diff options
author | Yang Tse <yangsita@gmail.com> | 2007-04-12 18:59:46 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-04-12 18:59:46 +0000 |
commit | b36376e12d0bd904e02122ebffc6c21530ee40e8 (patch) | |
tree | df968113b0243867a97b95c06dae01ecc6f810ab /ares | |
parent | 8aae15b6300cffed594053265b9c1aaf3e7fb7c6 (diff) |
add ares_getopt prototype
Diffstat (limited to 'ares')
-rw-r--r-- | ares/ares.h | 1 | ||||
-rw-r--r-- | ares/ares_getopt.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ares/ares.h b/ares/ares.h index 83a1c8e46..18d3a724c 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -218,6 +218,7 @@ int ares_parse_ns_reply(const unsigned char *abuf, int alen, void ares_free_string(void *str); void ares_free_hostent(struct hostent *host); const char *ares_strerror(int code); +int ares_getopt(int nargc, char * const nargv[], const char *ostr); #ifdef __cplusplus } diff --git a/ares/ares_getopt.c b/ares/ares_getopt.c index 738e70738..a14b6da30 100644 --- a/ares/ares_getopt.c +++ b/ares/ares_getopt.c @@ -44,9 +44,12 @@ * #endif */ +#include "setup.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "ares.h" /* declarations to provide consistent linkage */ extern char *optarg; @@ -61,7 +64,7 @@ char *optarg; /* argument associated with option */ #define BADCH (int)'?' #define BADARG (int)':' -#define EMSG "" +#define EMSG (char *)"" /* * ares_getopt -- |