mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-09-23 10:03:17 +00:00
more simplification
SCCS-file: localtime.c SCCS-SID: 7.36
This commit is contained in:
committed by
Paul Eggert
parent
af687ef72d
commit
fdc03de728
+4
-7
@@ -16,12 +16,9 @@ static char elsieid[] = "%W%";
|
||||
#include "tzfile.h"
|
||||
#include "fcntl.h"
|
||||
|
||||
#ifdef R_OK
|
||||
#define ACCESS_MODE R_OK
|
||||
#endif /* defined R_OK */
|
||||
#ifndef R_OK
|
||||
#define ACCESS_MODE 4
|
||||
#endif /* !defined R_OK */
|
||||
/*
|
||||
** SunOS 4.1.1 headers lack O_BINARY.
|
||||
*/
|
||||
|
||||
#ifdef O_BINARY
|
||||
#define OPEN_MODE (O_RDONLY | O_BINARY)
|
||||
@@ -282,7 +279,7 @@ register struct state * const sp;
|
||||
doaccess = TRUE;
|
||||
name = fullname;
|
||||
}
|
||||
if (doaccess && access(name, ACCESS_MODE) != 0)
|
||||
if (doaccess && access(name, R_OK) != 0)
|
||||
return -1;
|
||||
if ((fid = open(name, OPEN_MODE)) == -1)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user