summaryrefslogtreecommitdiff
path: root/lib/sys_select.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-30 10:58:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-30 10:58:39 -0700
commit18c7880d06e42284d765ef2cb7be4019fdcd9281 (patch)
tree5eac1eae190a6b859317bceb36f19b645ca67281 /lib/sys_select.in.h
parent7269b35c8d9be1a6f97906b9e29b8c422b92fc31 (diff)
downloadgnulib-18c7880d06e42284d765ef2cb7be4019fdcd9281.tar.gz
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.
Diffstat (limited to 'lib/sys_select.in.h')
-rw-r--r--lib/sys_select.in.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index d6d8c7be46..ef4c6f3cf6 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -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. */