[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: split stdio-safer into fopen-safer, tmpfile-safer

From: Paul Eggert
Subject: Re: split stdio-safer into fopen-safer, tmpfile-safer
Date: Wed, 02 Aug 2006 00:37:29 -0400
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Eric Blake <address@hidden> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]