This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


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

Re: <signal.h> broken with _POSIX_SOURCE=1 defined


On Tue, 3 Nov 1998 10:04:03 +0100, "Matthias Urlichs" wrote:
>Hi,
>
>Zack Weinberg:
>> >IMHO, we should have a testcase which does this for all legal values of
>> >_FOO_SOURCE (i.e. including "none" and "a few unlikely combinations") and
>> ><bar.h> (i.e. all except those in */bits/*).  
>> 
>> Anyone have an idea what would be a sensible subset?
>
>Maybe-not-THAT-stupid-idea: Randomize it -- include five randomly selected
>headers and zero to all randomly selected _FOO_SOURCE switches. Run that in
>the background on a few machines.

That might work.  I think AJ's approach is better though.

As an experiment I wrote a simple test which just includes every
single public header we provide with _GNU_SOURCE defined.  (except
db_185.h, regexp.h, and rpcsvc/*) That picks up a bunch of clashes
already.  Some of the errors make no sense at all -- the parse errors
are on perfectly acceptable-looking enums -- and some of the others
may be hard to fix.

Testcase on request.

zw

In file included from ../include/arpa/tftp.h:1,
                 from t-standards/all-headers.c:14:
../inet/arpa/tftp.h:51: warning: `ERROR' redefined
../inet/arpa/ftp.h:48: warning: this is the location of the previous definition
In file included from t-standards/all-headers.c:131:
../sysdeps/unix/sysv/linux/scsi/scsi.h:188: warning: `ABORT' redefined
../inet/arpa/telnet.h:59: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/scsi/scsi.h:190: warning: `NOP' redefined
../inet/arpa/telnet.h:56: warning: this is the location of the previous definition
In file included from t-standards/all-headers.c:209:
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:34: warning: `NGREG' redefined
../sysdeps/unix/sysv/linux/i386/sys/procfs.h:46: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:43: warning: `GS' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:35: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:45: warning: `FS' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:34: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:47: warning: `ES' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:33: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:49: warning: `DS' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:32: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:51: warning: `EDI' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:29: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:53: warning: `ESI' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:28: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:55: warning: `EBP' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:30: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:59: warning: `EBX' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:25: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:61: warning: `EDX' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:27: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:63: warning: `ECX' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:26: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:65: warning: `EAX' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:31: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:71: warning: `EIP' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:37: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:73: warning: `CS' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:38: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:75: warning: `EFL' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:39: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:77: warning: `UESP' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:40: warning: this is the location of the previous definition
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:79: warning: `SS' redefined
../sysdeps/unix/sysv/linux/i386/sys/reg.h:41: warning: this is the location of the previous definition
In file included from ../include/sys/vlimit.h:1,
                 from t-standards/all-headers.c:218:
../resource/sys/vlimit.h:58: warning: `INFINITY' redefined
../sysdeps/i386/fpu/bits/mathdef.h:36: warning: this is the location of the previous definition
In file included from t-standards/all-headers.c:93:
../sysdeps/unix/sysv/linux/netpacket/packet.h:24: redefinition of `struct sockaddr_ll'
../sysdeps/unix/sysv/linux/netpacket/packet.h:50: redefinition of `struct packet_mreq'
In file included from ../include/rpc/rpc_msg.h:1,
                 from ../sunrpc/rpc/rpc.h:54,
                 from ../include/rpc/rpc.h:1,
                 from ../sunrpc/rpc/key_prot.h:9,
                 from ../include/rpc/key_prot.h:1,
                 from t-standards/all-headers.c:118:
../sunrpc/rpc/rpc_msg.h:69: parse error before `0'
In file included from t-standards/all-headers.c:209:
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:31: conflicting types for `greg_t'
../sysdeps/unix/sysv/linux/i386/sys/procfs.h:43: previous declaration of `greg_t'
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:37: conflicting types for `gregset_t'
../sysdeps/unix/sysv/linux/i386/sys/procfs.h:44: previous declaration of `gregset_t'
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:42: parse error before `10'
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:58: parse error before `0'
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:70: parse error before `12'
../sysdeps/unix/sysv/linux/i386/sys/ucontext.h:83: conflicting types for `fpregset_t'
../sysdeps/unix/sysv/linux/i386/sys/procfs.h:45: previous declaration of `fpregset_t'


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