aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRoland McGrath1994-01-08 22:27:30 +0000
committerRoland McGrath1994-01-08 22:27:30 +0000
commit2771160004630733bcf39d020b50f296994ba6aa (patch)
tree060d69112c537abef555569b527a09739aaaf650 /lib-src
parente773d20a7b5dcdced6e7c3be71d1565d6ae3ba82 (diff)
downloademacs-2771160004630733bcf39d020b50f296994ba6aa.tar.gz
emacs-2771160004630733bcf39d020b50f296994ba6aa.zip
[! HAVE_STRERROR] (strerror): Define the function.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c15
-rw-r--r--lib-src/env.c15
-rw-r--r--lib-src/timer.c15
3 files changed, 45 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)
282#endif /* HAVE_SYSVIPC */ 282#endif /* HAVE_SYSVIPC */
283 283
284#endif /* HAVE_SOCKETS or HAVE_SYSVIPC */ 284#endif /* HAVE_SOCKETS or HAVE_SYSVIPC */
285
286#ifndef HAVE_STRERROR
287char *
288strerror (errnum)
289 int errnum;
290{
291 extern char *sys_errlist[];
292 extern int sys_nerr;
293
294 if (errnum >= 0 && errnum < sys_nerr)
295 return sys_errlist[errnum];
296 return (char *) "Unknown error";
297}
298
299#endif /* ! HAVE_STRERROR */
diff --git a/lib-src/env.c b/lib-src/env.c
index 282a94069df..35532e0360d 100644
--- a/lib-src/env.c
+++ b/lib-src/env.c
@@ -333,3 +333,18 @@ myindex (str, c)
333 } 333 }
334 return 0; 334 return 0;
335} 335}
336
337#ifndef HAVE_STRERROR
338char *
339strerror (errnum)
340 int errnum;
341{
342 extern char *sys_errlist[];
343 extern int sys_nerr;
344
345 if (errnum >= 0 && errnum < sys_nerr)
346 return sys_errlist[errnum];
347 return (char *) "Unknown error";
348}
349
350#endif /* ! HAVE_STRERROR */
diff --git a/lib-src/timer.c b/lib-src/timer.c
index 8676b196597..cb7c4c0b2b1 100644
--- a/lib-src/timer.c
+++ b/lib-src/timer.c
@@ -300,5 +300,20 @@ main (argc, argv)
300 for (;;) 300 for (;;)
301 pause (); 301 pause ();
302} 302}
303
304#ifndef HAVE_STRERROR
305char *
306strerror (errnum)
307 int errnum;
308{
309 extern char *sys_errlist[];
310 extern int sys_nerr;
311
312 if (errnum >= 0 && errnum < sys_nerr)
313 return sys_errlist[errnum];
314 return (char *) "Unknown error";
315}
316
317#endif /* ! HAVE_STRERROR */
303 318
304/* timer.c ends here */ 319/* timer.c ends here */