mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-12-07 05:14:28 +00:00
Eggert mods
SCCS-file: zic.c SCCS-SID: 7.102
This commit is contained in:
committed by
Paul Eggert
parent
58dbd6ba5a
commit
1aba97eb08
16
zic.c
16
zic.c
@ -7,9 +7,15 @@ static char elsieid[] = "%W%";
|
||||
#include "private.h"
|
||||
#include "locale.h"
|
||||
#include "tzfile.h"
|
||||
#ifdef unix
|
||||
#include "sys/stat.h" /* for umask manifest constants */
|
||||
#endif /* defined unix */
|
||||
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include "sys/stat.h"
|
||||
#endif
|
||||
#ifdef S_IRUSR
|
||||
#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
|
||||
#else
|
||||
#define MKDIR_UMASK 0755
|
||||
#endif
|
||||
|
||||
/*
|
||||
** On some ancient hosts, predicates like `isspace(C)' are defined
|
||||
@ -613,7 +619,7 @@ const char * const tofile;
|
||||
(void) exit(EXIT_FAILURE);
|
||||
|
||||
result = link(fromname, toname);
|
||||
#if (HAVE_SYMLINK - 0)
|
||||
#if (HAVE_SYMLINK - 0)
|
||||
if (result != 0) {
|
||||
const char *s = tofile;
|
||||
register char * symlinkcontents = NULL;
|
||||
@ -2187,7 +2193,7 @@ char * const argname;
|
||||
** created by some other multiprocessor, so we get
|
||||
** to do extra checking.
|
||||
*/
|
||||
if (mkdir(name, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0) {
|
||||
if (mkdir(name, MKDIR_UMASK) != 0) {
|
||||
const char *e = strerror(errno);
|
||||
|
||||
if (errno != EEXIST || !itsdir(name)) {
|
||||
|
||||
Reference in New Issue
Block a user