summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-01-08 21:47:36 +0000
committerRoland McGrath <roland@gnu.org>1994-01-08 21:47:36 +0000
commitbe06db9a3edd0cc9a68313286446e5cbc8cdb139 (patch)
tree874bf703197c96cce91b513c50309fefc2062cbc /src/emacs.c
parent92af894ffd42bbbfdbea693385b07e7faa5cf73f (diff)
downloademacs-be06db9a3edd0cc9a68313286446e5cbc8cdb139.tar.gz
(main): Call strerror instead of using sys_errlist.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/emacs.c b/src/emacs.c
index e20f488e8cc..143a85020c5 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1,5 +1,5 @@
/* Fully extensible Emacs, running on Unix, intended for GNU.
- Copyright (C) 1985, 1986, 1987, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986, 1987, 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -260,7 +260,7 @@ main (argc, argv, envp)
int skip_args = 0;
extern int errno;
extern sys_nerr;
- extern char *sys_errlist[];
+ extern char *strerror ();
extern void malloc_warning ();
/* Map in shared memory, if we are using that. */
@@ -397,12 +397,7 @@ main (argc, argv, envp)
result = open (argv[skip_args], O_RDWR, 2 );
if (result < 0)
{
- char *errstring;
-
- if (errno >= 0 && errno < sys_nerr)
- errstring = sys_errlist[errno];
- else
- errstring = "undocumented error code";
+ char *errstring = strerror (errno);
fprintf (stderr, "emacs: %s: %s\n", argv[skip_args], errstring);
exit (1);
}