Re: [HACKERS] CVS tip problems

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: olly(at)lfix(dot)co(dot)uk, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] CVS tip problems
Date: 2004-06-07 22:39:23
Message-ID: 200406072239.i57MdNT08697@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


This patch fixes strerror_r() by checking the return type from
configure.

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> The code we have appears to assume that the result will always be placed
> >> in the user-supplied buffer, which is apparently NOT what the glibc
> >> version does.
>
> > What does "may, but need not, use the user-supplied buffer" supposed to
> > mean in practical terms. How do they expect us to use it?
>
> AFAICS they expect you to use the function's return value.
>
> The current PG code is really erroneous for *both* strerror_r specs,
> since the SUS-spec version doesn't promise to put anything into the
> buffer if it returns a failure code. I think you will have to write
> some autoconf code to detect which return type is provided, and do
> the right things with the return value in both cases.
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 5.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-07 22:45:07 Re: [HACKERS] CVS tip problems
Previous Message Thomas Hallgren 2004-06-07 22:08:30 Re: [HACKERS] dynamic_library_path on Win32

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-06-07 22:45:07 Re: [HACKERS] CVS tip problems
Previous Message Thomas Hallgren 2004-06-07 22:08:30 Re: [HACKERS] dynamic_library_path on Win32