summaryrefslogtreecommitdiffstats
path: root/gnu/libexec/uucp/libunix/strerr.c
blob: 8e7480f1ec5c4675d8c0268673ddca808cf7bb88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* strerr.c
   Return a string for a Unix errno value.  */

#include "uucp.h"

#include <errno.h>

#ifndef sys_nerr
extern int sys_nerr;
#endif
#ifndef sys_errlist
extern char *sys_errlist[];
#endif

#undef strerror

char *
strerror (ierr)
     int ierr;
{
  if (ierr >= 0 && ierr < sys_nerr)
    return sys_errlist[ierr];
  return (char *) "unknown error";
}
OpenPOWER on IntegriCloud