diff --git a/contrib/llvm-project/libcxx/include/inttypes.h b/contrib/llvm-project/libcxx/include/inttypes.h index 8664412bd52..501cb1c11d5 100644 --- a/contrib/llvm-project/libcxx/include/inttypes.h +++ b/contrib/llvm-project/libcxx/include/inttypes.h @@ -241,12 +241,19 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int # pragma GCC system_header #endif -/* C99 stdlib (e.g. glibc < 2.18) does not provide format macros needed - for C++11 unless __STDC_FORMAT_MACROS is defined +/* C99 stdlib (e.g. glibc < 2.18) does not provide macros needed + for C++11 unless __STDC_CONSTANT_MACROS, __STDC_FORMAT_MACROS + and __STDC_LIMIT_MACROS are defined */ +#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS +#endif #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) # define __STDC_FORMAT_MACROS #endif +#if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS +#endif #if __has_include_next() # include_next