diff lib/sys_select.in.h @ 15328:c7ae1577bd26

sys_select: don't depend on sys_socket This is so that Emacs doesn't have to drag in m4/sockpfaf.m4 etc; see <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00358.html>. This fix works on GNU and GNU-like platforms, but has not been tested on native Windows. * lib/sys_select.in.h: Include <sys/socket.h> only if native Windows. * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Do not require gl_HEADER_SYS_SOCKET. * modules/sys_select (Files): Add m4/sys_socket_h.m4, for gl_PREREQ_SYS_H_WINSOCK2.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 30 Jun 2011 10:58:24 -0700
parents a2e884bebbb5
children e121c7cef4a9
line wrap: on
line diff
--- a/lib/sys_select.in.h	Wed Jun 29 17:05:08 2011 -0600
+++ b/lib/sys_select.in.h	Thu Jun 30 10:58:24 2011 -0700
@@ -80,7 +80,9 @@
 /* On native Windows platforms:
    Get the 'fd_set' type.  Also, gnulib's <sys/socket.h> redefines select
    so as to hide the declaration from <winsock2.h>.  */
-# include <sys/socket.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#  include <sys/socket.h>
+# endif
 #endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */