]> git.pond.sub.org Git - empserver/commitdiff
(new): Switch permissions to standard defines instead of magic numbers
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 10 Mar 2007 19:23:44 +0000 (19:23 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 10 Mar 2007 19:23:44 +0000 (19:23 +0000)
to improve portability.

src/lib/commands/new.c

index 5a15376ae92914a6c5a28e0799eeb8bd80d114db..4f153db0458f10d708a822fb4bb483ccbb263acd 100644 (file)
@@ -37,6 +37,7 @@
 #if defined(_WIN32)
 #include <io.h>
 #endif
+#include <sys/stat.h>
 #if !defined(_WIN32)
 #include <unistd.h>
 #endif
@@ -152,7 +153,8 @@ new(void)
     natp->nat_level[NAT_TLEV] = start_technology;
     natp->nat_level[NAT_ELEV] = start_education;
     natp->nat_tgms = 0;
-    (void)close(open(mailbox(buf, num), O_RDWR | O_TRUNC | O_CREAT, 0660));
+    (void)close(open(mailbox(buf, num), O_RDWR | O_TRUNC | O_CREAT,
+               S_IRWUG));
     init_sanct(natp, x, y);
     init_sanct(natp, x + 2, y);
     putnat(natp);