#!mkcmd
# $Id: util_herror.m,v 8.33 2012/08/30 14:42:41 ksb Exp $
# replay herror on systems where it is missing

%hi
/* this belongs in machine.h, try to figure out if we need emulation
 * for error lists for host entries.
 */
#if !defined(HAVE_H_ERRLIST)
#define HAVE_H_ERRLIST	0
#endif

#if !defined(NEED_HSTRERROR)
#define NEED_HSTRERROR	0
#endif
%%

%i
#if !HAVE_H_ERRLIST
char *h_errlist[] = {
	"Unknown 0",
	"Host not found",
	"Try again",
	"Non recoverable implementation error",
	"No data of requested type",
	"Unknown 5"
};
#endif

#if NEED_HSTRERROR
#define hstrerror(Me)   (h_errlist[Me])
#endif
%%
