bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* fopen: Fix link error on native Windows
@ 2021-08-08 16:54 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2021-08-08 16:54 UTC (permalink / raw
  To: bug-gnulib

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:



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-08 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-08 16:54 fopen: Fix link error on native Windows Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).