From 01972990f6045f7da03165940d532c270595ff67 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 31 Dec 2009 22:54:32 +0100 Subject: [PATCH] Avoid namespace pollution on glibc systems. --- ChangeLog | 8 ++++++++ lib/spawn.in.h | 9 +++++++-- lib/sys_times.in.h | 7 +++++-- lib/wchar.in.h | 11 +++++++---- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index a318caec77..b43a6e6d7c 100644 --- 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 index 3c42bfae5a..5a7633c2f9 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 31ab4ce37c..34aa281ee1 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 d7e798b4c2..d58c2642d6 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. */ -- 2.30.2