libstdc++: Stop using _GLIBCXX_USE_C99_STDINT_TR1 in <cstdint>
The _GLIBCXX_USE_C99_STDINT_TR1 macro (and the comments about it in acinclude.m4 and config.h) are misleading when it is also used for <stdint>, not only <tr1/stdint>. It is also wrong, because the configure checks for TR1 use -std=c++98 and a target might define uint32_t etc. for C++11 but not for C++98. Add a separate configure check for the <stdint.h> types using -std=c++11 for the checks. Use the result of that separate check in <cstdint> and most other places that still depend on the macro (many uses of that macro have been removed already). The remaining uses of the STDINT_TR1 macro are really for TR1, or are in the src/c++11/compatibility-*.cc files, where we don't want/need to change the condition they depend on (if those symbols were only exported when <stdint.h> types were available for -std=c++98, then that's the condition we should continue to use for whether to export the compat symbols now). Make similar changes for the related _GLIBCXX_USE_C99_INTTYPES_TR1 and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 macros, adding new macros for non-TR1 uses. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_USE_C99): Check for <stdint.h> types in C++11 mode and define _GLIBCXX_USE_C99_STDINT. Check for <inttypes.h> features in C++11 mode and define _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T. * config.h.in: Regenerate. * configure: Regenerate. * doc/doxygen/user.cfg.in (PREDEFINED): Add new macros. * include/bits/chrono.h: Check _GLIBCXX_USE_C99_STDINT instead of _GLIBCXX_USE_C99_STDINT_TR1. * include/c_compatibility/inttypes.h: Check _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T instead of _GLIBCXX_USE_C99_INTTYPES_TR1 and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1. * include/c_compatibility/stdatomic.h: Check _GLIBCXX_USE_C99_STDINT instead of _GLIBCXX_USE_C99_STDINT_TR1. * include/c_compatibility/stdint.h: Likewise. * include/c_global/cinttypes: Check _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T instead of _GLIBCXX_USE_C99_INTTYPES_TR1 and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1. * include/c_global/cstdint: Check _GLIBCXX_USE_C99_STDINT instead of _GLIBCXX_USE_C99_STDINT_TR1. * include/std/atomic: Likewise. * src/c++11/cow-stdexcept.cc: Likewise. * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Likewise. * testsuite/lib/libstdc++.exp (check_v3_target_cstdint): Likewise.
This commit is contained in:
parent
0d76fb1582
commit
5baabdb15d
14 changed files with 372 additions and 19 deletions
|
@ -1103,6 +1103,148 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
|
|||
])
|
||||
fi
|
||||
|
||||
# Check for the existence of <stdint.h> types.
|
||||
AC_CACHE_CHECK([for ISO C99 support in <stdint.h> for C++11],
|
||||
glibcxx_cv_c99_stdint, [
|
||||
AC_TRY_COMPILE([#define __STDC_LIMIT_MACROS
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
#include <stdint.h>],
|
||||
[typedef int8_t my_int8_t;
|
||||
my_int8_t i8 = INT8_MIN;
|
||||
i8 = INT8_MAX;
|
||||
typedef int16_t my_int16_t;
|
||||
my_int16_t i16 = INT16_MIN;
|
||||
i16 = INT16_MAX;
|
||||
typedef int32_t my_int32_t;
|
||||
my_int32_t i32 = INT32_MIN;
|
||||
i32 = INT32_MAX;
|
||||
typedef int64_t my_int64_t;
|
||||
my_int64_t i64 = INT64_MIN;
|
||||
i64 = INT64_MAX;
|
||||
typedef int_fast8_t my_int_fast8_t;
|
||||
my_int_fast8_t if8 = INT_FAST8_MIN;
|
||||
if8 = INT_FAST8_MAX;
|
||||
typedef int_fast16_t my_int_fast16_t;
|
||||
my_int_fast16_t if16 = INT_FAST16_MIN;
|
||||
if16 = INT_FAST16_MAX;
|
||||
typedef int_fast32_t my_int_fast32_t;
|
||||
my_int_fast32_t if32 = INT_FAST32_MIN;
|
||||
if32 = INT_FAST32_MAX;
|
||||
typedef int_fast64_t my_int_fast64_t;
|
||||
my_int_fast64_t if64 = INT_FAST64_MIN;
|
||||
if64 = INT_FAST64_MAX;
|
||||
typedef int_least8_t my_int_least8_t;
|
||||
my_int_least8_t il8 = INT_LEAST8_MIN;
|
||||
il8 = INT_LEAST8_MAX;
|
||||
typedef int_least16_t my_int_least16_t;
|
||||
my_int_least16_t il16 = INT_LEAST16_MIN;
|
||||
il16 = INT_LEAST16_MAX;
|
||||
typedef int_least32_t my_int_least32_t;
|
||||
my_int_least32_t il32 = INT_LEAST32_MIN;
|
||||
il32 = INT_LEAST32_MAX;
|
||||
typedef int_least64_t my_int_least64_t;
|
||||
my_int_least64_t il64 = INT_LEAST64_MIN;
|
||||
il64 = INT_LEAST64_MAX;
|
||||
typedef intmax_t my_intmax_t;
|
||||
my_intmax_t im = INTMAX_MAX;
|
||||
im = INTMAX_MIN;
|
||||
typedef intptr_t my_intptr_t;
|
||||
my_intptr_t ip = INTPTR_MAX;
|
||||
ip = INTPTR_MIN;
|
||||
typedef uint8_t my_uint8_t;
|
||||
my_uint8_t ui8 = UINT8_MAX;
|
||||
ui8 = UINT8_MAX;
|
||||
typedef uint16_t my_uint16_t;
|
||||
my_uint16_t ui16 = UINT16_MAX;
|
||||
ui16 = UINT16_MAX;
|
||||
typedef uint32_t my_uint32_t;
|
||||
my_uint32_t ui32 = UINT32_MAX;
|
||||
ui32 = UINT32_MAX;
|
||||
typedef uint64_t my_uint64_t;
|
||||
my_uint64_t ui64 = UINT64_MAX;
|
||||
ui64 = UINT64_MAX;
|
||||
typedef uint_fast8_t my_uint_fast8_t;
|
||||
my_uint_fast8_t uif8 = UINT_FAST8_MAX;
|
||||
uif8 = UINT_FAST8_MAX;
|
||||
typedef uint_fast16_t my_uint_fast16_t;
|
||||
my_uint_fast16_t uif16 = UINT_FAST16_MAX;
|
||||
uif16 = UINT_FAST16_MAX;
|
||||
typedef uint_fast32_t my_uint_fast32_t;
|
||||
my_uint_fast32_t uif32 = UINT_FAST32_MAX;
|
||||
uif32 = UINT_FAST32_MAX;
|
||||
typedef uint_fast64_t my_uint_fast64_t;
|
||||
my_uint_fast64_t uif64 = UINT_FAST64_MAX;
|
||||
uif64 = UINT_FAST64_MAX;
|
||||
typedef uint_least8_t my_uint_least8_t;
|
||||
my_uint_least8_t uil8 = UINT_LEAST8_MAX;
|
||||
uil8 = UINT_LEAST8_MAX;
|
||||
typedef uint_least16_t my_uint_least16_t;
|
||||
my_uint_least16_t uil16 = UINT_LEAST16_MAX;
|
||||
uil16 = UINT_LEAST16_MAX;
|
||||
typedef uint_least32_t my_uint_least32_t;
|
||||
my_uint_least32_t uil32 = UINT_LEAST32_MAX;
|
||||
uil32 = UINT_LEAST32_MAX;
|
||||
typedef uint_least64_t my_uint_least64_t;
|
||||
my_uint_least64_t uil64 = UINT_LEAST64_MAX;
|
||||
uil64 = UINT_LEAST64_MAX;
|
||||
typedef uintmax_t my_uintmax_t;
|
||||
my_uintmax_t uim = UINTMAX_MAX;
|
||||
uim = UINTMAX_MAX;
|
||||
typedef uintptr_t my_uintptr_t;
|
||||
my_uintptr_t uip = UINTPTR_MAX;
|
||||
uip = UINTPTR_MAX;
|
||||
],[glibcxx_cv_c99_stdint=yes],
|
||||
[glibcxx_cv_c99_stdint=no])
|
||||
])
|
||||
if test x"$glibcxx_cv_c99_stdint" = x"yes"; then
|
||||
AC_DEFINE(_GLIBCXX_USE_C99_STDINT, 1,
|
||||
[Define if C99 types in <stdint.h> should be imported in
|
||||
<cstdint> in namespace std for C++11.])
|
||||
fi
|
||||
|
||||
# Check for the existence of <inttypes.h> functions (NB: doesn't make
|
||||
# sense if the glibcxx_cv_c99_stdint check fails, per C99, 7.8/1).
|
||||
ac_c99_inttypes=no;
|
||||
if test x"$glibcxx_cv_c99_stdint" = x"yes"; then
|
||||
AC_MSG_CHECKING([for ISO C99 support for C++11 in <inttypes.h>])
|
||||
AC_TRY_COMPILE([#include <inttypes.h>],
|
||||
[intmax_t i, numer, denom, base;
|
||||
const char* s;
|
||||
char** endptr;
|
||||
intmax_t ret = imaxabs(i);
|
||||
imaxdiv_t dret = imaxdiv(numer, denom);
|
||||
ret = strtoimax(s, endptr, base);
|
||||
uintmax_t uret = strtoumax(s, endptr, base);
|
||||
],[ac_c99_inttypes=yes], [ac_c99_inttypes=no])
|
||||
AC_MSG_RESULT($ac_c99_inttypes)
|
||||
fi
|
||||
if test x"$ac_c99_inttypes" = x"yes"; then
|
||||
AC_DEFINE(_GLIBCXX_USE_C99_INTTYPES, 1,
|
||||
[Define if C99 functions in <inttypes.h> should be imported in
|
||||
<cinttypes> in namespace std in C++11.])
|
||||
fi
|
||||
|
||||
# Check for the existence of wchar_t <inttypes.h> functions (NB: doesn't
|
||||
# make sense if the glibcxx_cv_c99_stdint check fails, per C99, 7.8/1).
|
||||
ac_c99_inttypes_wchar_t=no;
|
||||
if test x"$glibcxx_cv_c99_stdint" = x"yes"; then
|
||||
AC_MSG_CHECKING([for wchar_t ISO C99 support for C++11 in <inttypes.h>])
|
||||
AC_TRY_COMPILE([#include <inttypes.h>],
|
||||
[intmax_t base;
|
||||
const wchar_t* s;
|
||||
wchar_t** endptr;
|
||||
intmax_t ret = wcstoimax(s, endptr, base);
|
||||
uintmax_t uret = wcstoumax(s, endptr, base);
|
||||
],[ac_c99_inttypes_wchar_t=yes],
|
||||
[ac_c99_inttypes_wchar_t=no])
|
||||
AC_MSG_RESULT($ac_c99_inttypes_wchar_t)
|
||||
fi
|
||||
if test x"$ac_c99_inttypes_wchar_t" = x"yes"; then
|
||||
AC_DEFINE(_GLIBCXX_USE_C99_INTTYPES_WCHAR_T, 1,
|
||||
[Define if wchar_t C99 functions in <inttypes.h> should be
|
||||
imported in <cinttypes> in namespace std in C++11.])
|
||||
fi
|
||||
|
||||
# Check for the existence of <math.h> functions used if C99 is enabled.
|
||||
AC_CACHE_CHECK([for ISO C99 support in <math.h> for C++11],
|
||||
glibcxx_cv_c99_math_cxx11, [
|
||||
|
|
|
@ -910,10 +910,18 @@
|
|||
namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_FENV_TR1
|
||||
|
||||
/* Define if C99 functions in <inttypes.h> should be imported in <cinttypes>
|
||||
in namespace std in C++11. */
|
||||
#undef _GLIBCXX_USE_C99_INTTYPES
|
||||
|
||||
/* Define if C99 functions in <inttypes.h> should be imported in
|
||||
<tr1/cinttypes> in namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_INTTYPES_TR1
|
||||
|
||||
/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
|
||||
<cinttypes> in namespace std in C++11. */
|
||||
#undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T
|
||||
|
||||
/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
|
||||
<tr1/cinttypes> in namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
|
||||
|
@ -922,6 +930,10 @@
|
|||
<tr1/cmath> in namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_MATH_TR1
|
||||
|
||||
/* Define if C99 types in <stdint.h> should be imported in <cstdint> in
|
||||
namespace std for C++11. */
|
||||
#undef _GLIBCXX_USE_C99_STDINT
|
||||
|
||||
/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
|
||||
namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
|
|
196
libstdc++-v3/configure
vendored
196
libstdc++-v3/configure
vendored
|
@ -17991,6 +17991,202 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
# Check for the existence of <stdint.h> types.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <stdint.h> for C++11" >&5
|
||||
$as_echo_n "checking for ISO C99 support in <stdint.h> for C++11... " >&6; }
|
||||
if ${glibcxx_cv_c99_stdint+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
#include <stdint.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
typedef int8_t my_int8_t;
|
||||
my_int8_t i8 = INT8_MIN;
|
||||
i8 = INT8_MAX;
|
||||
typedef int16_t my_int16_t;
|
||||
my_int16_t i16 = INT16_MIN;
|
||||
i16 = INT16_MAX;
|
||||
typedef int32_t my_int32_t;
|
||||
my_int32_t i32 = INT32_MIN;
|
||||
i32 = INT32_MAX;
|
||||
typedef int64_t my_int64_t;
|
||||
my_int64_t i64 = INT64_MIN;
|
||||
i64 = INT64_MAX;
|
||||
typedef int_fast8_t my_int_fast8_t;
|
||||
my_int_fast8_t if8 = INT_FAST8_MIN;
|
||||
if8 = INT_FAST8_MAX;
|
||||
typedef int_fast16_t my_int_fast16_t;
|
||||
my_int_fast16_t if16 = INT_FAST16_MIN;
|
||||
if16 = INT_FAST16_MAX;
|
||||
typedef int_fast32_t my_int_fast32_t;
|
||||
my_int_fast32_t if32 = INT_FAST32_MIN;
|
||||
if32 = INT_FAST32_MAX;
|
||||
typedef int_fast64_t my_int_fast64_t;
|
||||
my_int_fast64_t if64 = INT_FAST64_MIN;
|
||||
if64 = INT_FAST64_MAX;
|
||||
typedef int_least8_t my_int_least8_t;
|
||||
my_int_least8_t il8 = INT_LEAST8_MIN;
|
||||
il8 = INT_LEAST8_MAX;
|
||||
typedef int_least16_t my_int_least16_t;
|
||||
my_int_least16_t il16 = INT_LEAST16_MIN;
|
||||
il16 = INT_LEAST16_MAX;
|
||||
typedef int_least32_t my_int_least32_t;
|
||||
my_int_least32_t il32 = INT_LEAST32_MIN;
|
||||
il32 = INT_LEAST32_MAX;
|
||||
typedef int_least64_t my_int_least64_t;
|
||||
my_int_least64_t il64 = INT_LEAST64_MIN;
|
||||
il64 = INT_LEAST64_MAX;
|
||||
typedef intmax_t my_intmax_t;
|
||||
my_intmax_t im = INTMAX_MAX;
|
||||
im = INTMAX_MIN;
|
||||
typedef intptr_t my_intptr_t;
|
||||
my_intptr_t ip = INTPTR_MAX;
|
||||
ip = INTPTR_MIN;
|
||||
typedef uint8_t my_uint8_t;
|
||||
my_uint8_t ui8 = UINT8_MAX;
|
||||
ui8 = UINT8_MAX;
|
||||
typedef uint16_t my_uint16_t;
|
||||
my_uint16_t ui16 = UINT16_MAX;
|
||||
ui16 = UINT16_MAX;
|
||||
typedef uint32_t my_uint32_t;
|
||||
my_uint32_t ui32 = UINT32_MAX;
|
||||
ui32 = UINT32_MAX;
|
||||
typedef uint64_t my_uint64_t;
|
||||
my_uint64_t ui64 = UINT64_MAX;
|
||||
ui64 = UINT64_MAX;
|
||||
typedef uint_fast8_t my_uint_fast8_t;
|
||||
my_uint_fast8_t uif8 = UINT_FAST8_MAX;
|
||||
uif8 = UINT_FAST8_MAX;
|
||||
typedef uint_fast16_t my_uint_fast16_t;
|
||||
my_uint_fast16_t uif16 = UINT_FAST16_MAX;
|
||||
uif16 = UINT_FAST16_MAX;
|
||||
typedef uint_fast32_t my_uint_fast32_t;
|
||||
my_uint_fast32_t uif32 = UINT_FAST32_MAX;
|
||||
uif32 = UINT_FAST32_MAX;
|
||||
typedef uint_fast64_t my_uint_fast64_t;
|
||||
my_uint_fast64_t uif64 = UINT_FAST64_MAX;
|
||||
uif64 = UINT_FAST64_MAX;
|
||||
typedef uint_least8_t my_uint_least8_t;
|
||||
my_uint_least8_t uil8 = UINT_LEAST8_MAX;
|
||||
uil8 = UINT_LEAST8_MAX;
|
||||
typedef uint_least16_t my_uint_least16_t;
|
||||
my_uint_least16_t uil16 = UINT_LEAST16_MAX;
|
||||
uil16 = UINT_LEAST16_MAX;
|
||||
typedef uint_least32_t my_uint_least32_t;
|
||||
my_uint_least32_t uil32 = UINT_LEAST32_MAX;
|
||||
uil32 = UINT_LEAST32_MAX;
|
||||
typedef uint_least64_t my_uint_least64_t;
|
||||
my_uint_least64_t uil64 = UINT_LEAST64_MAX;
|
||||
uil64 = UINT_LEAST64_MAX;
|
||||
typedef uintmax_t my_uintmax_t;
|
||||
my_uintmax_t uim = UINTMAX_MAX;
|
||||
uim = UINTMAX_MAX;
|
||||
typedef uintptr_t my_uintptr_t;
|
||||
my_uintptr_t uip = UINTPTR_MAX;
|
||||
uip = UINTPTR_MAX;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
glibcxx_cv_c99_stdint=yes
|
||||
else
|
||||
glibcxx_cv_c99_stdint=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_c99_stdint" >&5
|
||||
$as_echo "$glibcxx_cv_c99_stdint" >&6; }
|
||||
if test x"$glibcxx_cv_c99_stdint" = x"yes"; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_C99_STDINT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# Check for the existence of <inttypes.h> functions (NB: doesn't make
|
||||
# sense if the glibcxx_cv_c99_stdint check fails, per C99, 7.8/1).
|
||||
ac_c99_inttypes=no;
|
||||
if test x"$glibcxx_cv_c99_stdint" = x"yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support for C++11 in <inttypes.h>" >&5
|
||||
$as_echo_n "checking for ISO C99 support for C++11 in <inttypes.h>... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <inttypes.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
intmax_t i, numer, denom, base;
|
||||
const char* s;
|
||||
char** endptr;
|
||||
intmax_t ret = imaxabs(i);
|
||||
imaxdiv_t dret = imaxdiv(numer, denom);
|
||||
ret = strtoimax(s, endptr, base);
|
||||
uintmax_t uret = strtoumax(s, endptr, base);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
ac_c99_inttypes=yes
|
||||
else
|
||||
ac_c99_inttypes=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_c99_inttypes" >&5
|
||||
$as_echo "$ac_c99_inttypes" >&6; }
|
||||
fi
|
||||
if test x"$ac_c99_inttypes" = x"yes"; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_C99_INTTYPES 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# Check for the existence of wchar_t <inttypes.h> functions (NB: doesn't
|
||||
# make sense if the glibcxx_cv_c99_stdint check fails, per C99, 7.8/1).
|
||||
ac_c99_inttypes_wchar_t=no;
|
||||
if test x"$glibcxx_cv_c99_stdint" = x"yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t ISO C99 support for C++11 in <inttypes.h>" >&5
|
||||
$as_echo_n "checking for wchar_t ISO C99 support for C++11 in <inttypes.h>... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <inttypes.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
intmax_t base;
|
||||
const wchar_t* s;
|
||||
wchar_t** endptr;
|
||||
intmax_t ret = wcstoimax(s, endptr, base);
|
||||
uintmax_t uret = wcstoumax(s, endptr, base);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
ac_c99_inttypes_wchar_t=yes
|
||||
else
|
||||
ac_c99_inttypes_wchar_t=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_c99_inttypes_wchar_t" >&5
|
||||
$as_echo "$ac_c99_inttypes_wchar_t" >&6; }
|
||||
fi
|
||||
if test x"$ac_c99_inttypes_wchar_t" = x"yes"; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# Check for the existence of <math.h> functions used if C99 is enabled.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 support in <math.h> for C++11" >&5
|
||||
$as_echo_n "checking for ISO C99 support in <math.h> for C++11... " >&6; }
|
||||
|
|
|
@ -2353,6 +2353,9 @@ PREDEFINED = __cplusplus=202002L \
|
|||
_GLIBCXX_USE_WCHAR_T \
|
||||
_GLIBCXX_USE_LONG_LONG \
|
||||
_GLIBCXX_USE_C99_COMPLEX_ARC \
|
||||
_GLIBCXX_USE_C99_INTTYPES \
|
||||
_GLIBCXX_USE_C99_INTTYPES_WCHAR_T \
|
||||
_GLIBCXX_USE_C99_STDINT \
|
||||
_GLIBCXX_USE_C99_STDINT_TR1 \
|
||||
_GLIBCXX_USE_SCHED_YIELD \
|
||||
_GLIBCXX_USE_NANOSLEEP \
|
||||
|
|
|
@ -884,7 +884,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
/// @}
|
||||
|
||||
/// @cond undocumented
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
# define _GLIBCXX_CHRONO_INT64_T int64_t
|
||||
#elif defined __INT64_TYPE__
|
||||
# define _GLIBCXX_CHRONO_INT64_T __INT64_TYPE__
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_INTTYPES_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_INTTYPES
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
@ -72,13 +72,13 @@ namespace std
|
|||
using ::strtoimax;
|
||||
using ::strtoumax;
|
||||
|
||||
#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
|
||||
#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_INTTYPES_WCHAR_T
|
||||
using ::wcstoimax;
|
||||
using ::wcstoumax;
|
||||
#endif
|
||||
} // namespace
|
||||
|
||||
#endif _GLIBCXX_USE_C99_INTTYPES_TR1
|
||||
#endif _GLIBCXX_USE_C99_INTTYPES
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ using std::atomic_char8_t;
|
|||
using std::atomic_char16_t;
|
||||
using std::atomic_char32_t;
|
||||
using std::atomic_wchar_t;
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
using std::atomic_int8_t;
|
||||
using std::atomic_uint8_t;
|
||||
using std::atomic_int16_t;
|
||||
|
@ -92,7 +92,7 @@ using std::atomic_intptr_t;
|
|||
using std::atomic_uintptr_t;
|
||||
using std::atomic_size_t;
|
||||
using std::atomic_ptrdiff_t;
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
using std::atomic_intmax_t;
|
||||
using std::atomic_uintmax_t;
|
||||
#endif
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ namespace std
|
|||
using ::uintptr_t;
|
||||
} // namespace
|
||||
|
||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#endif // _GLIBCXX_USE_C99_STDINT
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_INTTYPES_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_INTTYPES
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
@ -68,13 +68,13 @@ namespace std
|
|||
using ::strtoimax;
|
||||
using ::strtoumax;
|
||||
|
||||
#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
|
||||
#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_INTTYPES_WCHAR_T
|
||||
using ::wcstoimax;
|
||||
using ::wcstoumax;
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // _GLIBCXX_USE_C99_INTTYPES_TR1
|
||||
#endif // _GLIBCXX_USE_C99_INTTYPES
|
||||
|
||||
#endif // C++11
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
namespace std
|
||||
{
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
using ::int8_t;
|
||||
using ::int16_t;
|
||||
using ::int32_t;
|
||||
|
@ -83,7 +83,7 @@ namespace std
|
|||
|
||||
using ::uintmax_t;
|
||||
using ::uintptr_t;
|
||||
#else // !_GLIBCXX_USE_C99_STDINT_TR1
|
||||
#else // !_GLIBCXX_USE_C99_STDINT
|
||||
|
||||
using intmax_t = __INTMAX_TYPE__;
|
||||
using uintmax_t = __UINTMAX_TYPE__;
|
||||
|
@ -138,7 +138,7 @@ namespace std
|
|||
using uintptr_t = __UINTPTR_TYPE__;
|
||||
#endif
|
||||
|
||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#endif // _GLIBCXX_USE_C99_STDINT
|
||||
} // namespace std
|
||||
|
||||
#endif // C++11
|
||||
|
|
|
@ -1103,7 +1103,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
/// atomic_char32_t
|
||||
typedef atomic<char32_t> atomic_char32_t;
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// 2441. Exact-width atomic typedefs should be provided
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
|
|||
// declared transaction-safe, so we just don't provide transactional clones
|
||||
// in this case.
|
||||
#if _GLIBCXX_USE_WEAK_REF
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -461,5 +461,5 @@ CTORDTOR(15underflow_error, std::underflow_error, runtime_error)
|
|||
|
||||
}
|
||||
|
||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#endif // _GLIBCXX_USE_C99_STDINT
|
||||
#endif // _GLIBCXX_USE_WEAK_REF
|
||||
|
|
|
@ -70,7 +70,7 @@ static_assert(is_same<atomic_char32_t, _Atomic(char32_t)>);
|
|||
static_assert(is_same<atomic_wchar_t, _Atomic(wchar_t)>);
|
||||
|
||||
#include <stdint.h>
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT
|
||||
static_assert(is_same<atomic_int8_t, _Atomic(int8_t)>);
|
||||
static_assert(is_same<atomic_uint8_t, _Atomic(uint8_t)>);
|
||||
static_assert(is_same<atomic_int16_t, _Atomic(int16_t)>);
|
||||
|
|
|
@ -1063,7 +1063,7 @@ proc check_v3_target_parallel_mode { } {
|
|||
# Return 1 if the C99 stdint facilities are available, 0 otherwise.
|
||||
proc check_v3_target_cstdint { } {
|
||||
return [check_v3_target_prop_cached et_cstdint {
|
||||
set cond "defined _GLIBCXX_USE_C99_STDINT_TR1"
|
||||
set cond "defined _GLIBCXX_USE_C99_STDINT"
|
||||
return [v3_check_preprocessor_condition cstdint $cond]
|
||||
}]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue