]> git.saurik.com Git - wxWidgets.git/commitdiff
define __VISUALCn__ for n=5,6,7,8,9 and not only 8 (should have been part of r51353)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 29 Jan 2008 11:14:51 +0000 (11:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 29 Jan 2008 11:14:51 +0000 (11:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/platform.h
src/common/datetime.cpp

index 328f4bc194dfecdfa9294f34ce0fb2dda096be18..10f61e6cca83e4ac0bf235e9389dfff7960be11f 100644 (file)
      */
 #    if defined(_MSC_VER) && !defined(__MWERKS__)
 #        define __VISUALC__ _MSC_VER
+
+    /*
+       define special symbols for different VC version instead of writing tests
+       for magic numbers such as 1200, 1300 &c repeatedly
+     */
+#   if __VISUALC__ < 1100
+#       error "This Visual C++ version is too old and not supported any longer."
+#   elif __VISUALC__ < 1200
+#       define __VISUALC5__
+#   elif __VISUALC__ < 1300
+#       define __VISUALC6__
+#   elif __VISUALC__ < 1400
+#       define __VISUALC7__
+#   elif __VISUALC__ < 1500
+#       define __VISUALC8__
+#   elif __VISUALC__ < 1600
+#       define __VISUALC9__
+#   else
+#       pragma message("Please update this code for the next VC++ version")
+#   endif
+
 #    elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
 #        define __BORLANDC__
 #    elif defined(__WATCOMC__)
index 98e755a60150d1753763d043f04dca860ca945db..8fd992254d9750be2f70eb0e271d966bdc5d8272 100644 (file)
@@ -138,13 +138,6 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter<wxDateTime> , wxFromStringCon
     #include <wtime.h>
 #endif
 
-// define a special symbol for VC8 instead of writing tests for 1400 repeatedly
-#ifdef __VISUALC__
-    #if __VISUALC__ >= 1400
-        #define __VISUALC8__
-    #endif
-#endif
-
 #if !defined(WX_TIMEZONE) && !defined(WX_GMTOFF_IN_TM)
     #if defined(__WXPALMOS__)
         #define WX_GMTOFF_IN_TM