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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix <bits/mathcalls.h> __BEGIN_NAMESPACE_C99/__END_NAMESPACE_C99 pairing


On Wed, Feb 01, 2006 at 04:24:53PM +0100, Jakub Jelinek wrote:
> 2006-02-01  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* math/bits/mathcalls.h: Guard __END_NAMESPACE_C99 with the
> 	same #if condition as corresponding __BEGIN_NAMESPACE_C99.
> 	(scalb): Don't define only if __USE_ISOC99.

Forgot to add, I did some testing to see if similar problems aren't
elsewhere:
#!/bin/sh
for i in `rpm -ql glibc-headers`; do perl /usr/src/libc/scripts/begin-end-check.pl $i; done 2>&1 | grep -v OK
for i in `rpm -ql glibc-headers`; do
cat > /tmp/a.c <<EOF
#include <features.h>
#undef __BEGIN_DECLS
#undef __END_DECLS
#undef __BEGIN_NAMESPACE_STD
#undef __END_NAMESPACE_STD
#undef __BEGIN_NAMESPACE_C99
#undef __END_NAMESPACE_C99
#include <$i>
EOF
gcc -E /tmp/a.c -o /tmp/a.i > /dev/null 2>&1 || continue;
for flags in "" -D_GNU_SOURCE -D_ISOC99_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_SVID_SOURCE -D_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -ansi -D_POSIX_SOURCE -D_POSIX_C_SOURCE -D_POSIX_C_SOURCE=2 -D_POSIX_C_SOURCE=199309L -D_POSIX_C_SOURCE=199506L -D_POSIX_C_SOURCE=200112L; do
gcc $flags -E /tmp/a.c -o /tmp/a.i > /dev/null 2>&1;
perl /usr/src/libc/scripts/begin-end-check.pl /tmp/a.i | grep -v OK | sed "s~^~$i $flags: ~"
done
done

and math.h (plus tgmath.h that includes math.h) were the only 2 reported
headers.

	Jakub


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