diff options
| author | Richard M. Stallman | 1997-08-27 20:08:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-27 20:08:59 +0000 |
| commit | bd25266244d48e7a7254a8e5f3b893b13002a564 (patch) | |
| tree | 79374ef616e9f1e9131d3633c1ff2e4e9199bafa /lib-src | |
| parent | 9dde47f5798a73946d3f78da2e0daff23457ea31 (diff) | |
| download | emacs-bd25266244d48e7a7254a8e5f3b893b13002a564.tar.gz emacs-bd25266244d48e7a7254a8e5f3b893b13002a564.zip | |
[HAVE_SYSVIPC]: Include errno.h, as in the other case.
(main) [!BSD_SYSTEM]: Fix error message for getcwd failure.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/emacsclient.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 999be2c2a8c..97261b716ae 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -284,7 +284,13 @@ main (argc, argv) | |||
| 284 | if (cwd == 0) | 284 | if (cwd == 0) |
| 285 | { | 285 | { |
| 286 | /* getwd puts message in STRING if it fails. */ | 286 | /* getwd puts message in STRING if it fails. */ |
| 287 | fprintf (stderr, "%s: %s (%s)\n", argv[0], string, strerror (errno)); | 287 | fprintf (stderr, "%s: %s (%s)\n", argv[0], |
| 288 | #ifdef BSD_SYSTEM | ||
| 289 | string, | ||
| 290 | #else | ||
| 291 | "Cannot get current working directory", | ||
| 292 | #endif | ||
| 293 | strerror (errno)); | ||
| 288 | exit (1); | 294 | exit (1); |
| 289 | } | 295 | } |
| 290 | 296 | ||
| @@ -333,6 +339,8 @@ main (argc, argv) | |||
| 333 | #include <sys/msg.h> | 339 | #include <sys/msg.h> |
| 334 | #include <sys/utsname.h> | 340 | #include <sys/utsname.h> |
| 335 | #include <stdio.h> | 341 | #include <stdio.h> |
| 342 | #include <errno.h> | ||
| 343 | extern int errno; | ||
| 336 | 344 | ||
| 337 | char *getwd (), *getcwd (), *getenv (); | 345 | char *getwd (), *getcwd (), *getenv (); |
| 338 | struct utsname system_name; | 346 | struct utsname system_name; |
| @@ -408,7 +416,12 @@ main (argc, argv) | |||
| 408 | } | 416 | } |
| 409 | else | 417 | else |
| 410 | { | 418 | { |
| 419 | #ifdef BSD_SYSTEM | ||
| 411 | fprintf (stderr, "%s: %s\n", argv[0], cwd); | 420 | fprintf (stderr, "%s: %s\n", argv[0], cwd); |
| 421 | #else | ||
| 422 | fprintf (stderr, "%s: Cannot get current working directory: %s\n", | ||
| 423 | argv[0], strerror (errno)); | ||
| 424 | #endif | ||
| 412 | exit (1); | 425 | exit (1); |
| 413 | } | 426 | } |
| 414 | 427 | ||