Skip to content

Commit

Permalink
Also Pass Mode Bits in on Windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
felixhandte committed Apr 6, 2021
1 parent 7cabb22 commit 14167df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*-*************************************
Expand Down

0 comments on commit 14167df

Please sign in to comment.