diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-08-27 20:08:59 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-08-27 20:08:59 +0000 |
commit | bd25266244d48e7a7254a8e5f3b893b13002a564 (patch) | |
tree | 79374ef616e9f1e9131d3633c1ff2e4e9199bafa /lib-src/emacsclient.c | |
parent | 9dde47f5798a73946d3f78da2e0daff23457ea31 (diff) | |
download | emacs-bd25266244d48e7a7254a8e5f3b893b13002a564.tar.gz |
[HAVE_SYSVIPC]: Include errno.h, as in the other case.
(main) [!BSD_SYSTEM]: Fix error message for getcwd failure.
Diffstat (limited to 'lib-src/emacsclient.c')
-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) if (cwd == 0) { /* getwd puts message in STRING if it fails. */ - fprintf (stderr, "%s: %s (%s)\n", argv[0], string, strerror (errno)); + fprintf (stderr, "%s: %s (%s)\n", argv[0], +#ifdef BSD_SYSTEM + string, +#else + "Cannot get current working directory", +#endif + strerror (errno)); exit (1); } @@ -333,6 +339,8 @@ main (argc, argv) #include <sys/msg.h> #include <sys/utsname.h> #include <stdio.h> +#include <errno.h> +extern int errno; char *getwd (), *getcwd (), *getenv (); struct utsname system_name; @@ -408,7 +416,12 @@ main (argc, argv) } else { +#ifdef BSD_SYSTEM fprintf (stderr, "%s: %s\n", argv[0], cwd); +#else + fprintf (stderr, "%s: Cannot get current working directory: %s\n", + argv[0], strerror (errno)); +#endif exit (1); } |