From a2a4d43e4ca069ae0f2e4423b4c59d1462a13a62 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 19 Aug 1992 06:51:17 +0000 Subject: * xrdb.c [USG5]: Define SYSV, and then include . I wish I knew why. Don't include ; 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. --- src/xrdb.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/xrdb.c b/src/xrdb.c index 1ab859727d2..d6defba4a86 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -17,6 +17,19 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* 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 +#endif /* USG5 */ + +#endif /* 1 */ + #include #include #include @@ -30,14 +43,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #endif #include -#include -#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 @@ get_user_db (display) 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 -- cgit v1.2.1