Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Date: 2003-09-01 21:11:04
Message-ID: 11283.1062450664@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-01 21:15:19 Re: array constructor can't construct empty array
Previous Message Larry Rosenman 2003-09-01 21:03:17 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)