Correct compilation breakage of r63832.
wx/setup.h can't use wxCHECK_VISUALC_VERSION() which is defined in wx/platform.h _after_ wx/setup.h inclusion. Replace wxCHECK_VISUALC_VERSION() with manual tests for _MSC_VER. Also add more comments to explain what's going on. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -666,10 +666,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -666,10 +666,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -666,10 +666,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -666,10 +666,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -667,10 +667,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -666,10 +666,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -662,10 +662,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -665,10 +665,26 @@
 | 
				
			|||||||
// mingw32) you may need to install the headers (and just the headers)
 | 
					// mingw32) you may need to install the headers (and just the headers)
 | 
				
			||||||
// yourself. If you do, change the setting below manually.
 | 
					// yourself. If you do, change the setting below manually.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Recommended setting: 1
 | 
					// Recommended setting: 1 if supported by the compilation environment
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
 | 
				
			||||||
 | 
					// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					        // MSVC7+ comes with new enough Platform SDK, enable wxGraphicsContext
 | 
				
			||||||
 | 
					        // support for it
 | 
				
			||||||
#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 1
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					        // MSVC 6 didn't include GDI+ headers so disable by default, enable it
 | 
				
			||||||
 | 
					        // here if you use MSVC 6 with a newer SDK
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    // Disable support for other Windows compilers, enable it if your compiler
 | 
				
			||||||
 | 
					    // comes with new enough SDK or you installed the headers manually.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    // Notice that this will be set by configure under non-Windows platforms
 | 
				
			||||||
 | 
					    // anyhow so the value there is not important.
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								setup.h.in
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								setup.h.in
									
									
									
									
									
								
							@@ -323,9 +323,23 @@
 | 
				
			|||||||
#define wxUSE_STC 0
 | 
					#define wxUSE_STC 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if !defined(__WXMSW__) || wxCHECK_VISUALC_VERSION(7)
 | 
					
 | 
				
			||||||
 | 
					#ifdef _MSC_VER
 | 
				
			||||||
 | 
					#   if _MSC_VER >= 1400
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#   else
 | 
					#   else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#       define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
 | 
					#   endif
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
					#   define wxUSE_GRAPHICS_CONTEXT 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user