1
/* strerror -- return a string corresponding to an error number.
2
This is a quickie version only intended as compatability glue
3
for systems which predate the ANSI C definition of the function;
4
the glibc version is recommended for more general use.
6
Copyright (C) 1998 Free Software Foundation, Inc.
8
This program is free software; you can redistribute it and/or modify it
9
under the terms of the GNU General Public License as published by the
10
Free Software Foundation; either version 2, or (at your option) any
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, 59 Temple Place - Suite 330,
21
Boston, MA 02111-1307, USA. */
37
extern char *sys_errlist[];
43
static char unknown_string[] =
44
"Unknown error code #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
46
if (0<=e && e<sys_nerr)
47
return sys_errlist[e];
48
sprintf(unknown_string+20, "%d", e);
49
return unknown_string;
52
#endif /* !HAVE_STRERROR */