]> Savannah Git Hosting - gnulib.git/commitdiff
chown tests: Fix link error on mingw 10.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Apr 2023 00:29:26 +0000 (02:29 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2023 01:51:48 +0000 (03:51 +0200)
* modules/chown-tests (configure.ac): Test whether getgid() exists.
* modules/lchown-tests (configure.ac): Likewise.
* modules/fchownat-tests (configure.ac): Likewise.
* tests/test-chown.h (getgid): Define a fallback.
* tests/test-lchown.h (getgid): Likewise.

ChangeLog
modules/chown-tests
modules/fchownat-tests
modules/lchown-tests
tests/test-chown.h
tests/test-lchown.h

index 0751af3fa5945d52341f65b3fce62f9b6ab1660e..5c6ca2dea36b30fed3fa83c382b1846514386d34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-04-19  Bruno Haible  <bruno@clisp.org>
+
+       chown, lchown tests: Fix link error on mingw 10.
+       * modules/chown-tests (configure.ac): Test whether getgid() exists.
+       * modules/lchown-tests (configure.ac): Likewise.
+       * modules/fchownat-tests (configure.ac): Likewise.
+       * tests/test-chown.h (getgid): Define a fallback.
+       * tests/test-lchown.h (getgid): Likewise.
+
 2023-04-19  Bruno Haible  <bruno@clisp.org>
 
        ctime: Fix compilation errors in C++ mode on mingw 10.
index 1bd674406756a9b44ee791f29de064b4357c33f7..b12a0d6a18256c7ea11d7b06660a6843a87bfb4d 100644 (file)
@@ -16,7 +16,7 @@ stdckdint
 symlink
 
 configure.ac:
-AC_CHECK_FUNCS_ONCE([getegid])
+AC_CHECK_FUNCS_ONCE([getgid getegid])
 
 Makefile.am:
 TESTS += test-chown
index f0e4cea78cffd36e40d41696a46742ca12811f25..31b5b9f5a72cb5619f48228d90614f8646979111 100644 (file)
@@ -17,7 +17,7 @@ stdckdint
 symlink
 
 configure.ac:
-AC_CHECK_FUNCS_ONCE([getegid])
+AC_CHECK_FUNCS_ONCE([getgid getegid])
 
 Makefile.am:
 TESTS += test-fchownat
index edd0cc7c21fc63855d0a81b020e3cdd1f8f5c7ca..56c01082abe5ea24b6f4b766bb26d676bd691b0e 100644 (file)
@@ -16,7 +16,7 @@ stdbool
 symlink
 
 configure.ac:
-AC_CHECK_FUNCS_ONCE([getegid])
+AC_CHECK_FUNCS_ONCE([getgid getegid])
 
 Makefile.am:
 TESTS += test-lchown
index 4c7b6eec33fd2206a404daa05227ca2f381e72f1..4e3d417d1bb6b26eff9383f17217b5550744651a 100644 (file)
 
 #include "nap.h"
 
+#if !HAVE_GETGID
+# define getgid() ((gid_t) -1)
+#endif
+
 #if !HAVE_GETEGID
 # define getegid() ((gid_t) -1)
 #endif
index 1c68f4a1bad4823b04ad3e7559b37af82877c301..3f5d0bc54c2ebde2e3ba4dbb9434eca4535e3d47 100644 (file)
 
 #include "nap.h"
 
+#if !HAVE_GETGID
+# define getgid() ((gid_t) -1)
+#endif
+
 #if !HAVE_GETEGID
 # define getegid() ((gid_t) -1)
 #endif