aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath1994-01-08 21:28:08 +0000
committerRoland McGrath1994-01-08 21:28:08 +0000
commitce97267f95e597940247648751321e2b57e9de52 (patch)
tree04f103b127503b57d28a5e9d9b87bfae74f30803 /src
parent826c56acc9f7ca7cec43a310888a7bca142f9f16 (diff)
downloademacs-ce97267f95e597940247648751321e2b57e9de52.tar.gz
emacs-ce97267f95e597940247648751321e2b57e9de52.zip
Don't declare sys_errlist; declare strerror instead.
(err_str): Macro removed. (Finsert_file_contents, Fwrite_region): Call strerror instead of err_str.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 99139755232..f46ffef0ad9 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,5 +1,5 @@
1/* File IO for GNU Emacs. 1/* File IO for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993 Free Software Foundation, Inc. 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -54,11 +54,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
54 54
55#ifndef vax11c 55#ifndef vax11c
56extern int errno; 56extern int errno;
57extern char *sys_errlist[];
58extern int sys_nerr;
59#endif 57#endif
60 58
61#define err_str(a) ((a) < sys_nerr ? sys_errlist[a] : "unknown error") 59extern char *strerror ();
62 60
63#ifdef APOLLO 61#ifdef APOLLO
64#include <sys/time.h> 62#include <sys/time.h>
@@ -2687,7 +2685,7 @@ If VISIT is non-nil, BEG and END must be nil.")
2687 2685
2688 if (how_much < 0) 2686 if (how_much < 0)
2689 error ("IO error reading %s: %s", 2687 error ("IO error reading %s: %s",
2690 XSTRING (filename)->data, err_str (errno)); 2688 XSTRING (filename)->data, strerror (errno));
2691 2689
2692 notfound: 2690 notfound:
2693 handled: 2691 handled:
@@ -3049,7 +3047,7 @@ to the file, instead of any buffer contents, and END is ignored.")
3049 current_buffer->modtime = st.st_mtime; 3047 current_buffer->modtime = st.st_mtime;
3050 3048
3051 if (failure) 3049 if (failure)
3052 error ("IO error writing %s: %s", fn, err_str (save_errno)); 3050 error ("IO error writing %s: %s", fn, strerror (save_errno));
3053 3051
3054 if (visiting) 3052 if (visiting)
3055 { 3053 {