Avoid namespace pollution on glibc systems.
authorBruno Haible <bruno@clisp.org>
Thu, 31 Dec 2009 21:54:32 +0000 (22:54 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 31 Dec 2009 21:54:32 +0000 (22:54 +0100)
ChangeLog
lib/spawn.in.h
lib/sys_times.in.h
lib/wchar.in.h

index a318caec77073282230826c5fc6495e714b4e348..b43a6e6d7caad72f0c978f2cc165ad936e3a7132 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index 3c42bfae5abd66d48037a74652db50b42d113722..5a7633c2f93f4cf3d9f6569fe2951f63471e3168 100644 (file)
 #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
index 31ab4ce37c594205c835d12f4a4fb59dd81ba35e..34aa281ee18ea48254e338ef6c9e504de4bea677 100644 (file)
 
 # 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.  */
 
index d7e798b4c2da378b2d0baa7a1fcd90587e449ed2..d58c2642d6998f3b969c822ed52458a35a884b30 100644 (file)
 /* 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.  */