Do not halt compilation when using VS2008 to build a Windows 2000 target
authoryangtse <yangtse>
Fri, 20 Feb 2009 11:30:11 +0000 (11:30 +0000)
committeryangtse <yangtse>
Fri, 20 Feb 2009 11:30:11 +0000 (11:30 +0000)
CHANGES
ares/CHANGES
ares/config-win32.h
lib/config-win32.h
src/config-win32.h

diff --git a/CHANGES b/CHANGES
index 8c480ad..780a3f1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@
 
                                   Changelog
 
+Yang Tse (20 Feb 2009)
+- Do not halt compilation when using VS2008 to build a Windows 2000 target.
+
 Daniel Stenberg (20 Feb 2009)
 - Linus Nielsen Feltzing reported and helped me repeat and fix a problem with
   FTP with the multi interface: when a transfer fails, like when aborted by a
index 2a73a48..3a4a99c 100644 (file)
@@ -1,5 +1,8 @@
   Changelog for the c-ares project
 
+* February 20 2009 (Yang Tse)
+- Do not halt compilation when using VS2008 to build a Windows 2000 target.
+
 * February 3 2009 (Phil Blundell)
 - If the server returns garbage or nothing at all in response to an AAAA query,
   go on and ask for A records anyway.
index 6fd8288..f281255 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. */
+/* 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
 
index c33137b..6e37a3c 100644 (file)
 #  endif
 #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
 
index 52827e4..eb01858 100644 (file)
 #  endif
 #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