This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to handle *_unlocked when they're wrapped by _REENTRANT



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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]