summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-04-11 11:11:57 +0300
committerEli Zaretskii <eliz@gnu.org>2014-04-11 11:11:57 +0300
commit95765a6ac3a02d60988bd9a4ad73f9d8154113da (patch)
tree21066d675874f305c807772703c3f92f559e9e41
parentfd492166113d8023d65b72b7db8b5d308bcc262d (diff)
downloademacs-95765a6ac3a02d60988bd9a4ad73f9d8154113da.tar.gz
src/w32.c (sys_umask) <WRITE_USER>: Remove redundant constant.
src/w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and use S_IWRITE instead.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/w32.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9d59ab1c97c..22f25bef6f3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-11 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
+ use S_IWRITE instead.
+
2014-04-11 Glenn Morris <rgm@gnu.org>
* keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
diff --git a/src/w32.c b/src/w32.c
index 8802e13e71d..0892f932bc2 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -5354,11 +5354,6 @@ utime (const char *name, struct utimbuf *times)
return 0;
}
-/* Emacs expects us to support the traditional octal form of the mode
- bits, which is not what msvcrt.dll wants. */
-
-#define WRITE_USER 00200
-
int
sys_umask (int mode)
{
@@ -5370,14 +5365,14 @@ sys_umask (int mode)
at all. */
/* FIXME: if the GROUP and OTHER bits are reset, we should use ACLs
to prevent access by other users on NTFS. */
- if ((mode & WRITE_USER) != 0)
+ if ((mode & S_IWRITE) != 0)
arg |= S_IWRITE;
retval = _umask (arg);
/* Merge into the return value the bits they've set the last time,
which msvcrt.dll ignores and never returns. Emacs insists on its
notion of mask being identical to what we return. */
- retval |= (current_mask & ~WRITE_USER);
+ retval |= (current_mask & ~S_IWRITE);
current_mask = mode;
return retval;