On mingw, I'm seeing this compilation error:

$ make test-sys_select-c++.o
depbase=`echo test-sys_select-c++.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        g++-3 -mno-cygwin -DHAVE_CONFIG_H -I. -I..  -DGNULIB_STRICT_CHECKING=1 
-DIN_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib 
-I/usr/local/mingw/include -Wall   -MT test-sys_select-c++.o -MD -MP -MF 
$depbase.Tpo -c -o test-sys_select-c++.o test-sys_select-c++.cc &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from test-sys_select-c++.cc:22:
../gllib/sys/select.h:451: error: `close' was not declared in this scope
test-sys_select-c++.cc:34: warning: 'signature_check35' defined but not used
make: *** [test-sys_select-c++.o] Error 1

Apparently it was introduced on 2011-07-06.


This fixes it.


2011-10-03  Bruno Haible  <[email protected]>

        sys_select: Fix compilation error on mingw.
        * lib/sys_select.in.h: On native Windows, include <io.h>.

--- lib/sys_select.in.h.orig    Tue Oct  4 02:31:28 2011
+++ lib/sys_select.in.h Tue Oct  4 02:26:37 2011
@@ -95,11 +95,15 @@
 #  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
 

Reply via email to