Add libbroken.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@417 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
26
lib/roken/hstrerror.c
Normal file
26
lib/roken/hstrerror.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_HSTRERROR
|
||||
|
||||
#include <stdio.h>
|
||||
#include <netdb.h>
|
||||
|
||||
static char *msg[] = {
|
||||
"No error",
|
||||
"Authoritative Answer Host not found",
|
||||
"Non-Authoritive Host not found, or SERVERFAIL",
|
||||
"Non recoverable errors, FORMERR, REFUSED, NOTIMP",
|
||||
"Valid name, no data record of requested type"
|
||||
};
|
||||
|
||||
char *hstrerror(int herr)
|
||||
{
|
||||
if(herr >= 0 && herr <= 4)
|
||||
return msg[herr];
|
||||
return "Error number out of range (hstrerror)";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user