In a gnulib testdir for the modules
  accept accept4 fcntl socket
I'm seeing this compilation error on mingw:

gcc-3 -mno-cygwin  -g -O2  -L/usr/local/mingw/lib -o test-fcntl.exe 
test-fcntl.o libtests.a ../gllib/libgnu.a libtests.a  
../gllib/libgnu.a(fcntl.o): In function `dupfd':
/home/bruno/multibuild-1627/mingw2009/testdir1/gllib/fcntl.c:136: undefined 
reference to `_close_used_without_requesting_gnulib_module_close'
collect2: ld returned 1 exit status
make[4]: *** [test-fcntl.exe] Error 1

Since the file descriptors being closed can be copies of a socket handle,
just "#undef close" will not be enough. We need the 'close' module here.


2012-01-28  Bruno Haible  <br...@clisp.org>

        fcntl: Avoid compilation error on native Windows.
        * modules/fcntl (Depends-on): Add 'close'.

--- modules/fcntl.orig  Sat Jan 28 13:03:06 2012
+++ modules/fcntl       Sat Jan 28 13:00:10 2012
@@ -8,6 +8,7 @@
 Depends-on:
 fcntl-h
 extensions
+close           [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]
 dup2            [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]
 getdtablesize   [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]
 msvc-nothrow    [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]


Reply via email to