2005-09-15 Benjamin Kosnik <bkoz@redhat.com>
[official-gcc.git] / libstdc++-v3 / include / bits / c++config
blob75b7236964d603ca9e8b20f9e7ac7dd66820a255
1 // Predefined symbols and macros -*- C++ -*-
3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4 // Free Software Foundation, Inc.
5 //
6 // This file is part of the GNU ISO C++ Library.  This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
10 // any later version.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING.  If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction.  Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License.  This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
31 #ifndef _CXXCONFIG
32 #define _CXXCONFIG 1
34 // Pick up any OS-specific definitions.
35 #include <bits/os_defines.h>
37 // Debug mode support. Debug mode basic_string is not allowed to be
38 // associated with std, because of locale and exception link
39 // dependence.
40 namespace __gnu_debug_def { }
42 namespace __gnu_debug 
43
44   using namespace __gnu_debug_def;
47 #ifdef _GLIBCXX_DEBUG
48 # define _GLIBCXX_STD __gnu_norm
49 # define _GLIBCXX_EXTERN_TEMPLATE 0
50 namespace __gnu_norm 
51
52   using namespace std; 
54 namespace std
56   using namespace __gnu_debug_def __attribute__ ((strong));
58 # if __NO_INLINE__ && !__GXX_WEAK__
59 #  warning debug mode without inlining may fail due to lack of weak symbols
60 # endif
61 #else
62 # define _GLIBCXX_STD std
63 #endif
65 // Allow use of "export template." This is currently not a feature
66 // that g++ supports.
67 // #define _GLIBCXX_EXPORT_TEMPLATE 1
69 // Allow use of the GNU syntax extension, "extern template." This
70 // extension is fully documented in the g++ manual, but in a nutshell,
71 // it inhibits all implicit instantiations and is used throughout the
72 // library to avoid multiple weak definitions for required types that
73 // are already explicitly instantiated in the library binary. This
74 // substantially reduces the binary size of resulting executables.
75 #ifndef _GLIBCXX_EXTERN_TEMPLATE
76 # define _GLIBCXX_EXTERN_TEMPLATE 1
77 #endif
79 // Certain function definitions that are meant to be overridable from
80 // user code are decorated with this macro.  For some targets, this
81 // macro causes these definitions to be weak.
82 #ifndef _GLIBCXX_WEAK_DEFINITION
83 # define _GLIBCXX_WEAK_DEFINITION
84 #endif
86 // The remainder of the prewritten config is automatic; all the
87 // user hooks are listed above.
89 // Create a boolean flag to be used to determine if --fast-math is set.
90 #ifdef __FAST_MATH__
91 # define _GLIBCXX_FAST_MATH 1
92 #else
93 # define _GLIBCXX_FAST_MATH 0
94 #endif
96 // This marks string literals in header files to be extracted for eventual
97 // translation.  It is primarily used for messages in thrown exceptions; see
98 // src/functexcept.cc.  We use __N because the more traditional _N is used
99 // for something else under certain OSes (see BADNAMES).
100 #define __N(msgid)     (msgid)
102 // End of prewritten config; the discovered settings follow.