# HG changeset patch # User Bruno Haible # Date 1286405535 -7200 # Node ID d06d8f66d2bd41f64641ed07529e101fc9f42f57 # Parent 1d8a613275c6dbfca61b0c5d9f4411c1e24ba100 string, sys_select: Avoid #including large headers unless necessary. * lib/string.in.h: Don't include except on NetBSD. * lib/sys_select.in.h: Don't include except on Solaris, OSF/1, BeOS, Haiku. Reported by Jim Meyering. diff -r 1d8a613275c6 -r d06d8f66d2bd ChangeLog --- a/ChangeLog Tue Oct 05 16:39:32 2010 -0600 +++ b/ChangeLog Thu Oct 07 00:52:15 2010 +0200 @@ -1,3 +1,11 @@ +2010-10-06 Bruno Haible + + string, sys_select: Avoid #including large headers unless necessary. + * lib/string.in.h: Don't include except on NetBSD. + * lib/sys_select.in.h: Don't include except on Solaris, + OSF/1, BeOS, Haiku. + Reported by Jim Meyering. + 2010-10-05 Eric Blake memmem, strstr, strcasestr: fix bug with long periodic needle diff -r 1d8a613275c6 -r d06d8f66d2bd lib/string.in.h --- a/lib/string.in.h Tue Oct 05 16:39:32 2010 -0600 +++ b/lib/string.in.h Thu Oct 07 00:52:15 2010 +0200 @@ -51,8 +51,8 @@ #endif /* NetBSD 5.0 declares strsignal in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) \ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ && ! defined __GLIBC__ # include #endif diff -r 1d8a613275c6 -r d06d8f66d2bd lib/sys_select.in.h --- a/lib/sys_select.in.h Tue Oct 05 16:39:32 2010 -0600 +++ b/lib/sys_select.in.h Thu Oct 07 00:52:15 2010 +0200 @@ -51,8 +51,9 @@ /* On Solaris 10, provides an FD_ZERO implementation that relies on memset(), but without including . - But avoid namespace pollution on glibc systems. */ -# ifndef __GLIBC__ + But in any case avoid namespace pollution on glibc systems. */ +# if (defined __sun || defined __osf__ || defined __BEOS__) \ + && ! defined __GLIBC__ # include # endif