Use its expansion instead.
#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
#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;
}
{
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;
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;
}
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));