1// Predefined symbols and macros -*- C++ -*- 2 3// Copyright (C) 1997-2019 Free Software Foundation, Inc. 4// 5// This file is part of the GNU ISO C++ Library. This library is free 6// software; you can redistribute it and/or modify it under the 7// terms of the GNU General Public License as published by the 8// Free Software Foundation; either version 3, or (at your option) 9// any later version. 10 11// This library is distributed in the hope that it will be useful, 12// but WITHOUT ANY WARRANTY; without even the implied warranty of 13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14// GNU General Public License for more details. 15 16// Under Section 7 of GPL version 3, you are granted additional 17// permissions described in the GCC Runtime Library Exception, version 18// 3.1, as published by the Free Software Foundation. 19 20// You should have received a copy of the GNU General Public License and 21// a copy of the GCC Runtime Library Exception along with this program; 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23// <http://www.gnu.org/licenses/>. 24 25/** @file bits/c++config.h 26 * This is an internal header file, included by other library headers. 27 * Do not attempt to use it directly. @headername{version} 28 */ 29 30#ifndef _GLIBCXX_CXX_CONFIG_H 31#define _GLIBCXX_CXX_CONFIG_H 1 32 33// The major release number for the GCC release the C++ library belongs to. 34#define _GLIBCXX_RELEASE 35 36// The datestamp of the C++ library in compressed ISO date format. 37#define __GLIBCXX__ 38 39// Macros for various attributes. 40// _GLIBCXX_PURE 41// _GLIBCXX_CONST 42// _GLIBCXX_NORETURN 43// _GLIBCXX_NOTHROW 44// _GLIBCXX_VISIBILITY 45#ifndef _GLIBCXX_PURE 46# define _GLIBCXX_PURE __attribute__ ((__pure__)) 47#endif 48 49#ifndef _GLIBCXX_CONST 50# define _GLIBCXX_CONST __attribute__ ((__const__)) 51#endif 52 53#ifndef _GLIBCXX_NORETURN 54# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) 55#endif 56 57// See below for C++ 58#ifndef _GLIBCXX_NOTHROW 59# ifndef __cplusplus 60# define _GLIBCXX_NOTHROW __attribute__((__nothrow__)) 61# endif 62#endif 63 64// Macros for visibility attributes. 65// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 66// _GLIBCXX_VISIBILITY 67#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 68 69#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 70# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V))) 71#else 72// If this is not supplied by the OS-specific or CPU-specific 73// headers included below, it will be defined to an empty default. 74# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V) 75#endif 76 77// Macros for deprecated attributes. 78// _GLIBCXX_USE_DEPRECATED 79// _GLIBCXX_DEPRECATED 80// _GLIBCXX_DEPRECATED_SUGGEST 81// _GLIBCXX17_DEPRECATED 82#ifndef _GLIBCXX_USE_DEPRECATED 83# define _GLIBCXX_USE_DEPRECATED 1 84#endif 85 86#if defined(__DEPRECATED) && (__cplusplus >= 201103L) 87# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__)) 88# define _GLIBCXX_DEPRECATED_SUGGEST(ALT) \ 89 __attribute__ ((__deprecated__ ("use '" ALT "' instead"))) 90#else 91# define _GLIBCXX_DEPRECATED 92# define _GLIBCXX_DEPRECATED_SUGGEST(ALT) 93#endif 94 95#if defined(__DEPRECATED) && (__cplusplus >= 201703L) 96# define _GLIBCXX17_DEPRECATED [[__deprecated__]] 97#else 98# define _GLIBCXX17_DEPRECATED 99#endif 100 101// Macros for ABI tag attributes. 102#ifndef _GLIBCXX_ABI_TAG_CXX11 103# define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11"))) 104#endif 105 106// Macro to warn about unused results. 107#if __cplusplus >= 201703L 108# define _GLIBCXX_NODISCARD [[__nodiscard__]] 109#else 110# define _GLIBCXX_NODISCARD 111#endif 112 113 114 115#if __cplusplus 116 117// Macro for constexpr, to support in mixed 03/0x mode. 118#ifndef _GLIBCXX_CONSTEXPR 119# if __cplusplus >= 201103L 120# define _GLIBCXX_CONSTEXPR constexpr 121# define _GLIBCXX_USE_CONSTEXPR constexpr 122# else 123# define _GLIBCXX_CONSTEXPR 124# define _GLIBCXX_USE_CONSTEXPR const 125# endif 126#endif 127 128#ifndef _GLIBCXX14_CONSTEXPR 129# if __cplusplus >= 201402L 130# define _GLIBCXX14_CONSTEXPR constexpr 131# else 132# define _GLIBCXX14_CONSTEXPR 133# endif 134#endif 135 136#ifndef _GLIBCXX17_CONSTEXPR 137# if __cplusplus >= 201703L 138# define _GLIBCXX17_CONSTEXPR constexpr 139# else 140# define _GLIBCXX17_CONSTEXPR 141# endif 142#endif 143 144#ifndef _GLIBCXX20_CONSTEXPR 145# if __cplusplus > 201703L 146# define _GLIBCXX20_CONSTEXPR constexpr 147# else 148# define _GLIBCXX20_CONSTEXPR 149# endif 150#endif 151 152#ifndef _GLIBCXX17_INLINE 153# if __cplusplus >= 201703L 154# define _GLIBCXX17_INLINE inline 155# else 156# define _GLIBCXX17_INLINE 157# endif 158#endif 159 160// Macro for noexcept, to support in mixed 03/0x mode. 161#ifndef _GLIBCXX_NOEXCEPT 162# if __cplusplus >= 201103L 163# define _GLIBCXX_NOEXCEPT noexcept 164# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) 165# define _GLIBCXX_USE_NOEXCEPT noexcept 166# define _GLIBCXX_THROW(_EXC) 167# else 168# define _GLIBCXX_NOEXCEPT 169# define _GLIBCXX_NOEXCEPT_IF(_COND) 170# define _GLIBCXX_USE_NOEXCEPT throw() 171# define _GLIBCXX_THROW(_EXC) throw(_EXC) 172# endif 173#endif 174 175#ifndef _GLIBCXX_NOTHROW 176# define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT 177#endif 178 179#ifndef _GLIBCXX_THROW_OR_ABORT 180# if __cpp_exceptions 181# define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC)) 182# else 183# define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort()) 184# endif 185#endif 186 187#if __cpp_noexcept_function_type 188#define _GLIBCXX_NOEXCEPT_PARM , bool _NE 189#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE) 190#else 191#define _GLIBCXX_NOEXCEPT_PARM 192#define _GLIBCXX_NOEXCEPT_QUAL 193#endif 194 195// Macro for extern template, ie controlling template linkage via use 196// of extern keyword on template declaration. As documented in the g++ 197// manual, it inhibits all implicit instantiations and is used 198// throughout the library to avoid multiple weak definitions for 199// required types that are already explicitly instantiated in the 200// library binary. This substantially reduces the binary size of 201// resulting executables. 202// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern 203// templates only in basic_string, thus activating its debug-mode 204// checks even at -O0. 205#define _GLIBCXX_EXTERN_TEMPLATE 206 207/* 208 Outline of libstdc++ namespaces. 209 210 namespace std 211 { 212 namespace __debug { } 213 namespace __parallel { } 214 namespace __profile { } 215 namespace __cxx1998 { } 216 217 namespace __detail { 218 namespace __variant { } // C++17 219 } 220 221 namespace rel_ops { } 222 223 namespace tr1 224 { 225 namespace placeholders { } 226 namespace regex_constants { } 227 namespace __detail { } 228 } 229 230 namespace tr2 { } 231 232 namespace decimal { } 233 234 namespace chrono { } // C++11 235 namespace placeholders { } // C++11 236 namespace regex_constants { } // C++11 237 namespace this_thread { } // C++11 238 inline namespace literals { // C++14 239 inline namespace chrono_literals { } // C++14 240 inline namespace complex_literals { } // C++14 241 inline namespace string_literals { } // C++14 242 inline namespace string_view_literals { } // C++17 243 } 244 } 245 246 namespace abi { } 247 248 namespace __gnu_cxx 249 { 250 namespace __detail { } 251 } 252 253 For full details see: 254 http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html 255*/ 256namespace std 257{ 258 typedef __SIZE_TYPE__ size_t; 259 typedef __PTRDIFF_TYPE__ ptrdiff_t; 260 261#if __cplusplus >= 201103L 262 typedef decltype(nullptr) nullptr_t; 263#endif 264} 265 266#define _GLIBCXX_USE_DUAL_ABI 267 268#if ! _GLIBCXX_USE_DUAL_ABI 269// Ignore any pre-defined value of _GLIBCXX_USE_CXX11_ABI 270# undef _GLIBCXX_USE_CXX11_ABI 271#endif 272 273#ifndef _GLIBCXX_USE_CXX11_ABI 274#define _GLIBCXX_USE_CXX11_ABI 275#endif 276 277#if _GLIBCXX_USE_CXX11_ABI 278namespace std 279{ 280 inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 281} 282namespace __gnu_cxx 283{ 284 inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 285} 286# define _GLIBCXX_NAMESPACE_CXX11 __cxx11:: 287# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 namespace __cxx11 { 288# define _GLIBCXX_END_NAMESPACE_CXX11 } 289# define _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_ABI_TAG_CXX11 290#else 291# define _GLIBCXX_NAMESPACE_CXX11 292# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 293# define _GLIBCXX_END_NAMESPACE_CXX11 294# define _GLIBCXX_DEFAULT_ABI_TAG 295#endif 296 297// Defined if inline namespaces are used for versioning. 298#define _GLIBCXX_INLINE_VERSION 299 300// Inline namespace for symbol versioning. 301#if _GLIBCXX_INLINE_VERSION 302# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __8 { 303# define _GLIBCXX_END_NAMESPACE_VERSION } 304 305namespace std 306{ 307inline _GLIBCXX_BEGIN_NAMESPACE_VERSION 308#if __cplusplus >= 201402L 309 inline namespace literals { 310 inline namespace chrono_literals { } 311 inline namespace complex_literals { } 312 inline namespace string_literals { } 313#if __cplusplus > 201402L 314 inline namespace string_view_literals { } 315#endif // C++17 316 } 317#endif // C++14 318_GLIBCXX_END_NAMESPACE_VERSION 319} 320 321namespace __gnu_cxx 322{ 323inline _GLIBCXX_BEGIN_NAMESPACE_VERSION 324_GLIBCXX_END_NAMESPACE_VERSION 325} 326 327#else 328# define _GLIBCXX_BEGIN_NAMESPACE_VERSION 329# define _GLIBCXX_END_NAMESPACE_VERSION 330#endif 331 332// Inline namespaces for special modes: debug, parallel, profile. 333#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ 334 || defined(_GLIBCXX_PROFILE) 335namespace std 336{ 337_GLIBCXX_BEGIN_NAMESPACE_VERSION 338 339 // Non-inline namespace for components replaced by alternates in active mode. 340 namespace __cxx1998 341 { 342# if _GLIBCXX_USE_CXX11_ABI 343 inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 344# endif 345 } 346 347_GLIBCXX_END_NAMESPACE_VERSION 348 349 // Inline namespace for debug mode. 350# ifdef _GLIBCXX_DEBUG 351 inline namespace __debug { } 352# endif 353 354 // Inline namespaces for parallel mode. 355# ifdef _GLIBCXX_PARALLEL 356 inline namespace __parallel { } 357# endif 358 359 // Inline namespaces for profile mode 360# ifdef _GLIBCXX_PROFILE 361 inline namespace __profile { } 362# endif 363} 364 365// Check for invalid usage and unsupported mixed-mode use. 366# if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL) 367# error illegal use of multiple inlined namespaces 368# endif 369# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG) 370# error illegal use of multiple inlined namespaces 371# endif 372# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL) 373# error illegal use of multiple inlined namespaces 374# endif 375 376// Check for invalid use due to lack for weak symbols. 377# if __NO_INLINE__ && !__GXX_WEAK__ 378# warning currently using inlined namespace mode which may fail \ 379 without inlining due to lack of weak symbols 380# endif 381#endif 382 383// Macros for namespace scope. Either namespace std:: or the name 384// of some nested namespace within it corresponding to the active mode. 385// _GLIBCXX_STD_A 386// _GLIBCXX_STD_C 387// 388// Macros for opening/closing conditional namespaces. 389// _GLIBCXX_BEGIN_NAMESPACE_ALGO 390// _GLIBCXX_END_NAMESPACE_ALGO 391// _GLIBCXX_BEGIN_NAMESPACE_CONTAINER 392// _GLIBCXX_END_NAMESPACE_CONTAINER 393#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) 394# define _GLIBCXX_STD_C __cxx1998 395# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \ 396 namespace _GLIBCXX_STD_C { 397# define _GLIBCXX_END_NAMESPACE_CONTAINER } 398#else 399# define _GLIBCXX_STD_C std 400# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER 401# define _GLIBCXX_END_NAMESPACE_CONTAINER 402#endif 403 404#ifdef _GLIBCXX_PARALLEL 405# define _GLIBCXX_STD_A __cxx1998 406# define _GLIBCXX_BEGIN_NAMESPACE_ALGO \ 407 namespace _GLIBCXX_STD_A { 408# define _GLIBCXX_END_NAMESPACE_ALGO } 409#else 410# define _GLIBCXX_STD_A std 411# define _GLIBCXX_BEGIN_NAMESPACE_ALGO 412# define _GLIBCXX_END_NAMESPACE_ALGO 413#endif 414 415// GLIBCXX_ABI Deprecated 416// Define if compatibility should be provided for -mlong-double-64. 417#undef _GLIBCXX_LONG_DOUBLE_COMPAT 418 419// Inline namespace for long double 128 mode. 420#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 421namespace std 422{ 423 inline namespace __gnu_cxx_ldbl128 { } 424} 425# define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128:: 426# define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 { 427# define _GLIBCXX_END_NAMESPACE_LDBL } 428#else 429# define _GLIBCXX_NAMESPACE_LDBL 430# define _GLIBCXX_BEGIN_NAMESPACE_LDBL 431# define _GLIBCXX_END_NAMESPACE_LDBL 432#endif 433#if _GLIBCXX_USE_CXX11_ABI 434# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_CXX11 435# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_CXX11 436# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_CXX11 437#else 438# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_LDBL 439# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_LDBL 440# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL 441#endif 442 443// Debug Mode implies checking assertions. 444#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) 445# define _GLIBCXX_ASSERTIONS 1 446#endif 447 448// Disable std::string explicit instantiation declarations in order to assert. 449#ifdef _GLIBCXX_ASSERTIONS 450# undef _GLIBCXX_EXTERN_TEMPLATE 451# define _GLIBCXX_EXTERN_TEMPLATE -1 452#endif 453 454// Assert. 455#if defined(_GLIBCXX_ASSERTIONS) \ 456 || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS) 457namespace std 458{ 459 // Avoid the use of assert, because we're trying to keep the <cassert> 460 // include out of the mix. 461 extern "C++" inline void 462 __replacement_assert(const char* __file, int __line, 463 const char* __function, const char* __condition) 464 { 465 __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line, 466 __function, __condition); 467 __builtin_abort(); 468 } 469} 470#define __glibcxx_assert_impl(_Condition) \ 471 do \ 472 { \ 473 if (! (_Condition)) \ 474 std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ 475 #_Condition); \ 476 } while (false) 477#endif 478 479#if defined(_GLIBCXX_ASSERTIONS) 480# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition) 481#else 482# define __glibcxx_assert(_Condition) 483#endif 484 485// Macros for race detectors. 486// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and 487// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain 488// atomic (lock-free) synchronization to race detectors: 489// the race detector will infer a happens-before arc from the former to the 490// latter when they share the same argument pointer. 491// 492// The most frequent use case for these macros (and the only case in the 493// current implementation of the library) is atomic reference counting: 494// void _M_remove_reference() 495// { 496// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); 497// if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) 498// { 499// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount); 500// _M_destroy(__a); 501// } 502// } 503// The annotations in this example tell the race detector that all memory 504// accesses occurred when the refcount was positive do not race with 505// memory accesses which occurred after the refcount became zero. 506#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE 507# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) 508#endif 509#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER 510# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) 511#endif 512 513// Macros for C linkage: define extern "C" linkage only when using C++. 514# define _GLIBCXX_BEGIN_EXTERN_C extern "C" { 515# define _GLIBCXX_END_EXTERN_C } 516 517#define _GLIBCXX_USE_ALLOCATOR_NEW 518 519#else // !__cplusplus 520# define _GLIBCXX_BEGIN_EXTERN_C 521# define _GLIBCXX_END_EXTERN_C 522#endif 523 524 525// First includes. 526 527// Pick up any OS-specific definitions. 528#include <bits/os_defines.h> 529 530// Pick up any CPU-specific definitions. 531#include <bits/cpu_defines.h> 532 533// If platform uses neither visibility nor psuedo-visibility, 534// specify empty default for namespace annotation macros. 535#ifndef _GLIBCXX_PSEUDO_VISIBILITY 536# define _GLIBCXX_PSEUDO_VISIBILITY(V) 537#endif 538 539// Certain function definitions that are meant to be overridable from 540// user code are decorated with this macro. For some targets, this 541// macro causes these definitions to be weak. 542#ifndef _GLIBCXX_WEAK_DEFINITION 543# define _GLIBCXX_WEAK_DEFINITION 544#endif 545 546// By default, we assume that __GXX_WEAK__ also means that there is support 547// for declaring functions as weak while not defining such functions. This 548// allows for referring to functions provided by other libraries (e.g., 549// libitm) without depending on them if the respective features are not used. 550#ifndef _GLIBCXX_USE_WEAK_REF 551# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__ 552#endif 553 554// Conditionally enable annotations for the Transactional Memory TS on C++11. 555// Most of the following conditions are due to limitations in the current 556// implementation. 557#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \ 558 && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201500L \ 559 && !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \ 560 && _GLIBCXX_USE_ALLOCATOR_NEW 561#define _GLIBCXX_TXN_SAFE transaction_safe 562#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic 563#else 564#define _GLIBCXX_TXN_SAFE 565#define _GLIBCXX_TXN_SAFE_DYN 566#endif 567 568#if __cplusplus > 201402L 569// In C++17 mathematical special functions are in namespace std. 570# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 571#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 572// For C++11 and C++14 they are in namespace std when requested. 573# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 574#endif 575 576// The remainder of the prewritten config is automatic; all the 577// user hooks are listed above. 578 579// Create a boolean flag to be used to determine if --fast-math is set. 580#ifdef __FAST_MATH__ 581# define _GLIBCXX_FAST_MATH 1 582#else 583# define _GLIBCXX_FAST_MATH 0 584#endif 585 586// This marks string literals in header files to be extracted for eventual 587// translation. It is primarily used for messages in thrown exceptions; see 588// src/functexcept.cc. We use __N because the more traditional _N is used 589// for something else under certain OSes (see BADNAMES). 590#define __N(msgid) (msgid) 591 592// For example, <windows.h> is known to #define min and max as macros... 593#undef min 594#undef max 595 596// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally 597// so they should be tested with #if not with #ifdef. 598#if __cplusplus >= 201103L 599# ifndef _GLIBCXX_USE_C99_MATH 600# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH 601# endif 602# ifndef _GLIBCXX_USE_C99_COMPLEX 603# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX 604# endif 605# ifndef _GLIBCXX_USE_C99_STDIO 606# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO 607# endif 608# ifndef _GLIBCXX_USE_C99_STDLIB 609# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB 610# endif 611# ifndef _GLIBCXX_USE_C99_WCHAR 612# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR 613# endif 614#else 615# ifndef _GLIBCXX_USE_C99_MATH 616# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH 617# endif 618# ifndef _GLIBCXX_USE_C99_COMPLEX 619# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX 620# endif 621# ifndef _GLIBCXX_USE_C99_STDIO 622# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO 623# endif 624# ifndef _GLIBCXX_USE_C99_STDLIB 625# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB 626# endif 627# ifndef _GLIBCXX_USE_C99_WCHAR 628# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR 629# endif 630#endif 631 632// Unless explicitly specified, enable char8_t extensions only if the core 633// language char8_t feature macro is defined. 634#ifndef _GLIBCXX_USE_CHAR8_T 635# ifdef __cpp_char8_t 636# define _GLIBCXX_USE_CHAR8_T 1 637# endif 638#endif 639#ifdef _GLIBCXX_USE_CHAR8_T 640# define __cpp_lib_char8_t 201811L 641#endif 642 643/* Define if __float128 is supported on this host. */ 644#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__) 645#define _GLIBCXX_USE_FLOAT128 646#endif 647 648#if __GNUC__ >= 7 649// Assume these are available if the compiler claims to be a recent GCC: 650# define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1 651# define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 652# define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 653# if __GNUC__ >= 9 654# define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1 655# endif 656#elif defined(__is_identifier) && defined(__has_builtin) 657// For non-GNU compilers: 658# if ! __is_identifier(__has_unique_object_representations) 659# define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1 660# endif 661# if ! __is_identifier(__is_aggregate) 662# define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 663# endif 664# if __has_builtin(__builtin_launder) 665# define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 666# endif 667# if __has_builtin(__builtin_is_constant_evaluated) 668# define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1 669# endif 670#endif // GCC 671 672// PSTL configuration 673 674#if __cplusplus >= 201703L 675// This header is not installed for freestanding: 676#if __has_include(<pstl/pstl_config.h>) 677// Preserved here so we have some idea which version of upstream we've pulled in 678// #define PSTL_VERSION 104 679// #define PSTL_VERSION_MAJOR (PSTL_VERSION/100) 680// #define PSTL_VERSION_MINOR (PSTL_VERSION - PSTL_VERSION_MAJOR * 100) 681 682// For now this defaults to being based on the presence of Thread Building Blocks 683# ifndef _GLIBCXX_USE_TBB_PAR_BACKEND 684# define _GLIBCXX_USE_TBB_PAR_BACKEND __has_include(<tbb/tbb.h>) 685# endif 686// This section will need some rework when a new (default) backend type is added 687# if _GLIBCXX_USE_TBB_PAR_BACKEND 688# define __PSTL_USE_PAR_POLICIES 1 689# endif 690 691# define __PSTL_ASSERT(_Condition) __glibcxx_assert(_Condition) 692# define __PSTL_ASSERT_MSG(_Condition, _Message) __glibcxx_assert(_Condition) 693 694#include <pstl/pstl_config.h> 695#endif // __has_include 696#endif // C++17 697 698// End of prewritten config; the settings discovered at configure time follow. 699