Files
heimdal/lib/roken/hstrerror.c
Björn Groenvall c3abc6ba6f Added const to hstrerror.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@637 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-08-07 20:06:58 +00:00

32 lines
527 B
C

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "roken.h"
#ifndef HAVE_HSTRERROR
#include <stdio.h>
#include <netdb.h>
static
const
char *const 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"
};
const
char *hstrerror(int herr)
{
if (herr >= 0 && herr <= 4)
return msg[herr];
return "Error number out of range (hstrerror)";
}
#endif