git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@519 ec53bebd-3082-4978-b11e-865c3cabbd6b
		
			
				
	
	
		
			25 lines
		
	
	
		
			350 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			350 B
		
	
	
	
		
			C
		
	
	
	
	
	
#ifdef HAVE_CONFIG_H
 | 
						|
#include <config.h>
 | 
						|
#endif
 | 
						|
 | 
						|
#include <errno.h>
 | 
						|
#include <string.h>
 | 
						|
 | 
						|
RCSID("$Id$");
 | 
						|
 | 
						|
extern int sys_nerr;
 | 
						|
extern char *sys_errlist[];
 | 
						|
 | 
						|
char*
 | 
						|
strerror(int eno)
 | 
						|
{
 | 
						|
    static char emsg[1024];
 | 
						|
 | 
						|
    if(eno < 0 || eno >= sys_nerr)
 | 
						|
	sprintf(emsg, "Error %d occurred.", eno);
 | 
						|
    else
 | 
						|
	strcpy(emsg, sys_errlist[eno]);
 | 
						|
 | 
						|
    return emsg;
 | 
						|
}
 |