]> 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>
Thu, 20 Apr 2023 00:29:26 +0000 (02:29 +0200)
* modules/chown-tests (configure.ac): Test whether getgid() exists.
* modules/fchownat-tests (configure.ac): Likewise.
* tests/test-chown.h (getgid): Define a fallback.

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

index fbc18124895916072e29a5d56407f56d38b64e9e..639f3e2923eb0bac248de69fa6735b7d3958ff7b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
index 1fa6e44bc79bdcb21ca7cd6a6876c364fe7ad594..d013be17e7245f656e6c4f8d372949db93f9553d 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 f498efaf667981eeed665fb20491ef14c7c135e5..f11d02cddec7378a2c628968171899156044f3c0 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 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