resolv: make internal symbols static/hidden

Change-Id: I988b83613e6252c0cc961555e81c10f856a38b37
This commit is contained in:
Jim Huang 2010-10-15 02:02:57 +08:00
parent f67e5211e0
commit 7cc5666d94
6 changed files with 10 additions and 8 deletions

View file

@ -1143,7 +1143,7 @@ _cache_flush_locked( Cache* cache )
"*************************");
}
struct resolv_cache*
static struct resolv_cache*
_resolv_cache_create( void )
{
struct resolv_cache* cache;

View file

@ -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

View file

@ -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},

View file

@ -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;

View file

@ -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;

View file

@ -134,6 +134,7 @@ _res_thread_get(void)
return rt;
}
__LIBC_HIDDEN__
struct __res_state _nres;
#if 0