summaryrefslogtreecommitdiff
path: root/src/xrdb.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-10-16 06:22:25 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-10-16 06:22:25 +0400
commit61655b89f454597079c7f1ddf680d654c2c5f4e8 (patch)
tree8f3bcfdf8e2298d6a606ecf57269e1a063198252 /src/xrdb.c
parent293902c8b28955cce23d0ae79820d363ba99bf72 (diff)
downloademacs-61655b89f454597079c7f1ddf680d654c2c5f4e8.tar.gz
* editfns.c (get_system_name): Remove.
* lisp.h (get_system_name): Remove prototype. * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes. (get_environ_db): Use Vsystem_name. Avoid call to strlen.
Diffstat (limited to 'src/xrdb.c')
-rw-r--r--src/xrdb.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/xrdb.c b/src/xrdb.c
index 73672c9617c..9d056a607e4 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -24,7 +24,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 +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);
@@ -429,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;