aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-06 13:59:37 +0000
committerYang Tse <yangsita@gmail.com>2009-10-06 13:59:37 +0000
commit1209f2c014be055552ffc8576cc4469c7f316ce9 (patch)
tree7ee36c2db0909f955a212403e85422760d10ec74
parent7c821a85f82c983739c79239e7a4efd0ccf5643b (diff)
Fix ssize_t redefinition errors on WIN64 reported by Alexey Simak
-rw-r--r--ares/config-win32.h6
-rw-r--r--ares/setup.h6
2 files changed, 5 insertions, 7 deletions
diff --git a/ares/config-win32.h b/ares/config-win32.h
index e8c5d72a4..6f2fbc2bc 100644
--- a/ares/config-win32.h
+++ b/ares/config-win32.h
@@ -196,12 +196,16 @@
#define RETSIGTYPE void
/* Define ssize_t if it is not an available 'typedefed' type */
-#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
+#ifndef _SSIZE_T_DEFINED
+#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) || \
+ defined(__MINGW32__)
#elif defined(_WIN64)
#define ssize_t __int64
#else
#define ssize_t int
#endif
+#define _SSIZE_T_DEFINED
+#endif
/* ---------------------------------------------------------------- */
/* STRUCT RELATED */
diff --git a/ares/setup.h b/ares/setup.h
index 875062423..69ee510e6 100644
--- a/ares/setup.h
+++ b/ares/setup.h
@@ -133,12 +133,6 @@
#ifndef HAVE_CONFIG_H
-#if defined(__DJGPP__) || (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
- defined(__POCC__)
-#else
-#define ssize_t int
-#endif
-
#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) && !defined(__WATCOMC__)
#define HAVE_SYS_TIME_H
#endif