aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Huang <jserv@0xlab.org>2010-10-15 02:02:57 +0800
committerJim Huang <jserv@0xlab.org>2010-10-15 02:10:29 +0800
commit7cc5666d94615d9249163dc7ac0f58c2614497ce (patch)
treeda6ee98c595330b3ff97ea743d31d769e19c83ca
parentf67e5211e045af1b12f646448a5a35f96ba5e8f1 (diff)
downloadbionic-7cc5666d94615d9249163dc7ac0f58c2614497ce.tar.gz
resolv: make internal symbols static/hidden
Change-Id: I988b83613e6252c0cc961555e81c10f856a38b37
-rw-r--r--libc/netbsd/resolv/res_cache.c2
-rw-r--r--libc/netbsd/resolv/res_data.c3
-rw-r--r--libc/netbsd/resolv/res_debug.c4
-rw-r--r--libc/netbsd/resolv/res_init.c6
-rw-r--r--libc/netbsd/resolv/res_send.c2
-rw-r--r--libc/netbsd/resolv/res_state.c1
6 files changed, 10 insertions, 8 deletions
diff --git a/libc/netbsd/resolv/res_cache.c b/libc/netbsd/resolv/res_cache.c
index 2621a7bbf..84194c249 100644
--- a/libc/netbsd/resolv/res_cache.c
+++ b/libc/netbsd/resolv/res_cache.c
@@ -1143,7 +1143,7 @@ _cache_flush_locked( Cache* cache )
"*************************");
}
-struct resolv_cache*
+static struct resolv_cache*
_resolv_cache_create( void )
{
struct resolv_cache* cache;
diff --git a/libc/netbsd/resolv/res_data.c b/libc/netbsd/resolv/res_data.c
index e60ecfdd8..014c99bf0 100644
--- a/libc/netbsd/resolv/res_data.c
+++ b/libc/netbsd/resolv/res_data.c
@@ -46,6 +46,7 @@ __RCSID("$NetBSD: res_data.c,v 1.8 2004/06/09 18:07:03 christos Exp $");
#include <unistd.h>
+__LIBC_HIDDEN__
const char * const _res_opcodes[] = {
"QUERY",
"IQUERY",
@@ -82,7 +83,7 @@ extern struct __res_state _nres;
int res_ourserver_p(const res_state, const struct sockaddr *);
#ifdef ANDROID_CHANGES
-int res_need_init() {
+static int res_need_init() {
return ((_nres.options & RES_INIT) == 0U) || res_get_dns_changed();
}
#else
diff --git a/libc/netbsd/resolv/res_debug.c b/libc/netbsd/resolv/res_debug.c
index 84c6afc34..721e01556 100644
--- a/libc/netbsd/resolv/res_debug.c
+++ b/libc/netbsd/resolv/res_debug.c
@@ -385,7 +385,7 @@ const struct res_sym __p_class_syms[] = {
/*
* Names of message sections.
*/
-const struct res_sym __p_default_section_syms[] = {
+static const struct res_sym __p_default_section_syms[] = {
{ns_s_qd, "QUERY", (char *)0},
{ns_s_an, "ANSWER", (char *)0},
{ns_s_ns, "AUTHORITY", (char *)0},
@@ -393,7 +393,7 @@ const struct res_sym __p_default_section_syms[] = {
{0, (char *)0, (char *)0}
};
-const struct res_sym __p_update_section_syms[] = {
+static const struct res_sym __p_update_section_syms[] = {
{S_ZONE, "ZONE", (char *)0},
{S_PREREQ, "PREREQUISITE", (char *)0},
{S_UPDATE, "UPDATE", (char *)0},
diff --git a/libc/netbsd/resolv/res_init.c b/libc/netbsd/resolv/res_init.c
index 81e570f77..2158f2062 100644
--- a/libc/netbsd/resolv/res_init.c
+++ b/libc/netbsd/resolv/res_init.c
@@ -113,8 +113,8 @@ __RCSID("$NetBSD: res_init.c,v 1.8 2006/03/19 03:10:08 christos Exp $");
#define DNS_PROP_NAME_PREFIX "net.dns"
#define DNS_CHANGE_PROP_NAME "net.dnschange"
#define DNS_SEARCH_PROP_NAME "net.dns.search"
-const prop_info *dns_change_prop;
-int dns_last_change_counter;
+static const prop_info *dns_change_prop;
+static int dns_last_change_counter;
static int _get_dns_change_count();
#else
#include <resolv.h>
@@ -170,7 +170,7 @@ res_ninit(res_state statp) {
}
#ifdef ANDROID_CHANGES
-int load_domain_search_list(res_state statp) {
+static int load_domain_search_list(res_state statp) {
char propvalue[PROP_VALUE_MAX];
register char *cp, **pp;
diff --git a/libc/netbsd/resolv/res_send.c b/libc/netbsd/resolv/res_send.c
index 696f8cfeb..b11895621 100644
--- a/libc/netbsd/resolv/res_send.c
+++ b/libc/netbsd/resolv/res_send.c
@@ -222,7 +222,7 @@ static const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
* author:
* paul vixie, 29may94
*/
-int
+__LIBC_HIDDEN__ int
res_ourserver_p(const res_state statp, const struct sockaddr *sa) {
const struct sockaddr_in *inp, *srv;
const struct sockaddr_in6 *in6p, *srv6;
diff --git a/libc/netbsd/resolv/res_state.c b/libc/netbsd/resolv/res_state.c
index 3a2301d2e..3209b6f1c 100644
--- a/libc/netbsd/resolv/res_state.c
+++ b/libc/netbsd/resolv/res_state.c
@@ -134,6 +134,7 @@ _res_thread_get(void)
return rt;
}
+__LIBC_HIDDEN__
struct __res_state _nres;
#if 0