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/c_global | |
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/c_global')
-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 |
3 files changed, 6 insertions, 6 deletions
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; |