* emacs-lisp/byte-opt.el (toplevel): Add compare-window-configurations,
[bpt/emacs.git] / src / xrdb.c
index 624bafa..9d056a6 100644 (file)
@@ -24,9 +24,8 @@ 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 <setjmp.h>
 
 #include "lisp.h"
 
@@ -49,11 +48,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);
@@ -430,8 +424,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;