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 |
11 #define __STDC_FORMAT_MACROS | 11 #define __STDC_FORMAT_MACROS |
12 #endif | 12 #endif |
13 | 13 |
14 #if defined(_WIN32) | 14 #if defined(_WIN32) |
15 // Cut down on the amount of stuff that gets included via windows.h. | 15 // Cut down on the amount of stuff that gets included via windows.h. |
16 #define WIN32_LEAN_AND_MEAN | 16 #define WIN32_LEAN_AND_MEAN |
17 #define NOMINMAX | 17 #define NOMINMAX |
18 #define NOKERNEL | 18 #define NOKERNEL |
19 #define NOUSER | 19 #define NOUSER |
20 #define NOSERVICE | 20 #define NOSERVICE |
21 #define NOSOUND | 21 #define NOSOUND |
22 #define NOMCX | 22 #define NOMCX |
23 | 23 #define _UNICODE |
| 24 #define UNICODE |
24 #include <windows.h> | 25 #include <windows.h> |
25 #include <winsock2.h> | 26 #include <winsock2.h> |
26 #include <Rpc.h> | 27 #include <Rpc.h> |
27 #include <shellapi.h> | 28 #include <shellapi.h> |
28 #endif | 29 #endif |
29 | 30 |
30 #if !defined(_WIN32) | 31 #if !defined(_WIN32) |
31 #include <arpa/inet.h> | 32 #include <arpa/inet.h> |
32 #include <inttypes.h> | 33 #include <inttypes.h> |
33 #include <stdint.h> | 34 #include <stdint.h> |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // have an implicit 'this' argument, the arguments of such methods | 369 // have an implicit 'this' argument, the arguments of such methods |
369 // should be counted from two, not one." | 370 // should be counted from two, not one." |
370 // | 371 // |
371 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ | 372 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ |
372 __attribute__((__format__(__printf__, string_index, first_to_check))) | 373 __attribute__((__format__(__printf__, string_index, first_to_check))) |
373 #else | 374 #else |
374 #define PRINTF_ATTRIBUTE(string_index, first_to_check) | 375 #define PRINTF_ATTRIBUTE(string_index, first_to_check) |
375 #endif | 376 #endif |
376 | 377 |
377 #endif // PLATFORM_GLOBALS_H_ | 378 #endif // PLATFORM_GLOBALS_H_ |
OLD | NEW |