summaryrefslogtreecommitdiff
path: root/setup.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-03-10 23:30:34 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-03-10 23:30:34 +0000
commit958690522090718e23b12ccd5000e87c5544fbd7 (patch)
tree007ba99c4d45b4c0bbb18bfc1a027759c56c03c5 /setup.h
parent989849366122cdd1abd7caa1ce979145e96ccdca (diff)
downloadc-ares-958690522090718e23b12ccd5000e87c5544fbd7.tar.gz
c-ares-958690522090718e23b12ccd5000e87c5544fbd7.tar.bz2
c-ares-958690522090718e23b12ccd5000e87c5544fbd7.zip
Dominick Meglio added ares_parse_aaaa_reply.c and did various adjustments. The
first little steps towards IPv6 support!
Diffstat (limited to 'setup.h')
-rw-r--r--setup.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/setup.h b/setup.h
index 696f7c5..b7b99b5 100644
--- a/setup.h
+++ b/setup.h
@@ -1,7 +1,7 @@
#ifndef ARES_SETUP_H
#define ARES_SETUP_H
-/* Copyright (C) 2004 by Daniel Stenberg et al
+/* Copyright (C) 2004 - 2005 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
@@ -45,11 +45,11 @@ typedef int ares_socket_t;
/* Assume a few thing unless they're set by configure
*/
#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER)
-#define HAVE_SYS_TIME_H
+#define HAVE_SYS_TIME_H
#endif
#if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
-#define HAVE_UNISTD_H
+#define HAVE_UNISTD_H
#endif
#if !defined(HAVE_SYS_UIO_H) && !defined(WIN32) && !defined(MSDOS)
@@ -69,4 +69,24 @@ int ares_strcasecmp(const char *s1, const char *s2);
#define strcasecmp(a,b) ares_strcasecmp(a,b)
#endif
+/* IPv6 compatibility */
+#if !defined(HAVE_AF_INET6)
+#if defined(HAVE_PF_INET6)
+#define AF_INET6 PF_INET6
+#else
+#define AF_INET6 AF_MAX+1
+#endif
+#endif
+
+#ifndef HAVE_PF_INET6
+#define PF_INET6 AF_INET6
+#endif
+
+#ifndef HAVE_STRUCT_IN6_ADDR
+struct in6_addr
+{
+ unsigned char s6_addr[16];
+};
+#endif
+
#endif /* ARES_SETUP_H */