# HG changeset patch # User Stefan Monnier # Date 1033164458 0 # Node ID 473041262ca133bf8ce8ae433b988c95d96afd40 # Parent de014e746a6bc22b3a770f8b85f380c87c96ff6c (main): Always use /tmp and non-qualified hostname. diff -r de014e746a6b -r 473041262ca1 lib-src/ChangeLog --- 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 diff -r de014e746a6b -r 473041262ca1 lib-src/emacsclient.c --- 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)