| Index: base/format_macros.h
|
| diff --git a/base/format_macros.h b/base/format_macros.h
|
| index 4d90c593a61690895f152a4b03e597b1c3fc3613..d58658d2b91a428dfed116248595748a28617d4c 100644
|
| --- a/base/format_macros.h
|
| +++ b/base/format_macros.h
|
| @@ -23,19 +23,20 @@
|
|
|
| #include "build/build_config.h"
|
|
|
| -#if defined(OS_POSIX)
|
| -
|
| -#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && !defined(PRId64)
|
| +#if defined(OS_POSIX) && (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && \
|
| + !defined(PRId64)
|
| #error "inttypes.h has already been included before this header file, but "
|
| #error "without __STDC_FORMAT_MACROS defined."
|
| #endif
|
|
|
| -#if !defined(__STDC_FORMAT_MACROS)
|
| +#if defined(OS_POSIX) && !defined(__STDC_FORMAT_MACROS)
|
| #define __STDC_FORMAT_MACROS
|
| #endif
|
|
|
| #include <inttypes.h>
|
|
|
| +#if defined(OS_POSIX)
|
| +
|
| // GCC will concatenate wide and narrow strings correctly, so nothing needs to
|
| // be done here.
|
| #define WidePRId64 PRId64
|
| @@ -76,16 +77,8 @@
|
|
|
| #else // OS_WIN
|
|
|
| -#if !defined(PRId64)
|
| -#define PRId64 "I64d"
|
| -#endif
|
| -
|
| -#if !defined(PRIu64)
|
| -#define PRIu64 "I64u"
|
| -#endif
|
| -
|
| -#if !defined(PRIx64)
|
| -#define PRIx64 "I64x"
|
| +#if !defined(PRId64) || !defined(PRIu64) || !defined(PRIx64)
|
| +#error "inttypes.h provided by win toolchain should define these."
|
| #endif
|
|
|
| #define WidePRId64 L"I64d"
|
|
|