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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 #define TARGET_OS_LINUX 1 | 95 #define TARGET_OS_LINUX 1 |
96 | 96 |
97 #elif defined(__APPLE__) | 97 #elif defined(__APPLE__) |
98 | 98 |
99 // Define the flavor of Mac OS we are running on. | 99 // Define the flavor of Mac OS we are running on. |
100 #include <TargetConditionals.h> | 100 #include <TargetConditionals.h> |
101 // TODO(iposva): Rename TARGET_OS_MACOS to TARGET_OS_MAC to inherit | 101 // TODO(iposva): Rename TARGET_OS_MACOS to TARGET_OS_MAC to inherit |
102 // the value defined in TargetConditionals.h | 102 // the value defined in TargetConditionals.h |
103 #define TARGET_OS_MACOS 1 | 103 #define TARGET_OS_MACOS 1 |
104 #if TARGET_OS_IPHONE | 104 #if TARGET_OS_IPHONE |
| 105 // Test for this #define by saying '#if TARGET_OS_IOS' rather than the usual |
| 106 // '#if defined(TARGET_OS_IOS)'. TARGET_OS_IOS is defined to be 0 in |
| 107 // XCode >= 7.0. See Issue #24453. |
105 #define TARGET_OS_IOS 1 | 108 #define TARGET_OS_IOS 1 |
106 #endif | 109 #endif |
107 | 110 |
108 #elif defined(_WIN32) | 111 #elif defined(_WIN32) |
109 | 112 |
110 // Windows, both 32- and 64-bit, regardless of the check for _WIN32. | 113 // Windows, both 32- and 64-bit, regardless of the check for _WIN32. |
111 #define TARGET_OS_WINDOWS 1 | 114 #define TARGET_OS_WINDOWS 1 |
112 | 115 |
113 #else | 116 #else |
114 #error Automatic target os detection failed. | 117 #error Automatic target os detection failed. |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 646 |
644 #if defined(_WIN32) | 647 #if defined(_WIN32) |
645 #define STDIN_FILENO 0 | 648 #define STDIN_FILENO 0 |
646 #define STDOUT_FILENO 1 | 649 #define STDOUT_FILENO 1 |
647 #define STDERR_FILENO 2 | 650 #define STDERR_FILENO 2 |
648 #endif | 651 #endif |
649 | 652 |
650 } // namespace dart | 653 } // namespace dart |
651 | 654 |
652 #endif // PLATFORM_GLOBALS_H_ | 655 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |