summaryrefslogtreecommitdiff
path: root/config-win32.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-02-20 11:30:11 +0000
committerYang Tse <yangsita@gmail.com>2009-02-20 11:30:11 +0000
commit9e0140f455875582fea9aa6f194e6d374b69301d (patch)
treedd500f22e35da9f2119174360561dbf922457f84 /config-win32.h
parentfb7803fbd022a509fd2e8077c654c05b00eabc1b (diff)
downloadc-ares-9e0140f455875582fea9aa6f194e6d374b69301d.tar.gz
c-ares-9e0140f455875582fea9aa6f194e6d374b69301d.tar.bz2
c-ares-9e0140f455875582fea9aa6f194e6d374b69301d.zip
Do not halt compilation when using VS2008 to build a Windows 2000 target
Diffstat (limited to 'config-win32.h')
-rw-r--r--config-win32.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/config-win32.h b/config-win32.h
index 6fd8288..f281255 100644
--- a/config-win32.h
+++ b/config-win32.h
@@ -223,17 +223,33 @@
#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. */
+/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
+ 2000 as a supported build target. VS2008 default installations provide an
+ embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
+ valid build target for VS2008. Popular belief is that binaries built using
+ Windows SDK versions 6.X and Windows 2000 as a build target are functional */
+#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define VS2008_MINIMUM_TARGET 0x0500
+#endif
+
+/* When no build target is specified VS2008 default build target is Windows
+ Vista, which leaves out even Winsows XP. If no build target has been given
+ for VS2008 we will target the minimum Officially supported build target,
+ which happens to be Windows XP. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+# define VS2008_DEFAULT_TARGET 0x0501
+#endif
+
+/* VS2008 default target settings and minimum build target check */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
# ifndef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
+# define _WIN32_WINNT VS2008_DEFAULT_TARGET
# endif
# ifndef WINVER
-# define WINVER 0x0501
+# define WINVER VS2008_DEFAULT_TARGET
# endif
-# if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
-# error VS2008 does not support Windows build targets prior to WinXP
+# if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
+# error VS2008 does not support Windows build targets prior to Windows 2000
# endif
#endif