c++config revision 117397
197403Sobrien// Predefined symbols and macros -*- C++ -*-
297403Sobrien
3117397Skan// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
4117397Skan// Free Software Foundation, Inc.
597403Sobrien//
697403Sobrien// This file is part of the GNU ISO C++ Library.  This library is free
797403Sobrien// software; you can redistribute it and/or modify it under the
897403Sobrien// terms of the GNU General Public License as published by the
997403Sobrien// Free Software Foundation; either version 2, or (at your option)
1097403Sobrien// any later version.
1197403Sobrien
1297403Sobrien// This library is distributed in the hope that it will be useful,
1397403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of
1497403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1597403Sobrien// GNU General Public License for more details.
1697403Sobrien
1797403Sobrien// You should have received a copy of the GNU General Public License along
1897403Sobrien// with this library; see the file COPYING.  If not, write to the Free
1997403Sobrien// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2097403Sobrien// USA.
2197403Sobrien
2297403Sobrien// As a special exception, you may use this file as part of a free software
2397403Sobrien// library without restriction.  Specifically, if other files instantiate
2497403Sobrien// templates or use macros or inline functions from this file, or you compile
2597403Sobrien// this file and link it with other files to produce an executable, this
2697403Sobrien// file does not by itself cause the resulting executable to be covered by
2797403Sobrien// the GNU General Public License.  This exception does not however
2897403Sobrien// invalidate any other reasons why the executable file might be covered by
2997403Sobrien// the GNU General Public License.
3097403Sobrien
3197403Sobrien#ifndef _CPP_CPPCONFIG
3297403Sobrien#define _CPP_CPPCONFIG 1
3397403Sobrien
3497403Sobrien// Pick up any OS-specific definitions.
3597403Sobrien#include <bits/os_defines.h>
3697403Sobrien
3797403Sobrien// The current version of the C++ library in compressed ISO date format.
38117397Skan#define __GLIBCPP__ 20030711
3997403Sobrien
40117397Skan// This is necessary until GCC supports separate template compilation.
4197403Sobrien#define _GLIBCPP_NO_TEMPLATE_EXPORT 1
4297403Sobrien
4397403Sobrien// This is a hack around not having either pre-compiled headers or
4497403Sobrien// export compilation. If defined, the io, string, and valarray
4597403Sobrien// headers will include all the necessary bits. If not defined, the
4697403Sobrien// implementation optimizes the headers for the most commonly-used
4797403Sobrien// types. For the io library, this means that larger, out-of-line
4897403Sobrien// member functions are only declared, and definitions are not parsed
4997403Sobrien// by the compiler, but instead instantiated into the library binary.
5097403Sobrien#define _GLIBCPP_FULLY_COMPLIANT_HEADERS 1
5197403Sobrien
52117397Skan// Allow use of the GNU syntax extension, "extern template." This
53117397Skan// extension is fully documented in the g++ manual, but in a nutshell,
54117397Skan// it inhibits all implicit instantiations and is used throughout the
55117397Skan// library to avoid multiple weak definitions for required types that
56117397Skan// are already explicitly instantiated in the library binary. This
57117397Skan// substantially reduces the binary size of resulting executables.
58117397Skan#ifndef _GLIBCPP_EXTERN_TEMPLATE
59117397Skan#define _GLIBCPP_EXTERN_TEMPLATE 1
60117397Skan#endif
61117397Skan
6297403Sobrien// To enable older, ARM-style iostreams and other anachronisms use this.
6397403Sobrien//#define _GLIBCPP_DEPRECATED 1
6497403Sobrien
6597403Sobrien// Use corrected code from the committee library group's issues list.
6697403Sobrien#define _GLIBCPP_RESOLVE_LIB_DEFECTS 1
6797403Sobrien
68107606Sobrien// Hopefully temporary workaround to autoconf/m4 issue with quoting '@'.
69107606Sobrien#define _GLIBCPP_AT_AT "@@"
70107606Sobrien
7197403Sobrien// In those parts of the standard C++ library that use a mutex instead
7297403Sobrien// of a spin-lock, we now unconditionally use GCC's gthr.h mutex
7397403Sobrien// abstraction layer.  All support to directly map to various
7497403Sobrien// threading models has been removed.  Note: gthr.h may well map to
7597403Sobrien// gthr-single.h which is a correct way to express no threads support
7697403Sobrien// in gcc.  Support for the undocumented _NOTHREADS has been removed.
7797403Sobrien
7897403Sobrien// Default to the typically high-speed, pool-based allocator (as
7997403Sobrien// libstdc++-v2) instead of the malloc-based allocator (libstdc++-v3
8097403Sobrien// snapshots).  See libstdc++-v3/docs/html/17_intro/howto.html for
8197403Sobrien// details on why you don't want to override this setting.  Ensure
8297403Sobrien// that threads are properly configured on your platform before
8397403Sobrien// assigning blame to the STL container-memory allocator.  After doing
8497403Sobrien// so, please report any possible issues to libstdc++@gcc.gnu.org .
85102782Skan// Do not define __USE_MALLOC on the command line.  Enforce it here:
86102782Skan#ifdef __USE_MALLOC
87110614Skan#error __USE_MALLOC should never be defined.  Read the release notes.
88102782Skan#endif
8997403Sobrien
90117397Skan// Create a boolean flag to be used to determine if --fast-math is set.
91117397Skan#ifdef __FAST_MATH__
92117397Skan#define _GLIBCPP_FAST_MATH 1
93117397Skan#else
94117397Skan#define _GLIBCPP_FAST_MATH 0
95117397Skan#endif
96117397Skan
9797403Sobrien// The remainder of the prewritten config is mostly automatic; all the
9897403Sobrien// user hooks are listed above.
9997403Sobrien
10097403Sobrien// End of prewritten config; the discovered settings follow.
101