changeset 1126:94d76dbb5ce6

* xrdb.c: Don't include <X11/Xos.h>. 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.
author Jim Blandy <jimb@redhat.com>
date Sun, 13 Sep 1992 12:48:38 +0000
parents 059624bf9bf0
children cd3d59155bf7
files src/xrdb.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xrdb.c	Sun Sep 13 12:46:45 1992 +0000
+++ b/src/xrdb.c	Sun Sep 13 12:48:38 1992 +0000
@@ -32,7 +32,9 @@
  
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
+#if 0
 #include <X11/Xos.h>
+#endif
 #include <X11/X.h>
 #include <X11/Xutil.h>
 #include <X11/Xresource.h>
@@ -49,7 +51,9 @@
 #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 @@
 {
   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 */
 }