From da61918c75bf2eb4519e3f12d21daebac5ba3311 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Tue, 6 Apr 2021 11:29:28 -0400 Subject: [PATCH] Also Pass Mode Bits in on Windows 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/fileio.c b/programs/fileio.c index 2b74feb85..5d7d40ddc 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -74,11 +74,12 @@ #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 /*-*************************************