Index: include/inttypes.h =================================================================== --- include/inttypes.h +++ include/inttypes.h @@ -237,6 +237,13 @@ #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 +*/ +#if __cplusplus >= 201103L && !defined(__STDC_FORMAT_MACROS) +# define __STDC_FORMAT_MACROS +#endif + #include_next #ifdef __cplusplus Index: include/stdint.h =================================================================== --- /dev/null +++ include/stdint.h @@ -0,0 +1,33 @@ +// -*- C++ -*- +//===---------------------------- stdint.h --------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_STDINT_H +#define _LIBCPP_STDINT_H + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +/* C99 stdlib (e.g. glibc < 2.18) does not provide macros needed + for C++11 unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS + are defined +*/ +#if __cplusplus >= 201103L && !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS +#endif +#if __cplusplus >= 201103L && !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS +#endif + +#include_next + +#endif // _LIBCPP_STDINT_H