Yoann Vandoorselaere <[EMAIL PROTECTED]> writes: > Using -pthread allow option like -D_REENTRANT to be defined when > compiling Gnulib, which sound like a requirement if the program using > Gnulib is multithreaded.
Why do you feel a need to use -D_REENTRANT? When I looked into it recently, I decided to remove -D_REENTRANT from gnutls because it didn't seem like it was needed anymore. glibc manual: -- Macro: _REENTRANT -- Macro: _THREAD_SAFE If you define one of these macros, reentrant versions of several functions get declared. Some of the functions are specified in POSIX.1c but many others are only available on a few other systems or are unique to GNU libc. The problem is the delay in the standardization of the thread safe C library interface. Looking into my /usr/include, I could only find that it matters for getlogin_r*. I know debian has a policy to add _REENTRANT but their justification seem to have been linux-threads. I don't know if it is needed any more. If someone could shred any light why you really would want to use _REENTRANT, that would be helpful. /Simon