Remove macro S_IRWUG

Use its expansion instead.
This commit is contained in:
Markus Armbruster 2009-04-13 17:27:08 +02:00
parent 1c08ccf25b
commit c665c83ba4
5 changed files with 8 additions and 9 deletions

View file

@ -42,10 +42,6 @@
#include "w32misc.h"
#endif /* _WIN32 */
#ifndef S_IRWUG
#define S_IRWUG S_IRGRP | S_IWGRP | S_IRUSR | S_IWUSR
#endif
#ifdef __GNUC__
#define ATTRIBUTE(attrs) __attribute__ (attrs)
#else

View file

@ -87,7 +87,8 @@ ef_open(int type, int how, int nelt)
#if defined(_WIN32)
oflags |= O_BINARY;
#endif
if ((fd = open(ep->file, oflags, S_IRWUG)) < 0) {
fd = open(ep->file, oflags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (fd < 0) {
logerror("Can't open %s (%s)", ep->file, strerror(errno));
return 0;
}

View file

@ -69,7 +69,8 @@ logopen(void)
{
int fd;
fd = open(logfile, O_WRONLY | O_CREAT | O_APPEND, S_IRWUG);
fd = open(logfile, O_WRONLY | O_CREAT | O_APPEND,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (fd < 0)
logerror("Can't open %s (%s)", logfile, strerror(errno));
return fd;

View file

@ -91,7 +91,8 @@ nat_reset(struct natstr *natp, enum nat_status stat, coord x, coord y)
natp->nat_update = 0;
natp->nat_tgms = 0;
close(creat(mailbox(buf, natp->nat_cnum), S_IRWUG));
close(creat(mailbox(buf, natp->nat_cnum),
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
natp->nat_ann = 0; /* FIXME number of annos */
natp->nat_btu = stat == STAT_SANCT ? max_btus : 0;

View file

@ -176,9 +176,9 @@ main(int argc, char *argv[])
}
for (i = 0; i < MAXNOC; i++) {
filename = mailbox(buf, i);
close(creat(filename, S_IRWUG));
close(creat(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
}
close(creat(annfil, S_IRWUG));
close(creat(annfil, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
/* create a zero-filled sector file */
memset(&sct, 0, sizeof(sct));