sys_select: Fix compilation error on mingw.
authorBruno Haible <bruno@clisp.org>
Tue, 4 Oct 2011 00:32:48 +0000 (02:32 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 4 Oct 2011 00:32:48 +0000 (02:32 +0200)
* lib/sys_select.in.h: On native Windows, include <io.h>.

ChangeLog
lib/sys_select.in.h

index 668add3..3df0838 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-10-03  Bruno Haible  <bruno@clisp.org>
 
+       sys_select: Fix compilation error on mingw.
+       * lib/sys_select.in.h: On native Windows, include <io.h>.
+
+2011-10-03  Bruno Haible  <bruno@clisp.org>
+
        wmemset: Support for MSVC.
        * m4/wmemset.m4 (gl_FUNC_WMEMSET): Use a small test program to test
        whether wmemset() exists.
index 7d43c27..397508a 100644 (file)
 #  include <string.h>
 # endif
 /* On native Windows platforms:
-   Get the 'fd_set' type.  */
-# if @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
-#  define _GL_INCLUDING_WINSOCK2_H
-#  include <winsock2.h>
-#  undef _GL_INCLUDING_WINSOCK2_H
+   Get the 'fd_set' type.
+   Get the close() declaration before we override it.  */
+# if @HAVE_WINSOCK2_H@
+#  if !defined _GL_INCLUDING_WINSOCK2_H
+#   define _GL_INCLUDING_WINSOCK2_H
+#   include <winsock2.h>
+#   undef _GL_INCLUDING_WINSOCK2_H
+#  endif
+#  include <io.h>
 # endif
 #endif