OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef PLATFORM_GLOBALS_H_ | 5 #ifndef PLATFORM_GLOBALS_H_ |
6 #define PLATFORM_GLOBALS_H_ | 6 #define PLATFORM_GLOBALS_H_ |
7 | 7 |
8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to | 8 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to |
9 // enable platform independent printf format specifiers. | 9 // enable platform independent printf format specifiers. |
10 #ifndef __STDC_FORMAT_MACROS | 10 #ifndef __STDC_FORMAT_MACROS |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 #if !defined(PRIuPTR) | 126 #if !defined(PRIuPTR) |
127 #define PRIuPTR DART_PRINTF_PTR_PREFIX "u" | 127 #define PRIuPTR DART_PRINTF_PTR_PREFIX "u" |
128 #endif | 128 #endif |
129 | 129 |
130 #if !defined(PRIxPTR) | 130 #if !defined(PRIxPTR) |
131 #define PRIxPTR DART_PRINTF_PTR_PREFIX "x" | 131 #define PRIxPTR DART_PRINTF_PTR_PREFIX "x" |
132 #endif | 132 #endif |
133 | 133 |
134 #if !defined(PRId64) | 134 #if !defined(PRId64) |
135 #define PRId64 I64d | 135 #define PRId64 "I64d" |
136 #endif | 136 #endif |
137 | 137 |
138 #if !defined(PRIu64) | 138 #if !defined(PRIu64) |
139 #define PRIu64 I64u | 139 #define PRIu64 "I64u" |
140 #endif | 140 #endif |
141 | 141 |
142 #if !defined(PRIx64) | 142 #if !defined(PRIx64) |
143 #define PRIx64 I64x | 143 #define PRIx64 "I64x" |
144 #endif | 144 #endif |
145 | 145 |
146 #endif // defined(TARGET_OS_WINDOWS) | 146 #endif // defined(TARGET_OS_WINDOWS) |
147 | 147 |
148 | 148 |
149 // Short form printf format specifiers | 149 // Short form printf format specifiers |
150 #define Pd PRIdPTR | 150 #define Pd PRIdPTR |
151 #define Pu PRIuPTR | 151 #define Pu PRIuPTR |
152 #define Px PRIxPTR | 152 #define Px PRIxPTR |
153 #define Pd64 PRId64 | 153 #define Pd64 PRId64 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 // have an implicit 'this' argument, the arguments of such methods | 395 // have an implicit 'this' argument, the arguments of such methods |
396 // should be counted from two, not one." | 396 // should be counted from two, not one." |
397 // | 397 // |
398 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 398 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
399 __attribute__((__format__(__printf__, string_index, first_to_check))) | 399 __attribute__((__format__(__printf__, string_index, first_to_check))) |
400 #else | 400 #else |
401 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 401 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
402 #endif | 402 #endif |
403 | 403 |
404 #endif // PLATFORM_GLOBALS_H_ | 404 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |