X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Fsrc%2Flimits.cc;h=3cf2c281a5299344e9cee9fc51698f34d9cab36b;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=294673ea186999dd92e9268693e1121f944bbab5;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libstdc++-v3/src/limits.cc b/libstdc++-v3/src/limits.cc index 294673ea..3cf2c281 100644 --- a/libstdc++-v3/src/limits.cc +++ b/libstdc++-v3/src/limits.cc @@ -1,11 +1,12 @@ // Static data members of -*- C++ -*- numeric_limits classes -// Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 1999, 2001, 2002, 2005, 2006, 2009 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) +// Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, @@ -13,19 +14,14 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . // Written by Gabriel Dos Reis @@ -36,8 +32,8 @@ #include -namespace std -{ +_GLIBCXX_BEGIN_NAMESPACE(std) + const bool __numeric_limits_base::is_specialized; const int __numeric_limits_base::digits; const int __numeric_limits_base::digits10; @@ -159,7 +155,7 @@ namespace std // wchar_t // This used to be problematic... -#ifdef _GLIBCPP_USE_WCHAR_T +#ifdef _GLIBCXX_USE_WCHAR_T const bool numeric_limits::is_specialized; const int numeric_limits::digits; const int numeric_limits::digits10; @@ -182,7 +178,7 @@ namespace std const bool numeric_limits::traps; const bool numeric_limits::tinyness_before; const float_round_style numeric_limits::round_style; -#endif // _GLIBCPP_USE_WCHAR_T +#endif // _GLIBCXX_USE_WCHAR_T // short const bool numeric_limits::is_specialized; @@ -446,4 +442,36 @@ namespace std const bool numeric_limits::traps; const bool numeric_limits::tinyness_before; const float_round_style numeric_limits::round_style; -} // namespace std + +_GLIBCXX_END_NAMESPACE + +// XXX GLIBCXX_ABI Deprecated +#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT + +#define _GLIBCXX_NUM_LIM_COMPAT(type, member, len) \ + extern "C" type _ZNSt14numeric_limitsIeE ## len ## member ## E \ + __attribute__ ((alias ("_ZNSt14numeric_limitsIdE" #len #member "E"))) +_GLIBCXX_NUM_LIM_COMPAT (bool, is_specialized, 14); +_GLIBCXX_NUM_LIM_COMPAT (int, digits, 6); +_GLIBCXX_NUM_LIM_COMPAT (int, digits10, 8); +_GLIBCXX_NUM_LIM_COMPAT (bool, is_signed, 9); +_GLIBCXX_NUM_LIM_COMPAT (bool, is_integer, 10); +_GLIBCXX_NUM_LIM_COMPAT (bool, is_exact, 8); +_GLIBCXX_NUM_LIM_COMPAT (int, radix, 5); +_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent, 12); +_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent10, 14); +_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent, 12); +_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent10, 14); +_GLIBCXX_NUM_LIM_COMPAT (bool, has_infinity, 12); +_GLIBCXX_NUM_LIM_COMPAT (bool, has_quiet_NaN, 13); +_GLIBCXX_NUM_LIM_COMPAT (bool, has_signaling_NaN, 17); +_GLIBCXX_NUM_LIM_COMPAT (std::float_denorm_style, has_denorm, 10); +_GLIBCXX_NUM_LIM_COMPAT (bool, has_denorm_loss, 15); +_GLIBCXX_NUM_LIM_COMPAT (bool, is_iec559, 9); +_GLIBCXX_NUM_LIM_COMPAT (bool, is_bounded, 10); +_GLIBCXX_NUM_LIM_COMPAT (bool, is_modulo, 9); +_GLIBCXX_NUM_LIM_COMPAT (bool, traps, 5); +_GLIBCXX_NUM_LIM_COMPAT (bool, tinyness_before, 15); +_GLIBCXX_NUM_LIM_COMPAT (std::float_round_style, round_style, 11); + +#endif // _GLIBCXX_LONG_DOUBLE_COMPAT