Mercurial > emacs
diff lib-src/=timer.c @ 5527:51451a050975
[! HAVE_STRERROR] (strerror): Define the function.
| author | Roland McGrath <roland@gnu.org> |
|---|---|
| date | Sat, 08 Jan 1994 22:27:30 +0000 |
| parents | 1d84e80b47a4 |
| children | c50d6d8ad8c1 |
line wrap: on
line diff
--- a/lib-src/=timer.c Sat Jan 08 22:06:34 1994 +0000 +++ b/lib-src/=timer.c Sat Jan 08 22:27:30 1994 +0000 @@ -300,5 +300,20 @@ for (;;) pause (); } + +#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 */ /* timer.c ends here */
