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
This commit is contained in:
parent
a054560d99
commit
23c64853c8
@ -1,3 +1,97 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2015-11-13 Jonathan Wakely <jwakely@redhat.com>
|
2015-11-13 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
* include/experimental/bits/shared_ptr.h: Tweak comments.
|
* include/experimental/bits/shared_ptr.h: Tweak comments.
|
||||||
|
@ -915,234 +915,438 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
|
|||||||
GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
|
GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
|
||||||
|
|
||||||
if test x"$enable_c99" = x"yes"; then
|
if test x"$enable_c99" = x"yes"; then
|
||||||
|
AC_LANG_SAVE
|
||||||
|
AC_LANG_CPLUSPLUS
|
||||||
|
|
||||||
AC_LANG_SAVE
|
# Use -std=c++98 (instead of -std=gnu++98) because leaving __STRICT_ANSI__
|
||||||
AC_LANG_CPLUSPLUS
|
# undefined may cause fake C99 facilities, like pre-standard snprintf,
|
||||||
|
# to be spuriously enabled.
|
||||||
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS -std=c++98"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
ac_save_gcc_no_link="$gcc_no_link"
|
||||||
|
|
||||||
# Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
|
if test x$gcc_no_link != xyes; then
|
||||||
# undefined and fake C99 facilities - like pre-standard snprintf - may be
|
# Use -fno-exceptions to that the C driver can link these tests without
|
||||||
# spuriously enabled.
|
# hitting undefined references to personality routines.
|
||||||
# Long term, -std=c++0x could be even better, could manage to explicitly
|
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||||
# request C99 facilities to the underlying C headers.
|
AC_CHECK_LIB(m, sin, [LIBS="$LIBS -lm"], [
|
||||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
# Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
|
||||||
CXXFLAGS="$CXXFLAGS -std=c++98"
|
gcc_no_link=yes
|
||||||
ac_save_LIBS="$LIBS"
|
])
|
||||||
ac_save_gcc_no_link="$gcc_no_link"
|
fi
|
||||||
|
|
||||||
if test x$gcc_no_link != xyes; then
|
# Check for the existence of <math.h> functions used if C99 is enabled.
|
||||||
# Use -fno-exceptions to that the C driver can link these tests without
|
AC_MSG_CHECKING([for ISO C99 support in <math.h> for C++98])
|
||||||
# hitting undefined references to personality routines.
|
AC_CACHE_VAL(glibcxx_cv_c99_math_cxx98, [
|
||||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
GCC_TRY_COMPILE_OR_LINK(
|
||||||
AC_CHECK_LIB(m, sin, [
|
[#include <math.h>
|
||||||
LIBS="$LIBS -lm"
|
volatile double d1, d2;
|
||||||
], [
|
volatile int i;],
|
||||||
# Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
|
[i = fpclassify(d1);
|
||||||
gcc_no_link=yes
|
i = isfinite(d1);
|
||||||
|
i = isinf(d1);
|
||||||
|
i = isnan(d1);
|
||||||
|
i = isnormal(d1);
|
||||||
|
i = signbit(d1);
|
||||||
|
i = isgreater(d1, d2);
|
||||||
|
i = isgreaterequal(d1, d2);
|
||||||
|
i = isless(d1, d2);
|
||||||
|
i = islessequal(d1, d2);
|
||||||
|
i = islessgreater(d1, d2);
|
||||||
|
i = islessgreater(d1, d2);
|
||||||
|
i = isunordered(d1, d2);
|
||||||
|
], [glibcxx_cv_c99_math_cxx98=yes], [glibcxx_cv_c99_math_cxx98=no])
|
||||||
])
|
])
|
||||||
fi
|
AC_MSG_RESULT($glibcxx_cv_c99_math_cxx98)
|
||||||
|
if test x"$glibcxx_cv_c99_math_cxx98" = x"yes"; then
|
||||||
|
AC_DEFINE(_GLIBCXX98_USE_C99_MATH, 1,
|
||||||
|
[Define if C99 functions or macros in <math.h> should be imported
|
||||||
|
in <cmath> in namespace std for C++98.])
|
||||||
|
fi
|
||||||
|
|
||||||
# Check for the existence of <math.h> functions used if C99 is enabled.
|
# Check for the existence of <complex.h> complex math functions.
|
||||||
AC_MSG_CHECKING([for ISO C99 support in <math.h>])
|
# This is necessary even though libstdc++ uses the builtin versions
|
||||||
AC_CACHE_VAL(glibcxx_cv_c99_math, [
|
# of these functions, because if the builtin cannot be used, a reference
|
||||||
GCC_TRY_COMPILE_OR_LINK(
|
# to the library function is emitted.
|
||||||
[#include <math.h>
|
AC_CHECK_HEADERS(tgmath.h, ac_has_tgmath_h=yes, ac_has_tgmath_h=no)
|
||||||
volatile double d1, d2;
|
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
|
||||||
volatile int i;],
|
if test x"$ac_has_complex_h" = x"yes"; then
|
||||||
[i = fpclassify(d1);
|
AC_MSG_CHECKING([for ISO C99 support in <complex.h> for C++98])
|
||||||
i = isfinite(d1);
|
AC_CACHE_VAL(glibcxx_cv_c99_complex_cxx98, [
|
||||||
i = isinf(d1);
|
GCC_TRY_COMPILE_OR_LINK(
|
||||||
i = isnan(d1);
|
[#include <complex.h>
|
||||||
i = isnormal(d1);
|
typedef __complex__ float float_type;
|
||||||
i = signbit(d1);
|
typedef __complex__ double double_type;
|
||||||
i = isgreater(d1, d2);
|
typedef __complex__ long double ld_type;
|
||||||
i = isgreaterequal(d1, d2);
|
volatile float_type tmpf;
|
||||||
i = isless(d1, d2);
|
volatile double_type tmpd;
|
||||||
i = islessequal(d1, d2);
|
volatile ld_type tmpld;
|
||||||
i = islessgreater(d1, d2);
|
volatile float f;
|
||||||
i = islessgreater(d1, d2);
|
volatile double d;
|
||||||
i = isunordered(d1, d2);
|
volatile long double ld;],
|
||||||
],[glibcxx_cv_c99_math=yes], [glibcxx_cv_c99_math=no])
|
[f = cabsf(tmpf);
|
||||||
])
|
f = cargf(tmpf);
|
||||||
AC_MSG_RESULT($glibcxx_cv_c99_math)
|
tmpf = ccosf(tmpf);
|
||||||
if test x"$glibcxx_cv_c99_math" = x"yes"; then
|
tmpf = ccoshf(tmpf);
|
||||||
AC_DEFINE(_GLIBCXX_USE_C99_MATH, 1,
|
tmpf = cexpf(tmpf);
|
||||||
[Define if C99 functions or macros in <math.h> should be imported
|
tmpf = clogf(tmpf);
|
||||||
in <cmath> in namespace std.])
|
tmpf = csinf(tmpf);
|
||||||
fi
|
tmpf = csinhf(tmpf);
|
||||||
|
tmpf = csqrtf(tmpf);
|
||||||
|
tmpf = ctanf(tmpf);
|
||||||
|
tmpf = ctanhf(tmpf);
|
||||||
|
tmpf = cpowf(tmpf, tmpf);
|
||||||
|
tmpf = cprojf(tmpf);
|
||||||
|
d = cabs(tmpd);
|
||||||
|
d = carg(tmpd);
|
||||||
|
tmpd = ccos(tmpd);
|
||||||
|
tmpd = ccosh(tmpd);
|
||||||
|
tmpd = cexp(tmpd);
|
||||||
|
tmpd = clog(tmpd);
|
||||||
|
tmpd = csin(tmpd);
|
||||||
|
tmpd = csinh(tmpd);
|
||||||
|
tmpd = csqrt(tmpd);
|
||||||
|
tmpd = ctan(tmpd);
|
||||||
|
tmpd = ctanh(tmpd);
|
||||||
|
tmpd = cpow(tmpd, tmpd);
|
||||||
|
tmpd = cproj(tmpd);
|
||||||
|
ld = cabsl(tmpld);
|
||||||
|
ld = cargl(tmpld);
|
||||||
|
tmpld = ccosl(tmpld);
|
||||||
|
tmpld = ccoshl(tmpld);
|
||||||
|
tmpld = cexpl(tmpld);
|
||||||
|
tmpld = clogl(tmpld);
|
||||||
|
tmpld = csinl(tmpld);
|
||||||
|
tmpld = csinhl(tmpld);
|
||||||
|
tmpld = csqrtl(tmpld);
|
||||||
|
tmpld = ctanl(tmpld);
|
||||||
|
tmpld = ctanhl(tmpld);
|
||||||
|
tmpld = cpowl(tmpld, tmpld);
|
||||||
|
tmpld = cprojl(tmpld);
|
||||||
|
], [glibcxx_cv_c99_complex_cxx98=yes], [glibcxx_cv_c99_complex_cxx98=no])
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($glibcxx_cv_c99_complex_cxx98)
|
||||||
|
if test x"$glibcxx_cv_c99_complex_cxx98" = x"yes"; then
|
||||||
|
AC_DEFINE(_GLIBCXX98_USE_C99_COMPLEX, 1,
|
||||||
|
[Define if C99 functions in <complex.h> should be used in
|
||||||
|
<complex> for C++98. Using compiler builtins for these functions
|
||||||
|
requires corresponding C99 library functions to be present.])
|
||||||
|
fi
|
||||||
|
|
||||||
# Check for the existence of <complex.h> complex math functions.
|
# Check for the existence in <stdio.h> of vscanf, et. al.
|
||||||
# This is necessary even though libstdc++ uses the builtin versions
|
AC_MSG_CHECKING([for ISO C99 support in <stdio.h> for C++98])
|
||||||
# of these functions, because if the builtin cannot be used, a reference
|
AC_CACHE_VAL(glibcxx_cv_c99_stdio_cxx98, [
|
||||||
# to the library function is emitted.
|
GCC_TRY_COMPILE_OR_LINK(
|
||||||
AC_CHECK_HEADERS(tgmath.h, ac_has_tgmath_h=yes, ac_has_tgmath_h=no)
|
[#include <stdio.h>
|
||||||
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
|
#include <stdarg.h>
|
||||||
glibcxx_cv_c99_complex=no;
|
void foo(char* fmt, ...)
|
||||||
if test x"$ac_has_complex_h" = x"yes"; then
|
{
|
||||||
AC_MSG_CHECKING([for ISO C99 support in <complex.h>])
|
va_list args; va_start(args, fmt);
|
||||||
GCC_TRY_COMPILE_OR_LINK(
|
vfscanf(stderr, "%i", args);
|
||||||
[#include <complex.h>
|
vscanf("%i", args);
|
||||||
typedef __complex__ float float_type;
|
vsnprintf(fmt, 0, "%i", args);
|
||||||
typedef __complex__ double double_type;
|
vsscanf(fmt, "%i", args);
|
||||||
typedef __complex__ long double ld_type;
|
snprintf(fmt, 0, "%i");
|
||||||
volatile float_type tmpf;
|
}], [],
|
||||||
volatile double_type tmpd;
|
[glibcxx_cv_c99_stdio_cxx98=yes], [glibcxx_cv_c99_stdio_cxx98=no])
|
||||||
volatile ld_type tmpld;
|
])
|
||||||
volatile float f;
|
AC_MSG_RESULT($glibcxx_cv_c99_stdio_cxx98)
|
||||||
volatile double d;
|
if test x"$glibcxx_cv_c99_stdio_cxx98" = x"yes"; then
|
||||||
volatile long double ld;],
|
AC_DEFINE(_GLIBCXX98_USE_C99_STDIO, 1,
|
||||||
[f = cabsf(tmpf);
|
[Define if C99 functions or macros in <stdio.h> should be imported
|
||||||
f = cargf(tmpf);
|
in <cstdio> in namespace std for C++98.])
|
||||||
tmpf = ccosf(tmpf);
|
fi
|
||||||
tmpf = ccoshf(tmpf);
|
|
||||||
tmpf = cexpf(tmpf);
|
|
||||||
tmpf = clogf(tmpf);
|
|
||||||
tmpf = csinf(tmpf);
|
|
||||||
tmpf = csinhf(tmpf);
|
|
||||||
tmpf = csqrtf(tmpf);
|
|
||||||
tmpf = ctanf(tmpf);
|
|
||||||
tmpf = ctanhf(tmpf);
|
|
||||||
tmpf = cpowf(tmpf, tmpf);
|
|
||||||
tmpf = cprojf(tmpf);
|
|
||||||
d = cabs(tmpd);
|
|
||||||
d = carg(tmpd);
|
|
||||||
tmpd = ccos(tmpd);
|
|
||||||
tmpd = ccosh(tmpd);
|
|
||||||
tmpd = cexp(tmpd);
|
|
||||||
tmpd = clog(tmpd);
|
|
||||||
tmpd = csin(tmpd);
|
|
||||||
tmpd = csinh(tmpd);
|
|
||||||
tmpd = csqrt(tmpd);
|
|
||||||
tmpd = ctan(tmpd);
|
|
||||||
tmpd = ctanh(tmpd);
|
|
||||||
tmpd = cpow(tmpd, tmpd);
|
|
||||||
tmpd = cproj(tmpd);
|
|
||||||
ld = cabsl(tmpld);
|
|
||||||
ld = cargl(tmpld);
|
|
||||||
tmpld = ccosl(tmpld);
|
|
||||||
tmpld = ccoshl(tmpld);
|
|
||||||
tmpld = cexpl(tmpld);
|
|
||||||
tmpld = clogl(tmpld);
|
|
||||||
tmpld = csinl(tmpld);
|
|
||||||
tmpld = csinhl(tmpld);
|
|
||||||
tmpld = csqrtl(tmpld);
|
|
||||||
tmpld = ctanl(tmpld);
|
|
||||||
tmpld = ctanhl(tmpld);
|
|
||||||
tmpld = cpowl(tmpld, tmpld);
|
|
||||||
tmpld = cprojl(tmpld);
|
|
||||||
],[glibcxx_cv_c99_complex=yes], [glibcxx_cv_c99_complex=no])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($glibcxx_cv_c99_complex)
|
|
||||||
if test x"$glibcxx_cv_c99_complex" = x"yes"; then
|
|
||||||
AC_DEFINE(_GLIBCXX_USE_C99_COMPLEX, 1,
|
|
||||||
[Define if C99 functions in <complex.h> should be used in
|
|
||||||
<complex>. Using compiler builtins for these functions requires
|
|
||||||
corresponding C99 library functions to be present.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for the existence in <stdio.h> of vscanf, et. al.
|
# Check for the existence in <wchar.h> of wcstold, etc.
|
||||||
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
|
if test x"$ac_has_wchar_h" = xyes &&
|
||||||
AC_CACHE_VAL(glibcxx_cv_c99_stdio, [
|
test x"$ac_has_wctype_h" = xyes; then
|
||||||
GCC_TRY_COMPILE_OR_LINK(
|
AC_MSG_CHECKING([for ISO C99 support in <wchar.h> for C++98])
|
||||||
[#include <stdio.h>
|
AC_CACHE_VAL(glibcxx_cv_c99_wchar_cxx98, [
|
||||||
#include <stdarg.h>
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
void foo(char* fmt, ...)
|
namespace test
|
||||||
{
|
{
|
||||||
va_list args; va_start(args, fmt);
|
using ::wcstold;
|
||||||
vfscanf(stderr, "%i", args);
|
using ::wcstoll;
|
||||||
vscanf("%i", args);
|
using ::wcstoull;
|
||||||
vsnprintf(fmt, 0, "%i", args);
|
}
|
||||||
vsscanf(fmt, "%i", args);
|
], [], [glibcxx_cv_c99_wchar_cxx98=yes], [glibcxx_cv_c99_wchar_cxx98=no])
|
||||||
snprintf(fmt, 0, "%i");
|
])
|
||||||
}], [],
|
|
||||||
[glibcxx_cv_c99_stdio=yes], [glibcxx_cv_c99_stdio=no])
|
|
||||||
])
|
|
||||||
AC_MSG_RESULT($glibcxx_cv_c99_stdio)
|
|
||||||
|
|
||||||
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
|
# Checks for wide character functions that may not be present.
|
||||||
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
|
# Injection of these is wrapped with guard macros.
|
||||||
AC_CACHE_VAL(glibcxx_cv_c99_stdlib, [
|
# NB: only put functions here, instead of immediately above, if
|
||||||
GCC_TRY_COMPILE_OR_LINK(
|
# absolutely necessary.
|
||||||
[#include <stdlib.h>
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
volatile float f;
|
namespace test { using ::vfwscanf; }], [],
|
||||||
volatile long double ld;
|
[AC_DEFINE(HAVE_VFWSCANF, 1, [Defined if vfwscanf exists.])], [])
|
||||||
volatile unsigned long long ll;
|
|
||||||
lldiv_t mydivt;],
|
|
||||||
[char* tmp;
|
|
||||||
f = strtof("gnu", &tmp);
|
|
||||||
ld = strtold("gnu", &tmp);
|
|
||||||
ll = strtoll("gnu", &tmp, 10);
|
|
||||||
ll = strtoull("gnu", &tmp, 10);
|
|
||||||
ll = llabs(10);
|
|
||||||
mydivt = lldiv(10,1);
|
|
||||||
ll = mydivt.quot;
|
|
||||||
ll = mydivt.rem;
|
|
||||||
ll = atoll("10");
|
|
||||||
_Exit(0);
|
|
||||||
],[glibcxx_cv_c99_stdlib=yes], [glibcxx_cv_c99_stdlib=no])
|
|
||||||
])
|
|
||||||
AC_MSG_RESULT($glibcxx_cv_c99_stdlib)
|
|
||||||
|
|
||||||
# Check for the existence in <wchar.h> of wcstold, etc.
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
glibcxx_cv_c99_wchar=no;
|
namespace test { using ::vswscanf; }], [],
|
||||||
if test x"$ac_has_wchar_h" = xyes &&
|
[AC_DEFINE(HAVE_VSWSCANF, 1, [Defined if vswscanf exists.])], [])
|
||||||
test x"$ac_has_wctype_h" = xyes; then
|
|
||||||
AC_MSG_CHECKING([for ISO C99 support in <wchar.h>])
|
|
||||||
AC_TRY_COMPILE([#include <wchar.h>
|
|
||||||
namespace test
|
|
||||||
{
|
|
||||||
using ::wcstold;
|
|
||||||
using ::wcstoll;
|
|
||||||
using ::wcstoull;
|
|
||||||
}
|
|
||||||
],[],[glibcxx_cv_c99_wchar=yes], [glibcxx_cv_c99_wchar=no])
|
|
||||||
|
|
||||||
# Checks for wide character functions that may not be present.
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
# Injection of these is wrapped with guard macros.
|
namespace test { using ::vwscanf; }], [],
|
||||||
# NB: only put functions here, instead of immediately above, if
|
[AC_DEFINE(HAVE_VWSCANF, 1, [Defined if vwscanf exists.])], [])
|
||||||
# absolutely necessary.
|
|
||||||
AC_TRY_COMPILE([#include <wchar.h>
|
|
||||||
namespace test { using ::vfwscanf; } ], [],
|
|
||||||
[AC_DEFINE(HAVE_VFWSCANF,1,
|
|
||||||
[Defined if vfwscanf exists.])],[])
|
|
||||||
|
|
||||||
AC_TRY_COMPILE([#include <wchar.h>
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
namespace test { using ::vswscanf; } ], [],
|
namespace test { using ::wcstof; }], [],
|
||||||
[AC_DEFINE(HAVE_VSWSCANF,1,
|
[AC_DEFINE(HAVE_WCSTOF, 1, [Defined if wcstof exists.])], [])
|
||||||
[Defined if vswscanf exists.])],[])
|
|
||||||
|
|
||||||
AC_TRY_COMPILE([#include <wchar.h>
|
AC_TRY_COMPILE([#include <wctype.h>],
|
||||||
namespace test { using ::vwscanf; } ], [],
|
[wint_t t; int i = iswblank(t);],
|
||||||
[AC_DEFINE(HAVE_VWSCANF,1,[Defined if vwscanf exists.])],[])
|
[AC_DEFINE(HAVE_ISWBLANK, 1, [Defined if iswblank exists.])], [])
|
||||||
|
|
||||||
AC_TRY_COMPILE([#include <wchar.h>
|
AC_MSG_RESULT($glibcxx_cv_c99_wchar_cxx98)
|
||||||
namespace test { using ::wcstof; } ], [],
|
if test x"$glibcxx_cv_c99_wchar_cxx98" = x"yes"; then
|
||||||
[AC_DEFINE(HAVE_WCSTOF,1,[Defined if wcstof exists.])],[])
|
AC_DEFINE(_GLIBCXX98_USE_C99_WCHAR, 1,
|
||||||
|
[Define if C99 functions or macros in <wchar.h> should be imported
|
||||||
|
in <cwchar> in namespace std for C++98.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
AC_TRY_COMPILE([#include <wctype.h>],
|
# Option parsed, now set things appropriately.
|
||||||
[ wint_t t; int i = iswblank(t);],
|
if test x"$glibcxx_cv_c99_math_cxx98" = x"no" ||
|
||||||
[AC_DEFINE(HAVE_ISWBLANK,1,
|
test x"$glibcxx_cv_c99_complex_cxx98" = x"no" ||
|
||||||
[Defined if iswblank exists.])],[])
|
test x"$glibcxx_cv_c99_stdio_cxx98" = x"no" ||
|
||||||
|
test x"$glibcxx_cv_c99_stdlib_cxx98" = x"no" ||
|
||||||
|
test x"$glibcxx_cv_c99_wchar_cxx98" = x"no"; then
|
||||||
|
enable_c99=no;
|
||||||
|
else
|
||||||
|
AC_DEFINE(_GLIBCXX_USE_C99, 1,
|
||||||
|
[Define if C99 functions or macros from <wchar.h>, <math.h>,
|
||||||
|
<complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_RESULT($glibcxx_cv_c99_wchar)
|
gcc_no_link="$ac_save_gcc_no_link"
|
||||||
fi
|
LIBS="$ac_save_LIBS"
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
|
||||||
# Option parsed, now set things appropriately.
|
AC_LANG_SAVE
|
||||||
if test x"$glibcxx_cv_c99_math" = x"no" ||
|
AC_LANG_CPLUSPLUS
|
||||||
test x"$glibcxx_cv_c99_complex" = x"no" ||
|
|
||||||
test x"$glibcxx_cv_c99_stdio" = x"no" ||
|
|
||||||
test x"$glibcxx_cv_c99_stdlib" = x"no" ||
|
|
||||||
test x"$glibcxx_cv_c99_wchar" = x"no"; then
|
|
||||||
enable_c99=no;
|
|
||||||
else
|
|
||||||
AC_DEFINE(_GLIBCXX_USE_C99, 1,
|
|
||||||
[Define if C99 functions or macros from <wchar.h>, <math.h>,
|
|
||||||
<complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
gcc_no_link="$ac_save_gcc_no_link"
|
# Use -std=c++11 and test again for C99 library feature in C++11 mode.
|
||||||
LIBS="$ac_save_LIBS"
|
# For the reasons given above we use -std=c++11 not -std=gnu++11.
|
||||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
AC_LANG_RESTORE
|
CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
ac_save_gcc_no_link="$gcc_no_link"
|
||||||
|
|
||||||
|
if test x$gcc_no_link != xyes; then
|
||||||
|
# Use -fno-exceptions to that the C driver can link these tests without
|
||||||
|
# hitting undefined references to personality routines.
|
||||||
|
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||||
|
AC_CHECK_LIB(m, sin, [LIBS="$LIBS -lm"], [
|
||||||
|
# Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
|
||||||
|
gcc_no_link=yes
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for the existence of <math.h> functions used if C99 is enabled.
|
||||||
|
AC_MSG_CHECKING([for ISO C99 support in <math.h> for C++11])
|
||||||
|
AC_CACHE_VAL(glibcxx_cv_c99_math_cxx11, [
|
||||||
|
GCC_TRY_COMPILE_OR_LINK(
|
||||||
|
[#include <math.h>
|
||||||
|
volatile double d1, d2;
|
||||||
|
volatile int i;],
|
||||||
|
[i = fpclassify(d1);
|
||||||
|
i = isfinite(d1);
|
||||||
|
i = isinf(d1);
|
||||||
|
i = isnan(d1);
|
||||||
|
i = isnormal(d1);
|
||||||
|
i = signbit(d1);
|
||||||
|
i = isgreater(d1, d2);
|
||||||
|
i = isgreaterequal(d1, d2);
|
||||||
|
i = isless(d1, d2);
|
||||||
|
i = islessequal(d1, d2);
|
||||||
|
i = islessgreater(d1, d2);
|
||||||
|
i = islessgreater(d1, d2);
|
||||||
|
i = isunordered(d1, d2);
|
||||||
|
], [glibcxx_cv_c99_math_cxx11=yes], [glibcxx_cv_c99_math_cxx11=no])
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($glibcxx_cv_c99_math_cxx11)
|
||||||
|
if test x"$glibcxx_cv_c99_math_cxx11" = x"yes"; then
|
||||||
|
AC_DEFINE(_GLIBCXX11_USE_C99_MATH, 1,
|
||||||
|
[Define if C99 functions or macros in <math.h> should be imported
|
||||||
|
in <cmath> in namespace std for C++11.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for the existence of <complex.h> complex math functions.
|
||||||
|
# This is necessary even though libstdc++ uses the builtin versions
|
||||||
|
# of these functions, because if the builtin cannot be used, a reference
|
||||||
|
# to the library function is emitted.
|
||||||
|
AC_CHECK_HEADERS(tgmath.h, ac_has_tgmath_h=yes, ac_has_tgmath_h=no)
|
||||||
|
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
|
||||||
|
if test x"$ac_has_complex_h" = x"yes"; then
|
||||||
|
AC_MSG_CHECKING([for ISO C99 support in <complex.h> for C++11])
|
||||||
|
AC_CACHE_VAL(glibcxx_cv_c99_complex_cxx11, [
|
||||||
|
GCC_TRY_COMPILE_OR_LINK(
|
||||||
|
[#include <complex.h>
|
||||||
|
typedef __complex__ float float_type;
|
||||||
|
typedef __complex__ double double_type;
|
||||||
|
typedef __complex__ long double ld_type;
|
||||||
|
volatile float_type tmpf;
|
||||||
|
volatile double_type tmpd;
|
||||||
|
volatile ld_type tmpld;
|
||||||
|
volatile float f;
|
||||||
|
volatile double d;
|
||||||
|
volatile long double ld;],
|
||||||
|
[f = cabsf(tmpf);
|
||||||
|
f = cargf(tmpf);
|
||||||
|
tmpf = ccosf(tmpf);
|
||||||
|
tmpf = ccoshf(tmpf);
|
||||||
|
tmpf = cexpf(tmpf);
|
||||||
|
tmpf = clogf(tmpf);
|
||||||
|
tmpf = csinf(tmpf);
|
||||||
|
tmpf = csinhf(tmpf);
|
||||||
|
tmpf = csqrtf(tmpf);
|
||||||
|
tmpf = ctanf(tmpf);
|
||||||
|
tmpf = ctanhf(tmpf);
|
||||||
|
tmpf = cpowf(tmpf, tmpf);
|
||||||
|
tmpf = cprojf(tmpf);
|
||||||
|
d = cabs(tmpd);
|
||||||
|
d = carg(tmpd);
|
||||||
|
tmpd = ccos(tmpd);
|
||||||
|
tmpd = ccosh(tmpd);
|
||||||
|
tmpd = cexp(tmpd);
|
||||||
|
tmpd = clog(tmpd);
|
||||||
|
tmpd = csin(tmpd);
|
||||||
|
tmpd = csinh(tmpd);
|
||||||
|
tmpd = csqrt(tmpd);
|
||||||
|
tmpd = ctan(tmpd);
|
||||||
|
tmpd = ctanh(tmpd);
|
||||||
|
tmpd = cpow(tmpd, tmpd);
|
||||||
|
tmpd = cproj(tmpd);
|
||||||
|
ld = cabsl(tmpld);
|
||||||
|
ld = cargl(tmpld);
|
||||||
|
tmpld = ccosl(tmpld);
|
||||||
|
tmpld = ccoshl(tmpld);
|
||||||
|
tmpld = cexpl(tmpld);
|
||||||
|
tmpld = clogl(tmpld);
|
||||||
|
tmpld = csinl(tmpld);
|
||||||
|
tmpld = csinhl(tmpld);
|
||||||
|
tmpld = csqrtl(tmpld);
|
||||||
|
tmpld = ctanl(tmpld);
|
||||||
|
tmpld = ctanhl(tmpld);
|
||||||
|
tmpld = cpowl(tmpld, tmpld);
|
||||||
|
tmpld = cprojl(tmpld);
|
||||||
|
], [glibcxx_cv_c99_complex_cxx11=yes], [glibcxx_cv_c99_complex_cxx11=no])
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($glibcxx_cv_c99_complex_cxx11)
|
||||||
|
if test x"$glibcxx_cv_c99_complex_cxx11" = x"yes"; then
|
||||||
|
AC_DEFINE(_GLIBCXX11_USE_C99_COMPLEX, 1,
|
||||||
|
[Define if C99 functions in <complex.h> should be used in
|
||||||
|
<complex> for C++11. Using compiler builtins for these functions
|
||||||
|
requires corresponding C99 library functions to be present.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for the existence in <stdio.h> of vscanf, et. al.
|
||||||
|
AC_MSG_CHECKING([for ISO C99 support in <stdio.h> for C++11])
|
||||||
|
AC_CACHE_VAL(glibcxx_cv_c99_stdio_cxx11, [
|
||||||
|
GCC_TRY_COMPILE_OR_LINK(
|
||||||
|
[#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
void foo(char* fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args; va_start(args, fmt);
|
||||||
|
vfscanf(stderr, "%i", args);
|
||||||
|
vscanf("%i", args);
|
||||||
|
vsnprintf(fmt, 0, "%i", args);
|
||||||
|
vsscanf(fmt, "%i", args);
|
||||||
|
snprintf(fmt, 0, "%i");
|
||||||
|
}], [],
|
||||||
|
[glibcxx_cv_c99_stdio_cxx11=yes], [glibcxx_cv_c99_stdio_cxx11=no])
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($glibcxx_cv_c99_stdio_cxx11)
|
||||||
|
if test x"$glibcxx_cv_c99_stdio_cxx11" = x"yes"; then
|
||||||
|
AC_DEFINE(_GLIBCXX11_USE_C99_STDIO, 1,
|
||||||
|
[Define if C99 functions or macros in <stdio.h> should be imported
|
||||||
|
in <cstdio> in namespace std for C++11.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
|
||||||
|
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h> for C++11])
|
||||||
|
AC_CACHE_VAL(glibcxx_cv_c99_stdlib_cxx11, [
|
||||||
|
GCC_TRY_COMPILE_OR_LINK(
|
||||||
|
[#include <stdlib.h>
|
||||||
|
volatile float f;
|
||||||
|
volatile long double ld;
|
||||||
|
volatile unsigned long long ll;
|
||||||
|
lldiv_t mydivt;],
|
||||||
|
[char* tmp;
|
||||||
|
f = strtof("gnu", &tmp);
|
||||||
|
ld = strtold("gnu", &tmp);
|
||||||
|
ll = strtoll("gnu", &tmp, 10);
|
||||||
|
ll = strtoull("gnu", &tmp, 10);
|
||||||
|
ll = llabs(10);
|
||||||
|
mydivt = lldiv(10,1);
|
||||||
|
ll = mydivt.quot;
|
||||||
|
ll = mydivt.rem;
|
||||||
|
ll = atoll("10");
|
||||||
|
_Exit(0);
|
||||||
|
], [glibcxx_cv_c99_stdlib_cxx11=yes], [glibcxx_cv_c99_stdlib_cxx11=no])
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($glibcxx_cv_c99_stdlib_cxx11)
|
||||||
|
if test x"$glibcxx_cv_c99_stdlib_cxx11" = x"yes"; then
|
||||||
|
AC_DEFINE(_GLIBCXX11_USE_C99_STDLIB, 1,
|
||||||
|
[Define if C99 functions or macros in <stdlib.h> should be imported
|
||||||
|
in <cstdlib> in namespace std for C++11.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for the existence in <wchar.h> of wcstold, etc.
|
||||||
|
if test x"$ac_has_wchar_h" = xyes &&
|
||||||
|
test x"$ac_has_wctype_h" = xyes; then
|
||||||
|
AC_MSG_CHECKING([for ISO C99 support in <wchar.h> for C++11])
|
||||||
|
AC_CACHE_VAL(glibcxx_cv_c99_wchar_cxx11, [
|
||||||
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
|
namespace test
|
||||||
|
{
|
||||||
|
using ::wcstold;
|
||||||
|
using ::wcstoll;
|
||||||
|
using ::wcstoull;
|
||||||
|
}
|
||||||
|
], [], [glibcxx_cv_c99_wchar_cxx11=yes], [glibcxx_cv_c99_wchar_cxx11=no])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Checks for wide character functions that may not be present.
|
||||||
|
# Injection of these is wrapped with guard macros.
|
||||||
|
# NB: only put functions here, instead of immediately above, if
|
||||||
|
# absolutely necessary.
|
||||||
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
|
namespace test { using ::vfwscanf; }], [],
|
||||||
|
[AC_DEFINE(HAVE_VFWSCANF, 1, [Defined if vfwscanf exists.])], [])
|
||||||
|
|
||||||
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
|
namespace test { using ::vswscanf; }], [],
|
||||||
|
[AC_DEFINE(HAVE_VSWSCANF, 1, [Defined if vswscanf exists.])], [])
|
||||||
|
|
||||||
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
|
namespace test { using ::vwscanf; }], [],
|
||||||
|
[AC_DEFINE(HAVE_VWSCANF, 1, [Defined if vwscanf exists.])], [])
|
||||||
|
|
||||||
|
AC_TRY_COMPILE([#include <wchar.h>
|
||||||
|
namespace test { using ::wcstof; }], [],
|
||||||
|
[AC_DEFINE(HAVE_WCSTOF, 1, [Defined if wcstof exists.])], [])
|
||||||
|
|
||||||
|
AC_TRY_COMPILE([#include <wctype.h>],
|
||||||
|
[wint_t t; int i = iswblank(t);],
|
||||||
|
[AC_DEFINE(HAVE_ISWBLANK, 1, [Defined if iswblank exists.])], [])
|
||||||
|
|
||||||
|
AC_MSG_RESULT($glibcxx_cv_c99_wchar_cxx11)
|
||||||
|
if test x"$glibcxx_cv_c99_wchar_cxx11" = x"yes"; then
|
||||||
|
AC_DEFINE(_GLIBCXX11_USE_C99_WCHAR, 1,
|
||||||
|
[Define if C99 functions or macros in <wchar.h> should be imported
|
||||||
|
in <cwchar> in namespace std for C++11.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
gcc_no_link="$ac_save_gcc_no_link"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([for fully enabled ISO C99 support])
|
AC_MSG_CHECKING([for fully enabled ISO C99 support])
|
||||||
|
@ -731,6 +731,44 @@
|
|||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Define if C99 functions in <complex.h> should be used in <complex> for
|
||||||
|
C++11. Using compiler builtins for these functions requires corresponding
|
||||||
|
C99 library functions to be present. */
|
||||||
|
#undef _GLIBCXX11_USE_C99_COMPLEX
|
||||||
|
|
||||||
|
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
|
||||||
|
in namespace std for C++11. */
|
||||||
|
#undef _GLIBCXX11_USE_C99_MATH
|
||||||
|
|
||||||
|
/* Define if C99 functions or macros in <stdio.h> should be imported in
|
||||||
|
<cstdio> in namespace std for C++11. */
|
||||||
|
#undef _GLIBCXX11_USE_C99_STDIO
|
||||||
|
|
||||||
|
/* Define if C99 functions or macros in <stdlib.h> should be imported in
|
||||||
|
<cstdlib> in namespace std for C++11. */
|
||||||
|
#undef _GLIBCXX11_USE_C99_STDLIB
|
||||||
|
|
||||||
|
/* Define if C99 functions or macros in <wchar.h> should be imported in
|
||||||
|
<cwchar> in namespace std for C++11. */
|
||||||
|
#undef _GLIBCXX11_USE_C99_WCHAR
|
||||||
|
|
||||||
|
/* Define if C99 functions in <complex.h> should be used in <complex> for
|
||||||
|
C++98. Using compiler builtins for these functions requires corresponding
|
||||||
|
C99 library functions to be present. */
|
||||||
|
#undef _GLIBCXX98_USE_C99_COMPLEX
|
||||||
|
|
||||||
|
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
|
||||||
|
in namespace std for C++98. */
|
||||||
|
#undef _GLIBCXX98_USE_C99_MATH
|
||||||
|
|
||||||
|
/* Define if C99 functions or macros in <stdio.h> should be imported in
|
||||||
|
<cstdio> in namespace std for C++98. */
|
||||||
|
#undef _GLIBCXX98_USE_C99_STDIO
|
||||||
|
|
||||||
|
/* Define if C99 functions or macros in <wchar.h> should be imported in
|
||||||
|
<cwchar> in namespace std for C++98. */
|
||||||
|
#undef _GLIBCXX98_USE_C99_WCHAR
|
||||||
|
|
||||||
/* Define if the compiler supports C++11 atomics. */
|
/* Define if the compiler supports C++11 atomics. */
|
||||||
#undef _GLIBCXX_ATOMIC_BUILTINS
|
#undef _GLIBCXX_ATOMIC_BUILTINS
|
||||||
|
|
||||||
@ -791,11 +829,6 @@
|
|||||||
<stdio.h>, and <stdlib.h> can be used or exposed. */
|
<stdio.h>, and <stdlib.h> can be used or exposed. */
|
||||||
#undef _GLIBCXX_USE_C99
|
#undef _GLIBCXX_USE_C99
|
||||||
|
|
||||||
/* Define if C99 functions in <complex.h> should be used in <complex>. Using
|
|
||||||
compiler builtins for these functions requires corresponding C99 library
|
|
||||||
functions to be present. */
|
|
||||||
#undef _GLIBCXX_USE_C99_COMPLEX
|
|
||||||
|
|
||||||
/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
|
/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
|
||||||
Using compiler builtins for these functions requires corresponding C99
|
Using compiler builtins for these functions requires corresponding C99
|
||||||
library functions to be present. */
|
library functions to be present. */
|
||||||
@ -817,10 +850,6 @@
|
|||||||
<tr1/cinttypes> in namespace std::tr1. */
|
<tr1/cinttypes> in namespace std::tr1. */
|
||||||
#undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
|
#undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
|
||||||
|
|
||||||
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
|
|
||||||
in namespace std. */
|
|
||||||
#undef _GLIBCXX_USE_C99_MATH
|
|
||||||
|
|
||||||
/* Define if C99 functions or macros in <math.h> should be imported in
|
/* Define if C99 functions or macros in <math.h> should be imported in
|
||||||
<tr1/cmath> in namespace std::tr1. */
|
<tr1/cmath> in namespace std::tr1. */
|
||||||
#undef _GLIBCXX_USE_C99_MATH_TR1
|
#undef _GLIBCXX_USE_C99_MATH_TR1
|
||||||
|
@ -64,7 +64,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
__builtin_va_list __args;
|
__builtin_va_list __args;
|
||||||
__builtin_va_start(__args, __fmt);
|
__builtin_va_start(__args, __fmt);
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
||||||
#else
|
#else
|
||||||
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
||||||
|
@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
__builtin_va_list __args;
|
__builtin_va_list __args;
|
||||||
__builtin_va_start(__args, __fmt);
|
__builtin_va_start(__args, __fmt);
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
||||||
#else
|
#else
|
||||||
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
||||||
|
@ -88,7 +88,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
__builtin_va_list __args;
|
__builtin_va_list __args;
|
||||||
__builtin_va_start(__args, __fmt);
|
__builtin_va_start(__args, __fmt);
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
|
||||||
#else
|
#else
|
||||||
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
|
||||||
|
@ -30,6 +30,9 @@
|
|||||||
// file will come before all others.
|
// file will come before all others.
|
||||||
|
|
||||||
#define _GLIBCXX_USE_C99 1
|
#define _GLIBCXX_USE_C99 1
|
||||||
|
#define _GLIBCXX_USE_C99_STDIO 1
|
||||||
|
#define _GLIBCXX_USE_C99_STDLIB 1
|
||||||
|
#define _GLIBCXX_USE_C99_WCHAR 1
|
||||||
#define _GLIBCXX_USE_C99_CHECK 1
|
#define _GLIBCXX_USE_C99_CHECK 1
|
||||||
#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
|
#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
|
||||||
#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
|
#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
|
||||||
|
1273
libstdc++-v3/configure
vendored
1273
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -5387,7 +5387,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
|
|||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
|
#if __cplusplus >= 201103L
|
||||||
|
|
||||||
#include <ext/string_conversions.h>
|
#include <ext/string_conversions.h>
|
||||||
|
|
||||||
@ -5396,6 +5396,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
|
|||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_CXX11
|
_GLIBCXX_BEGIN_NAMESPACE_CXX11
|
||||||
|
|
||||||
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
// 21.4 Numeric Conversions [string.conversions].
|
// 21.4 Numeric Conversions [string.conversions].
|
||||||
inline int
|
inline int
|
||||||
stoi(const string& __str, size_t* __idx = 0, int __base = 10)
|
stoi(const string& __str, size_t* __idx = 0, int __base = 10)
|
||||||
@ -5434,7 +5435,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
|||||||
inline long double
|
inline long double
|
||||||
stold(const string& __str, size_t* __idx = 0)
|
stold(const string& __str, size_t* __idx = 0)
|
||||||
{ return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
|
{ 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.
|
// NB: (v)snprintf vs sprintf.
|
||||||
|
|
||||||
// DR 1261.
|
// DR 1261.
|
||||||
@ -5498,8 +5501,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
|||||||
return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
|
return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
|
||||||
"%Lf", __val);
|
"%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
|
inline int
|
||||||
stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
|
stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
|
||||||
{ return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
|
{ return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
|
||||||
@ -5601,13 +5605,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
|||||||
L"%Lf", __val);
|
L"%Lf", __val);
|
||||||
}
|
}
|
||||||
#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
|
#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
|
||||||
#endif
|
#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_CXX11
|
_GLIBCXX_END_NAMESPACE_CXX11
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif /* C++11 && _GLIBCXX_USE_C99 ... */
|
#endif /* C++11 */
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
|
|
||||||
|
@ -529,4 +529,40 @@ namespace std
|
|||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#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.
|
// End of prewritten config; the settings discovered at configure time follow.
|
||||||
|
@ -959,13 +959,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The following code uses vsnprintf (or vsprintf(), when
|
// The following code uses vsnprintf (or vsprintf(), when
|
||||||
// _GLIBCXX_USE_C99 is not defined) to convert floating point values
|
// _GLIBCXX_USE_C99_STDIO is not defined) to convert floating point
|
||||||
// for insertion into a stream. An optimization would be to replace
|
// values for insertion into a stream. An optimization would be to
|
||||||
// them with code that works directly on a wide buffer and then use
|
// replace them with code that works directly on a wide buffer and
|
||||||
// __pad to do the padding. It would be good to replace them anyway
|
// then use __pad to do the padding. It would be good to replace
|
||||||
// to gain back the efficiency that C++ provides by knowing up front
|
// them anyway to gain back the efficiency that C++ provides by
|
||||||
// the type of the values to insert. Also, sprintf is dangerous
|
// knowing up front the type of the values to insert. Also, sprintf
|
||||||
// since may lead to accidental buffer overruns. This
|
// is dangerous since may lead to accidental buffer overruns. This
|
||||||
// implementation follows the C++ standard fairly directly as
|
// implementation follows the C++ standard fairly directly as
|
||||||
// outlined in 22.2.2.2 [lib.locale.num.put]
|
// outlined in 22.2.2.2 [lib.locale.num.put]
|
||||||
template<typename _CharT, typename _OutIter>
|
template<typename _CharT, typename _OutIter>
|
||||||
@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL
|
|||||||
char __fbuf[16];
|
char __fbuf[16];
|
||||||
__num_base::_S_format_float(__io, __fbuf, __mod);
|
__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.
|
// Precision is always used except for hexfloat format.
|
||||||
const bool __use_prec =
|
const bool __use_prec =
|
||||||
(__io.flags() & ios_base::floatfield) != ios_base::floatfield;
|
(__io.flags() & ios_base::floatfield) != ios_base::floatfield;
|
||||||
|
@ -578,7 +578,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
|
|||||||
{
|
{
|
||||||
const locale __loc = __io.getloc();
|
const locale __loc = __io.getloc();
|
||||||
const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
|
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.
|
// First try a buffer perhaps big enough.
|
||||||
int __cs_size = 64;
|
int __cs_size = 64;
|
||||||
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
||||||
@ -751,7 +751,7 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
|
|||||||
case 'S':
|
case 'S':
|
||||||
// Seconds. [tm_sec]
|
// Seconds. [tm_sec]
|
||||||
// [00, 60] in C99 (one leap-second), [00, 61] in C89.
|
// [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,
|
__beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
|
||||||
#else
|
#else
|
||||||
__beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2,
|
__beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2,
|
||||||
|
@ -56,7 +56,7 @@ using std::fabs;
|
|||||||
using std::floor;
|
using std::floor;
|
||||||
using std::fmod;
|
using std::fmod;
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_MATH
|
||||||
using std::fpclassify;
|
using std::fpclassify;
|
||||||
using std::isfinite;
|
using std::isfinite;
|
||||||
using std::isinf;
|
using std::isinf;
|
||||||
|
@ -103,7 +103,7 @@ using std::wmemmove;
|
|||||||
using std::wmemset;
|
using std::wmemset;
|
||||||
using std::wcsftime;
|
using std::wcsftime;
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
using std::wcstold;
|
using std::wcstold;
|
||||||
using std::wcstoll;
|
using std::wcstoll;
|
||||||
using std::wcstoull;
|
using std::wcstoull;
|
||||||
|
@ -146,7 +146,7 @@ namespace std
|
|||||||
using ::vsprintf;
|
using ::vsprintf;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
|
|
||||||
#undef snprintf
|
#undef snprintf
|
||||||
#undef vfscanf
|
#undef vfscanf
|
||||||
@ -189,6 +189,6 @@ namespace std
|
|||||||
using ::__gnu_cxx::vsscanf;
|
using ::__gnu_cxx::vsscanf;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#endif // _GLIBCXX_USE_C99
|
#endif // _GLIBCXX_USE_C99_STDIO
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,7 +195,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
#undef _Exit
|
#undef _Exit
|
||||||
#undef llabs
|
#undef llabs
|
||||||
@ -266,7 +266,7 @@ namespace std
|
|||||||
using ::__gnu_cxx::strtold;
|
using ::__gnu_cxx::strtold;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#endif // _GLIBCXX_USE_C99
|
#endif // _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
#endif // !_GLIBCXX_HOSTED
|
#endif // !_GLIBCXX_HOSTED
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
#undef wcstold
|
#undef wcstold
|
||||||
#undef wcstoll
|
#undef wcstoll
|
||||||
@ -289,7 +289,7 @@ namespace std
|
|||||||
using std::vwscanf;
|
using std::vwscanf;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
using std::wcstold;
|
using std::wcstold;
|
||||||
using std::wcstoll;
|
using std::wcstoll;
|
||||||
using std::wcstoull;
|
using std::wcstoull;
|
||||||
|
@ -144,7 +144,7 @@ namespace std
|
|||||||
using ::vsprintf;
|
using ::vsprintf;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
|
|
||||||
#undef snprintf
|
#undef snprintf
|
||||||
#undef vfscanf
|
#undef vfscanf
|
||||||
|
@ -192,7 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
#undef _Exit
|
#undef _Exit
|
||||||
#undef llabs
|
#undef llabs
|
||||||
@ -263,7 +263,7 @@ namespace std
|
|||||||
using ::__gnu_cxx::strtold;
|
using ::__gnu_cxx::strtold;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#endif // _GLIBCXX_USE_C99
|
#endif // _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
#endif // !_GLIBCXX_HOSTED
|
#endif // !_GLIBCXX_HOSTED
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
#undef wcstold
|
#undef wcstold
|
||||||
#undef wcstoll
|
#undef wcstoll
|
||||||
|
@ -2680,7 +2680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
|
#if __cplusplus >= 201103L
|
||||||
|
|
||||||
#include <ext/string_conversions.h>
|
#include <ext/string_conversions.h>
|
||||||
|
|
||||||
@ -2688,6 +2688,7 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
|
|||||||
{
|
{
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
// 21.4 Numeric Conversions [string.conversions].
|
// 21.4 Numeric Conversions [string.conversions].
|
||||||
inline int
|
inline int
|
||||||
stoi(const __vstring& __str, std::size_t* __idx = 0, int __base = 10)
|
stoi(const __vstring& __str, std::size_t* __idx = 0, int __base = 10)
|
||||||
@ -2726,7 +2727,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
inline long double
|
inline long double
|
||||||
stold(const __vstring& __str, std::size_t* __idx = 0)
|
stold(const __vstring& __str, std::size_t* __idx = 0)
|
||||||
{ return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
|
{ 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.
|
// NB: (v)snprintf vs sprintf.
|
||||||
|
|
||||||
// DR 1261.
|
// DR 1261.
|
||||||
@ -2789,8 +2792,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n,
|
return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n,
|
||||||
"%Lf", __val);
|
"%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
|
inline int
|
||||||
stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
|
stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
|
||||||
{ return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
|
{ 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,
|
return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n,
|
||||||
L"%Lf", __val);
|
L"%Lf", __val);
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
|
||||||
#endif
|
#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
complex<_Tp>
|
complex<_Tp>
|
||||||
pow(const complex<_Tp>& __x, const _Tp& __y)
|
pow(const complex<_Tp>& __x, const _Tp& __y)
|
||||||
{
|
{
|
||||||
#ifndef _GLIBCXX_USE_C99_COMPLEX
|
#if ! _GLIBCXX_USE_C99_COMPLEX
|
||||||
if (__x == _Tp())
|
if (__x == _Tp())
|
||||||
return _Tp();
|
return _Tp();
|
||||||
#endif
|
#endif
|
||||||
@ -1831,7 +1831,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
arg(_Tp __x)
|
arg(_Tp __x)
|
||||||
{
|
{
|
||||||
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
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)
|
return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L)
|
||||||
: __type();
|
: __type();
|
||||||
#else
|
#else
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
|
|
||||||
namespace std _GLIBCXX_VISIBILITY(default)
|
namespace std _GLIBCXX_VISIBILITY(default)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#if _GLIBCXX_HOSTED
|
#if _GLIBCXX_HOSTED
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
namespace std _GLIBCXX_VISIBILITY(default)
|
namespace std _GLIBCXX_VISIBILITY(default)
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ namespace tr1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _GLIBCXX_USE_C99
|
#endif // _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
#endif // _GLIBCXX_HOSTED
|
#endif // _GLIBCXX_HOSTED
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ namespace tr1
|
|||||||
using std::vwscanf;
|
using std::vwscanf;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
using std::wcstold;
|
using std::wcstold;
|
||||||
using std::wcstoll;
|
using std::wcstoll;
|
||||||
using std::wcstoull;
|
using std::wcstoull;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#if _GLIBCXX_HOSTED
|
#if _GLIBCXX_HOSTED
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
using std::tr1::atoll;
|
using std::tr1::atoll;
|
||||||
using std::tr1::strtoll;
|
using std::tr1::strtoll;
|
||||||
|
@ -72,7 +72,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
|
|
||||||
ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
|
ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
// Precision is always used except for hexfloat format.
|
// Precision is always used except for hexfloat format.
|
||||||
if (__fltfield != (ios_base::fixed | ios_base::scientific))
|
if (__fltfield != (ios_base::fixed | ios_base::scientific))
|
||||||
#endif
|
#endif
|
||||||
@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
*__fptr++ = 'f';
|
*__fptr++ = 'f';
|
||||||
else if (__fltfield == ios_base::scientific)
|
else if (__fltfield == ios_base::scientific)
|
||||||
*__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
|
*__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
else if (__fltfield == (ios_base::fixed | ios_base::scientific))
|
else if (__fltfield == (ios_base::fixed | ios_base::scientific))
|
||||||
*__fptr++ = (__flags & ios_base::uppercase) ? 'A' : 'a';
|
*__fptr++ = (__flags & ios_base::uppercase) ? 'A' : 'a';
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <exception>
|
#include <exception>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
void terminate() { _Exit(0); }
|
void terminate() { _Exit(0); }
|
||||||
|
|
||||||
void f() noexcept
|
void f() noexcept
|
||||||
@ -39,7 +39,7 @@ void f() noexcept
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
f();
|
f();
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <exception>
|
#include <exception>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
void unexpected() { _Exit(0); }
|
void unexpected() { _Exit(0); }
|
||||||
|
|
||||||
void f() throw()
|
void f() throw()
|
||||||
@ -39,7 +39,7 @@ void f() throw()
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
f();
|
f();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = false;
|
bool test __attribute__((unused)) = false;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
void
|
void
|
||||||
test01()
|
test01()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
bool test __attribute__((unused)) = true;
|
bool test __attribute__((unused)) = true;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
// libstdc++/13943
|
// libstdc++/13943
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
@ -36,7 +36,7 @@ void test01()
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
test01();
|
test01();
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
typedef std::lldiv_t my_lldiv_t;
|
typedef std::lldiv_t my_lldiv_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1614,7 +1614,7 @@ proc check_v3_target_string_conversions { } {
|
|||||||
|
|
||||||
set f [open $src "w"]
|
set f [open $src "w"]
|
||||||
puts $f "#include <bits/c++config.h>"
|
puts $f "#include <bits/c++config.h>"
|
||||||
puts $f "#if !defined(_GLIBCXX_USE_C99) || defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)"
|
puts $f "#if !(_GLIBCXX_USE_C99_STDIO && _GLIBCXX_USE_C99_STDLIB && _GLIBCXX_USE_C99_WCHAR) || defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)"
|
||||||
puts $f "# error No string conversions"
|
puts $f "# error No string conversions"
|
||||||
puts $f "#endif"
|
puts $f "#endif"
|
||||||
close $f
|
close $f
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <tr1/cmath>
|
#include <tr1/cmath>
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_MATH
|
||||||
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
|
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -30,7 +30,7 @@ void test01(int dummy, ...)
|
|||||||
std::va_list ap;
|
std::va_list ap;
|
||||||
va_start(ap, dummy);
|
va_start(ap, dummy);
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
|
|
||||||
char* s = 0;
|
char* s = 0;
|
||||||
const char* cs = 0;
|
const char* cs = 0;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
long long i = 0;
|
long long i = 0;
|
||||||
const char* s = 0;
|
const char* s = 0;
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDLIB
|
||||||
|
|
||||||
typedef std::tr1::lldiv_t my_lldiv_t;
|
typedef std::tr1::lldiv_t my_lldiv_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void test01(int dummy, ...)
|
|||||||
ret3 = ret3; // Suppress unused warning.
|
ret3 = ret3; // Suppress unused warning.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_WCHAR
|
||||||
|
|
||||||
const wchar_t* nptr2 = 0;
|
const wchar_t* nptr2 = 0;
|
||||||
wchar_t** endptr2 = 0;
|
wchar_t** endptr2 = 0;
|
||||||
|
@ -83,7 +83,7 @@ namespace __gnu_test
|
|||||||
p = tmp;
|
p = tmp;
|
||||||
#else
|
#else
|
||||||
char buf[64];
|
char buf[64];
|
||||||
#if _GLIBCXX_USE_C99
|
#if _GLIBCXX_USE_C99_STDIO
|
||||||
std::snprintf(buf, 64, "filesystem-ts-test.%lu", (unsigned long)::getpid());
|
std::snprintf(buf, 64, "filesystem-ts-test.%lu", (unsigned long)::getpid());
|
||||||
#else
|
#else
|
||||||
std::sprintf(buf, "filesystem-ts-test.%lu", (unsigned long)::getpid());
|
std::sprintf(buf, "filesystem-ts-test.%lu", (unsigned long)::getpid());
|
||||||
|
Loading…
Reference in New Issue
Block a user