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_UTILS_H_ | 5 #ifndef PLATFORM_UTILS_H_ |
6 #define PLATFORM_UTILS_H_ | 6 #define PLATFORM_UTILS_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 intptr_t length) { | 165 intptr_t length) { |
166 return offset >= 0 && | 166 return offset >= 0 && |
167 count >= 0 && | 167 count >= 0 && |
168 length >= 0 && | 168 length >= 0 && |
169 count <= (length - offset); | 169 count <= (length - offset); |
170 } | 170 } |
171 }; | 171 }; |
172 | 172 |
173 } // namespace dart | 173 } // namespace dart |
174 | 174 |
175 #if defined(TARGET_OS_LINUX) | 175 #if defined(TARGET_OS_ANDROID) |
| 176 #include "platform/utils_android.h" |
| 177 #elif defined(TARGET_OS_LINUX) |
176 #include "platform/utils_linux.h" | 178 #include "platform/utils_linux.h" |
177 #elif defined(TARGET_OS_MACOS) | 179 #elif defined(TARGET_OS_MACOS) |
178 #include "platform/utils_macos.h" | 180 #include "platform/utils_macos.h" |
179 #elif defined(TARGET_OS_WINDOWS) | 181 #elif defined(TARGET_OS_WINDOWS) |
180 #include "platform/utils_win.h" | 182 #include "platform/utils_win.h" |
181 #else | 183 #else |
182 #error Unknown target os. | 184 #error Unknown target os. |
183 #endif | 185 #endif |
184 | 186 |
185 #endif // PLATFORM_UTILS_H_ | 187 #endif // PLATFORM_UTILS_H_ |
OLD | NEW |