]> code.delx.au - gnu-emacs/blobdiff - src/xrdb.c
TODO update
[gnu-emacs] / src / xrdb.c
index 73672c9617c78aad31ddb57210ca7052bb11d6a9..9d3ce1670b14d57282789b7f099d6db509af9179 100644 (file)
@@ -1,5 +1,6 @@
 /* Deal with the X Resource Manager.
-   Copyright (C) 1990, 1993-1994, 2000-2012 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1993-1994, 2000-2013 Free Software Foundation,
+   Inc.
 
 Author: Joseph Arceneaux
 Created: 4/90
@@ -24,7 +25,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #include <errno.h>
 #include <epaths.h>
-
+#include <stdlib.h>
 #include <stdio.h>
 
 #include "lisp.h"
@@ -48,11 +49,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "keyboard.h"
 #endif
 
-extern char *getenv (const char *);
-
-extern struct passwd *getpwuid (uid_t);
-extern struct passwd *getpwnam (const char *);
-
 char *x_get_string_resource (XrmDatabase rdb, const char *name,
                             const char *class);
 static int file_p (const char *filename);
@@ -429,8 +425,9 @@ get_environ_db (void)
     {
       static char const xdefaults[] = ".Xdefaults-";
       char *home = gethomedir ();
-      char const *host = get_system_name ();
-      ptrdiff_t pathsize = strlen (home) + sizeof xdefaults + strlen (host);
+      char const *host = SSDATA (Vsystem_name);
+      ptrdiff_t pathsize = (strlen (home) + sizeof xdefaults
+                           + SBYTES (Vsystem_name));
       path = xrealloc (home, pathsize);
       strcat (strcat (path, xdefaults), host);
       p = path;