Mercurial > emacs
comparison src/unexenix.c @ 5521:d1d144ed5b76
Don't declare sys_errlist; declare strerror instead.
(fatal_unexec): Call strerror instead of using sys_errlist.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Sat, 08 Jan 1994 21:42:04 +0000 |
parents | 1fc792473491 |
children | ee40177f6c68 |
comparison
equal
deleted
inserted
replaced
5520:66bda5c15609 | 5521:d1d144ed5b76 |
---|---|
4 from development of the GNU system. Changes in this code will be | 4 from development of the GNU system. Changes in this code will be |
5 installed when Xenix users send them in, but aside from that | 5 installed when Xenix users send them in, but aside from that |
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, |
19 but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
64 errno = EEOF; \ | 64 errno = EEOF; \ |
65 if (lseek(_fd, _position, L_SET) != _position) \ | 65 if (lseek(_fd, _position, L_SET) != _position) \ |
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 |
74 #define L_SET 0 | 73 #define L_SET 0 |
75 #endif | 74 #endif |
249 va_dcl | 248 va_dcl |
250 { | 249 { |
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); |
261 exit (1); | 258 exit (1); |
262 } | 259 } |