diff options
| author | Jim Blandy | 1991-12-21 07:03:14 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-12-21 07:03:14 +0000 |
| commit | 1464f5d50ea1b821791964b837fcaccece424c63 (patch) | |
| tree | 94b5abb1b5bbcee5d01c985fee5ce976978d8002 | |
| parent | 3f1f436615dea6232f1ca844e627feac5f204e46 (diff) | |
| download | emacs-1464f5d50ea1b821791964b837fcaccece424c63.tar.gz emacs-1464f5d50ea1b821791964b837fcaccece424c63.zip | |
*** empty log message ***
| -rw-r--r-- | lib-src/emacsserver.c | 22 | ||||
| -rw-r--r-- | src/bytecode.c | 7 |
2 files changed, 15 insertions, 14 deletions
diff --git a/lib-src/emacsserver.c b/lib-src/emacsserver.c index 19e4e430ab3..e65e3e97831 100644 --- a/lib-src/emacsserver.c +++ b/lib-src/emacsserver.c | |||
| @@ -59,6 +59,7 @@ extern int errno; | |||
| 59 | 59 | ||
| 60 | main () | 60 | main () |
| 61 | { | 61 | { |
| 62 | char system_name[32]; | ||
| 62 | int s, infd, fromlen; | 63 | int s, infd, fromlen; |
| 63 | struct sockaddr_un server, fromunix; | 64 | struct sockaddr_un server, fromunix; |
| 64 | char *homedir; | 65 | char *homedir; |
| @@ -85,21 +86,27 @@ main () | |||
| 85 | exit (1); | 86 | exit (1); |
| 86 | } | 87 | } |
| 87 | server.sun_family = AF_UNIX; | 88 | server.sun_family = AF_UNIX; |
| 88 | homedir = getenv ("HOME"); | 89 | #ifndef SERVER_HOME_DIR |
| 89 | if (homedir == NULL) | 90 | gethostname (system_name, sizeof (system_name)); |
| 91 | sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name); | ||
| 92 | |||
| 93 | if (unlink (server.sun_path) == -1 && errno != ENOENT) | ||
| 94 | { | ||
| 95 | perror ("unlink"); | ||
| 96 | exit (1); | ||
| 97 | } | ||
| 98 | #else | ||
| 99 | if ((homedir = getenv ("HOME")) == NULL) | ||
| 90 | { | 100 | { |
| 91 | fprintf (stderr,"No home directory\n"); | 101 | fprintf (stderr,"No home directory\n"); |
| 92 | exit (1); | 102 | exit (1); |
| 93 | } | 103 | } |
| 94 | sprintf (server.sun_path, "/tmp/esrv%d", geteuid ()); | ||
| 95 | |||
| 96 | #if 0 | ||
| 97 | strcpy (server.sun_path, homedir); | 104 | strcpy (server.sun_path, homedir); |
| 98 | strcat (server.sun_path, "/.emacs_server"); | 105 | strcat (server.sun_path, "/.emacs_server"); |
| 99 | #endif | ||
| 100 | |||
| 101 | /* Delete anyone else's old server. */ | 106 | /* Delete anyone else's old server. */ |
| 102 | unlink (server.sun_path); | 107 | unlink (server.sun_path); |
| 108 | #endif | ||
| 109 | |||
| 103 | if (bind (s, &server, strlen (server.sun_path) + 2) < 0) | 110 | if (bind (s, &server, strlen (server.sun_path) + 2) < 0) |
| 104 | { | 111 | { |
| 105 | perror ("bind"); | 112 | perror ("bind"); |
| @@ -294,6 +301,7 @@ main () | |||
| 294 | if ((fromlen = msgrcv (s, msgp, BUFSIZ - 1, 1, 0)) < 0) | 301 | if ((fromlen = msgrcv (s, msgp, BUFSIZ - 1, 1, 0)) < 0) |
| 295 | { | 302 | { |
| 296 | perror ("msgrcv"); | 303 | perror ("msgrcv"); |
| 304 | exit (1); | ||
| 297 | } | 305 | } |
| 298 | else | 306 | else |
| 299 | { | 307 | { |
diff --git a/src/bytecode.c b/src/bytecode.c index d8de7ebaebe..eb5b117f683 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -418,14 +418,7 @@ If the third argument is incorrect, Emacs may crash.") | |||
| 418 | } | 418 | } |
| 419 | } | 419 | } |
| 420 | #endif | 420 | #endif |
| 421 | /* The frobbing of gcpro3 was lost by jwz's changes in June 91 | ||
| 422 | and then reinserted by jwz in Nov 91. */ | ||
| 423 | /* Remove protection from the args we are giving to Ffuncall. | ||
| 424 | FFuncall will protect them, and double protection would | ||
| 425 | cause disasters. */ | ||
| 426 | gcpro3.nvars = &TOP - stack - 1; | ||
| 427 | TOP = Ffuncall (op + 1, &TOP); | 421 | TOP = Ffuncall (op + 1, &TOP); |
| 428 | gcpro3.nvars = XFASTINT (maxdepth); | ||
| 429 | break; | 422 | break; |
| 430 | 423 | ||
| 431 | case Bunbind+6: | 424 | case Bunbind+6: |