+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ Avoid future namespace pollution on glibc systems.
+ * lib/arpa_inet.in.h: Don't include <sys/socket.h> on glibc systems.
+ * lib/sys_ioctl.in.h: Don't include <unistd.h> on glibc systems.
+ * lib/sys_select.in.h: Don't include <sys/time.h> and <string.h> on
+ glibc systems.
+
2009-12-24 Bruno Haible <bruno@clisp.org>
Refactor common macros used in tests.
#ifndef _GL_ARPA_INET_H
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
- under MinGW. */
-#include <sys/socket.h>
+ under MinGW.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sys/socket.h>
+#endif
#if @HAVE_ARPA_INET_H@
#define _GL_SYS_IOCTL_H
/* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
- but not in <sys/ioctl.h>. */
-#include <unistd.h>
+ but not in <sys/ioctl.h>.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <unistd.h>
+#endif
/* The definition of GL_LINK_WARNING is copied here. */
# include <sys/types.h>
/* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
- of 'struct timeval', and no definition of this type. */
-# include <sys/time.h>
+ of 'struct timeval', and no definition of this type.
+ But avoid namespace pollution on glibc systems. */
+# ifndef __GLIBC__
+# include <sys/time.h>
+# endif
/* On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
- that relies on memset(), but without including <string.h>. */
-# include <string.h>
+ that relies on memset(), but without including <string.h>.
+ But avoid namespace pollution on glibc systems. */
+# ifndef __GLIBC__
+# include <string.h>
+# endif
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@