Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
port.h
Go to the documentation of this file.
1 
18 #ifndef ION_PORT_OVERRIDE_BASE_PORT_H_
19 #define ION_PORT_OVERRIDE_BASE_PORT_H_
20 
22 
23 #if defined(ION_PLATFORM_ANDROID) || defined(ION_PLATFORM_GENERIC_ARM)
24 #include <cerrno> // For ENOMEM.
25 #endif
26 
28 #include <algorithm>
29 #include <bitset>
30 #include <cmath>
31 #include <iostream> // NOLINT
32 #include <set>
33 #include <string>
34 #include <vector>
35 using std::bitset;
36 using std::endl;
37 using std::max;
38 using std::min;
39 using std::set;
40 #if !defined(ION_GOOGLE_INTERNAL)
41 using std::string;
42 #endif
43 #if defined(ION_PLATFORM_ANDROID) || defined(ION_PLATFORM_GENERIC_ARM)
44 #define IS_LITTLE_ENDIAN
45 #if __ANDROID_API__ <= 9
52 using std::isinf;
53 #endif
54 #elif defined(ION_PLATFORM_NACL)
55 using std::isinf;
56 using std::isnan;
57 #endif
58 using std::swap;
59 using std::vector;
60 
61 #include "util/port.h"
62 
64 #if defined(LANG_CXX11) && defined(__clang__)
65 namespace std {
66  typedef decltype(nullptr) nullptr_t;
67 } // namespace std
68 #endif
69 
70 #if defined(ION_PLATFORM_WINDOWS)
71 #undef snprintf
74 #undef vsnprintf
75 #define snprintf _snprintf
76 #define vsnprintf _vsnprintf
77 
82 #undef CreateDirectory
83 #undef FAR
84 #undef far
85 #undef GetCurrentDirectory
86 #undef GetCurrentTime
87 #undef GetMessage
88 #undef max
89 #undef min
90 #undef NEAR
91 #undef near
92 #undef OPTIONAL
93 #undef RemoveDirectory
94 #undef RGB
95 #undef SendMessage
96 #endif // ION_PLATFORM_WINDOWS
97 
98 #endif // ION_PORT_OVERRIDE_BASE_PORT_H_