This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: <signal.h> broken with _POSIX_SOURCE=1 defined
- To: Zack Weinberg <zack@rabi.columbia.edu>
- Subject: Re: <signal.h> broken with _POSIX_SOURCE=1 defined
- From: Zack Weinberg <zack@rabi.columbia.edu>
- Date: Tue, 03 Nov 1998 09:04:16 -0500
- cc: libc-hacker@cygnus.com
On Tue, 03 Nov 1998 08:08:07 -0500, Zack Weinberg wrote:
>
>As an experiment I wrote a simple test which just includes every
>single public header we provide with _GNU_SOURCE defined.
Followup: Doing the same thing with _POSIX_SOURCE instead produces
some spurious errors. They come from the internal prototypes in the
wrapper headers.
In file included from t-standards/all-headers.c:8:
../include/aio.h:5: warning: `struct aioinit' declared inside parameter list
../include/aio.h:5: warning: its scope is only this definition or declaration,
../include/aio.h:5: warning: which is probably not what you want.
In file included from t-standards/all-headers.c:137:
../include/search.h:13: parse error before `__free_fn_t'
../include/search.h:13: warning: function declaration isn't a prototype
In both cases the problem is that the internal protos expect a type
definition which is predicated on _GNU_SOURCE. That's safe when
building libc, but not when testing it.
The internal prototypes should all be shielded somehow. #ifdef _LIBC
would work except that if I don't define that for the tests then
features.h will go look for gnu/stubs.h which doesn't exist. Suggestions?
zw