1999-09-27 18:44:28 +00:00
|
|
|
/*****************************************************
|
|
|
|
* provides strerror()
|
|
|
|
* author Stephan Witt <stephan.witt@beusen.de>
|
|
|
|
*****************************************************/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2006-04-05 23:39:11 +00:00
|
|
|
/* $Id: strerror.c,v 1.3 2000/08/04 13:12:30 lasgouttes Exp $ */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#if !defined(lint) && !defined(WITH_WARNINGS)
|
2000-08-04 13:12:30 +00:00
|
|
|
static char vcid[] = "$Id: strerror.c,v 1.3 2000/08/04 13:12:30 lasgouttes Exp $";
|
1999-09-27 18:44:28 +00:00
|
|
|
#endif /* lint */
|
|
|
|
|
2006-04-05 23:39:11 +00:00
|
|
|
extern int sys_nerr ;
|
1999-09-27 18:44:28 +00:00
|
|
|
extern char * sys_errlist [] ;
|
|
|
|
|
|
|
|
char * strerror (int errnum)
|
|
|
|
{
|
|
|
|
static char * errtext = "unknown errno" ;
|
|
|
|
|
|
|
|
if ( errnum < sys_nerr )
|
|
|
|
return sys_errlist [errnum] ;
|
|
|
|
return errtext ;
|
|
|
|
}
|