Re: CVS tip problems - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CVS tip problems
Date
Msg-id 14191.1086055804@sss.pgh.pa.us
Whole thread Raw
In response to Re: CVS tip problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Converting postgresql.conf parameters to kilobytes
Next
From: Claudio Natoli
Date:
Subject: Re: Can't detect time zone