aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ares/ares.h8
-rw-r--r--ares/ares_private.h8
-rw-r--r--ares/setup.h10
-rw-r--r--include/curl/curl.h14
-rw-r--r--lib/setup.h10
-rw-r--r--src/setup.h10
6 files changed, 36 insertions, 24 deletions
diff --git a/ares/ares.h b/ares/ares.h
index 4437e3d3a..af7df703d 100644
--- a/ares/ares.h
+++ b/ares/ares.h
@@ -18,6 +18,14 @@
#ifndef ARES__H
#define ARES__H
+/*
+ * Define WIN32 when build target is Win32 API
+ */
+
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
+#define WIN32
+#endif
+
#include <sys/types.h>
#if defined(_AIX) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
diff --git a/ares/ares_private.h b/ares/ares_private.h
index 26f55db5a..d5ffbb382 100644
--- a/ares/ares_private.h
+++ b/ares/ares_private.h
@@ -18,6 +18,14 @@
* without express or implied warranty.
*/
+/*
+ * Define WIN32 when build target is Win32 API
+ */
+
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
+#define WIN32
+#endif
+
#include <stdio.h>
#include <sys/types.h>
diff --git a/ares/setup.h b/ares/setup.h
index 29e5d0f1f..70b8ecb0a 100644
--- a/ares/setup.h
+++ b/ares/setup.h
@@ -16,13 +16,11 @@
* without express or implied warranty.
*/
-#if !defined(WIN32) && defined(__WIN32__)
-/* Borland fix */
-#define WIN32
-#endif
+/*
+ * Define WIN32 when build target is Win32 API
+ */
-#if !defined(WIN32) && defined(_WIN32)
-/* VS2005 on x64 fix */
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
#define WIN32
#endif
diff --git a/include/curl/curl.h b/include/curl/curl.h
index a29476017..79ea49752 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -29,6 +29,14 @@
#include "curlver.h" /* the libcurl version defines */
+/*
+ * Define WIN32 when build target is Win32 API
+ */
+
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
+#define WIN32
+#endif
+
#include <stdio.h>
#include <limits.h>
@@ -41,12 +49,6 @@
# include <time.h>
#endif /* defined (vms) */
-#if defined(_WIN32) && !defined(WIN32)
-/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we
- make this adjustment to catch this. */
-#define WIN32 1
-#endif
-
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \
!defined(__CYGWIN__) || defined(__MINGW32__)
#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H))
diff --git a/lib/setup.h b/lib/setup.h
index 058af7ac4..b08120ce3 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -32,13 +32,11 @@
#define CURL_DISABLE_FILE
#endif /* HTTP_ONLY */
-#if !defined(WIN32) && defined(__WIN32__)
-/* Borland fix */
-#define WIN32
-#endif
+/*
+ * Define WIN32 when build target is Win32 API
+ */
-#if !defined(WIN32) && defined(_WIN32)
-/* VS2005 on x64 fix */
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
#define WIN32
#endif
diff --git a/src/setup.h b/src/setup.h
index c66b8e143..41ba43084 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -25,13 +25,11 @@
#define CURL_NO_OLDIES
-#if !defined(WIN32) && defined(__WIN32__)
-/* Borland fix */
-#define WIN32
-#endif
+/*
+ * Define WIN32 when build target is Win32 API
+ */
-#if !defined(WIN32) && defined(_WIN32)
-/* VS2005 on x64 fix */
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
#define WIN32
#endif