]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
MSVC 9.0 (VS2008) does not support Windows build targets prior to WinXP,
authorYang Tse <yangsita@gmail.com>
Tue, 18 Dec 2007 18:08:19 +0000 (18:08 +0000)
committerYang Tse <yangsita@gmail.com>
Tue, 18 Dec 2007 18:08:19 +0000 (18:08 +0000)
and makes wrong asumptions of build target when it isn't specified. So,
if no build target has been defined we will target WinXP when building
with MSVC 9.0 (VS2008).

CHANGES
ares/config-win32.h
lib/config-win32.h
src/config-win32.h

diff --git a/CHANGES b/CHANGES
index a6b80f60e858398f603a32bd5f63a3d0aa3870ec..62cc18a27ce40dcb3d9615f641561a2d26b43a64 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,12 @@
                                   Changelog
 
 
+Yang Tse (18 Dec 2007)
+- MSVC 9.0 (VS2008) does not support Windows build targets prior to WinXP,
+  and makes wrong asumptions of build target when it isn't specified. So,
+  if no build target has been defined we will target WinXP when building
+  curl/libcurl with MSVC 9.0 (VS2008).
+
 Daniel S (17 Dec 2007)
 - Mateusz Loskot pointed out that MSVC 9.0 (VS2008) has the pollfd struct and
   defines in winsock2.h somehow differently than previous versions and that
index 257a984514c689959d4719dcc4de1c8069077d45..854143d55a4bc004298c2cfcfde6d74b5cab19f1 100644 (file)
 #define _CRT_NONSTDC_NO_DEPRECATE 1
 #endif
 
+/* VS2008 does not support Windows build targets prior to WinXP, */
+/* so, if no build target has been defined we will target WinXP. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+#  ifndef _WIN32_WINNT
+#    define _WIN32_WINNT 0x0501
+#  endif
+#  ifndef WINVER
+#    define WINVER 0x0501
+#  endif
+#  if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
+#    error VS2008 does not support Windows build targets prior to WinXP
+#  endif
+#endif
+
 /* ---------------------------------------------------------------- */
 /*                         IPV6 COMPATIBILITY                       */
 /* ---------------------------------------------------------------- */
index 97db859b9c0490145ae9e372e64d643433cbc615..8e57b14547210699b4a67b46045eaed71f5448a7 100644 (file)
 #define _CRT_NONSTDC_NO_DEPRECATE 1
 #endif
 
+/* VS2008 does not support Windows build targets prior to WinXP, */
+/* so, if no build target has been defined we will target WinXP. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+#  ifndef _WIN32_WINNT
+#    define _WIN32_WINNT 0x0501
+#  endif
+#  ifndef WINVER
+#    define WINVER 0x0501
+#  endif
+#  if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
+#    error VS2008 does not support Windows build targets prior to WinXP
+#  endif
+#endif
+
 /* ---------------------------------------------------------------- */
 /*                           LDAP SUPPORT                           */
 /* ---------------------------------------------------------------- */
index 940dbf064fbdb813a6068a88c6e59a0dc6e307d7..e6c42e50155c9d1a10ebe7df64df85621ec522e5 100644 (file)
 #define _CRT_NONSTDC_NO_DEPRECATE 1
 #endif
 
+/* VS2008 does not support Windows build targets prior to WinXP, */
+/* so, if no build target has been defined we will target WinXP. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+#  ifndef _WIN32_WINNT
+#    define _WIN32_WINNT 0x0501
+#  endif
+#  ifndef WINVER
+#    define WINVER 0x0501
+#  endif
+#  if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
+#    error VS2008 does not support Windows build targets prior to WinXP
+#  endif
+#endif
+
 /* ---------------------------------------------------------------- */
 /*                       ADDITIONAL DEFINITIONS                     */
 /* ---------------------------------------------------------------- */