changeset 1019:aaa628aaf808

* xrdb.c [USG5]: Define SYSV, and then include <unistd.h>. I wish I knew why. Don't include <sys/types.h>; just declare getuid to return an int. Big deal. (MAXPATHLEN): If this is not defined by the system's include files, give it a value of 256. (get_user_db): Fetch the defaults directly from the display structure, rather than using XResourceManagerString; that function doesn't exist in the older versions of X.
author Jim Blandy <jimb@redhat.com>
date Wed, 19 Aug 1992 06:51:17 +0000
parents 5fd29acd3db7
children 7c2565dd644c
files src/xrdb.c
diffstat 1 files changed, 19 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/xrdb.c	Wed Aug 19 06:46:08 1992 +0000
+++ b/src/xrdb.c	Wed Aug 19 06:51:17 1992 +0000
@@ -17,6 +17,19 @@
 
 /* Written by jla, 4/90 */
 
+#ifdef emacs
+#include "config.h"
+#endif
+
+#if 1 /* I'd really appreciate it if this code could go away...  -JimB */
+/* this avoids lossage in the `dual-universe' headers on AT&T SysV X11 */
+#ifdef USG5
+#define SYSV
+#include <unistd.h>
+#endif /* USG5 */
+
+#endif /* 1 */
+ 
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <X11/Xos.h>
@@ -30,14 +43,13 @@
 #include <pwd.h>
 #endif
 #include <sys/stat.h>
-#include <sys/types.h>
 
-#ifdef emacs
-#include "config.h"
+#ifndef MAXPATHLEN
+#define MAXPATHLEN	256
 #endif
 
 extern char *getenv ();
-extern uid_t getuid ();
+extern int getuid ();
 extern struct passwd *getpwuid ();
 extern struct passwd *getpwnam ();
 
@@ -267,7 +279,9 @@
   XrmDatabase db;
   char *xdefs;
 
-  xdefs = XResourceManagerString (display);
+  /* Yes, I know we should probably get this using XResourceManagerString.
+     Who cares.  */
+  xdefs = display->xdefaults;
   if (xdefs != NULL)
     db = XrmGetStringDatabase (xdefs);
   else