aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-09-13 12:48:38 +0000
committerJim Blandy1992-09-13 12:48:38 +0000
commitdfc35f5fca6653357bbc8f1582aa86e65877267c (patch)
treef77c9d2a305b3efb7462f0a346f683220d142608 /src
parent252500313bad12f953dc0824ee125166bcc268e2 (diff)
downloademacs-dfc35f5fca6653357bbc8f1582aa86e65877267c.tar.gz
emacs-dfc35f5fca6653357bbc8f1582aa86e65877267c.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/xrdb.c8
1 files changed, 6 insertions, 2 deletions
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. */
32 32
33#include <X11/Xlib.h> 33#include <X11/Xlib.h>
34#include <X11/Xatom.h> 34#include <X11/Xatom.h>
35#if 0
35#include <X11/Xos.h> 36#include <X11/Xos.h>
37#endif
36#include <X11/X.h> 38#include <X11/X.h>
37#include <X11/Xutil.h> 39#include <X11/Xutil.h>
38#include <X11/Xresource.h> 40#include <X11/Xresource.h>
@@ -49,7 +51,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
49#endif 51#endif
50 52
51extern char *getenv (); 53extern char *getenv ();
52extern int getuid (); 54extern short getuid (); /* If this causes portability problems,
55 I think we should just delete it; it'll
56 default to `int' anyway. */
53extern struct passwd *getpwuid (); 57extern struct passwd *getpwuid ();
54extern struct passwd *getpwnam (); 58extern struct passwd *getpwnam ();
55 59
@@ -96,7 +100,7 @@ file_p (path)
96{ 100{
97 struct stat status; 101 struct stat status;
98 102
99 return (access (path, R_OK) == 0 /* exists and is readable */ 103 return (access (path, 4) == 0 /* exists and is readable */
100 && stat (path, &status) == 0 /* get the status */ 104 && stat (path, &status) == 0 /* get the status */
101 && (status.st_mode & S_IFDIR) == 0); /* not a directory */ 105 && (status.st_mode & S_IFDIR) == 0); /* not a directory */
102} 106}