Building a testdir for module 'posixtm' on mingw and MSVC, I see this
link error:
../../gltests/test-posixtm.c: In function ‘main’:
../../gltests/test-posixtm.c:162:11: warning: implicit declaration of function
‘stpcpy’ [-Wimplicit-function-declaration]
162 | stpcpy (stpcpy (tmp_buf, curr_year_str), T[i].in);
| ^~~~~~
../../gltests/test-posixtm.c:162:11: warning: incompatible implicit declaration
of built-in function ‘stpcpy’ [-Wbuiltin-declaration-mismatch]
mv -f .deps/test-posixtm.Tpo .deps/test-posixtm.Po
x86_64-w64-mingw32-gcc -Wno-error -g -O2 -L/usr/local/mingw64/lib -o
test-posixtm.exe test-posixtm.o libtests.a ../gllib/libgnu.a libtests.a
../gllib/libgnu.a libtests.a
/usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld:
test-posixtm.o: in function `main':
/home/bruno/testdir1/build-mingw64/gltests/../../gltests/test-posixtm.c:162:
undefined reference to `stpcpy'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1646: test-posixtm.exe] Error 1
This patch fixes it.
2023-04-20 Bruno Haible <[email protected]>
posixtm tests: Fix link error.
* modules/posixtm-tests (Depends-on): Add stpcpy.
diff --git a/modules/posixtm-tests b/modules/posixtm-tests
index 7f5ada5593..de5a84a333 100644
--- a/modules/posixtm-tests
+++ b/modules/posixtm-tests
@@ -6,6 +6,7 @@ Depends-on:
intprops
setenv
stdint
+stpcpy
strftime
configure.ac: