summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-12-18 18:08:19 +0000
committerYang Tse <yangsita@gmail.com>2007-12-18 18:08:19 +0000
commit07a1857d59e2da6d57eb622e90822ffa4835e1de (patch)
tree37be949b0eb36047b0a31a3b392930ee4f2538df /src
parentf4ffa85f6061c07b80911daa6dc8c51be9c7bd4c (diff)
downloadcurl-07a1857d59e2da6d57eb622e90822ffa4835e1de.tar.gz
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 with MSVC 9.0 (VS2008).
Diffstat (limited to 'src')
-rw-r--r--src/config-win32.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config-win32.h b/src/config-win32.h
index 940dbf064..e6c42e501 100644
--- a/src/config-win32.h
+++ b/src/config-win32.h
@@ -187,6 +187,20 @@
#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 */
/* ---------------------------------------------------------------- */