summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin/named/ns_glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/bin/named/ns_glue.c')
-rw-r--r--contrib/bind/bin/named/ns_glue.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/contrib/bind/bin/named/ns_glue.c b/contrib/bind/bin/named/ns_glue.c
index 4b7972c..9c40dde 100644
--- a/contrib/bind/bin/named/ns_glue.c
+++ b/contrib/bind/bin/named/ns_glue.c
@@ -1,9 +1,9 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_glue.c,v 8.14 1999/10/19 02:06:26 gson Exp $";
+static const char rcsid[] = "$Id: ns_glue.c,v 8.16 2000/04/21 06:50:18 vixie Exp $";
#endif /* not lint */
/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Copyright (c) 1996-2000 by Internet Software Consortium, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -73,15 +73,13 @@ ina_put(struct in_addr ina, u_char *data) {
}
/*
- * XXX: sin_ntoa() should probably be in libc.
+ * IP address to presentation format.
*/
const char *
sin_ntoa(struct sockaddr_in sin) {
static char ret[sizeof "[111.222.333.444].55555"];
- sprintf(ret, "[%s].%u",
- inet_ntoa(sin.sin_addr),
- ntohs(sin.sin_port));
+ sprintf(ret, "[%s].%u", inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
return (ret);
}
@@ -180,7 +178,7 @@ ns_assertion_failed(char *file, int line, assertion_type type, char *cond,
}
/*
- * XXX This is for compatibility and will eventually be removed.
+ * XXX This is for compatibility and should eventually be removed.
*/
void
panic(const char *msg, const void *arg) {
@@ -192,7 +190,7 @@ panic(const char *msg, const void *arg) {
* Note: the root label is not included in the count.
*/
int
-nlabels (const char *dname) {
+nlabels(const char *dname) {
int count, i, found, escaped;
const char *tmpdname, *end_tmpdname;
int tmpdnamelen, c;
@@ -215,9 +213,8 @@ nlabels (const char *dname) {
escaped = 0;
else
escaped = 1;
- } else {
+ } else
break;
- }
if (!escaped)
tmpdnamelen--;
}
@@ -244,8 +241,7 @@ nlabels (const char *dname) {
}
}
- ns_debug(ns_log_default, 12, "nlabels of \"%s\" -> %d", dname,
- count);
+ ns_debug(ns_log_default, 12, "nlabels of \"%s\" -> %d", dname, count);
return (count);
}
@@ -448,3 +444,20 @@ movefile(const char *oldname, const char *newname) {
return (rename(oldname, newname));
}
#endif
+
+#ifdef ultrix
+/*
+ * Some library routines in libc need to be able to see the res_send
+ * and res_close symbols with out __ prefix otherwise we get multiply
+ * defined symbol errors when linking named.
+ */
+
+#undef res_send
+int res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) {
+ return __res_send(buf, buflen, ans, anssiz);
+}
+#undef _res_close
+void _res_close(void) {
+ __res_close();
+}
+#endif
OpenPOWER on IntegriCloud