Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | // (C) Copyright John Maddock 2001 - 2003. |
| 2 | // (C) Copyright David Abrahams 2002 - 2003. |
| 3 | // (C) Copyright Aleksey Gurtovoy 2002. |
| 4 | // Use, modification and distribution are subject to the |
| 5 | // Boost Software License, Version 1.0. (See accompanying file |
| 6 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 7 | |
| 8 | // See http://www.boost.org for most recent version. |
| 9 | |
| 10 | // CodeGear C++ compiler setup: |
| 11 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 12 | #if !defined( NDNBOOST_WITH_CODEGEAR_WARNINGS ) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 13 | // these warnings occur frequently in optimized template code |
| 14 | # pragma warn -8004 // var assigned value, but never used |
| 15 | # pragma warn -8008 // condition always true/false |
| 16 | # pragma warn -8066 // dead code can never execute |
| 17 | # pragma warn -8104 // static members with ctors not threadsafe |
| 18 | # pragma warn -8105 // reference member in class without ctors |
| 19 | #endif |
| 20 | // |
| 21 | // versions check: |
| 22 | // last known and checked version is 0x621 |
| 23 | #if (__CODEGEARC__ > 0x621) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 24 | # if defined(NDNBOOST_ASSERT_CONFIG) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 25 | # error "Unknown compiler version - please run the configure tests and report the results" |
| 26 | # else |
| 27 | # pragma message( "Unknown compiler version - please run the configure tests and report the results") |
| 28 | # endif |
| 29 | #endif |
| 30 | |
| 31 | // CodeGear C++ Builder 2009 |
| 32 | #if (__CODEGEARC__ <= 0x613) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 33 | # define NDNBOOST_NO_INTEGRAL_INT64_T |
| 34 | # define NDNBOOST_NO_DEPENDENT_NESTED_DERIVATIONS |
| 35 | # define NDNBOOST_NO_PRIVATE_IN_AGGREGATE |
| 36 | # define NDNBOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 37 | // we shouldn't really need this - but too many things choke |
| 38 | // without it, this needs more investigation: |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 39 | # define NDNBOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS |
| 40 | # define NDNBOOST_SP_NO_SP_CONVERTIBLE |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 41 | #endif |
| 42 | |
| 43 | // CodeGear C++ Builder 2010 |
| 44 | #if (__CODEGEARC__ <= 0x621) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 45 | # define NDNBOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type |
| 46 | # define NDNBOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL |
| 47 | # define NDNBOOST_NO_MEMBER_TEMPLATE_FRIENDS |
| 48 | # define NDNBOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member |
| 49 | # define NDNBOOST_NO_USING_TEMPLATE |
| 50 | # define NDNBOOST_NO_TWO_PHASE_NAME_LOOKUP |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 51 | // Temporary hack, until specific MPL preprocessed headers are generated |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 52 | # define NDNBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 53 | |
| 54 | // CodeGear has not yet completely implemented value-initialization, for |
| 55 | // example for array types, as I reported in 2010: Embarcadero Report 83751, |
| 56 | // "Value-initialization: arrays should have each element value-initialized", |
| 57 | // http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 |
| 58 | // Last checked version: Embarcadero C++ 6.21 |
| 59 | // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues |
| 60 | // (Niels Dekker, LKEB, April 2010) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 61 | # define NDNBOOST_NO_COMPLETE_VALUE_INITIALIZATION |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 62 | |
| 63 | # if defined(NDEBUG) && defined(__cplusplus) |
| 64 | // fix broken <cstring> so that Boost.test works: |
| 65 | # include <cstring> |
| 66 | # undef strcmp |
| 67 | # endif |
| 68 | // fix broken errno declaration: |
| 69 | # include <errno.h> |
| 70 | # ifndef errno |
| 71 | # define errno errno |
| 72 | # endif |
| 73 | |
| 74 | #endif |
| 75 | // |
| 76 | // C++0x macros: |
| 77 | // |
| 78 | #if (__CODEGEARC__ <= 0x620) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 79 | #define NDNBOOST_NO_CXX11_STATIC_ASSERT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 80 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 81 | #define NDNBOOST_HAS_STATIC_ASSERT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 82 | #endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 83 | #define NDNBOOST_HAS_CHAR16_T |
| 84 | #define NDNBOOST_HAS_CHAR32_T |
| 85 | #define NDNBOOST_HAS_LONG_LONG |
| 86 | // #define NDNBOOST_HAS_ALIGNOF |
| 87 | #define NDNBOOST_HAS_DECLTYPE |
| 88 | #define NDNBOOST_HAS_EXPLICIT_CONVERSION_OPS |
| 89 | // #define NDNBOOST_HAS_RVALUE_REFS |
| 90 | #define NDNBOOST_HAS_SCOPED_ENUM |
| 91 | // #define NDNBOOST_HAS_STATIC_ASSERT |
| 92 | #define NDNBOOST_HAS_STD_TYPE_TRAITS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 93 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 94 | #define NDNBOOST_NO_CXX11_AUTO_DECLARATIONS |
| 95 | #define NDNBOOST_NO_CXX11_AUTO_MULTIDECLARATIONS |
| 96 | #define NDNBOOST_NO_CXX11_CONSTEXPR |
| 97 | #define NDNBOOST_NO_CXX11_DEFAULTED_FUNCTIONS |
| 98 | #define NDNBOOST_NO_CXX11_DELETED_FUNCTIONS |
| 99 | #define NDNBOOST_NO_CXX11_EXTERN_TEMPLATE |
| 100 | #define NDNBOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS |
| 101 | #define NDNBOOST_NO_CXX11_LAMBDAS |
| 102 | #define NDNBOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS |
| 103 | #define NDNBOOST_NO_CXX11_NOEXCEPT |
| 104 | #define NDNBOOST_NO_CXX11_NULLPTR |
| 105 | #define NDNBOOST_NO_CXX11_RANGE_BASED_FOR |
| 106 | #define NDNBOOST_NO_CXX11_RAW_LITERALS |
| 107 | #define NDNBOOST_NO_CXX11_RVALUE_REFERENCES |
| 108 | #define NDNBOOST_NO_SFINAE_EXPR |
| 109 | #define NDNBOOST_NO_CXX11_TEMPLATE_ALIASES |
| 110 | #define NDNBOOST_NO_CXX11_UNICODE_LITERALS |
| 111 | #define NDNBOOST_NO_CXX11_VARIADIC_TEMPLATES |
| 112 | #define NDNBOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX |
| 113 | #define NDNBOOST_NO_CXX11_USER_DEFINED_LITERALS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 114 | |
| 115 | // |
| 116 | // TR1 macros: |
| 117 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 118 | #define NDNBOOST_HAS_TR1_HASH |
| 119 | #define NDNBOOST_HAS_TR1_TYPE_TRAITS |
| 120 | #define NDNBOOST_HAS_TR1_UNORDERED_MAP |
| 121 | #define NDNBOOST_HAS_TR1_UNORDERED_SET |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 122 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 123 | #define NDNBOOST_HAS_MACRO_USE_FACET |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 124 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 125 | #define NDNBOOST_NO_CXX11_HDR_INITIALIZER_LIST |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 126 | |
| 127 | // On non-Win32 platforms let the platform config figure this out: |
| 128 | #ifdef _WIN32 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 129 | # define NDNBOOST_HAS_STDINT_H |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 130 | #endif |
| 131 | |
| 132 | // |
| 133 | // __int64: |
| 134 | // |
| 135 | #if !defined(__STRICT_ANSI__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 136 | # define NDNBOOST_HAS_MS_INT64 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 137 | #endif |
| 138 | // |
| 139 | // check for exception handling support: |
| 140 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 141 | #if !defined(_CPPUNWIND) && !defined(NDNBOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(NDNBOOST_NO_EXCEPTIONS) |
| 142 | # define NDNBOOST_NO_EXCEPTIONS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 143 | #endif |
| 144 | // |
| 145 | // all versions have a <dirent.h>: |
| 146 | // |
| 147 | #if !defined(__STRICT_ANSI__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 148 | # define NDNBOOST_HAS_DIRENT_H |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 149 | #endif |
| 150 | // |
| 151 | // all versions support __declspec: |
| 152 | // |
| 153 | #if defined(__STRICT_ANSI__) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 154 | // config/platform/win32.hpp will define NDNBOOST_SYMBOL_EXPORT, etc., unless already defined |
| 155 | # define NDNBOOST_SYMBOL_EXPORT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 156 | #endif |
| 157 | // |
| 158 | // ABI fixing headers: |
| 159 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 160 | #ifndef NDNBOOST_ABI_PREFIX |
| 161 | # define NDNBOOST_ABI_PREFIX "ndnboost/config/abi/borland_prefix.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 162 | #endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 163 | #ifndef NDNBOOST_ABI_SUFFIX |
| 164 | # define NDNBOOST_ABI_SUFFIX "ndnboost/config/abi/borland_suffix.hpp" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 165 | #endif |
| 166 | // |
| 167 | // Disable Win32 support in ANSI mode: |
| 168 | // |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 169 | # pragma defineonoption NDNBOOST_DISABLE_WIN32 -A |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 170 | // |
| 171 | // MSVC compatibility mode does some nasty things: |
| 172 | // TODO: look up if this doesn't apply to the whole 12xx range |
| 173 | // |
| 174 | #if defined(_MSC_VER) && (_MSC_VER <= 1200) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 175 | # define NDNBOOST_NO_ARGUMENT_DEPENDENT_LOOKUP |
| 176 | # define NDNBOOST_NO_VOID_RETURNS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 177 | #endif |
| 178 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 179 | #define NDNBOOST_COMPILER "CodeGear C++ version " NDNBOOST_STRINGIZE(__CODEGEARC__) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 180 | |