]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Also Pass Mode Bits in on Windows
authorW. Felix Handte <w@felixhandte.com>
Tue, 6 Apr 2021 15:29:28 +0000 (11:29 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 5 May 2021 17:10:34 +0000 (13:10 -0400)
I think in some unix emulation environments on Windows, (cygwin?) mode bits
are somehow respected. So we might as well pass them in. Can't hurt.

programs/fileio.c

index 2b74feb855dece3cc210c72f676b3ec0b5534d87..5d7d40ddcc25667ea0579d80f370d90b035a95e3 100644 (file)
 
 #define FNSPACE 30
 
-#if !defined(_WIN32)
 /* Default file permissions 0666 (modulated by umask) */
+#if !defined(_WIN32)
+/* These macros aren't defined on windows. */
 #define DEFAULT_FILE_PERMISSIONS (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
 #else
-#define DEFAULT_FILE_PERMISSIONS (0)
+#define DEFAULT_FILE_PERMISSIONS (0666)
 #endif
 
 /*-*************************************