+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ Avoid namespace pollution on glibc systems.
+ * lib/spawn.in.h: Don't include <sched.h>, <signal.h> on glibc systems.
+ * lib/sys_times.in.h: Don't include <time.h> on glibc systems.
+ * lib/wchar.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> on
+ glibc systems.
+
2009-12-31 Bruno Haible <bruno@clisp.org>
* m4/wchar.m4 (gl_WCHAR_H): Remove gl_STDDEF_H invocation.
#ifndef _GL_SPAWN_H
#define _GL_SPAWN_H
-#include <sched.h>
-#include <signal.h>
+/* Get definitions of 'struct sched_param' and 'sigset_t'.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sched.h>
+# include <signal.h>
+#endif
+
#include <sys/types.h>
#ifndef __THROW
# define _GL_SYS_TIMES_H
-/* Get clock_t. */
-# include <time.h>
+/* Get clock_t.
+ But avoid namespace pollution on glibc systems. */
+# ifndef __GLIBC__
+# include <time.h>
+# endif
/* The definition of GL_LINK_WARNING is copied here. */
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
+ included before <wchar.h>.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
/* Include the original <wchar.h> if it exists.
Some builds of uClibc lack it. */