From 746f3e2942c36511fda867cac0573d2907290db0 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 15 Sep 2008 15:28:26 +0000 Subject: rearrange to allow internal/private use of ares_strcasecmp to any system that lacks the strcasecmp function. --- ahost.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ahost.c') diff --git a/ahost.c b/ahost.c index 882efcc..567c7a0 100644 --- a/ahost.c +++ b/ahost.c @@ -43,6 +43,21 @@ #include "inet_net_pton.h" #include "ares_getopt.h" +#ifndef HAVE_STRDUP +# include "ares_strdup.h" +# define strdup(ptr) ares_strdup(ptr) +#endif + +#ifndef HAVE_STRCASECMP +# include "ares_strcasecmp.h" +# define strcasecmp(p1,p2) ares_strcasecmp(p1,p2) +#endif + +#ifndef HAVE_STRNCASECMP +# include "ares_strcasecmp.h" +# define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n) +#endif + static void callback(void *arg, int status, int timeouts, struct hostent *host); static void usage(void); -- cgit v1.2.3