diff options
Diffstat (limited to 'lib/libc/resolv/res_mkupdate.c')
-rw-r--r-- | lib/libc/resolv/res_mkupdate.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/lib/libc/resolv/res_mkupdate.c b/lib/libc/resolv/res_mkupdate.c index 01078f1..0e800e3 100644 --- a/lib/libc/resolv/res_mkupdate.c +++ b/lib/libc/resolv/res_mkupdate.c @@ -23,6 +23,8 @@ #if !defined(lint) && !defined(SABER) static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.2.1.4.5 2005/10/14 05:43:47 marka Exp $"; #endif /* not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "port_before.h" @@ -44,6 +46,10 @@ static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.2.1.4.5 2005/10/14 05:43: #include <unistd.h> #include <ctype.h> +#ifdef _LIBC +#include <isc/list.h> +#endif + #include "port_after.h" /* Options. Leave them on. */ @@ -59,7 +65,13 @@ static int getstr_str(char *, int, u_char **, u_char *); /* Forward. */ +#ifdef _LIBC +static +#endif int res_protocolnumber(const char *); +#ifdef _LIBC +static +#endif int res_servicenumber(const char *); /* @@ -89,7 +101,10 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { u_int16_t rtype, rclass; u_int32_t n1, rttl; u_char *dnptrs[20], **dpp, **lastdnptr; - int siglen, keylen, certlen; +#ifndef _LIBC + int siglen; +#endif + int keylen, certlen; /* * Initialize header fields. @@ -445,6 +460,9 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { return (-1); break; case ns_t_sig: +#ifdef _LIBC + return (-1); +#else { int sig_type, success, dateerror; u_int32_t exptime, timesigned; @@ -535,6 +553,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { cp += siglen; break; } +#endif case ns_t_key: /* flags */ n = gethexnum_str(&startp, endp); @@ -980,6 +999,7 @@ res_buildservicelist() { endservent(); } +#ifndef _LIBC void res_destroyservicelist() { struct valuelist *slp, *slp_next; @@ -992,7 +1012,11 @@ res_destroyservicelist() { } servicelist = (struct valuelist *)0; } +#endif +#ifdef _LIBC +static +#endif void res_buildprotolist(void) { struct protoent *pp; @@ -1022,6 +1046,7 @@ res_buildprotolist(void) { endprotoent(); } +#ifndef _LIBC void res_destroyprotolist(void) { struct valuelist *plp, *plp_next; @@ -1033,6 +1058,7 @@ res_destroyprotolist(void) { } protolist = (struct valuelist *)0; } +#endif static int findservice(const char *s, struct valuelist **list) { @@ -1059,6 +1085,9 @@ findservice(const char *s, struct valuelist **list) { /* * Convert service name or (ascii) number to int. */ +#ifdef _LIBC +static +#endif int res_servicenumber(const char *p) { if (servicelist == (struct valuelist *)0) @@ -1069,6 +1098,9 @@ res_servicenumber(const char *p) { /* * Convert protocol name or (ascii) number to int. */ +#ifdef _LIBC +static +#endif int res_protocolnumber(const char *p) { if (protolist == (struct valuelist *)0) @@ -1076,6 +1108,7 @@ res_protocolnumber(const char *p) { return (findservice(p, &protolist)); } +#ifndef _LIBC static struct servent * cgetservbyport(u_int16_t port, const char *proto) { /* Host byte order. */ struct valuelist **list = &servicelist; @@ -1156,3 +1189,4 @@ res_servicename(u_int16_t port, const char *proto) { /* Host byte order. */ } return (ss->s_name); } +#endif |