Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

In response to

Responses

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group