From: Bruno Haible Date: Thu, 24 Dec 2009 20:46:04 +0000 (+0100) Subject: Avoid future namespace pollution on glibc systems. X-Git-Tag: v0.1~4990 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=78389bd8fa1da105fb322b93e1a1cc6e5bceb9a0;p=gnulib.git Avoid future namespace pollution on glibc systems. --- diff --git a/ChangeLog b/ChangeLog index 98ea48cce..72c649f2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 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. * tests/macros.h: New file. * tests/test-areadlink.c: Include macros.h. Don't include diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h index 296562920..18ff65c41 100644 --- 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 index dfcb54e1a..f7f6a7e76 100644 --- 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 index 1fb2d946f..3a20473e0 100644 --- 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@