Mercurial > emacs
changeset 47659:473041262ca1
(main): Always use /tmp and non-qualified hostname.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 27 Sep 2002 22:07:38 +0000 |
parents | de014e746a6b |
children | 3c43648d83d4 |
files | lib-src/ChangeLog lib-src/emacsclient.c |
diffstat | 2 files changed, 7 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/ChangeLog Fri Sep 27 22:06:02 2002 +0000 +++ b/lib-src/ChangeLog Fri Sep 27 22:07:38 2002 +0000 @@ -6,6 +6,7 @@ (decode_options): Add -e and -d processing. (print_help_and_exit): Update the usage string. (main): Add support for --eval and --display. + (main): Always use /tmp and non-qualified hostname. 2002-09-25 Stefan Monnier <monnier@cs.yale.edu>
--- a/lib-src/emacsclient.c Fri Sep 27 22:06:02 2002 +0000 +++ b/lib-src/emacsclient.c Fri Sep 27 22:07:38 2002 +0000 @@ -313,6 +313,7 @@ server.sun_family = AF_UNIX; { + char *dot; system_name_length = 32; while (1) @@ -328,9 +329,13 @@ free (system_name); system_name_length *= 2; } + + /* We always use the non-dotted host name, for simplicity. */ + dot = index (system_name, '.'); + if (dot) + *dot = '\0'; } -#ifndef SERVER_HOME_DIR { int sock_status = 0; @@ -387,16 +392,6 @@ break; } } -#else - if ((homedir = getenv ("HOME")) == NULL) - { - fprintf (stderr, "%s: No home directory\n", argv[0]); - fail (argc, argv); - } - strcpy (server.sun_path, homedir); - strcat (server.sun_path, "/.emacs-server-"); - strcat (server.sun_path, system_name); -#endif if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) < 0)