diff options
author | Jim Blandy <jimb@redhat.com> | 1992-08-19 06:51:17 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-08-19 06:51:17 +0000 |
commit | 4574121becfac781e0d516462b1029674f5a63d7 (patch) | |
tree | d1a7100d094b7af84eeac060407ade29f1cc68bd /src/xrdb.c | |
parent | 1a06baa94b6bd32e25080b7a0c99588ab4029deb (diff) | |
download | emacs-4574121becfac781e0d516462b1029674f5a63d7.tar.gz |
* 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.
Diffstat (limited to 'src/xrdb.c')
-rw-r--r-- | src/xrdb.c | 24 |
1 files 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 <unistd.h> +#endif /* USG5 */ + +#endif /* 1 */ + #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/Xos.h> @@ -30,14 +43,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #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 @@ 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 |