| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_FORMAT_MACROS_H_ | 5 #ifndef BASE_FORMAT_MACROS_H_ |
| 6 #define BASE_FORMAT_MACROS_H_ | 6 #define BASE_FORMAT_MACROS_H_ |
| 7 | 7 |
| 8 // This file defines the C99 format macros for 64-bit values. If you wish to | 8 // This file defines the C99 format macros for 64-bit values. If you wish to |
| 9 // print a 64-bit value in a portable way do: | 9 // print a 64-bit value in a portable way do: |
| 10 // int64_t value; | 10 // int64_t value; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include <inttypes.h> | 30 #include <inttypes.h> |
| 31 | 31 |
| 32 // GCC will concatenate wide and narrow strings correctly, so nothing needs to | 32 // GCC will concatenate wide and narrow strings correctly, so nothing needs to |
| 33 // be done here. | 33 // be done here. |
| 34 #define WidePRId64 PRId64 | 34 #define WidePRId64 PRId64 |
| 35 #define WidePRIu64 PRIu64 | 35 #define WidePRIu64 PRIu64 |
| 36 #define WidePRIx64 PRIx64 | 36 #define WidePRIx64 PRIx64 |
| 37 | 37 |
| 38 #else // OS_WIN | 38 #else // OS_WIN |
| 39 | 39 |
| 40 #if !defined(PRId64) |
| 40 #define PRId64 "I64d" | 41 #define PRId64 "I64d" |
| 42 #endif |
| 43 |
| 44 #if !defined(PRIu64) |
| 41 #define PRIu64 "I64u" | 45 #define PRIu64 "I64u" |
| 46 #endif |
| 47 |
| 48 #if !defined(PRIx64) |
| 42 #define PRIx64 "I64x" | 49 #define PRIx64 "I64x" |
| 50 #endif |
| 43 | 51 |
| 44 #define WidePRId64 L"I64d" | 52 #define WidePRId64 L"I64d" |
| 45 #define WidePRIu64 L"I64u" | 53 #define WidePRIu64 L"I64u" |
| 46 #define WidePRIx64 L"I64x" | 54 #define WidePRIx64 L"I64x" |
| 47 | 55 |
| 48 #endif | 56 #endif |
| 49 | 57 |
| 50 #endif // !BASE_FORMAT_MACROS_H_ | 58 #endif // !BASE_FORMAT_MACROS_H_ |
| OLD | NEW |