summaryrefslogtreecommitdiff
path: root/ares_init.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-03-19 01:03:46 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-03-19 01:03:46 +0000
commitbb42658b06414d1d9d2dfe4d5bdae1395af96da8 (patch)
tree3f69fa9f500aa9a8b1f423f5366f1d7f1f80b042 /ares_init.c
parent1223fb7eaceca6a7009a6a06ddfe094f926aa723 (diff)
downloadc-ares-bb42658b06414d1d9d2dfe4d5bdae1395af96da8.tar.gz
c-ares-bb42658b06414d1d9d2dfe4d5bdae1395af96da8.tar.bz2
c-ares-bb42658b06414d1d9d2dfe4d5bdae1395af96da8.zip
silence warnings on win32 about static functions that are never used
Diffstat (limited to 'ares_init.c')
-rw-r--r--ares_init.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/ares_init.c b/ares_init.c
index d4a63a3..78103e2 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -54,19 +54,22 @@ static int init_by_options(ares_channel channel, struct ares_options *options,
static int init_by_environment(ares_channel channel);
static int init_by_resolv_conf(ares_channel channel);
static int init_by_defaults(ares_channel channel);
-static int config_domain(ares_channel channel, char *str);
-static int config_lookup(ares_channel channel, const char *str,
- const char *bindch, const char *filech);
+
static int config_nameserver(struct server_state **servers, int *nservers,
char *str);
-static int config_sortlist(struct apattern **sortlist, int *nsort,
- const char *str);
static int set_search(ares_channel channel, const char *str);
static int set_options(ares_channel channel, const char *str);
-static char *try_config(char *s, const char *opt);
static const char *try_option(const char *p, const char *q, const char *opt);
static int ip_addr(const char *s, int len, struct in_addr *addr);
static void natural_mask(struct apattern *pat);
+#ifndef WIN32
+static int config_domain(ares_channel channel, char *str);
+static int config_lookup(ares_channel channel, const char *str,
+ const char *bindch, const char *filech);
+static int config_sortlist(struct apattern **sortlist, int *nsort,
+ const char *str);
+static char *try_config(char *s, const char *opt);
+#endif
int ares_init(ares_channel *channelptr)
{
@@ -709,6 +712,7 @@ static int init_by_defaults(ares_channel channel)
return ARES_SUCCESS;
}
+#ifndef WIN32
static int config_domain(ares_channel channel, char *str)
{
char *q;
@@ -749,6 +753,8 @@ static int config_lookup(ares_channel channel, const char *str,
return (channel->lookups) ? ARES_SUCCESS : ARES_ENOMEM;
}
+#endif
+
static int config_nameserver(struct server_state **servers, int *nservers,
char *str)
{
@@ -810,6 +816,7 @@ static int config_nameserver(struct server_state **servers, int *nservers,
return ARES_SUCCESS;
}
+#ifndef WIN32
static int config_sortlist(struct apattern **sortlist, int *nsort,
const char *str)
{
@@ -856,6 +863,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
return ARES_SUCCESS;
}
+#endif
static int set_search(ares_channel channel, const char *str)
{
@@ -937,6 +945,7 @@ static int set_options(ares_channel channel, const char *str)
return ARES_SUCCESS;
}
+#ifndef WIN32
static char *try_config(char *s, const char *opt)
{
size_t len;
@@ -950,6 +959,8 @@ static char *try_config(char *s, const char *opt)
return s;
}
+#endif
+
static const char *try_option(const char *p, const char *q, const char *opt)
{
size_t len = strlen(opt);