* 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>
- chown tests: Fix link error on mingw 10.
+ 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>
symlink
configure.ac:
-AC_CHECK_FUNCS_ONCE([getegid])
+AC_CHECK_FUNCS_ONCE([getgid getegid])
Makefile.am:
TESTS += test-lchown
#include "nap.h"
+#if !HAVE_GETGID
+# define getgid() ((gid_t) -1)
+#endif
+
#if !HAVE_GETEGID
# define getegid() ((gid_t) -1)
#endif