* Copyright (c) 1987 Regents of the University of California.
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)herror.c 6.6 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
"Unknown host", /* 1 HOST_NOT_FOUND */
"Host name lookup failure", /* 2 TRY_AGAIN */
"Unknown server error", /* 3 NO_RECOVERY */
"No address associated with name", /* 4 NO_ADDRESS */
int h_nerr
= { sizeof(h_errlist
)/sizeof(h_errlist
[0]) };
* print the error indicated by the h_errno value.
register struct iovec
*v
= iov
;
v
->iov_base
= (u_int
)h_errno
< h_nerr
?
h_errlist
[h_errno
] : "Unknown error";
v
->iov_len
= strlen(v
->iov_base
);
writev(STDERR_FILENO
, iov
, (v
- iov
) + 1);