From f9b47a2df2673d0a49b75d983b89e17a6c86c1c5 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 13 Sep 1992 12:48:38 +0000 Subject: * xrdb.c: Don't include . Under R4, it stupidly insists on defining SIGCHLD, even if it already has a definition. (file_p): Use the constant 4 instead of R_OK; empirically, the number is more portable than the symbol if you count the #include hair you have to go through to get R_OK defined. Ffile_readable_p does this too. * xrdb.c (getuid): Declare this to return short. --- src/xrdb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/xrdb.c') diff --git a/src/xrdb.c b/src/xrdb.c index 8141444bef4..02e28f30cd3 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -32,7 +32,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include +#if 0 #include +#endif #include #include #include @@ -49,7 +51,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #endif extern char *getenv (); -extern int getuid (); +extern short getuid (); /* If this causes portability problems, + I think we should just delete it; it'll + default to `int' anyway. */ extern struct passwd *getpwuid (); extern struct passwd *getpwnam (); @@ -96,7 +100,7 @@ file_p (path) { struct stat status; - return (access (path, R_OK) == 0 /* exists and is readable */ + return (access (path, 4) == 0 /* exists and is readable */ && stat (path, &status) == 0 /* get the status */ && (status.st_mode & S_IFDIR) == 0); /* not a directory */ } -- cgit v1.2.1