#include <cwchar> // For WEOF, wmemmove, wmemset, etc.
#if __cplusplus >= 201103L
# include <type_traits>
+#if !defined __UINT_LEAST16_TYPE__ || !defined __UINT_LEAST32_TYPE__
+# include <cstdint>
+#endif
#endif
#if __cplusplus >= 202002L
# include <compare>
#if __cplusplus >= 201103L
-#include <cstdint>
-
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
struct char_traits<char16_t>
{
typedef char16_t char_type;
-#ifdef _GLIBCXX_USE_C99_STDINT_TR1
- typedef uint_least16_t int_type;
-#elif defined __UINT_LEAST16_TYPE__
+#ifdef __UINT_LEAST16_TYPE__
typedef __UINT_LEAST16_TYPE__ int_type;
+#elif defined _GLIBCXX_USE_C99_STDINT_TR1
+ typedef uint_least16_t int_type;
#else
typedef make_unsigned<char16_t>::type int_type;
#endif
struct char_traits<char32_t>
{
typedef char32_t char_type;
-#ifdef _GLIBCXX_USE_C99_STDINT_TR1
- typedef uint_least32_t int_type;
-#elif defined __UINT_LEAST32_TYPE__
+#ifdef __UINT_LEAST32_TYPE__
typedef __UINT_LEAST32_TYPE__ int_type;
+#elif defined _GLIBCXX_USE_C99_STDINT_TR1
+ typedef uint_least32_t int_type;
#else
typedef make_unsigned<char32_t>::type int_type;
#endif
int
__glibcxx_backtrace_simple(__glibcxx_backtrace_state*, int,
- int (*) (void*, uintptr_t),
+ int (*) (void*, __UINTPTR_TYPE__),
void(*)(void*, const char*, int),
void*);
int
-__glibcxx_backtrace_pcinfo(__glibcxx_backtrace_state*, uintptr_t,
- int (*)(void*, uintptr_t,
+__glibcxx_backtrace_pcinfo(__glibcxx_backtrace_state*, __UINTPTR_TYPE__,
+ int (*)(void*, __UINTPTR_TYPE__,
const char*, int, const char*),
void(*)(void*, const char*, int),
void*);
int
-__glibcxx_backtrace_syminfo(__glibcxx_backtrace_state*, uintptr_t addr,
- void (*) (void*, uintptr_t, const char*,
- uintptr_t, uintptr_t),
+__glibcxx_backtrace_syminfo(__glibcxx_backtrace_state*, __UINTPTR_TYPE__ addr,
+ void (*) (void*, __UINTPTR_TYPE__, const char*,
+ __UINTPTR_TYPE__, __UINTPTR_TYPE__),
void(*)(void*, const char*, int),
void*);
}
class basic_stacktrace
{
using _AllocTraits = allocator_traits<_Allocator>;
+ using uintptr_t = __UINTPTR_TYPE__;
public:
using value_type = stacktrace_entry;