1 // Predefined symbols and macros -*- C++ -*-
3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5 // Free Software Foundation, Inc.
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 2, or (at your option)
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING. If not, write to the Free
20 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 // As a special exception, you may use this file as part of a free software
24 // library without restriction. Specifically, if other files instantiate
25 // templates or use macros or inline functions from this file, or you compile
26 // this file and link it with other files to produce an executable, this
27 // file does not by itself cause the resulting executable to be covered by
28 // the GNU General Public License. This exception does not however
29 // invalidate any other reasons why the executable file might be covered by
30 // the GNU General Public License.
33 * This is an internal header file, included by other library headers.
34 * You should not attempt to use it directly.
40 // Pick up any OS-specific definitions.
41 #include <bits/os_defines.h>
43 // Pick up any CPU-specific definitions.
44 #include <bits/cpu_defines.h>
46 // The current version of the C++ library in compressed ISO date format.
49 // Macros for visibility.
50 #define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
52 #if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
53 #define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
55 #define _GLIBCXX_VISIBILITY(V)
58 // Macros for controlling various namespace association schemes and modes.
60 # define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
63 #define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
65 // Macros for namespace scope.
66 // _GLIBCXX_BEGIN_NAMESPACE
67 // _GLIBCXX_END_NAMESPACE
68 // _GLIBCXX_BEGIN_NESTED_NAMESPACE
69 // _GLIBCXX_END_NESTED_NAMESPACE
70 #if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
71 # define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY(default) {
72 # define _GLIBCXX_END_NESTED_NAMESPACE } }
73 # define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
74 # define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
76 # define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) {
77 # define _GLIBCXX_END_NAMESPACE }
78 # if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
79 # define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY(default) {
80 # define _GLIBCXX_END_NESTED_NAMESPACE } }
82 # define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
83 # define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
87 // Namespace associations for versioning mode.
88 #if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
92 using namespace _6 __attribute__ ((strong));
95 // In addition, other supported namespace configurations.
99 using namespace _6 __attribute__ ((strong));
107 using namespace _6 __attribute__ ((strong));
112 // Namespace associations for debug mode.
113 #if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
117 namespace __debug { }
118 using namespace __debug __attribute__ ((strong));
124 namespace __debug { }
125 using namespace __debug __attribute__ ((strong));
128 # define _GLIBCXX_STD __norm
129 # define _GLIBCXX_EXT __norm
130 # define _GLIBCXX_EXTERN_TEMPLATE 0
131 # if __NO_INLINE__ && !__GXX_WEAK__
132 # warning debug mode without inlining may fail due to lack of weak symbols
135 #if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
136 # define _GLIBCXX_STD _6
137 # define _GLIBCXX_EXT _6
139 # define _GLIBCXX_STD std
140 # define _GLIBCXX_EXT __gnu_cxx
144 /* Define if compatibility should be provided for -mlong-double-64. */
145 #undef _GLIBCXX_LONG_DOUBLE_COMPAT
147 // XXX GLIBCXX_ABI Deprecated
148 // Namespace associations for long double 128 mode.
149 _GLIBCXX_BEGIN_NAMESPACE(std)
150 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
151 # define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
152 # define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
153 # define _GLIBCXX_END_LDBL_NAMESPACE }
154 namespace __gnu_cxx_ldbl128 { }
155 using namespace __gnu_cxx_ldbl128 __attribute__((__strong__));
157 # define _GLIBCXX_LDBL_NAMESPACE
158 # define _GLIBCXX_BEGIN_LDBL_NAMESPACE
159 # define _GLIBCXX_END_LDBL_NAMESPACE
161 _GLIBCXX_END_NAMESPACE
164 // Allow use of "export template." This is currently not a feature
165 // that g++ supports.
166 // #define _GLIBCXX_EXPORT_TEMPLATE 1
168 // Allow use of the GNU syntax extension, "extern template." This
169 // extension is fully documented in the g++ manual, but in a nutshell,
170 // it inhibits all implicit instantiations and is used throughout the
171 // library to avoid multiple weak definitions for required types that
172 // are already explicitly instantiated in the library binary. This
173 // substantially reduces the binary size of resulting executables.
174 #ifndef _GLIBCXX_EXTERN_TEMPLATE
175 # define _GLIBCXX_EXTERN_TEMPLATE 1
179 // Certain function definitions that are meant to be overridable from
180 // user code are decorated with this macro. For some targets, this
181 // macro causes these definitions to be weak.
182 #ifndef _GLIBCXX_WEAK_DEFINITION
183 # define _GLIBCXX_WEAK_DEFINITION
186 // The remainder of the prewritten config is automatic; all the
187 // user hooks are listed above.
189 // Create a boolean flag to be used to determine if --fast-math is set.
191 # define _GLIBCXX_FAST_MATH 1
193 # define _GLIBCXX_FAST_MATH 0
196 // This marks string literals in header files to be extracted for eventual
197 // translation. It is primarily used for messages in thrown exceptions; see
198 // src/functexcept.cc. We use __N because the more traditional _N is used
199 // for something else under certain OSes (see BADNAMES).
200 #define __N(msgid) (msgid)
202 // For example, <windows.h> is known to #define min and max as macros...
206 // End of prewritten config; the discovered settings follow.