github.com/searKing/golang/go@v1.2.117/os/signal/cgo/include/boost/config/compiler/codegear.hpp (about) 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 12 // 13 // versions check: 14 // last known and checked version is 0x740 15 #if (__CODEGEARC__ > 0x740) 16 # if defined(BOOST_ASSERT_CONFIG) 17 # error "boost: Unknown compiler version - please run the configure tests and report the results" 18 # else 19 # pragma message( "boost: Unknown compiler version - please run the configure tests and report the results") 20 # endif 21 #endif 22 23 #ifdef __clang__ // Clang enhanced Windows compiler 24 25 # include "clang.hpp" 26 # define BOOST_NO_CXX11_THREAD_LOCAL 27 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR 28 29 // This bug has been reported to Embarcadero 30 31 #if defined(BOOST_HAS_INT128) 32 #undef BOOST_HAS_INT128 33 #endif 34 #if defined(BOOST_HAS_FLOAT128) 35 #undef BOOST_HAS_FLOAT128 36 #endif 37 38 // The clang-based compilers can not do 128 atomic exchanges 39 40 #define BOOST_ATOMIC_NO_CMPXCHG16B 41 42 // 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists 43 44 # define BOOST_NO_CWCHAR 45 46 # ifndef __MT__ /* If compiling in single-threaded mode, assume there is no CXX11_HDR_ATOMIC */ 47 # define BOOST_NO_CXX11_HDR_ATOMIC 48 # endif 49 50 /* temporarily disable this until we can link against fegetround fesetround feholdexcept */ 51 52 #define BOOST_NO_FENV_H 53 54 /* Reported this bug to Embarcadero with the latest C++ Builder Rio release */ 55 56 #define BOOST_NO_CXX11_HDR_EXCEPTION 57 58 // 59 // check for exception handling support: 60 // 61 #if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) 62 # define BOOST_NO_EXCEPTIONS 63 #endif 64 65 /* 66 67 // On non-Win32 platforms let the platform config figure this out: 68 #ifdef _WIN32 69 # define BOOST_HAS_STDINT_H 70 #endif 71 72 // 73 // __int64: 74 // 75 #if !defined(__STRICT_ANSI__) 76 # define BOOST_HAS_MS_INT64 77 #endif 78 // 79 // all versions have a <dirent.h>: 80 // 81 #if !defined(__STRICT_ANSI__) 82 # define BOOST_HAS_DIRENT_H 83 #endif 84 // 85 // Disable Win32 support in ANSI mode: 86 // 87 # pragma defineonoption BOOST_DISABLE_WIN32 -A 88 // 89 // MSVC compatibility mode does some nasty things: 90 // TODO: look up if this doesn't apply to the whole 12xx range 91 // 92 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 93 # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP 94 # define BOOST_NO_VOID_RETURNS 95 #endif 96 // 97 98 */ 99 100 // Specific settings for Embarcadero drivers 101 # define BOOST_EMBTC __CODEGEARC__ 102 # define BOOST_EMBTC_FULL_VER ((__clang_major__ << 16) | \ 103 (__clang_minor__ << 8) | \ 104 __clang_patchlevel__ ) 105 106 // Detecting which Embarcadero driver is being used 107 #if defined(BOOST_EMBTC) 108 # if defined(_WIN64) 109 # define BOOST_EMBTC_WIN64 1 110 # define BOOST_EMBTC_WINDOWS 1 111 # ifndef BOOST_USE_WINDOWS_H 112 # define BOOST_USE_WINDOWS_H 113 # endif 114 # elif defined(_WIN32) 115 # define BOOST_EMBTC_WIN32C 1 116 # define BOOST_EMBTC_WINDOWS 1 117 # ifndef BOOST_USE_WINDOWS_H 118 # define BOOST_USE_WINDOWS_H 119 # endif 120 # elif defined(__APPLE__) && defined(__arm__) 121 # define BOOST_EMBTC_IOSARM 1 122 # define BOOST_EMBTC_IOS 1 123 # elif defined(__APPLE__) && defined(__aarch64__) 124 # define BOOST_EMBTC_IOSARM64 1 125 # define BOOST_EMBTC_IOS 1 126 # elif defined(__ANDROID__) && defined(__arm__) 127 # define BOOST_EMBTC_AARM 1 128 # define BOOST_EMBTC_ANDROID 1 129 # elif 130 # if defined(BOOST_ASSERT_CONFIG) 131 # error "Unknown Embarcadero driver" 132 # else 133 # warning "Unknown Embarcadero driver" 134 # endif /* defined(BOOST_ASSERT_CONFIG) */ 135 # endif 136 #endif /* defined(BOOST_EMBTC) */ 137 138 #if defined(BOOST_EMBTC_WINDOWS) 139 140 #if !defined(_chdir) 141 #define _chdir(x) chdir(x) 142 #endif 143 144 #if !defined(_dup2) 145 #define _dup2(x,y) dup2(x,y) 146 #endif 147 148 #endif 149 150 # undef BOOST_COMPILER 151 # define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__ 152 // # define __CODEGEARC_CLANG__ __CODEGEARC__ 153 // # define __EMBARCADERO_CLANG__ __CODEGEARC__ 154 // # define __BORLANDC_CLANG__ __BORLANDC__ 155 156 #else // #if !defined(__clang__) 157 158 # define BOOST_CODEGEARC __CODEGEARC__ 159 # define BOOST_BORLANDC __BORLANDC__ 160 161 #if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) 162 // these warnings occur frequently in optimized template code 163 # pragma warn -8004 // var assigned value, but never used 164 # pragma warn -8008 // condition always true/false 165 # pragma warn -8066 // dead code can never execute 166 # pragma warn -8104 // static members with ctors not threadsafe 167 # pragma warn -8105 // reference member in class without ctors 168 #endif 169 170 // CodeGear C++ Builder 2009 171 #if (__CODEGEARC__ <= 0x613) 172 # define BOOST_NO_INTEGRAL_INT64_T 173 # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS 174 # define BOOST_NO_PRIVATE_IN_AGGREGATE 175 # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE 176 // we shouldn't really need this - but too many things choke 177 // without it, this needs more investigation: 178 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS 179 # define BOOST_SP_NO_SP_CONVERTIBLE 180 #endif 181 182 // CodeGear C++ Builder 2010 183 #if (__CODEGEARC__ <= 0x621) 184 # define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type 185 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL 186 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS 187 # define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member 188 # define BOOST_NO_USING_TEMPLATE 189 # define BOOST_NO_TWO_PHASE_NAME_LOOKUP 190 // Temporary hack, until specific MPL preprocessed headers are generated 191 # define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS 192 193 // CodeGear has not yet completely implemented value-initialization, for 194 // example for array types, as I reported in 2010: Embarcadero Report 83751, 195 // "Value-initialization: arrays should have each element value-initialized", 196 // http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 197 // Last checked version: Embarcadero C++ 6.21 198 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues 199 // (Niels Dekker, LKEB, April 2010) 200 # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION 201 202 # if defined(NDEBUG) && defined(__cplusplus) 203 // fix broken <cstring> so that Boost.test works: 204 # include <cstring> 205 # undef strcmp 206 # endif 207 // fix broken errno declaration: 208 # include <errno.h> 209 # ifndef errno 210 # define errno errno 211 # endif 212 213 #endif 214 215 // Reportedly, #pragma once is supported since C++ Builder 2010 216 #if (__CODEGEARC__ >= 0x620) 217 # define BOOST_HAS_PRAGMA_ONCE 218 #endif 219 220 #define BOOST_NO_FENV_H 221 222 // 223 // C++0x macros: 224 // 225 #if (__CODEGEARC__ <= 0x620) 226 #define BOOST_NO_CXX11_STATIC_ASSERT 227 #else 228 #define BOOST_HAS_STATIC_ASSERT 229 #endif 230 #define BOOST_HAS_CHAR16_T 231 #define BOOST_HAS_CHAR32_T 232 #define BOOST_HAS_LONG_LONG 233 // #define BOOST_HAS_ALIGNOF 234 #define BOOST_HAS_DECLTYPE 235 #define BOOST_HAS_EXPLICIT_CONVERSION_OPS 236 // #define BOOST_HAS_RVALUE_REFS 237 #define BOOST_HAS_SCOPED_ENUM 238 // #define BOOST_HAS_STATIC_ASSERT 239 #define BOOST_HAS_STD_TYPE_TRAITS 240 241 #define BOOST_NO_CXX11_AUTO_DECLARATIONS 242 #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS 243 #define BOOST_NO_CXX11_CONSTEXPR 244 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS 245 #define BOOST_NO_CXX11_DELETED_FUNCTIONS 246 #define BOOST_NO_CXX11_EXTERN_TEMPLATE 247 #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS 248 #define BOOST_NO_CXX11_LAMBDAS 249 #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS 250 #define BOOST_NO_CXX11_NOEXCEPT 251 #define BOOST_NO_CXX11_NULLPTR 252 #define BOOST_NO_CXX11_RANGE_BASED_FOR 253 #define BOOST_NO_CXX11_RAW_LITERALS 254 #define BOOST_NO_CXX11_RVALUE_REFERENCES 255 #define BOOST_NO_SFINAE_EXPR 256 #define BOOST_NO_CXX11_SFINAE_EXPR 257 #define BOOST_NO_CXX11_TEMPLATE_ALIASES 258 #define BOOST_NO_CXX11_UNICODE_LITERALS 259 #define BOOST_NO_CXX11_VARIADIC_TEMPLATES 260 #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX 261 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS 262 #define BOOST_NO_CXX11_ALIGNAS 263 #define BOOST_NO_CXX11_ALIGNOF 264 #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES 265 #define BOOST_NO_CXX11_INLINE_NAMESPACES 266 #define BOOST_NO_CXX11_REF_QUALIFIERS 267 #define BOOST_NO_CXX11_FINAL 268 #define BOOST_NO_CXX11_OVERRIDE 269 #define BOOST_NO_CXX11_THREAD_LOCAL 270 #define BOOST_NO_CXX11_DECLTYPE_N3276 271 #define BOOST_NO_CXX11_UNRESTRICTED_UNION 272 273 // C++ 14: 274 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) 275 # define BOOST_NO_CXX14_AGGREGATE_NSDMI 276 #endif 277 #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) 278 # define BOOST_NO_CXX14_BINARY_LITERALS 279 #endif 280 #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) 281 # define BOOST_NO_CXX14_CONSTEXPR 282 #endif 283 #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) 284 # define BOOST_NO_CXX14_DECLTYPE_AUTO 285 #endif 286 #if (__cplusplus < 201304) // There's no SD6 check for this.... 287 # define BOOST_NO_CXX14_DIGIT_SEPARATORS 288 #endif 289 #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) 290 # define BOOST_NO_CXX14_GENERIC_LAMBDAS 291 #endif 292 #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) 293 # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES 294 #endif 295 #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) 296 # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION 297 #endif 298 #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) 299 # define BOOST_NO_CXX14_VARIABLE_TEMPLATES 300 #endif 301 302 // C++17 303 #if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) 304 # define BOOST_NO_CXX17_STRUCTURED_BINDINGS 305 #endif 306 307 #if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) 308 # define BOOST_NO_CXX17_INLINE_VARIABLES 309 #endif 310 311 #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) 312 # define BOOST_NO_CXX17_FOLD_EXPRESSIONS 313 #endif 314 315 #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) 316 # define BOOST_NO_CXX17_IF_CONSTEXPR 317 #endif 318 319 // 320 // TR1 macros: 321 // 322 #define BOOST_HAS_TR1_HASH 323 #define BOOST_HAS_TR1_TYPE_TRAITS 324 #define BOOST_HAS_TR1_UNORDERED_MAP 325 #define BOOST_HAS_TR1_UNORDERED_SET 326 327 #define BOOST_HAS_MACRO_USE_FACET 328 329 #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST 330 331 // On non-Win32 platforms let the platform config figure this out: 332 #ifdef _WIN32 333 # define BOOST_HAS_STDINT_H 334 #endif 335 336 // 337 // __int64: 338 // 339 #if !defined(__STRICT_ANSI__) 340 # define BOOST_HAS_MS_INT64 341 #endif 342 // 343 // check for exception handling support: 344 // 345 #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) 346 # define BOOST_NO_EXCEPTIONS 347 #endif 348 // 349 // all versions have a <dirent.h>: 350 // 351 #if !defined(__STRICT_ANSI__) 352 # define BOOST_HAS_DIRENT_H 353 #endif 354 // 355 // all versions support __declspec: 356 // 357 #if defined(__STRICT_ANSI__) 358 // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined 359 # define BOOST_SYMBOL_EXPORT 360 #endif 361 // 362 // ABI fixing headers: 363 // 364 #ifndef BOOST_ABI_PREFIX 365 # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" 366 #endif 367 #ifndef BOOST_ABI_SUFFIX 368 # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" 369 #endif 370 // 371 // Disable Win32 support in ANSI mode: 372 // 373 # pragma defineonoption BOOST_DISABLE_WIN32 -A 374 // 375 // MSVC compatibility mode does some nasty things: 376 // TODO: look up if this doesn't apply to the whole 12xx range 377 // 378 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 379 # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP 380 # define BOOST_NO_VOID_RETURNS 381 #endif 382 383 #define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) 384 385 #endif // #if !defined(__clang__)