1 | #ifndef __StdHeaders_H__ |
---|
2 | #define __StdHeaders_H__ |
---|
3 | |
---|
4 | #ifdef __BORLANDC__ |
---|
5 | #define __STD_ALGORITHM |
---|
6 | #endif |
---|
7 | |
---|
8 | #if defined ( OGRE_GCC_VISIBILITY ) && ((OGRE_PLATFORM == OGRE_PLATFORM_APPLE && !__LP64__) && OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS) |
---|
9 | /* Until libstdc++ for gcc 4.2 is released, we have to declare all |
---|
10 | * symbols in libstdc++.so externally visible, otherwise we end up |
---|
11 | * with them marked as hidden by -fvisible=hidden. |
---|
12 | * |
---|
13 | * See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20218 |
---|
14 | * |
---|
15 | * Due to a more strict linker included with Xcode 4, this is disabled on Mac OS X and iOS. |
---|
16 | * The reason? It changes the visibility of Boost functions. The mismatch between visibility Boost when used in Ogre (default) |
---|
17 | * and Boost when compiled (hidden) results in mysterious link errors such as "Bad codegen, pointer diff". |
---|
18 | */ |
---|
19 | # pragma GCC visibility push(default) |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <cassert> |
---|
23 | #include <cstdio> |
---|
24 | #include <cstdlib> |
---|
25 | #include <ctime> |
---|
26 | #include <cstring> |
---|
27 | #include <cstdarg> |
---|
28 | #include <cmath> |
---|
29 | |
---|
30 | // STL containers |
---|
31 | #include <vector> |
---|
32 | #include <map> |
---|
33 | #include <string> |
---|
34 | #include <set> |
---|
35 | #include <list> |
---|
36 | #include <deque> |
---|
37 | #include <queue> |
---|
38 | #include <bitset> |
---|
39 | |
---|
40 | // Note - not in the original STL, but exists in SGI STL and STLport |
---|
41 | // For gcc 4.3 see http://gcc.gnu.org/gcc-4.3/changes.html |
---|
42 | #if (OGRE_COMPILER == OGRE_COMPILER_GNUC) && !defined(STLPORT) |
---|
43 | # if OGRE_COMP_VER >= 430 |
---|
44 | # include <tr1/unordered_map> |
---|
45 | # include <tr1/unordered_set> |
---|
46 | # else |
---|
47 | # include <ext/hash_map> |
---|
48 | # include <ext/hash_set> |
---|
49 | # endif |
---|
50 | #elif (OGRE_COMPILER == OGRE_COMPILER_CLANG) |
---|
51 | # if defined(_LIBCPP_VERSION) |
---|
52 | # include <unordered_map> |
---|
53 | # include <unordered_set> |
---|
54 | # else |
---|
55 | # include <tr1/unordered_map> |
---|
56 | # include <tr1/unordered_set> |
---|
57 | # endif |
---|
58 | #elif !defined(STLPORT) |
---|
59 | # if (OGRE_COMPILER == OGRE_COMPILER_MSVC) && _MSC_FULL_VER >= 150030729 // VC++ 9.0 SP1+ |
---|
60 | # include <unordered_map> |
---|
61 | # include <unordered_set> |
---|
62 | # elif OGRE_THREAD_PROVIDER == 1 |
---|
63 | # include <boost/unordered_map.hpp> |
---|
64 | # include <boost/unordered_set.hpp> |
---|
65 | # else |
---|
66 | # error "Your compiler doesn't support unordered_set and unordered_map. Try to compile Ogre with Boost or STLPort." |
---|
67 | # endif |
---|
68 | #endif |
---|
69 | |
---|
70 | // STL algorithms & functions |
---|
71 | #include <algorithm> |
---|
72 | #include <functional> |
---|
73 | #include <limits> |
---|
74 | |
---|
75 | // C++ Stream stuff |
---|
76 | #include <fstream> |
---|
77 | #include <iostream> |
---|
78 | #include <iomanip> |
---|
79 | #include <sstream> |
---|
80 | |
---|
81 | #ifdef __BORLANDC__ |
---|
82 | namespace Ogre |
---|
83 | { |
---|
84 | using namespace std; |
---|
85 | } |
---|
86 | #endif |
---|
87 | |
---|
88 | extern "C" { |
---|
89 | |
---|
90 | # include <sys/types.h> |
---|
91 | # include <sys/stat.h> |
---|
92 | |
---|
93 | } |
---|
94 | |
---|
95 | #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT |
---|
96 | # undef min |
---|
97 | # undef max |
---|
98 | # if defined( __MINGW32__ ) |
---|
99 | # include <unistd.h> |
---|
100 | # endif |
---|
101 | #endif |
---|
102 | |
---|
103 | #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID |
---|
104 | extern "C" { |
---|
105 | |
---|
106 | # include <unistd.h> |
---|
107 | # include <dlfcn.h> |
---|
108 | |
---|
109 | } |
---|
110 | #endif |
---|
111 | |
---|
112 | #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS |
---|
113 | extern "C" { |
---|
114 | # include <unistd.h> |
---|
115 | # include <sys/param.h> |
---|
116 | # include <CoreFoundation/CoreFoundation.h> |
---|
117 | } |
---|
118 | #endif |
---|
119 | |
---|
120 | #if defined ( OGRE_GCC_VISIBILITY ) && ((OGRE_PLATFORM == OGRE_PLATFORM_APPLE && !__LP64__) && OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS) |
---|
121 | # pragma GCC visibility pop |
---|
122 | #endif |
---|
123 | #endif |
---|