# HG changeset patch # User Bruno Haible # Date 1261687564 -3600 # Node ID e2d59f164e76b286105c6fa5d5ed433f7832c6f7 # Parent a48d3d749ca54fa49f5af564975a294b82ca0b24 Avoid future namespace pollution on glibc systems. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-12-24 Bruno Haible + + Avoid future namespace pollution on glibc systems. + * lib/arpa_inet.in.h: Don't include on glibc systems. + * lib/sys_ioctl.in.h: Don't include on glibc systems. + * lib/sys_select.in.h: Don't include and on + glibc systems. + 2009-12-24 Bruno Haible Refactor common macros used in tests. diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h --- a/lib/arpa_inet.in.h +++ b/lib/arpa_inet.in.h @@ -19,8 +19,11 @@ #ifndef _GL_ARPA_INET_H /* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc - under MinGW. */ -#include + under MinGW. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif #if @HAVE_ARPA_INET_H@ diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h --- a/lib/sys_ioctl.in.h +++ b/lib/sys_ioctl.in.h @@ -30,8 +30,11 @@ #define _GL_SYS_IOCTL_H /* AIX 5.1 and Solaris 10 declare ioctl() in and in , - but not in . */ -#include + but not in . + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif /* The definition of GL_LINK_WARNING is copied here. */ diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -42,12 +42,18 @@ # include /* On OSF/1 4.0, provides only a forward declaration - of 'struct timeval', and no definition of this type. */ -# include + of 'struct timeval', and no definition of this type. + But avoid namespace pollution on glibc systems. */ +# ifndef __GLIBC__ +# include +# endif /* On Solaris 10, provides an FD_ZERO implementation - that relies on memset(), but without including . */ -# include + that relies on memset(), but without including . + But avoid namespace pollution on glibc systems. */ +# ifndef __GLIBC__ +# include +# endif /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@