This is the mail archive of the gcc-patches@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: fputs_unlocked warnings


On Thu, 11 Mar 1999 00:34:24 -0700, Jeffrey A Law wrote:
>
>  In message <199903101657.LAA20927@blastula.phys.columbia.edu>you write:
>  > 
>  > We use fputs_unlocked if we detect it in the library.  It's a GNU
>  > extension and the glibc2.1 stdio.h doesn't prototype it unless you
>  > define _GNU_SOURCE.  This produces 81 warnings like this:
[...]
>How about using the NEED_DECLARATION_blah support in autoconf?
>
>You add fputs_unlocked to the right line in configure.in, autoconf will
>define NEED_DECLARATION_FPUTS_UNLOCKED if the declaration is missing.
[...]
>That way we're not actually dependent on GNU_SOURCE.  hpux for example 
>suffers from the same kind of problem, except you have to define a different
>macro to get the declaration (like HPUX_SOURCE or something like that).

I'd rather get the prototype from the headers if possible, just for
aesthetic reasons.  On the other hand trying to figure out what
magic macro to define on what system is probably worse, and I am
worried about all the cruft that `enable extensions' magic macros tend
to pull in.

zw


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