From 738e547815c9a799fa12c63715be13b7046fc25a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 22 Nov 2009 03:41:26 +0000 Subject: Fix name space pollution. --- ares/ares_getopt.c | 2 +- ares/ares_getopt.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ares') diff --git a/ares/ares_getopt.c b/ares/ares_getopt.c index 59f3b8834..b3cbb012d 100644 --- a/ares/ares_getopt.c +++ b/ares/ares_getopt.c @@ -51,7 +51,7 @@ int opterr = 1, /* if error message should be printed */ optind = 1; /* index into parent argv vector */ -static int optopt; /* character checked for validity */ +int optopt = 0; /* character checked for validity */ static int optreset; /* reset getopt */ char *optarg; /* argument associated with option */ diff --git a/ares/ares_getopt.h b/ares/ares_getopt.h index e0eb28323..3c8074930 100644 --- a/ares/ares_getopt.h +++ b/ares/ares_getopt.h @@ -33,15 +33,15 @@ int ares_getopt(int nargc, char * const nargv[], const char *ostr); -#if defined(WATT32) -#undef optarg -#undef optind -#undef opterr -#endif +#define optarg ares_optarg +#define optind ares_optind +#define opterr ares_opterr +#define optopt ares_optopt +#define optreset ares_optreset extern char *optarg; extern int optind; extern int opterr; - +extern int optopt; #endif /* ARES_GETOPT_H */ -- cgit v1.2.3