OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreStdHeaders.h
Go to the documentation of this file.
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 #include "OgreFastArray.h"
41 
42 // Note - not in the original STL, but exists in SGI STL and STLport
43 // For gcc 4.3 see http://gcc.gnu.org/gcc-4.3/changes.html
44 #if (OGRE_COMPILER == OGRE_COMPILER_GNUC) && !defined(STLPORT)
45 # if OGRE_COMP_VER >= 430
46 # include <tr1/unordered_map>
47 # include <tr1/unordered_set>
48 # else
49 # include <ext/hash_map>
50 # include <ext/hash_set>
51 # endif
52 #elif (OGRE_COMPILER == OGRE_COMPILER_CLANG)
53 # if defined(_LIBCPP_VERSION)
54 # include <unordered_map>
55 # include <unordered_set>
56 # else
57 # include <tr1/unordered_map>
58 # include <tr1/unordered_set>
59 # endif
60 #elif !defined(STLPORT)
61 # if (OGRE_COMPILER == OGRE_COMPILER_MSVC) && _MSC_FULL_VER >= 150030729 // VC++ 9.0 SP1+
62 # include <unordered_map>
63 # include <unordered_set>
64 # elif OGRE_THREAD_PROVIDER == 1
65 # include <boost/unordered_map.hpp>
66 # include <boost/unordered_set.hpp>
67 # else
68 # error "Your compiler doesn't support unordered_set and unordered_map. Try to compile Ogre with Boost or STLPort."
69 # endif
70 #endif
71 
72 // STL algorithms & functions
73 #include <algorithm>
74 #include <functional>
75 #include <limits>
76 
77 // C++ Stream stuff
78 #include <fstream>
79 #include <iosfwd>
80 #include <sstream>
81 
82 #ifdef __BORLANDC__
83 namespace Ogre
84 {
85  using namespace std;
86 }
87 #endif
88 
89 extern "C" {
90 
91 # include <sys/types.h>
92 # include <sys/stat.h>
93 
94 }
95 
96 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT
97 # undef min
98 # undef max
99 # if defined( __MINGW32__ )
100 # include <unistd.h>
101 # endif
102 #endif
103 
104 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
105 extern "C" {
106 
107 # include <unistd.h>
108 # include <dlfcn.h>
109 
110 }
111 #endif
112 
113 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
114 extern "C" {
115 # include <unistd.h>
116 # include <sys/param.h>
117 # include <CoreFoundation/CoreFoundation.h>
118 }
119 #endif
120 
121 #if defined ( OGRE_GCC_VISIBILITY ) && ((OGRE_PLATFORM == OGRE_PLATFORM_APPLE && !__LP64__) && OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS)
122 # pragma GCC visibility pop
123 #endif
124 #endif