aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath1994-01-08 21:42:04 +0000
committerRoland McGrath1994-01-08 21:42:04 +0000
commit20c92ac78b197158acfa1ef6e006efc88e61c7dd (patch)
tree6879ce75cb78c86f76b79fd4726f94ec6803a107 /src
parent15b74b81c26e1f62781af70c3f7aeabac686085a (diff)
downloademacs-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.c11
-rw-r--r--src/unexmips.c13
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
11This file is part of GNU Emacs. 11This file is part of GNU Emacs.
12 12
13GNU Emacs is free software; you can redistribute it and/or modify 13GNU Emacs is free software; you can redistribute it and/or modify
14it under the terms of the GNU General Public License as published by 14it under the terms of the GNU General Public License as published by
15the Free Software Foundation; either version 1, or (at your option) 15the Free Software Foundation; either version 2, or (at your option)
16any later version. 16any later version.
17 17
18GNU Emacs is distributed in the hope that it will be useful, 18GNU 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
68extern int errno; 68extern int errno;
69extern int sys_nerr; 69extern char *strerror ();
70extern 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
11This file is part of GNU Emacs. 11This file is part of GNU Emacs.
12 12
13GNU Emacs is free software; you can redistribute it and/or modify 13GNU Emacs is free software; you can redistribute it and/or modify
14it under the terms of the GNU General Public License as published by 14it under the terms of the GNU General Public License as published by
15the Free Software Foundation; either version 1, or (at your option) 15the Free Software Foundation; either version 2, or (at your option)
16any later version. 16any later version.
17 17
18GNU Emacs is distributed in the hope that it will be useful, 18GNU 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
61extern int errno; 61extern int errno;
62extern int sys_nerr; 62extern char *strerror ();
63extern char *sys_errlist[];
64#define EEOF -1 63#define EEOF -1
65 64
66static struct scnhdr *text_section; 65static struct scnhdr *text_section;
@@ -300,15 +299,13 @@ mark_x (name)
300 299
301static void 300static void
302fatal_unexec (s, va_alist) 301fatal_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);