Eric Blake <[EMAIL PROTECTED]> writes: > Should the extensions module be extended to check for and define > _POSIX_SOURCE, to coax the compiler into admitting that fdopen > exists?
I'd be inclined to say "no". Defining _POSIX_SOURCE tends to cause more problems than it cures, because it can disable useful extensions. For example, with Solaris 10 /usr/ucb/cc, it disables SA_RESTART in <signal.h>. Instead, we should advise users not to use /usr/ucb/cc on Solaris. I know of no reason to use that compiler (other than to generate bogus bug reports :-). Anybody who has a working /usr/ucb/cc in a Solaris setup has a working C compiler in some other location (typically /opt/SUNWspro/bin/cc) and should simply use that compiler. Perhaps we could write a gnulib module that detects the mistake of someone attempting to use /usr/ucb/cc on Solaris. > Also, why is extensions.m4 doing this? Should it be using #ifdef instead? > #ifndef __EXTENSIONS__ > # undef __EXTENSIONS__ > #endif No, that's just the template. The undef gets replaced by a define, if __EXTENSIONS__ is needed. It gets left alone otherwise, so it's a noop in that case.