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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 265 |
266 | 266 |
267 // Short form printf format specifiers | 267 // Short form printf format specifiers |
268 #define Pd PRIdPTR | 268 #define Pd PRIdPTR |
269 #define Pu PRIuPTR | 269 #define Pu PRIuPTR |
270 #define Px PRIxPTR | 270 #define Px PRIxPTR |
271 #define Pd64 PRId64 | 271 #define Pd64 PRId64 |
272 #define Pu64 PRIu64 | 272 #define Pu64 PRIu64 |
273 #define Px64 PRIx64 | 273 #define Px64 PRIx64 |
274 | 274 |
275 | |
276 // Suffixes for 64-bit integer literals. | 275 // Suffixes for 64-bit integer literals. |
277 #ifdef _MSC_VER | 276 #ifdef _MSC_VER |
278 #define DART_INT64_C(x) x##I64 | 277 #define DART_INT64_C(x) x##I64 |
279 #define DART_UINT64_C(x) x##UI64 | 278 #define DART_UINT64_C(x) x##UI64 |
280 #else | 279 #else |
281 #define DART_INT64_C(x) x##LL | 280 #define DART_INT64_C(x) x##LL |
282 #define DART_UINT64_C(x) x##ULL | 281 #define DART_UINT64_C(x) x##ULL |
283 #endif | 282 #endif |
284 | 283 |
285 // Replace calls to strtoll with _strtoi64 on Windows. | 284 // Replace calls to strtoll with _strtoi64 on Windows. |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 // should be counted from two, not one." | 543 // should be counted from two, not one." |
545 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 544 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
546 __attribute__((__format__(__printf__, string_index, first_to_check))) | 545 __attribute__((__format__(__printf__, string_index, first_to_check))) |
547 #else | 546 #else |
548 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 547 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
549 #endif | 548 #endif |
550 | 549 |
551 } // namespace dart | 550 } // namespace dart |
552 | 551 |
553 #endif // PLATFORM_GLOBALS_H_ | 552 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |