diff options
| author | Roland McGrath | 1994-01-08 21:43:57 +0000 |
|---|---|---|
| committer | Roland McGrath | 1994-01-08 21:43:57 +0000 |
| commit | 92af894ffd42bbbfdbea693385b07e7faa5cf73f (patch) | |
| tree | e9d89de307e4b08813c78a1b9e695dbd9d2e82e5 | |
| parent | 20c92ac78b197158acfa1ef6e006efc88e61c7dd (diff) | |
| download | emacs-92af894ffd42bbbfdbea693385b07e7faa5cf73f.tar.gz emacs-92af894ffd42bbbfdbea693385b07e7faa5cf73f.zip | |
Don't declare sys_errlist; declare strerror instead.
(main): Call strerror instead of using sys_errlist.
| -rw-r--r-- | lib-src/emacsclient.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 4219d0a0f5b..b28acb26da0 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* Client process that communicates with GNU Emacs acting as server. | 1 | /* Client process that communicates with GNU Emacs acting as server. |
| 2 | Copyright (C) 1986, 1987 Free Software Foundation, Inc. | 2 | Copyright (C) 1986, 1987, 1994 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| 6 | GNU Emacs is free software; you can redistribute it and/or modify | 6 | GNU Emacs is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 1, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | 10 | ||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | 11 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -52,8 +52,7 @@ main (argc, argv) | |||
| 52 | #include <stdio.h> | 52 | #include <stdio.h> |
| 53 | #include <errno.h> | 53 | #include <errno.h> |
| 54 | 54 | ||
| 55 | extern int sys_nerr; | 55 | extern char *strerror (); |
| 56 | extern char *sys_errlist[]; | ||
| 57 | extern int errno; | 56 | extern int errno; |
| 58 | 57 | ||
| 59 | main (argc, argv) | 58 | main (argc, argv) |
| @@ -137,8 +136,7 @@ main (argc, argv) | |||
| 137 | if (cwd == 0) | 136 | if (cwd == 0) |
| 138 | { | 137 | { |
| 139 | /* getwd puts message in STRING if it fails. */ | 138 | /* getwd puts message in STRING if it fails. */ |
| 140 | fprintf (stderr, "%s: %s (%s)\n", argv[0], string, | 139 | fprintf (stderr, "%s: %s (%s)\n", argv[0], string, strerror (errno)); |
| 141 | (errno < sys_nerr) ? sys_errlist[errno] : "unknown error"); | ||
| 142 | exit (1); | 140 | exit (1); |
| 143 | } | 141 | } |
| 144 | 142 | ||