From: Bruno Haible Date: Thu, 31 Dec 2009 21:54:32 +0000 (+0100) Subject: Avoid namespace pollution on glibc systems. X-Git-Tag: v0.1~4939 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=01972990f6045f7da03165940d532c270595ff67;p=gnulib.git Avoid namespace pollution on glibc systems. --- diff --git a/ChangeLog b/ChangeLog index a318caec7..b43a6e6d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-12-31 Bruno Haible + Avoid namespace pollution on glibc systems. + * lib/spawn.in.h: Don't include , on glibc systems. + * lib/sys_times.in.h: Don't include on glibc systems. + * lib/wchar.in.h: Don't include , , on + glibc systems. + +2009-12-31 Bruno Haible + * m4/wchar.m4 (gl_WCHAR_H): Remove gl_STDDEF_H invocation. (gl_REPLACE_WCHAR_H): Turn into a no-op. * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Likewise. diff --git a/lib/spawn.in.h b/lib/spawn.in.h index 3c42bfae5..5a7633c2f 100644 --- a/lib/spawn.in.h +++ b/lib/spawn.in.h @@ -29,8 +29,13 @@ #ifndef _GL_SPAWN_H #define _GL_SPAWN_H -#include -#include +/* Get definitions of 'struct sched_param' and 'sigset_t'. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +# include +#endif + #include #ifndef __THROW diff --git a/lib/sys_times.in.h b/lib/sys_times.in.h index 31ab4ce37..34aa281ee 100644 --- a/lib/sys_times.in.h +++ b/lib/sys_times.in.h @@ -32,8 +32,11 @@ # define _GL_SYS_TIMES_H -/* Get clock_t. */ -# include +/* Get clock_t. + But avoid namespace pollution on glibc systems. */ +# ifndef __GLIBC__ +# include +# endif /* The definition of GL_LINK_WARNING is copied here. */ diff --git a/lib/wchar.in.h b/lib/wchar.in.h index d7e798b4c..d58c2642d 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -55,10 +55,13 @@ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include + included before . + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +# include +# include +#endif /* Include the original if it exists. Some builds of uClibc lack it. */