| 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 to enable platform independent printf. | 8 // __STDC_FORMAT_MACROS has to be defined to enable platform independent printf. |
| 9 #ifndef __STDC_FORMAT_MACROS | 9 #ifndef __STDC_FORMAT_MACROS |
| 10 #define __STDC_FORMAT_MACROS | 10 #define __STDC_FORMAT_MACROS |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #if defined(_WIN32) | 13 #if defined(_WIN32) |
| 14 // Cut down on the amount of stuff that gets included via windows.h. | 14 // Cut down on the amount of stuff that gets included via windows.h. |
| 15 #define WIN32_LEAN_AND_MEAN | 15 #define WIN32_LEAN_AND_MEAN |
| 16 #define NOMINMAX | 16 #define NOMINMAX |
| 17 #define NOKERNEL | 17 #define NOKERNEL |
| 18 #define NOUSER | 18 #define NOUSER |
| 19 #define NOSERVICE | 19 #define NOSERVICE |
| 20 #define NOSOUND | 20 #define NOSOUND |
| 21 #define NOMCX | 21 #define NOMCX |
| 22 | 22 |
| 23 #include <windows.h> | 23 #include <windows.h> |
| 24 #include <Rpc.h> | 24 #include <Rpc.h> |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 #if !defined(_WIN32) | 27 #if !defined(_WIN32) |
| 28 #include <inttypes.h> | 28 #include <inttypes.h> |
| 29 #include <stdint.h> |
| 29 #include <unistd.h> | 30 #include <unistd.h> |
| 30 #endif | 31 #endif |
| 31 | 32 |
| 32 #include <float.h> | 33 #include <float.h> |
| 33 #include <limits.h> | 34 #include <limits.h> |
| 34 #include <math.h> | 35 #include <math.h> |
| 35 #include <stdarg.h> | 36 #include <stdarg.h> |
| 36 #include <stddef.h> | 37 #include <stddef.h> |
| 37 #include <stdint.h> | |
| 38 #include <stdio.h> | 38 #include <stdio.h> |
| 39 #include <stdlib.h> | 39 #include <stdlib.h> |
| 40 #include <string.h> | 40 #include <string.h> |
| 41 #include <sys/types.h> | 41 #include <sys/types.h> |
| 42 #include <cstdlib> | 42 #include <cstdlib> |
| 43 #include <sstream> | 43 #include <sstream> |
| 44 | 44 |
| 45 #if defined(_WIN32) | 45 #if defined(_WIN32) |
| 46 #include "platform/c99_support_win.h" | 46 #include "platform/c99_support_win.h" |
| 47 #include "platform/inttypes_support_win.h" | 47 #include "platform/inttypes_support_win.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 // separate lines with body in {}s). | 337 // separate lines with body in {}s). |
| 338 # define TEMP_FAILURE_RETRY(expression) \ | 338 # define TEMP_FAILURE_RETRY(expression) \ |
| 339 ({ int64_t __result; \ | 339 ({ int64_t __result; \ |
| 340 do { \ | 340 do { \ |
| 341 __result = (int64_t) (expression); \ | 341 __result = (int64_t) (expression); \ |
| 342 } while (__result == -1L && errno == EINTR); \ | 342 } while (__result == -1L && errno == EINTR); \ |
| 343 __result; }) | 343 __result; }) |
| 344 #endif | 344 #endif |
| 345 | 345 |
| 346 #endif // PLATFORM_GLOBALS_H_ | 346 #endif // PLATFORM_GLOBALS_H_ |
| OLD | NEW |