# HG changeset patch # User Bruno Haible # Date 1262296472 -3600 # Node ID efe1df275da6b70bcce8d4a41cf1a70a13874ea4 # Parent 6d50d2a81c7db85b86139717b0d9c10833a7ee1c Avoid namespace pollution on glibc systems. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +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. diff --git a/lib/spawn.in.h b/lib/spawn.in.h --- 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 --- 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 --- 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. */