diff options
| author | Roland McGrath | 1994-01-08 21:42:04 +0000 |
|---|---|---|
| committer | Roland McGrath | 1994-01-08 21:42:04 +0000 |
| commit | 20c92ac78b197158acfa1ef6e006efc88e61c7dd (patch) | |
| tree | 6879ce75cb78c86f76b79fd4726f94ec6803a107 /src | |
| parent | 15b74b81c26e1f62781af70c3f7aeabac686085a (diff) | |
| download | emacs-20c92ac78b197158acfa1ef6e006efc88e61c7dd.tar.gz emacs-20c92ac78b197158acfa1ef6e006efc88e61c7dd.zip | |
Don't declare sys_errlist; declare strerror instead.
(fatal_unexec): Call strerror instead of using sys_errlist.
Diffstat (limited to 'src')
| -rw-r--r-- | src/unexenix.c | 11 | ||||
| -rw-r--r-- | src/unexmips.c | 13 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/unexenix.c b/src/unexenix.c index 20e1b06898a..9fb775a27ce 100644 --- a/src/unexenix.c +++ b/src/unexenix.c | |||
| @@ -6,13 +6,13 @@ | |||
| 6 | we don't plan to think about it, or about whether other Emacs | 6 | we don't plan to think about it, or about whether other Emacs |
| 7 | maintenance might break it. | 7 | maintenance might break it. |
| 8 | 8 | ||
| 9 | Copyright (C) 1988 Free Software Foundation, Inc. | 9 | Copyright (C) 1988, 1994 Free Software Foundation, Inc. |
| 10 | 10 | ||
| 11 | This file is part of GNU Emacs. | 11 | This file is part of GNU Emacs. |
| 12 | 12 | ||
| 13 | GNU Emacs is free software; you can redistribute it and/or modify | 13 | GNU Emacs is free software; you can redistribute it and/or modify |
| 14 | it under the terms of the GNU General Public License as published by | 14 | it under the terms of the GNU General Public License as published by |
| 15 | the Free Software Foundation; either version 1, or (at your option) | 15 | the Free Software Foundation; either version 2, or (at your option) |
| 16 | any later version. | 16 | any later version. |
| 17 | 17 | ||
| 18 | GNU Emacs is distributed in the hope that it will be useful, | 18 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -66,8 +66,7 @@ static void fatal_unexec (); | |||
| 66 | fatal_unexec(_error_message, _error_arg); | 66 | fatal_unexec(_error_message, _error_arg); |
| 67 | 67 | ||
| 68 | extern int errno; | 68 | extern int errno; |
| 69 | extern int sys_nerr; | 69 | extern char *strerror (); |
| 70 | extern char *sys_errlist[]; | ||
| 71 | #define EEOF -1 | 70 | #define EEOF -1 |
| 72 | 71 | ||
| 73 | #ifndef L_SET | 72 | #ifndef L_SET |
| @@ -251,10 +250,8 @@ fatal_unexec (s, va_alist) | |||
| 251 | va_list ap; | 250 | va_list ap; |
| 252 | if (errno == EEOF) | 251 | if (errno == EEOF) |
| 253 | fputs ("unexec: unexpected end of file, ", stderr); | 252 | fputs ("unexec: unexpected end of file, ", stderr); |
| 254 | else if (errno < sys_nerr) | ||
| 255 | fprintf (stderr, "unexec: %s, ", sys_errlist[errno]); | ||
| 256 | else | 253 | else |
| 257 | fprintf (stderr, "unexec: error code %d, ", errno); | 254 | fprintf (stderr, "unexec: %s, ", strerror (errno)); |
| 258 | va_start (ap); | 255 | va_start (ap); |
| 259 | _doprnt (s, ap, stderr); | 256 | _doprnt (s, ap, stderr); |
| 260 | fputs (".\n", stderr); | 257 | fputs (".\n", stderr); |
diff --git a/src/unexmips.c b/src/unexmips.c index b39adfc9c39..8dffa695a5b 100644 --- a/src/unexmips.c +++ b/src/unexmips.c | |||
| @@ -6,13 +6,13 @@ | |||
| 6 | we don't plan to think about it, or about whether other Emacs | 6 | we don't plan to think about it, or about whether other Emacs |
| 7 | maintenance might break it. | 7 | maintenance might break it. |
| 8 | 8 | ||
| 9 | Copyright (C) 1988 Free Software Foundation, Inc. | 9 | Copyright (C) 1988, 1994 Free Software Foundation, Inc. |
| 10 | 10 | ||
| 11 | This file is part of GNU Emacs. | 11 | This file is part of GNU Emacs. |
| 12 | 12 | ||
| 13 | GNU Emacs is free software; you can redistribute it and/or modify | 13 | GNU Emacs is free software; you can redistribute it and/or modify |
| 14 | it under the terms of the GNU General Public License as published by | 14 | it under the terms of the GNU General Public License as published by |
| 15 | the Free Software Foundation; either version 1, or (at your option) | 15 | the Free Software Foundation; either version 2, or (at your option) |
| 16 | any later version. | 16 | any later version. |
| 17 | 17 | ||
| 18 | GNU Emacs is distributed in the hope that it will be useful, | 18 | GNU Emacs is distributed in the hope that it will be useful, |
| @@ -59,8 +59,7 @@ static void mark_x (); | |||
| 59 | fatal_unexec (_error_message, _error_arg); | 59 | fatal_unexec (_error_message, _error_arg); |
| 60 | 60 | ||
| 61 | extern int errno; | 61 | extern int errno; |
| 62 | extern int sys_nerr; | 62 | extern char *strerror (); |
| 63 | extern char *sys_errlist[]; | ||
| 64 | #define EEOF -1 | 63 | #define EEOF -1 |
| 65 | 64 | ||
| 66 | static struct scnhdr *text_section; | 65 | static struct scnhdr *text_section; |
| @@ -300,15 +299,13 @@ mark_x (name) | |||
| 300 | 299 | ||
| 301 | static void | 300 | static void |
| 302 | fatal_unexec (s, va_alist) | 301 | fatal_unexec (s, va_alist) |
| 303 | va_dcl | 302 | va_dcl |
| 304 | { | 303 | { |
| 305 | va_list ap; | 304 | va_list ap; |
| 306 | if (errno == EEOF) | 305 | if (errno == EEOF) |
| 307 | fputs ("unexec: unexpected end of file, ", stderr); | 306 | fputs ("unexec: unexpected end of file, ", stderr); |
| 308 | else if (errno < sys_nerr) | ||
| 309 | fprintf (stderr, "unexec: %s, ", sys_errlist[errno]); | ||
| 310 | else | 307 | else |
| 311 | fprintf (stderr, "unexec: error code %d, ", errno); | 308 | fprintf (stderr, "unexec: %s, ", strerror (errno)); |
| 312 | va_start (ap); | 309 | va_start (ap); |
| 313 | _doprnt (s, ap, stderr); | 310 | _doprnt (s, ap, stderr); |
| 314 | fputs (".\n", stderr); | 311 | fputs (".\n", stderr); |