From f79f2f8d3c5177c6706e50788271a8a30b192220 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 25 Aug 2005 16:27:28 +0000 Subject: [PATCH] Large patch from Ulrich Eckhardt to fix support for EVC++ 4. [SVN r30670] --- include/boost/config/auto_link.hpp | 12 ++++-- include/boost/config/compiler/borland.hpp | 1 + include/boost/config/compiler/comeau.hpp | 4 +- include/boost/config/compiler/visualc.hpp | 49 ++++++++++++++++------- include/boost/detail/workaround.hpp | 5 ++- 5 files changed, 50 insertions(+), 21 deletions(-) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 88134d3b..fdb2a875 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -109,10 +109,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // select toolset if not defined already: // #ifndef BOOST_LIB_TOOLSET -#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) +// Note: no compilers before 1200 are supported +#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) - // vc6: -# define BOOST_LIB_TOOLSET "vc6" +# ifdef UNDER_CE + // vc6: +# define BOOST_LIB_TOOLSET "evc4" +# else + // vc6: +# define BOOST_LIB_TOOLSET "vc6" +# endif #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300) diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 66769bec..9c0635d5 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -142,6 +142,7 @@ #endif // // MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range // #if defined(_MSC_VER) && (_MSC_VER <= 1200) # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP diff --git a/include/boost/config/compiler/comeau.hpp b/include/boost/config/compiler/comeau.hpp index 1b71008e..278222dc 100644 --- a/include/boost/config/compiler/comeau.hpp +++ b/include/boost/config/compiler/comeau.hpp @@ -24,8 +24,8 @@ # endif // Void returns don't work when emulating VC 6 (Peter Dimov) - -# if defined(_MSC_VER) && (_MSC_VER == 1200) +// TODO: look up if this doesn't apply to the whole 12xx range +# if defined(_MSC_VER) && (_MSC_VER < 1300) # define BOOST_NO_VOID_RETURNS # endif diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 1ce600cc..69612700 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -17,8 +17,8 @@ // turn off the warnings before we #include anything #pragma warning( disable : 4503 ) // warning: decorated name length exceeded -#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1201 == EVC4.2 -#pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info +#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4 +# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_VOID_RETURNS # define BOOST_NO_EXCEPTION_STD_NAMESPACE @@ -28,9 +28,9 @@ #if (_MSC_VER <= 1300) // 1300 == VC++ 7.0 -#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -#endif +# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# endif # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION @@ -56,6 +56,7 @@ # define BOOST_NO_SFINAE # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS # define BOOST_NO_IS_ABSTRACT +// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)? # if (_MSC_VER > 1200) # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS # endif @@ -116,16 +117,36 @@ # define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" #endif -# if _MSC_VER == 1200 -# define BOOST_COMPILER_VERSION 6.0 -# elif _MSC_VER == 1300 -# define BOOST_COMPILER_VERSION 7.0 -# elif _MSC_VER == 1310 -# define BOOST_COMPILER_VERSION 7.1 -# elif _MSC_VER == 1400 -# define BOOST_COMPILER_VERSION 8.0 +// TODO: +// these things are mostly bogus. 1200 means version 12.0 of the compiler. The +// artificial versions assigned to them only refer to the versions of some IDE +// these compilers have been shipped with, and even that is not all of it. Some +// were shipped with freely downloadable SDKs, others as crosscompilers in eVC. +// IOW, you can't use these 'versions' in any sensible way. Sorry. +# if defined(UNDER_CE) +# if _MSC_VER < 1200 + // Note: these are so far off, they are not really supported +# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202 +# define BOOST_COMPILER_VERSION evc4.0 +# error unknown CE compiler +# else +# error unknown CE compiler +# endif # else -# define BOOST_COMPILER_VERSION _MSC_VER +# if _MSC_VER < 1200 + // Note: these are so far off, they are not really supported +# define BOOST_COMPILER_VERSION 5.0 +# elif _MSC_VER < 1300 +# define BOOST_COMPILER_VERSION 6.0 +# elif _MSC_VER == 1300 +# define BOOST_COMPILER_VERSION 7.0 +# elif _MSC_VER == 1310 +# define BOOST_COMPILER_VERSION 7.1 +# elif _MSC_VER == 1400 +# define BOOST_COMPILER_VERSION 8.0 +# else +# define BOOST_COMPILER_VERSION _MSC_VER +# endif # endif #define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) diff --git a/include/boost/detail/workaround.hpp b/include/boost/detail/workaround.hpp index b5ecad77..b10f9b58 100644 --- a/include/boost/detail/workaround.hpp +++ b/include/boost/detail/workaround.hpp @@ -9,7 +9,8 @@ // // Usage: // -// #if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// // workaround for eVC4 and VC6 // ... // workaround code here // #endif // @@ -17,7 +18,7 @@ // first argument must be undefined or expand to a numeric // value. The above expands to: // -// (BOOST_MSVC) != 0 && (BOOST_MSVC) <= 1200 +// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 // // When used for workarounds that apply to the latest known version // and all earlier versions of a compiler, the following convention