Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Side by Side Diff: runtime/platform/globals.h

Issue 353403004: Fixes Android build by using C++ math header instead of C one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/platform/floating_point_win.cc ('k') | runtime/platform/math.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 30
31 #if !defined(_WIN32) 31 #if !defined(_WIN32)
32 #include <arpa/inet.h> 32 #include <arpa/inet.h>
33 #include <inttypes.h> 33 #include <inttypes.h>
34 #include <stdint.h> 34 #include <stdint.h>
35 #include <unistd.h> 35 #include <unistd.h>
36 #endif 36 #endif
37 37
38 #include <float.h> 38 #include <float.h>
39 #include <limits.h> 39 #include <limits.h>
40 #include <math.h>
41 #include <stdarg.h> 40 #include <stdarg.h>
42 #include <stddef.h> 41 #include <stddef.h>
43 #include <stdio.h> 42 #include <stdio.h>
44 #include <stdlib.h> 43 #include <stdlib.h>
45 #include <string.h> 44 #include <string.h>
46 #include <sys/types.h> 45 #include <sys/types.h>
47 46
48 #if defined(_WIN32) 47 #if defined(_WIN32)
49 #include "platform/c99_support_win.h" 48 #include "platform/c99_support_win.h"
50 #include "platform/inttypes_support_win.h" 49 #include "platform/inttypes_support_win.h"
51 #include "platform/floating_point_win.h" 50 #include "platform/floating_point_win.h"
52 #endif 51 #endif
53 52
53 #include "platform/math.h"
54
54 #if !defined(_WIN32) 55 #if !defined(_WIN32)
55 #include "platform/floating_point.h" 56 #include "platform/floating_point.h"
56 #endif 57 #endif
57 58
58
59 // Target OS detection. 59 // Target OS detection.
60 // for more information on predefined macros: 60 // for more information on predefined macros:
61 // - http://msdn.microsoft.com/en-us/library/b0084kay.aspx 61 // - http://msdn.microsoft.com/en-us/library/b0084kay.aspx
62 // - with gcc, run: "echo | gcc -E -dM -" 62 // - with gcc, run: "echo | gcc -E -dM -"
63 #if defined(__ANDROID__) 63 #if defined(__ANDROID__)
64 #define TARGET_OS_ANDROID 1 64 #define TARGET_OS_ANDROID 1
65 #elif defined(__linux__) || defined(__FreeBSD__) 65 #elif defined(__linux__) || defined(__FreeBSD__)
66 #define TARGET_OS_LINUX 1 66 #define TARGET_OS_LINUX 1
67 #elif defined(__APPLE__) 67 #elif defined(__APPLE__)
68 #define TARGET_OS_MACOS 1 68 #define TARGET_OS_MACOS 1
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods 501 // N.B.: As the GCC manual states, "[s]ince non-static C++ methods
502 // have an implicit 'this' argument, the arguments of such methods 502 // have an implicit 'this' argument, the arguments of such methods
503 // should be counted from two, not one." 503 // should be counted from two, not one."
504 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \ 504 #define PRINTF_ATTRIBUTE(string_index, first_to_check) \
505 __attribute__((__format__(__printf__, string_index, first_to_check))) 505 __attribute__((__format__(__printf__, string_index, first_to_check)))
506 #else 506 #else
507 #define PRINTF_ATTRIBUTE(string_index, first_to_check) 507 #define PRINTF_ATTRIBUTE(string_index, first_to_check)
508 #endif 508 #endif
509 509
510 #endif // PLATFORM_GLOBALS_H_ 510 #endif // PLATFORM_GLOBALS_H_
OLDNEW
« no previous file with comments | « runtime/platform/floating_point_win.cc ('k') | runtime/platform/math.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698