diff options
author | Jennifer Yao <jenny.hyphen.fa@gmail.com> | 2015-11-13 14:51:25 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-11-13 14:51:25 +0000 |
commit | 23c64853c83f3cf9cdf6925ab1c77d951cd1686b (patch) | |
tree | 016605b19b096572e3039c93cd9cad0d7940b26d /libstdc++-v3/include | |
parent | a054560d994d592b11f461447e4fafb0e51787d3 (diff) | |
download | gcc-23c64853c83f3cf9cdf6925ab1c77d951cd1686b.zip gcc-23c64853c83f3cf9cdf6925ab1c77d951cd1686b.tar.gz gcc-23c64853c83f3cf9cdf6925ab1c77d951cd1686b.tar.bz2 |
More fine-grained autoconf checks for C99 library
2015-11-13 Jennifer Yao <jenny.hyphen.fa@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/58393
PR libstdc++/61580
* acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with
-std=c++11 as well as -std=c++98, and define separate macros for each.
Cache the results of checking for complex math and wide character
functions. Reformat for readability.
* config.h.in: Regenerate.
* include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to
either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to
language standard in use.
* config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* config/locale/generic/c_locale.h (std::__convert_from_v): Likewise.
* config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise.
* config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO,
_GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR.
* configure: Regenerate.
* include/bits/basic_string.h: Make numeric conversion functions
depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or
_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
* include/ext/vstring.h: Likewise.
* include/bits/locale_facets.tcc (std::num_put::_M_insert_float):
Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* include/bits/locale_facets_nonio.tcc (std::money_put::do_put):
Likewise.
* include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_MATH.
* include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* src/c++98/locale_facets.cc (std::__num_base::_S_format_float):
Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* testsuite/18_support/exception_ptr/60612-terminate.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
(test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stof.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoi.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stol.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stold.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoll.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoul.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoull.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
to_wstring.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/13943.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise.
* testsuite/lib/libstdc++.exp (check_v3_target_string_conversions):
Change preprocessor #if conditional so that it uses
_GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and
_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
* testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH.
* testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Likewise.
* testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
* testsuite/util/testsuite_fs.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r230324
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/basic_string.h | 12 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 36 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/locale_facets.tcc | 16 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/locale_facets_nonio.tcc | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/c_compatibility/math.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/c_compatibility/wchar.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/c_global/cstdio | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/c_global/cstdlib | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/c_global/cwchar | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/cstdio | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/cstdlib | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/cwchar | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/vstring.h | 12 | ||||
-rw-r--r-- | libstdc++-v3/include/std/complex | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/cstdio | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/cstdlib | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/cwchar | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/stdlib.h | 2 |
18 files changed, 81 insertions, 37 deletions
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 35246d9..b3853cd 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -5387,7 +5387,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99) +#if __cplusplus >= 201103L #include <ext/string_conversions.h> @@ -5396,6 +5396,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CXX11 +#if _GLIBCXX_USE_C99_STDLIB // 21.4 Numeric Conversions [string.conversions]. inline int stoi(const string& __str, size_t* __idx = 0, int __base = 10) @@ -5434,7 +5435,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 inline long double stold(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } +#endif // _GLIBCXX_USE_C99_STDLIB +#if _GLIBCXX_USE_C99_STDIO // NB: (v)snprintf vs sprintf. // DR 1261. @@ -5498,8 +5501,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%Lf", __val); } +#endif // _GLIBCXX_USE_C99_STDIO -#ifdef _GLIBCXX_USE_WCHAR_T +#if defined(_GLIBCXX_USE_WCHAR_T) && defined(_GLIBCXX_USE_C99_WCHAR) inline int stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(), @@ -5601,13 +5605,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 L"%Lf", __val); } #endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF -#endif +#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR _GLIBCXX_END_NAMESPACE_CXX11 _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif /* C++11 && _GLIBCXX_USE_C99 ... */ +#endif /* C++11 */ #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 924f13e..723feb1 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -529,4 +529,40 @@ namespace std #undef min #undef max +// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally +// so they should be tested with #if not with #ifdef. +#if __cplusplus >= 201103L +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR +# endif +#else +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR +# endif +#endif + // End of prewritten config; the settings discovered at configure time follow. diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index bd58771..2db2d83 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -959,13 +959,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL } // The following code uses vsnprintf (or vsprintf(), when - // _GLIBCXX_USE_C99 is not defined) to convert floating point values - // for insertion into a stream. An optimization would be to replace - // them with code that works directly on a wide buffer and then use - // __pad to do the padding. It would be good to replace them anyway - // to gain back the efficiency that C++ provides by knowing up front - // the type of the values to insert. Also, sprintf is dangerous - // since may lead to accidental buffer overruns. This + // _GLIBCXX_USE_C99_STDIO is not defined) to convert floating point + // values for insertion into a stream. An optimization would be to + // replace them with code that works directly on a wide buffer and + // then use __pad to do the padding. It would be good to replace + // them anyway to gain back the efficiency that C++ provides by + // knowing up front the type of the values to insert. Also, sprintf + // is dangerous since may lead to accidental buffer overruns. This // implementation follows the C++ standard fairly directly as // outlined in 22.2.2.2 [lib.locale.num.put] template<typename _CharT, typename _OutIter> @@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL char __fbuf[16]; __num_base::_S_format_float(__io, __fbuf, __mod); -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO // Precision is always used except for hexfloat format. const bool __use_prec = (__io.flags() & ios_base::floatfield) != ios_base::floatfield; diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index 2e73b5d..631ef53 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -578,7 +578,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 { const locale __loc = __io.getloc(); const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO // First try a buffer perhaps big enough. int __cs_size = 64; char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); @@ -751,7 +751,7 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 case 'S': // Seconds. [tm_sec] // [00, 60] in C99 (one leap-second), [00, 61] in C89. -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99 __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, #else __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2, diff --git a/libstdc++-v3/include/c_compatibility/math.h b/libstdc++-v3/include/c_compatibility/math.h index d6acb6d..7729896 100644 --- a/libstdc++-v3/include/c_compatibility/math.h +++ b/libstdc++-v3/include/c_compatibility/math.h @@ -56,7 +56,7 @@ using std::fabs; using std::floor; using std::fmod; -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_MATH using std::fpclassify; using std::isfinite; using std::isinf; diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h index 06b5d47..3bc12d0 100644 --- a/libstdc++-v3/include/c_compatibility/wchar.h +++ b/libstdc++-v3/include/c_compatibility/wchar.h @@ -103,7 +103,7 @@ using std::wmemmove; using std::wmemset; using std::wcsftime; -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR using std::wcstold; using std::wcstoll; using std::wcstoull; diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio index d1c958b..486cee9 100644 --- a/libstdc++-v3/include/c_global/cstdio +++ b/libstdc++-v3/include/c_global/cstdio @@ -146,7 +146,7 @@ namespace std using ::vsprintf; } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO #undef snprintf #undef vfscanf @@ -189,6 +189,6 @@ namespace std using ::__gnu_cxx::vsscanf; } // namespace std -#endif // _GLIBCXX_USE_C99 +#endif // _GLIBCXX_USE_C99_STDIO #endif diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib index 7e9bb30..a2f44fc 100644 --- a/libstdc++-v3/include/c_global/cstdlib +++ b/libstdc++-v3/include/c_global/cstdlib @@ -195,7 +195,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDLIB #undef _Exit #undef llabs @@ -266,7 +266,7 @@ namespace std using ::__gnu_cxx::strtold; } // namespace std -#endif // _GLIBCXX_USE_C99 +#endif // _GLIBCXX_USE_C99_STDLIB #endif // !_GLIBCXX_HOSTED diff --git a/libstdc++-v3/include/c_global/cwchar b/libstdc++-v3/include/c_global/cwchar index dddb409..1571463 100644 --- a/libstdc++-v3/include/c_global/cwchar +++ b/libstdc++-v3/include/c_global/cwchar @@ -232,7 +232,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR #undef wcstold #undef wcstoll @@ -289,7 +289,7 @@ namespace std using std::vwscanf; #endif -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR using std::wcstold; using std::wcstoll; using std::wcstoull; diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio index 37f01ca..b7860f9 100644 --- a/libstdc++-v3/include/c_std/cstdio +++ b/libstdc++-v3/include/c_std/cstdio @@ -144,7 +144,7 @@ namespace std using ::vsprintf; } // namespace std -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO #undef snprintf #undef vfscanf diff --git a/libstdc++-v3/include/c_std/cstdlib b/libstdc++-v3/include/c_std/cstdlib index 0bd7058..7b69884 100644 --- a/libstdc++-v3/include/c_std/cstdlib +++ b/libstdc++-v3/include/c_std/cstdlib @@ -192,7 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDLIB #undef _Exit #undef llabs @@ -263,7 +263,7 @@ namespace std using ::__gnu_cxx::strtold; } // namespace std -#endif // _GLIBCXX_USE_C99 +#endif // _GLIBCXX_USE_C99_STDLIB #endif // !_GLIBCXX_HOSTED diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar index aa1b2fa..5aade7f 100644 --- a/libstdc++-v3/include/c_std/cwchar +++ b/libstdc++-v3/include/c_std/cwchar @@ -228,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR #undef wcstold #undef wcstoll diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 68acd57..8732bd3 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -2680,7 +2680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) +#if __cplusplus >= 201103L #include <ext/string_conversions.h> @@ -2688,6 +2688,7 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#if _GLIBCXX_USE_C99_STDLIB // 21.4 Numeric Conversions [string.conversions]. inline int stoi(const __vstring& __str, std::size_t* __idx = 0, int __base = 10) @@ -2726,7 +2727,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline long double stold(const __vstring& __str, std::size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } +#endif // _GLIBCXX_USE_C99_STDLIB +#if _GLIBCXX_USE_C99_STDIO // NB: (v)snprintf vs sprintf. // DR 1261. @@ -2789,8 +2792,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n, "%Lf", __val); } +#endif // _GLIBCXX_USE_C99_STDIO -#ifdef _GLIBCXX_USE_WCHAR_T +#if defined(_GLIBCXX_USE_WCHAR_T) && defined(_GLIBCXX_USE_C99_WCHAR) inline int stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(), @@ -2890,8 +2894,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n, L"%Lf", __val); } -#endif -#endif +#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF +#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 5ed4fd5..f1d3b79 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION complex<_Tp> pow(const complex<_Tp>& __x, const _Tp& __y) { -#ifndef _GLIBCXX_USE_C99_COMPLEX +#if ! _GLIBCXX_USE_C99_COMPLEX if (__x == _Tp()) return _Tp(); #endif @@ -1831,7 +1831,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION arg(_Tp __x) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; -#if (_GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) +#if (_GLIBCXX11_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L) : __type(); #else diff --git a/libstdc++-v3/include/tr1/cstdio b/libstdc++-v3/include/tr1/cstdio index 7681823..b8fc04f 100644 --- a/libstdc++-v3/include/tr1/cstdio +++ b/libstdc++-v3/include/tr1/cstdio @@ -33,7 +33,7 @@ #include <cstdio> -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/tr1/cstdlib b/libstdc++-v3/include/tr1/cstdlib index c3c65eb..35a9133 100644 --- a/libstdc++-v3/include/tr1/cstdlib +++ b/libstdc++-v3/include/tr1/cstdlib @@ -35,7 +35,7 @@ #if _GLIBCXX_HOSTED -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDLIB namespace std _GLIBCXX_VISIBILITY(default) { @@ -65,7 +65,7 @@ namespace tr1 } } -#endif // _GLIBCXX_USE_C99 +#endif // _GLIBCXX_USE_C99_STDLIB #endif // _GLIBCXX_HOSTED diff --git a/libstdc++-v3/include/tr1/cwchar b/libstdc++-v3/include/tr1/cwchar index 10772ee..0db2262 100644 --- a/libstdc++-v3/include/tr1/cwchar +++ b/libstdc++-v3/include/tr1/cwchar @@ -52,7 +52,7 @@ namespace tr1 using std::vwscanf; #endif -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR using std::wcstold; using std::wcstoll; using std::wcstoull; diff --git a/libstdc++-v3/include/tr1/stdlib.h b/libstdc++-v3/include/tr1/stdlib.h index 310c7bc..5e826d6 100644 --- a/libstdc++-v3/include/tr1/stdlib.h +++ b/libstdc++-v3/include/tr1/stdlib.h @@ -33,7 +33,7 @@ #if _GLIBCXX_HOSTED -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDLIB using std::tr1::atoll; using std::tr1::strtoll; |