# HG changeset patch # User Richard M. Stallman # Date 872712539 0 # Node ID 1289a4779e6876102364b3f26666f2dad154c7cf # Parent 30f977ea74dbe3de3642a0aa77bd7b05616ac883 [HAVE_SYSVIPC]: Include errno.h, as in the other case. (main) [!BSD_SYSTEM]: Fix error message for getcwd failure. diff -r 30f977ea74db -r 1289a4779e68 lib-src/emacsclient.c --- a/lib-src/emacsclient.c Wed Aug 27 20:01:05 1997 +0000 +++ b/lib-src/emacsclient.c Wed Aug 27 20:08:59 1997 +0000 @@ -284,7 +284,13 @@ 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 @@ #include #include #include +#include +extern int errno; char *getwd (), *getcwd (), *getenv (); struct utsname system_name; @@ -408,7 +416,12 @@ } 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); }