Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <gsstark@mit.edu>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgresql.org
Date: 2003-09-01T21:11:04Z
Lists: pgsql-hackers
Greg Stark <gsstark@mit.edu> writes: > On the other hand, things like, getpwnam, strtok, etc have non-thread-safe > APIs. They can never be made thread-safe. The *_r versions of these functions > are standardized and required. If they don't exist then the platform simply > does not support threads. This statement is simply false. A platform can build thread-safe versions of those "unsafe" APIs if it makes the return values point to thread-local storage. Some BSDs do it that way. Accordingly, any simplistic "we must have _r to be thread-safe" approach is incorrect. regards, tom lane