aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRoland McGrath1994-01-08 21:43:57 +0000
committerRoland McGrath1994-01-08 21:43:57 +0000
commit92af894ffd42bbbfdbea693385b07e7faa5cf73f (patch)
treee9d89de307e4b08813c78a1b9e695dbd9d2e82e5 /lib-src
parent20c92ac78b197158acfa1ef6e006efc88e61c7dd (diff)
downloademacs-92af894ffd42bbbfdbea693385b07e7faa5cf73f.tar.gz
emacs-92af894ffd42bbbfdbea693385b07e7faa5cf73f.zip
Don't declare sys_errlist; declare strerror instead.
(main): Call strerror instead of using sys_errlist.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 4219d0a0f5b..b28acb26da0 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1,11 +1,11 @@
1/* Client process that communicates with GNU Emacs acting as server. 1/* Client process that communicates with GNU Emacs acting as server.
2 Copyright (C) 1986, 1987 Free Software Foundation, Inc. 2 Copyright (C) 1986, 1987, 1994 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
6GNU Emacs is free software; you can redistribute it and/or modify 6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by 7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option) 8the Free Software Foundation; either version 2, or (at your option)
9any later version. 9any later version.
10 10
11GNU Emacs is distributed in the hope that it will be useful, 11GNU Emacs is distributed in the hope that it will be useful,
@@ -52,8 +52,7 @@ main (argc, argv)
52#include <stdio.h> 52#include <stdio.h>
53#include <errno.h> 53#include <errno.h>
54 54
55extern int sys_nerr; 55extern char *strerror ();
56extern char *sys_errlist[];
57extern int errno; 56extern int errno;
58 57
59main (argc, argv) 58main (argc, argv)
@@ -137,8 +136,7 @@ main (argc, argv)
137 if (cwd == 0) 136 if (cwd == 0)
138 { 137 {
139 /* getwd puts message in STRING if it fails. */ 138 /* getwd puts message in STRING if it fails. */
140 fprintf (stderr, "%s: %s (%s)\n", argv[0], string, 139 fprintf (stderr, "%s: %s (%s)\n", argv[0], string, strerror (errno));
141 (errno < sys_nerr) ? sys_errlist[errno] : "unknown error");
142 exit (1); 140 exit (1);
143 } 141 }
144 142