* Copyright (c) 1987 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
"@(#) Copyright (c) 1987 Regents of the University of California.\n\
static char sccsid
[] = "@(#)herror.c 1.1 (Berkeley) %G%";
"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
= h_errno
< h_nerr
? h_errlist
[h_errno
] : "Unknown error";
v
->iov_len
= strlen(v
->iov_base
);
writev(2, iov
, (v
- iov
) + 1);