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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 #endif | 226 #endif |
227 | 227 |
228 // DART_UNUSED inidicates to the compiler that a variable/typedef is expected | 228 // DART_UNUSED inidicates to the compiler that a variable/typedef is expected |
229 // to be unused and disables the related warning. | 229 // to be unused and disables the related warning. |
230 #ifdef __GNUC__ | 230 #ifdef __GNUC__ |
231 #define DART_UNUSED __attribute__((unused)) | 231 #define DART_UNUSED __attribute__((unused)) |
232 #else | 232 #else |
233 #define DART_UNUSED | 233 #define DART_UNUSED |
234 #endif | 234 #endif |
235 | 235 |
236 #ifdef _MSC_VER | |
237 #define DART_NORETURN __declspec(noreturn) | |
238 #elif __GNUC__ | |
239 #define DART_NORETURN __attribute__((noreturn)) | |
Ivan Posva
2015/10/29 23:14:09
Why?
zra
2015/10/30 06:09:46
exit() is marked as not returning. If we don't mar
| |
240 #else | |
241 #error Automatic compiler detection failed. | |
242 #endif | |
243 | |
236 #if !defined(TARGET_ARCH_MIPS) | 244 #if !defined(TARGET_ARCH_MIPS) |
237 #if !defined(TARGET_ARCH_ARM) | 245 #if !defined(TARGET_ARCH_ARM) |
238 #if !defined(TARGET_ARCH_X64) | 246 #if !defined(TARGET_ARCH_X64) |
239 #if !defined(TARGET_ARCH_IA32) | 247 #if !defined(TARGET_ARCH_IA32) |
240 #if !defined(TARGET_ARCH_ARM64) | 248 #if !defined(TARGET_ARCH_ARM64) |
241 // No target architecture specified pick the one matching the host architecture. | 249 // No target architecture specified pick the one matching the host architecture. |
242 #if defined(HOST_ARCH_MIPS) | 250 #if defined(HOST_ARCH_MIPS) |
243 #define TARGET_ARCH_MIPS 1 | 251 #define TARGET_ARCH_MIPS 1 |
244 #elif defined(HOST_ARCH_ARM) | 252 #elif defined(HOST_ARCH_ARM) |
245 #define TARGET_ARCH_ARM 1 | 253 #define TARGET_ARCH_ARM 1 |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
602 | 610 |
603 #if defined(_WIN32) | 611 #if defined(_WIN32) |
604 #define STDIN_FILENO 0 | 612 #define STDIN_FILENO 0 |
605 #define STDOUT_FILENO 1 | 613 #define STDOUT_FILENO 1 |
606 #define STDERR_FILENO 2 | 614 #define STDERR_FILENO 2 |
607 #endif | 615 #endif |
608 | 616 |
609 } // namespace dart | 617 } // namespace dart |
610 | 618 |
611 #endif // PLATFORM_GLOBALS_H_ | 619 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |