summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-01-08 22:27:30 +0000
committerRoland McGrath <roland@gnu.org>1994-01-08 22:27:30 +0000
commitb91b3a4302bca5c98a8d3ec218525721288461f3 (patch)
tree911b5ec6474a36d069126f3fb5f67477f1d7709b /lib-src/emacsclient.c
parent8ea6477b73a0b0d4ffb24a044650ee95634d5808 (diff)
downloademacs-b91b3a4302bca5c98a8d3ec218525721288461f3.tar.gz
[! HAVE_STRERROR] (strerror): Define the function.
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index b28acb26da0..85d0bdebeb5 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -282,3 +282,18 @@ main (argc, argv)
#endif /* HAVE_SYSVIPC */
#endif /* HAVE_SOCKETS or HAVE_SYSVIPC */
+
+#ifndef HAVE_STRERROR
+char *
+strerror (errnum)
+ int errnum;
+{
+ extern char *sys_errlist[];
+ extern int sys_nerr;
+
+ if (errnum >= 0 && errnum < sys_nerr)
+ return sys_errlist[errnum];
+ return (char *) "Unknown error";
+}
+
+#endif /* ! HAVE_STRERROR */