about summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-10-18 09:58:59 +0000
committerJakub Jelinek <jakub@redhat.com>2004-10-18 09:58:59 +0000
commit56c4396a6e1568a5511ac43873fa3c9e1ebfa8d1 (patch)
treef2d0f6e1aaf9794668b53c6456fcacbbacd63805 /resolv
parent4ce1a5c9712b4d7616058e708630c33744f983f6 (diff)
downloadglibc-56c4396a6e1568a5511ac43873fa3c9e1ebfa8d1.tar.gz
glibc-56c4396a6e1568a5511ac43873fa3c9e1ebfa8d1.tar.xz
glibc-56c4396a6e1568a5511ac43873fa3c9e1ebfa8d1.zip
Updated to fedora-glibc-20041018T0940
Diffstat (limited to 'resolv')
-rw-r--r--resolv/base64.c9
-rw-r--r--resolv/gethnamaddr.c8
-rw-r--r--resolv/ns_name.c2
-rw-r--r--resolv/ns_netint.c3
-rw-r--r--resolv/res_comp.c15
-rw-r--r--resolv/res_data.c7
-rw-r--r--resolv/res_debug.c31
-rw-r--r--resolv/res_mkquery.c1
-rw-r--r--resolv/res_query.c6
-rw-r--r--resolv/res_send.c3
10 files changed, 64 insertions, 21 deletions
diff --git a/resolv/base64.c b/resolv/base64.c
index b7c7d1c1b8..ea584ed357 100644
--- a/resolv/base64.c
+++ b/resolv/base64.c
@@ -112,9 +112,9 @@ static const char Pad64 = '=';
    end of the data is performed using the '=' character.
 
    Since all base64 input is an integral number of octets, only the
-         -------------------------------------------------                       
+         -------------------------------------------------
    following cases can arise:
-   
+
        (1) the final quantum of encoding input is an integral
            multiple of 24 bits; here, the final unit of encoded
 	   output will be an integral multiple of 4 characters
@@ -156,14 +156,14 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
 		target[datalength++] = Base64[output[2]];
 		target[datalength++] = Base64[output[3]];
 	}
-    
+
 	/* Now we worry about padding. */
 	if (0 != srclength) {
 		/* Get what's left. */
 		input[0] = input[1] = input[2] = '\0';
 		for (i = 0; i < srclength; i++)
 			input[i] = *src++;
-	
+
 		output[0] = input[0] >> 2;
 		output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
 		output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
@@ -186,6 +186,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
 	target[datalength] = '\0';	/* Returned value doesn't count \0. */
 	return (datalength);
 }
+libresolv_hidden_def (b64_ntop)
 
 /* skips all whitespace anywhere.
    converts characters, four at a time, starting at (or after)
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index 1a4b08ecdc..3698e4b841 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -487,6 +487,9 @@ getanswer(answer, anslen, qname, qtype)
 	return (NULL);
 }
 
+extern struct hostent *gethostbyname2(const char *name, int af);
+libresolv_hidden_proto (gethostbyname2)
+
 struct hostent *
 gethostbyname(name)
 	const char *name;
@@ -637,6 +640,7 @@ gethostbyname2(name, af)
 		free (buf.buf);
 	return ret;
 }
+libresolv_hidden_def (gethostbyname2)
 
 struct hostent *
 gethostbyaddr(addr, len, af)
@@ -795,6 +799,7 @@ _sethtent(f)
 		rewind(hostf);
 	stayopen = f;
 }
+libresolv_hidden_def (_sethtent)
 
 void
 _endhtent()
@@ -869,6 +874,7 @@ _gethtent()
 	__set_h_errno (NETDB_SUCCESS);
 	return (&host);
 }
+libresolv_hidden_def (_gethtent)
 
 struct hostent *
 _gethtbyname(name)
@@ -907,6 +913,7 @@ _gethtbyname2(name, af)
 	_endhtent();
 	return (p);
 }
+libresolv_hidden_def (_gethtbyname2)
 
 struct hostent *
 _gethtbyaddr(addr, len, af)
@@ -923,6 +930,7 @@ _gethtbyaddr(addr, len, af)
 	_endhtent();
 	return (p);
 }
+libresolv_hidden_def (_gethtbyaddr)
 
 static void
 map_v4v6_address(src, dst)
diff --git a/resolv/ns_name.c b/resolv/ns_name.c
index b96a1fe8ab..ed361915d8 100644
--- a/resolv/ns_name.c
+++ b/resolv/ns_name.c
@@ -145,6 +145,7 @@ ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
 	*dn++ = '\0';
 	return (dn - dst);
 }
+libresolv_hidden_def (ns_name_ntop)
 
 /*
  * ns_name_pton(src, dst, dstsiz)
@@ -421,6 +422,7 @@ ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
 		len = srcp - src;
 	return (len);
 }
+libresolv_hidden_def (ns_name_unpack)
 
 /*
  * ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr)
diff --git a/resolv/ns_netint.c b/resolv/ns_netint.c
index ff24128cd6..20ecf626d8 100644
--- a/resolv/ns_netint.c
+++ b/resolv/ns_netint.c
@@ -22,6 +22,7 @@ static const char rcsid[] = "$BINDId: ns_netint.c,v 8.4 1999/10/13 16:39:35 vixi
 /* Import. */
 
 #include <arpa/nameser.h>
+#include <resolv.h>
 
 /* Public. */
 
@@ -32,6 +33,7 @@ ns_get16(const u_char *src) {
 	NS_GET16(dst, src);
 	return (dst);
 }
+libresolv_hidden_def (ns_get16)
 
 u_long
 ns_get32(const u_char *src) {
@@ -40,6 +42,7 @@ ns_get32(const u_char *src) {
 	NS_GET32(dst, src);
 	return (dst);
 }
+libresolv_hidden_def (ns_get32)
 
 void
 ns_put16(u_int src, u_char *dst) {
diff --git a/resolv/res_comp.c b/resolv/res_comp.c
index f227c4d163..8157b97566 100644
--- a/resolv/res_comp.c
+++ b/resolv/res_comp.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 1985, 1993
  *    The Regents of the University of California.  All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -13,7 +13,7 @@
  * 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.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -29,14 +29,14 @@
 
 /*
  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- * 
+ *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies, and that
  * the name of Digital Equipment Corporation not be used in advertising or
  * publicity pertaining to distribution of the document or software without
  * specific, written prior permission.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
@@ -96,6 +96,7 @@ dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
 		dst[0] = '\0';
 	return (n);
 }
+libresolv_hidden_def (dn_expand)
 
 /*
  * Pack domain name 'exp_dn' in presentation form into 'comp_dn'.
@@ -110,6 +111,7 @@ dn_comp(const char *src, u_char *dst, int dstsiz,
 				 (const u_char **)dnptrs,
 				 (const u_char **)lastdnptr));
 }
+libresolv_hidden_def (dn_comp)
 
 /*
  * Skip over a compressed domain name. Return the size or -1.
@@ -122,6 +124,7 @@ dn_skipname(const u_char *ptr, const u_char *eom) {
 		return (-1);
 	return (ptr - saveptr);
 }
+libresolv_hidden_def (dn_skipname)
 
 /*
  * Verify that a domain name uses an acceptable character set.
@@ -170,6 +173,7 @@ res_hnok(const char *dn) {
 	}
 	return (1);
 }
+libresolv_hidden_def (res_hnok)
 
 /*
  * hostname-like (A, MX, WKS) owners can have "*" as their first label
@@ -227,6 +231,7 @@ res_dnok(const char *dn) {
 			return (0);
 	return (1);
 }
+libresolv_hidden_def (res_dnok)
 
 #ifdef BIND_4_COMPAT
 /*
@@ -238,7 +243,9 @@ res_dnok(const char *dn) {
  * Note that one _ comes from C and the others come from us.
  */
 void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); }
+libresolv_hidden_def (__putlong)
 void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }
+libresolv_hidden_def (__putshort)
 #ifndef __ultrix__
 u_int32_t _getlong(const u_char *src) { return (ns_get32(src)); }
 u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); }
diff --git a/resolv/res_data.c b/resolv/res_data.c
index 2183e022c8..438f815605 100644
--- a/resolv/res_data.c
+++ b/resolv/res_data.c
@@ -39,7 +39,7 @@ static const char rcsid[] = "$BINDId: res_data.c,v 8.17 1999/10/13 17:11:31 vixi
 #include <string.h>
 #include <unistd.h>
 
-const char *_res_opcodes[] = {
+const char *_res_opcodes[] attribute_hidden = {
 	"QUERY",
 	"IQUERY",
 	"CQUERYM",
@@ -59,7 +59,7 @@ const char *_res_opcodes[] = {
 };
 
 #ifdef BIND_UPDATE
-const char *_res_sectioncodes[] = {
+const char *_res_sectioncodes[] attribute_hidden = {
 	"ZONE",
 	"PREREQUISITES",
 	"UPDATE",
@@ -138,6 +138,7 @@ void
 fp_query(const u_char *msg, FILE *file) {
 	fp_nquery(msg, PACKETSZ, file);
 }
+libresolv_hidden_def (fp_query)
 
 void
 fp_nquery(const u_char *msg, int len, FILE *file) {
@@ -146,6 +147,7 @@ fp_nquery(const u_char *msg, int len, FILE *file) {
 
 	res_pquery(&_res, msg, len, file);
 }
+libresolv_hidden_def (fp_nquery)
 
 int
 res_mkquery(int op,			/* opcode of query */
@@ -295,6 +297,7 @@ hostalias(const char *name) {
 
 	return (res_hostalias(&_res, name, abuf, sizeof abuf));
 }
+libresolv_hidden_def (hostalias)
 
 #ifdef ultrix
 int
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index bd1fd3388f..6b719d1f2d 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -118,8 +118,8 @@ static const char rcsid[] = "$BINDId: res_debug.c,v 8.34 2000/02/29 05:30:55 vix
 # define SPRINTF(x) sprintf x
 #endif
 
-extern const char *_res_opcodes[];
-extern const char *_res_sectioncodes[];
+extern const char *_res_opcodes[] attribute_hidden;
+extern const char *_res_sectioncodes[] attribute_hidden;
 
 /*
  * Print the current options.
@@ -298,6 +298,7 @@ p_cdnname(const u_char *cp, const u_char *msg, int len, FILE *file) {
 		fputs(name, file);
 	return (cp + n);
 }
+libresolv_hidden_def (p_cdnname)
 
 const u_char *
 p_cdname(const u_char *cp, const u_char *msg, FILE *file) {
@@ -327,6 +328,7 @@ p_fqnname(cp, msg, msglen, name, namelen)
 	}
 	return (cp + n);
 }
+libresolv_hidden_def (p_fqnname)
 
 /* XXX:	the rest of these functions need to become length-limited, too. */
 
@@ -347,7 +349,7 @@ p_fqname(const u_char *cp, const u_char *msg, FILE *file) {
  * that C_ANY is a qclass but not a class.  (You can ask for records of class
  * C_ANY, but you can't have any records of that class in the database.)
  */
-const struct res_sym __p_class_syms[] = {
+const struct res_sym __p_class_syms[] attribute_hidden = {
 	{C_IN,		"IN"},
 	{C_CHAOS,	"CHAOS"},
 	{C_HS,		"HS"},
@@ -360,7 +362,7 @@ const struct res_sym __p_class_syms[] = {
 /*
  * Names of message sections.
  */
-const struct res_sym __p_default_section_syms[] = {
+const struct res_sym __p_default_section_syms[] attribute_hidden = {
 	{ns_s_qd,	"QUERY"},
 	{ns_s_an,	"ANSWER"},
 	{ns_s_ns,	"AUTHORITY"},
@@ -368,7 +370,7 @@ const struct res_sym __p_default_section_syms[] = {
 	{0,             (char *)0}
 };
 
-const struct res_sym __p_update_section_syms[] = {
+const struct res_sym __p_update_section_syms[] attribute_hidden = {
 	{S_ZONE,	"ZONE"},
 	{S_PREREQ,	"PREREQUISITE"},
 	{S_UPDATE,	"UPDATE"},
@@ -376,7 +378,7 @@ const struct res_sym __p_update_section_syms[] = {
 	{0,             (char *)0}
 };
 
-const struct res_sym __p_key_syms[] = {
+const struct res_sym __p_key_syms[] attribute_hidden = {
 	{NS_ALG_MD5RSA,		"RSA",		"RSA KEY with MD5 hash"},
 	{NS_ALG_DH,		"DH",		"Diffie Hellman"},
 	{NS_ALG_DSA,		"DSA",		"Digital Signature Algorithm"},
@@ -385,7 +387,7 @@ const struct res_sym __p_key_syms[] = {
 	{0,			NULL,		NULL}
 };
 
-const struct res_sym __p_cert_syms[] = {
+const struct res_sym __p_cert_syms[] attribute_hidden = {
 	{cert_t_pkix,	"PKIX",		"PKIX (X.509v3) Certificate"},
 	{cert_t_spki,	"SPKI",		"SPKI certificate"},
 	{cert_t_pgp,	"PGP",		"PGP certificate"},
@@ -399,7 +401,7 @@ const struct res_sym __p_cert_syms[] = {
  * that T_ANY is a qtype but not a type.  (You can ask for records of type
  * T_ANY, but you can't have any records of that type in the database.)
  */
-const struct res_sym __p_type_syms[] = {
+const struct res_sym __p_type_syms[] attribute_hidden = {
 	{ns_t_a,	"A",		"address"},
 	{ns_t_ns,	"NS",		"name server"},
 	{ns_t_md,	"MD",		"mail destination (deprecated)"},
@@ -450,7 +452,7 @@ const struct res_sym __p_type_syms[] = {
 /*
  * Names of DNS rcodes.
  */
-const struct res_sym __p_rcode_syms[] = {
+const struct res_sym __p_rcode_syms[] attribute_hidden = {
 	{ns_r_noerror,	"NOERROR",		"no error"},
 	{ns_r_formerr,	"FORMERR",		"format error"},
 	{ns_r_servfail,	"SERVFAIL",		"server failed"},
@@ -500,6 +502,7 @@ sym_ntos(const struct res_sym *syms, int number, int *success) {
 		*success = 0;
 	return (unname);
 }
+libresolv_hidden_def (sym_ntos)
 
 const char *
 sym_ntop(const struct res_sym *syms, int number, int *success) {
@@ -525,6 +528,7 @@ const char *
 p_type(int type) {
 	return (sym_ntos(__p_type_syms, type, (int *)0));
 }
+libresolv_hidden_def (p_type)
 
 /*
  * Return a string for the type.
@@ -551,6 +555,7 @@ const char *
 p_class(int class) {
 	return (sym_ntos(__p_class_syms, class, (int *)0));
 }
+libresolv_hidden_def (p_class)
 
 /*
  * Return a mnemonic for an option
@@ -581,6 +586,7 @@ p_option(u_long option) {
 				return (nbuf);
 	}
 }
+libresolv_hidden_def (p_option)
 
 /*
  * Return a mnemonic for a time to live.
@@ -601,6 +607,7 @@ const char *
 p_rcode(int rcode) {
 	return (sym_ntos(__p_rcode_syms, rcode, (int *)0));
 }
+libresolv_hidden_def (p_rcode)
 
 /*
  * routines to convert between on-the-wire RR format and zone file format.
@@ -608,8 +615,9 @@ p_rcode(int rcode) {
  * by 60*60*1000 for that.
  */
 
-static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000,
-				      1000000,10000000,100000000,1000000000};
+static const unsigned int poweroften[10]=
+  { 1, 10, 100, 1000, 10000, 100000,
+    1000000,10000000,100000000,1000000000};
 
 /* takes an XeY precision/size value, returns a string representation. */
 static const char *
@@ -988,6 +996,7 @@ loc_ntoa(binary, ascii)
 
 	return (ascii);
 }
+libresolv_hidden_def (loc_ntoa)
 
 
 /* Return the number of DNS hierarchy levels in the name. */
diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c
index 9825ae0fa3..875d495b72 100644
--- a/resolv/res_mkquery.c
+++ b/resolv/res_mkquery.c
@@ -219,3 +219,4 @@ res_nmkquery(res_state statp,
 	}
 	return (cp - buf);
 }
+libresolv_hidden_def (res_nmkquery)
diff --git a/resolv/res_query.c b/resolv/res_query.c
index d2ef3b5e93..0feba6687a 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -190,6 +190,7 @@ __libc_res_nquery(res_state statp,
 	}
 	return (n);
 }
+libresolv_hidden_def (__libc_res_nquery)
 
 int
 res_nquery(res_state statp,
@@ -201,6 +202,7 @@ res_nquery(res_state statp,
 	return __libc_res_nquery(statp, name, class, type, answer, anslen,
 				 NULL);
 }
+libresolv_hidden_def (res_nquery)
 
 /*
  * Formulate a normal query, send, and retrieve answer in supplied buffer.
@@ -365,6 +367,7 @@ __libc_res_nsearch(res_state statp,
 		RES_SET_H_ERRNO(statp, TRY_AGAIN);
 	return (-1);
 }
+libresolv_hidden_def (__libc_res_nsearch)
 
 int
 res_nsearch(res_state statp,
@@ -376,6 +379,7 @@ res_nsearch(res_state statp,
 	return __libc_res_nsearch(statp, name, class, type, answer,
 				  anslen, NULL);
 }
+libresolv_hidden_def (res_nsearch)
 
 /*
  * Perform a call on res_query on the concatenation of name and domain,
@@ -439,6 +443,7 @@ res_nquerydomain(res_state statp,
 	return __libc_res_nquerydomain(statp, name, domain, class, type,
 				       answer, anslen, NULL);
 }
+libresolv_hidden_def (res_nquerydomain)
 
 const char *
 res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) {
@@ -476,3 +481,4 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) {
 	fclose(fp);
 	return (NULL);
 }
+libresolv_hidden_def (res_hostalias)
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 44d8cb0fee..7773a2f522 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -312,6 +312,7 @@ res_nameinquery(const char *name, int type, int class,
 	}
 	return (0);
 }
+libresolv_hidden_def (res_nameinquery)
 
 /* int
  * res_queriesmatch(buf1, eom1, buf2, eom2)
@@ -361,6 +362,7 @@ res_queriesmatch(const u_char *buf1, const u_char *eom1,
 	}
 	return (1);
 }
+libresolv_hidden_def (res_queriesmatch)
 
 int
 __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
@@ -689,6 +691,7 @@ res_nsend(res_state statp,
 {
 	return __libc_res_nsend(statp, buf, buflen, ans, anssiz, NULL);
 }
+libresolv_hidden_def (res_nsend)
 
 /* Private */