This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to handle *_unlocked when they're wrapped by _REENTRANT
- To: Marc dot Espie at liafa1 dot liafa dot jussieu dot fr
- Subject: Re: How to handle *_unlocked when they're wrapped by _REENTRANT
- From: Joe Buck <jbuck at Synopsys dot COM>
- Date: Mon, 11 Jan 99 12:59:46 PST
- Cc: drepper at cygnus dot com, egcs at egcs dot cygnus dot com
Ulrich wrote:
> >Maybe it's even desirable to enable the _unlocked function only for
> >glibc 2. I.e., protect the definitions of the HAVE_* macros in
> >system.h with #if __GLIBC__ >= 2.
Marc Espie writes:
> No, some other systems are moving in the direction of thread-safe code,
> while not using GLIBC at all (FreeBSD, OpenBSD...)
>
> I think it's better to disable it for broken systems, rather than
> special-code the right behavior for Linux and fuck the rest of the free
> world...
I'm sure Ulrich didn't intend favoritism or "fucking" anyone, however, his
proposal was a step down the path we got off of with autoconf: we never
detect OS versions, we detect features, because it's unsafe otherwise. If
glibc has a nice feature the BSD folks might copy it or vice versa,
therefore we must never do #ifdef Linux or #ifdef GLIBC or #ifdef BSD.