diff options
| author | Jim Blandy | 1992-08-19 06:51:17 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-08-19 06:51:17 +0000 |
| commit | a2a4d43e4ca069ae0f2e4423b4c59d1462a13a62 (patch) | |
| tree | fcba72074c330a33177d4188c7411a9ea2cccb81 /src | |
| parent | f945b92083818d97c1c934d558ede679baafa564 (diff) | |
| download | emacs-a2a4d43e4ca069ae0f2e4423b4c59d1462a13a62.tar.gz emacs-a2a4d43e4ca069ae0f2e4423b4c59d1462a13a62.zip | |
* 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')
| -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. */ | |||
| 17 | 17 | ||
| 18 | /* Written by jla, 4/90 */ | 18 | /* Written by jla, 4/90 */ |
| 19 | 19 | ||
| 20 | #ifdef emacs | ||
| 21 | #include "config.h" | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #if 1 /* I'd really appreciate it if this code could go away... -JimB */ | ||
| 25 | /* this avoids lossage in the `dual-universe' headers on AT&T SysV X11 */ | ||
| 26 | #ifdef USG5 | ||
| 27 | #define SYSV | ||
| 28 | #include <unistd.h> | ||
| 29 | #endif /* USG5 */ | ||
| 30 | |||
| 31 | #endif /* 1 */ | ||
| 32 | |||
| 20 | #include <X11/Xlib.h> | 33 | #include <X11/Xlib.h> |
| 21 | #include <X11/Xatom.h> | 34 | #include <X11/Xatom.h> |
| 22 | #include <X11/Xos.h> | 35 | #include <X11/Xos.h> |
| @@ -30,14 +43,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 30 | #include <pwd.h> | 43 | #include <pwd.h> |
| 31 | #endif | 44 | #endif |
| 32 | #include <sys/stat.h> | 45 | #include <sys/stat.h> |
| 33 | #include <sys/types.h> | ||
| 34 | 46 | ||
| 35 | #ifdef emacs | 47 | #ifndef MAXPATHLEN |
| 36 | #include "config.h" | 48 | #define MAXPATHLEN 256 |
| 37 | #endif | 49 | #endif |
| 38 | 50 | ||
| 39 | extern char *getenv (); | 51 | extern char *getenv (); |
| 40 | extern uid_t getuid (); | 52 | extern int getuid (); |
| 41 | extern struct passwd *getpwuid (); | 53 | extern struct passwd *getpwuid (); |
| 42 | extern struct passwd *getpwnam (); | 54 | extern struct passwd *getpwnam (); |
| 43 | 55 | ||
| @@ -267,7 +279,9 @@ get_user_db (display) | |||
| 267 | XrmDatabase db; | 279 | XrmDatabase db; |
| 268 | char *xdefs; | 280 | char *xdefs; |
| 269 | 281 | ||
| 270 | xdefs = XResourceManagerString (display); | 282 | /* Yes, I know we should probably get this using XResourceManagerString. |
| 283 | Who cares. */ | ||
| 284 | xdefs = display->xdefaults; | ||
| 271 | if (xdefs != NULL) | 285 | if (xdefs != NULL) |
| 272 | db = XrmGetStringDatabase (xdefs); | 286 | db = XrmGetStringDatabase (xdefs); |
| 273 | else | 287 | else |