From aa90bfdb4a2d541cc5828e235b62d87ca54fe6d7 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 18 Mar 2020 20:23:04 -0400 Subject: [PATCH] Support for Embarcadero clang-based C++ compilers in Boost Config. --- include/boost/config/abi_prefix.hpp | 2 +- include/boost/config/abi_suffix.hpp | 4 +- include/boost/config/auto_link.hpp | 73 +++++++--- include/boost/config/compiler/borland.hpp | 3 +- include/boost/config/compiler/codegear.hpp | 132 ++++++++++++++++++ .../config/detail/select_compiler_config.hpp | 2 +- include/boost/config/detail/suffix.hpp | 2 +- include/boost/config/stdlib/dinkumware.hpp | 6 +- include/boost/config/stdlib/roguewave.hpp | 2 +- include/boost/config/stdlib/stlport.hpp | 10 +- include/boost/config/workaround.hpp | 15 ++ 11 files changed, 218 insertions(+), 33 deletions(-) diff --git a/include/boost/config/abi_prefix.hpp b/include/boost/config/abi_prefix.hpp index 3b134749..bcdc26d9 100644 --- a/include/boost/config/abi_prefix.hpp +++ b/include/boost/config/abi_prefix.hpp @@ -19,7 +19,7 @@ # include BOOST_ABI_PREFIX #endif -#if defined( __BORLANDC__ ) +#if defined( BOOST_BORLANDC ) #pragma nopushoptwarn #endif diff --git a/include/boost/config/abi_suffix.hpp b/include/boost/config/abi_suffix.hpp index 93916166..a1eb78db 100644 --- a/include/boost/config/abi_suffix.hpp +++ b/include/boost/config/abi_suffix.hpp @@ -20,8 +20,6 @@ # include BOOST_ABI_SUFFIX #endif -#if defined( __BORLANDC__ ) +#if defined( BOOST_BORLANDC ) #pragma nopushoptwarn #endif - - diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index e74f3c10..30b87021 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -51,6 +51,7 @@ BOOST_LIB_PREFIX + BOOST_LIB_ARCH_AND_MODEL_OPT "-" + BOOST_LIB_VERSION + + BOOST_LIB_SUFFIX These are defined as: @@ -78,6 +79,7 @@ BOOST_LIB_ARCH_AND_MODEL_OPT: The architecture and address model BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. +BOOST_LIB_SUFFIX: Static/import libraries extension (".lib", ".a") for the compiler. ***************************************************************************/ @@ -97,7 +99,8 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // Only include what follows for known and supported compilers: // #if defined(BOOST_MSVC) \ - || defined(__BORLANDC__) \ + || defined(BOOST_EMBTC_WINDOWS) \ + || defined(BOOST_BORLANDC) \ || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \ || (defined(BOOST_CLANG) && defined(BOOST_WINDOWS) && defined(_MSC_VER) && (__clang_major__ >= 4)) @@ -184,7 +187,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // vc14.2: # define BOOST_LIB_TOOLSET "vc142" -# elif defined(__BORLANDC__) +# elif defined(BOOST_EMBTC_WINDOWS) + + // Embarcadero Clang based compilers: +# if defined(BOOST_EMBTC_WIN32C) +# define BOOST_LIB_TOOLSET "bcb32" +# elif defined(BOOST_EMBTC_WIN64) +# define BOOST_LIB_TOOLSET "bcb64" +# endif + +# elif defined(BOOST_BORLANDC) // CBuilder 6: # define BOOST_LIB_TOOLSET "bcb" @@ -334,12 +346,32 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # endif -#elif defined(__BORLANDC__) +#elif defined(BOOST_EMBTC_WINDOWS) + +# ifdef _RTLDLL + +# if defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-d" +# else +# define BOOST_LIB_RT_OPT +# endif + +# else + +# if defined(_DEBUG) +# define BOOST_LIB_RT_OPT "-sd" +# else +# define BOOST_LIB_RT_OPT "-s" +# endif + +# endif + +#elif defined(BOOST_BORLANDC) // // figure out whether we want the debug builds or not: // -#if __BORLANDC__ > 0x561 +#if BOOST_BORLANDC > 0x561 #pragma defineonoption BOOST_BORLAND_DEBUG -v #endif // @@ -357,7 +389,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # elif defined(BOOST_BORLAND_DEBUG) # define BOOST_LIB_RT_OPT "-d" # elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT -y +# define BOOST_LIB_RT_OPT "-y" # else # define BOOST_LIB_RT_OPT # endif @@ -415,30 +447,36 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \ && defined(BOOST_LIB_VERSION) +#if defined(BOOST_EMBTC_WIN64) +# define BOOST_LIB_SUFFIX ".a" +#else +# define BOOST_LIB_SUFFIX ".lib" +#endif + #ifdef BOOST_AUTO_LINK_TAGGED -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_SYSTEM) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_AUTO_LINK_NOMANGLE) -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_SUFFIX) # endif #elif defined(BOOST_LIB_BUILDID) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) BOOST_LIB_SUFFIX) # endif #else -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION BOOST_LIB_SUFFIX) # endif #endif @@ -481,5 +519,6 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. #if defined(BOOST_DYN_LINK) # undef BOOST_DYN_LINK #endif - - +#if defined(BOOST_LIB_SUFFIX) +# undef BOOST_LIB_SUFFIX +#endif diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index cd4710ab..12872435 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -333,4 +333,5 @@ // (Niels Dekker, LKEB, April 2010) #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) +#define BOOST_BORLANDC __BORLANDC__ +#define BOOST_COMPILER "Classic Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 91f40a92..0912412d 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -9,6 +9,137 @@ // CodeGear C++ compiler setup: +#ifdef __clang__ // Clang enhanced Windows compiler + +# include "clang.hpp" +# define BOOST_NO_CXX11_THREAD_LOCAL +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR + +# ifndef __MT__ /* If compiling in single-threaded mode, assume there is no CXX11_HDR_ATOMIC */ +# define BOOST_NO_CXX11_HDR_ATOMIC +# endif + +#define BOOST_NO_FENV_H /* temporarily disable this until we can link against fegetround fesetround feholdexcept */ + +/* + +// On non-Win32 platforms let the platform config figure this out: +#ifdef _WIN32 +# define BOOST_HAS_STDINT_H +#endif + +// +// __int64: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_DIRENT_H +#endif +// +// Disable Win32 support in ANSI mode: +// +# pragma defineonoption BOOST_DISABLE_WIN32 -A +// +// 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 +# define BOOST_NO_VOID_RETURNS +#endif +// + +*/ + +// Specific settings for Embarcadero drivers +# define BOOST_EMBTC __CODEGEARC__ +# define BOOST_EMBTC_FULL_VER ((__clang_major__ << 16) | \ + (__clang_minor__ << 8) | \ + __clang_patchlevel__ ) + +// Detecting which Embarcadero driver is being used +#if defined(BOOST_EMBTC) +# if defined(_WIN64) +# define BOOST_EMBTC_WIN64 +# define BOOST_EMBTC_WINDOWS +# ifndef BOOST_USE_WINDOWS_H +# define BOOST_USE_WINDOWS_H +# endif +# elif defined(_WIN32) +# define BOOST_EMBTC_WIN32C +# define BOOST_EMBTC_WINDOWS +# ifndef BOOST_USE_WINDOWS_H +# define BOOST_USE_WINDOWS_H +# endif +# elif defined(__APPLE__) && defined(__arm__) +# define BOOST_EMBTC_IOSARM +# define BOOST_EMBTC_IOS +# elif defined(__APPLE__) && defined(__aarch64__) +# define BOOST_EMBTC_IOSARM64 +# define BOOST_EMBTC_IOS +# elif defined(__ANDROID__) && defined(__arm__) +# define BOOST_EMBTC_AARM +# define BOOST_EMBTC_ANDROID +# elif +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown Embarcadero driver" +# else +# warning "Unknown Embarcadero driver" +# endif /* defined(BOOST_ASSERT_CONFIG) */ +# endif +#endif /* defined(BOOST_EMBTC) */ + +#if defined(BOOST_EMBTC_WINDOWS) + // About TR1 headers and features: + // BOOST_HAS_TR1_*-style definitions are placed in "boost\tr1\detail\config.hpp", + // because there, they will always be found, but here, they may be not check. + + // // This is needed to allow 64-bit integers in cstdint.hpp + //# define BOOST_HAS_MS_INT64 + + //# define BOOST_HAS_RVALUE_REFS + + // // Boost.Fusion should not use its preprocessed templates, + // // due to we can use its variadic cpp11 templates. If that + // // macro is not defined it tries to use both at the same time + // // giving a redefinition error. + //# define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + + // // Bcc64 don't have this header + //# define BOOST_NO_FENV_H + + // // This is not necessary with the last versions of bcc64 + //# if !defined(__FUNC__) + //# define __FUNC__ __func__ + //# endif + + // FVTODO: This was uncommended with 1_55 - prolly worth testing this by uncommenting it. + // Dinkumware on Win32 and Win64 platforms has + // # define BOOST_HAS_STDINT_H +#endif /* BOOST_EMBTC_WINDOWS */ + +# undef BOOST_COMPILER +# define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__ +// # define __CODEGEARC_CLANG__ __CODEGEARC__ +// # define __EMBARCADERO_CLANG__ __CODEGEARC__ +// # define __BORLANDC_CLANG__ __BORLANDC__ + +#else // #if !defined(__clang__) + +# define BOOST_CODEGEARC __CODEGEARC__ +# define BOOST_BORLANDC __BORLANDC__ + #if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) // these warnings occur frequently in optimized template code # pragma warn -8004 // var assigned value, but never used @@ -238,3 +369,4 @@ #define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) +#endif // #if !defined(__clang__) diff --git a/include/boost/config/detail/select_compiler_config.hpp b/include/boost/config/detail/select_compiler_config.hpp index 8970dffb..c3d99e1a 100644 --- a/include/boost/config/detail/select_compiler_config.hpp +++ b/include/boost/config/detail/select_compiler_config.hpp @@ -39,7 +39,7 @@ // Intel # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" -#elif defined __clang__ && !defined(__ibmxl__) +#elif defined __clang__ && !defined(__ibmxl__) && !defined(__CODEGEARC__) // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index d3c4e083..2f862b44 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -54,7 +54,7 @@ // no namespace issues from this. // #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ - && !defined(BOOST_MSVC) && !defined(__BORLANDC__) + && !defined(BOOST_MSVC) && !defined(BOOST_BORLANDC) # include # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 10980420..b638286b 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -22,7 +22,7 @@ #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) // full dinkumware 3.06 and above // fully conforming provided the compiler supports it: -# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h +# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(BOOST_BORLANDC) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h # define BOOST_NO_STDC_NAMESPACE # endif # if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) @@ -68,12 +68,12 @@ // the same applies to other compilers that sit on top // of vc7.1 (Intel and Comeau): // -#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) +#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(BOOST_BORLANDC) # define BOOST_STD_EXTENSION_NAMESPACE stdext #endif -#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) +#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(BOOST_BORLANDC)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) // if we're using a dinkum lib that's // been configured for VC6/7 then there is // no iterator traits (true even for icl) diff --git a/include/boost/config/stdlib/roguewave.hpp b/include/boost/config/stdlib/roguewave.hpp index 0c5c113e..03a65768 100644 --- a/include/boost/config/stdlib/roguewave.hpp +++ b/include/boost/config/stdlib/roguewave.hpp @@ -59,7 +59,7 @@ // // Borland version of numeric_limits lacks __int64 specialisation: // -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC # define BOOST_NO_MS_INT64_NUMERIC_LIMITS #endif diff --git a/include/boost/config/stdlib/stlport.hpp b/include/boost/config/stdlib/stlport.hpp index 094e27bb..38bc763f 100644 --- a/include/boost/config/stdlib/stlport.hpp +++ b/include/boost/config/stdlib/stlport.hpp @@ -62,11 +62,11 @@ // then the io stream facets are not available in namespace std:: // #ifdef _STLPORT_VERSION -# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(BOOST_BORLANDC) # define BOOST_NO_STD_LOCALE # endif #else -# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) +# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(BOOST_BORLANDC) # define BOOST_NO_STD_LOCALE # endif #endif @@ -128,7 +128,7 @@ // BCB6 does cause problems. If we detect C++ Builder, then don't define // BOOST_NO_STDC_NAMESPACE // -#if !defined(__BORLANDC__) && !defined(__DMC__) +#if !defined(BOOST_BORLANDC) && !defined(__DMC__) // // If STLport is using it's own namespace, and the real names are in // the global namespace, then we duplicate STLport's using declarations @@ -143,7 +143,7 @@ # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif -#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 +#elif defined(BOOST_BORLANDC) && BOOST_BORLANDC < 0x560 // STLport doesn't import std::abs correctly: #include namespace std { using ::abs; } @@ -192,7 +192,7 @@ namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; // Borland ships a version of STLport with C++ Builder 6 that lacks // hashtables and the like: // -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) +#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x560) # undef BOOST_HAS_HASH #endif diff --git a/include/boost/config/workaround.hpp b/include/boost/config/workaround.hpp index fca8f3ab..7c6a2e62 100644 --- a/include/boost/config/workaround.hpp +++ b/include/boost/config/workaround.hpp @@ -50,6 +50,21 @@ #else #define __CODEGEARC___WORKAROUND_GUARD 0 #endif +#ifndef BOOST_BORLANDC +#define BOOST_BORLANDC_WORKAROUND_GUARD 1 +#else +#define BOOST_BORLANDC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_CODEGEARC +#define BOOST_CODEGEARC_WORKAROUND_GUARD 1 +#else +#define BOOST_CODEGEARC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_EMBTC +#define BOOST_EMBTC_WORKAROUND_GUARD 1 +#else +#define BOOST_EMBTC_WORKAROUND_GUARD 0 +#endif #ifndef _MSC_VER #define _MSC_VER_WORKAROUND_GUARD 1 #else