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