Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Lee Kindness <lkindness@csl.co.uk>
From: Lee Kindness <lkindness@csl.co.uk>
To: Bruce Momjian <pgman@candle.pha.pa.us>, Kurt Roeckx <Q@ping.be>, Peter Eisentraut <peter_e@gmx.net>, "Marc G. Fournier" <scrappy@hub.org>, Larry Rosenman <ler@lerctr.org>, Tom Lane <tgl@sss.pgh.pa.us>, "Marc G. Fournier" <scrappy@postgresql.org>, Greg Stark <gsstark@mit.edu>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Cc: Lee Kindness <lkindness@csl.co.uk>
Date: 2003-09-01T17:26:17Z
Lists: pgsql-hackers
Guys, too much thought is being spent on this... 1. For the _r functions we "need" we should ALWAYS use them if the system we are building on has them - they WILL be thread-safe. 2. If the system is missing a _r function then we implement a wrapper to call the normal non-_r version. However we do NOT make this wrapper call thread-safe - we assume the non-_r version already is. Together both steps ensure the code calling the _r function is readable (just one function signature) and that libpq will be thread-safe if the system C library is thread-safe. So this will catch all modern UNIX OSs. We really don't want to go deeper than this - of we do so we're wasting time on odd-ball systems that aren't thread-safe anyway - so for them libpq's thread-safety is of no consequence. L.