summaryrefslogtreecommitdiffstats
path: root/lib/libc/resolv/herror.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/resolv/herror.c')
-rw-r--r--lib/libc/resolv/herror.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/lib/libc/resolv/herror.c b/lib/libc/resolv/herror.c
index 9232426..c09969d 100644
--- a/lib/libc/resolv/herror.c
+++ b/lib/libc/resolv/herror.c
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -50,11 +46,14 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: herror.c,v 1.3.18.1 2005/04/27 05:01:09 sra Exp $";
+static const char rcsid[] = "$Id: herror.c,v 1.2.206.1 2004/03/09 08:33:54 marka Exp $";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include "port_before.h"
+#include "namespace.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/uio.h>
@@ -66,25 +65,23 @@ static const char rcsid[] = "$Id: herror.c,v 1.3.18.1 2005/04/27 05:01:09 sra Ex
#include <resolv.h>
#include <string.h>
#include <unistd.h>
-#include <irs.h>
+#include "un-namespace.h"
#include "port_after.h"
const char *h_errlist[] = {
"Resolver Error 0 (no error)",
- "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 */
+ "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] };
+const int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
-#if !(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
#undef h_errno
int h_errno;
-#endif
-/*%
+/*
* herror --
* print the error indicated by the h_errno value.
*/
@@ -110,10 +107,10 @@ herror(const char *s) {
DE_CONST("\n", t);
v->iov_base = t;
v->iov_len = 1;
- writev(STDERR_FILENO, iov, (v - iov) + 1);
+ _writev(STDERR_FILENO, iov, (v - iov) + 1);
}
-/*%
+/*
* hstrerror --
* return the string associated with a given "host" errno value.
*/
@@ -125,5 +122,3 @@ hstrerror(int err) {
return (h_errlist[err]);
return ("Unknown resolver error");
}
-
-/*! \file */
OpenPOWER on IntegriCloud