summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-20 23:21:42 +0200
committerBruno Haible <bruno@clisp.org>2023-04-20 23:21:42 +0200
commitdd0a48f50a97ca1185c957b0846e715be7777bcb (patch)
tree196f96c02a3f149e31223a3146aeab16dc428ebd /tests
parent876ad6af66851d4e25bb8475e1cd1ec46680b703 (diff)
downloadgnulib-dd0a48f50a97ca1185c957b0846e715be7777bcb.tar.gz
getumask: Make it work on native Windows.
* lib/getumask.c (getumask): When TMPDIR is unset, try TMP and TEMP. * tests/test-getumask.c (ASSUME_UMASK_CONSTANT): Define to 1 on native Windows.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-getumask.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test-getumask.c b/tests/test-getumask.c
index 6ee50836bc..ab1e48ecd9 100644
--- a/tests/test-getumask.c
+++ b/tests/test-getumask.c
@@ -25,6 +25,11 @@ SIGNATURE_CHECK (getumask, mode_t, (void));
#include "macros.h"
+#if defined _WIN32 && !defined __CYGWIN__
+/* On native Windows, getumask() always returns 0111. */
+# define ASSUME_UMASK_CONSTANT 1
+#endif
+
int
main (void)
{