This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fputs_unlocked warnings
- To: law at cygnus dot com
- Subject: Re: fputs_unlocked warnings
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Thu, 11 Mar 1999 09:37:10 -0500
- cc: egcs-patches at egcs dot cygnus dot com
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