diff options
author | Bruno Haible <bruno@clisp.org> | 2023-04-20 02:29:26 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-04-20 02:29:26 +0200 |
commit | b3774862952b27e3513b3ef82414d56bcae3b665 (patch) | |
tree | de8223564761f2428fb5835f415f6bb192669e59 | |
parent | 57d2a227e2ef996dd493822ab5ad54f3e712a3b1 (diff) | |
download | gnulib-b3774862952b27e3513b3ef82414d56bcae3b665.tar.gz |
chown tests: Fix link error on mingw 10.
* modules/chown-tests (configure.ac): Test whether getgid() exists.
* modules/fchownat-tests (configure.ac): Likewise.
* tests/test-chown.h (getgid): Define a fallback.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | modules/chown-tests | 2 | ||||
-rw-r--r-- | modules/fchownat-tests | 2 | ||||
-rw-r--r-- | tests/test-chown.h | 4 |
4 files changed, 13 insertions, 2 deletions
@@ -1,5 +1,12 @@ 2023-04-19 Bruno Haible <bruno@clisp.org> + chown tests: Fix link error on mingw 10. + * modules/chown-tests (configure.ac): Test whether getgid() exists. + * modules/fchownat-tests (configure.ac): Likewise. + * tests/test-chown.h (getgid): Define a fallback. + +2023-04-19 Bruno Haible <bruno@clisp.org> + ctime: Fix compilation errors in C++ mode on mingw 10. * lib/c++defs.h (_GL_FUNCDECL_RPL): Add a comment. * lib/time.in.h (ctime): Don't use _GL_ATTRIBUTE_DEPRECATED before diff --git a/modules/chown-tests b/modules/chown-tests index 1fa6e44bc7..d013be17e7 100644 --- a/modules/chown-tests +++ b/modules/chown-tests @@ -16,7 +16,7 @@ stdckdint symlink configure.ac: -AC_CHECK_FUNCS_ONCE([getegid]) +AC_CHECK_FUNCS_ONCE([getgid getegid]) Makefile.am: TESTS += test-chown diff --git a/modules/fchownat-tests b/modules/fchownat-tests index f498efaf66..f11d02cdde 100644 --- a/modules/fchownat-tests +++ b/modules/fchownat-tests @@ -17,7 +17,7 @@ stdckdint symlink configure.ac: -AC_CHECK_FUNCS_ONCE([getegid]) +AC_CHECK_FUNCS_ONCE([getgid getegid]) Makefile.am: TESTS += test-fchownat diff --git a/tests/test-chown.h b/tests/test-chown.h index 4c7b6eec33..4e3d417d1b 100644 --- a/tests/test-chown.h +++ b/tests/test-chown.h @@ -18,6 +18,10 @@ #include "nap.h" +#if !HAVE_GETGID +# define getgid() ((gid_t) -1) +#endif + #if !HAVE_GETEGID # define getegid() ((gid_t) -1) #endif |