mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-12-07 09:44:27 +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 "private.h"
|
||||||
#include "locale.h"
|
#include "locale.h"
|
||||||
#include "tzfile.h"
|
#include "tzfile.h"
|
||||||
#ifdef unix
|
|
||||||
#include "sys/stat.h" /* for umask manifest constants */
|
#if HAVE_SYS_STAT_H
|
||||||
#endif /* defined unix */
|
#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
|
** On some ancient hosts, predicates like `isspace(C)' are defined
|
||||||
@ -613,7 +619,7 @@ const char * const tofile;
|
|||||||
(void) exit(EXIT_FAILURE);
|
(void) exit(EXIT_FAILURE);
|
||||||
|
|
||||||
result = link(fromname, toname);
|
result = link(fromname, toname);
|
||||||
#if (HAVE_SYMLINK - 0)
|
#if (HAVE_SYMLINK - 0)
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
const char *s = tofile;
|
const char *s = tofile;
|
||||||
register char * symlinkcontents = NULL;
|
register char * symlinkcontents = NULL;
|
||||||
@ -2187,7 +2193,7 @@ char * const argname;
|
|||||||
** created by some other multiprocessor, so we get
|
** created by some other multiprocessor, so we get
|
||||||
** to do extra checking.
|
** 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);
|
const char *e = strerror(errno);
|
||||||
|
|
||||||
if (errno != EEXIST || !itsdir(name)) {
|
if (errno != EEXIST || !itsdir(name)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user