bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fopen: Fix link error on native Windows


From: Bruno Haible
Subject: fopen: Fix link error on native Windows
Date: Sun, 08 Aug 2021 18:54:43 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; )

A testdir for module 'fopen', when compiled on mingw, gives these link
errors:

x86_64-w64-mingw32-gcc  -Wno-error -g -O2  -L/usr/local/mingw64/lib -o 
test-fgetc.exe test-fgetc.o libtests.a ../gllib/libgnu.a libtests.a 
../gllib/libgnu.a libtests.a  
../gllib/libgnu.a(fopen.o): In function `rpl_fopen':
/home/bruno/testdir5/build-mingw64/fopen/gllib/../../../fopen/gllib/fopen.c:186:
 undefined reference to `close_used_without_requesting_gnulib_module_close'
/home/bruno/testdir5/build-mingw64/fopen/gllib/../../../fopen/gllib/fopen.c:199:
 undefined reference to `close_used_without_requesting_gnulib_module_close'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:2529: test-fgetc.exe] Error 1

This patch fixes it.


2021-08-08  Bruno Haible  <bruno@clisp.org>

        fopen: Fix link error on native Windows.
        * modules/fopen (Depends-on): Add close.

diff --git a/modules/fopen b/modules/fopen
index e672cd5..da216c9 100644
--- a/modules/fopen
+++ b/modules/fopen
@@ -11,6 +11,7 @@ largefile
 fcntl-h         [test $REPLACE_FOPEN = 1]
 stdbool         [test $REPLACE_FOPEN = 1]
 unistd          [test $REPLACE_FOPEN = 1]
+close           [test $REPLACE_FOPEN = 1]
 fstat           [test $REPLACE_FOPEN = 1]
 
 configure.ac:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]