* lib/string.in.h: Don't include <unistd.h> except on NetBSD.
* lib/sys_select.in.h: Don't include <string.h> except on Solaris,
OSF/1, BeOS, Haiku.
Reported by Jim Meyering.
+2010-10-06 Bruno Haible <bruno@clisp.org>
+
+ string, sys_select: Avoid #including large headers unless necessary.
+ * lib/string.in.h: Don't include <unistd.h> except on NetBSD.
+ * lib/sys_select.in.h: Don't include <string.h> except on Solaris,
+ OSF/1, BeOS, Haiku.
+ Reported by Jim Meyering.
+
2010-10-05 Eric Blake <eblake@redhat.com>
memmem, strstr, strcasestr: fix bug with long periodic needle
#endif
/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */
-/* 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 <unistd.h>
#endif
/* On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
that relies on memset(), but without including <string.h>.
- 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 <string.h>
# endif