summaryrefslogtreecommitdiff
path: root/setup.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-10-18 15:57:49 +0000
committerYang Tse <yangsita@gmail.com>2006-10-18 15:57:49 +0000
commit70ed671edf618a0508d2f06ddb80e5813aca5e68 (patch)
tree58504444da71384c030ef1d99b23f058c05dbb99 /setup.h
parent5d9bf10232a660d69ed69ce9a4aa0ffd6882a70a (diff)
downloadc-ares-70ed671edf618a0508d2f06ddb80e5813aca5e68.tar.gz
c-ares-70ed671edf618a0508d2f06ddb80e5813aca5e68.tar.bz2
c-ares-70ed671edf618a0508d2f06ddb80e5813aca5e68.zip
Introduce symbol USE_WINSOCK which will be defined when
using winsock or winsock2 API.
Diffstat (limited to 'setup.h')
-rw-r--r--setup.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/setup.h b/setup.h
index 70af3be..3b97e27 100644
--- a/setup.h
+++ b/setup.h
@@ -70,6 +70,22 @@
#endif
/*
+ * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
+ * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
+ * undefine USE_WINSOCK.
+ */
+
+#undef USE_WINSOCK
+
+#ifdef HAVE_WINSOCK2_H
+# define USE_WINSOCK 2
+#else
+# ifdef HAVE_WINSOCK_H
+# define USE_WINSOCK 1
+# endif
+#endif
+
+/*
* Work-arounds for systems without configure support
*/