OgreStdHeaders.h
Go to the documentation of this file.
00001 #ifndef __StdHeaders_H__
00002 #define __StdHeaders_H__
00003 
00004 #ifdef __BORLANDC__
00005     #define __STD_ALGORITHM
00006 #endif
00007 
00008 #if defined ( OGRE_GCC_VISIBILITY ) && ((OGRE_PLATFORM == OGRE_PLATFORM_APPLE && !__LP64__) && OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS)
00009 /* Until libstdc++ for gcc 4.2 is released, we have to declare all
00010  * symbols in libstdc++.so externally visible, otherwise we end up
00011  * with them marked as hidden by -fvisible=hidden.
00012  *
00013  * See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20218
00014  *
00015  * Due to a more strict linker included with Xcode 4, this is disabled on Mac OS X and iOS.
00016  * The reason? It changes the visibility of Boost functions.  The mismatch between visibility Boost when used in Ogre (default)
00017  * and Boost when compiled (hidden) results in mysterious link errors such as "Bad codegen, pointer diff".
00018  */
00019 #   pragma GCC visibility push(default)
00020 #endif
00021 
00022 #include <cassert>
00023 #include <cstdio>
00024 #include <cstdlib>
00025 #include <ctime>
00026 #include <cstring>
00027 #include <cstdarg>
00028 #include <cmath>
00029 
00030 // STL containers
00031 #include <vector>
00032 #include <map>
00033 #include <string>
00034 #include <set>
00035 #include <list>
00036 #include <deque>
00037 #include <queue>
00038 #include <bitset>
00039 
00040 // Note - not in the original STL, but exists in SGI STL and STLport
00041 // For gcc 4.3 see http://gcc.gnu.org/gcc-4.3/changes.html
00042 #if (OGRE_COMPILER == OGRE_COMPILER_GNUC) && !defined(STLPORT)
00043 #   if OGRE_COMP_VER >= 430
00044 #       include <tr1/unordered_map>
00045 #       include <tr1/unordered_set> 
00046 #   else
00047 #       include <ext/hash_map>
00048 #       include <ext/hash_set>
00049 #   endif
00050 #elif (OGRE_COMPILER == OGRE_COMPILER_CLANG)
00051 #   if defined(_LIBCPP_VERSION)
00052 #       include <unordered_map>
00053 #       include <unordered_set>
00054 #   else
00055 #       include <tr1/unordered_map>
00056 #       include <tr1/unordered_set>
00057 #   endif
00058 #elif !defined(STLPORT)
00059 #   if (OGRE_COMPILER == OGRE_COMPILER_MSVC) && _MSC_FULL_VER >= 150030729 // VC++ 9.0 SP1+
00060 #       include <unordered_map>
00061 #       include <unordered_set>
00062 #   elif OGRE_THREAD_PROVIDER == 1
00063 #       include <boost/unordered_map.hpp>
00064 #       include <boost/unordered_set.hpp>
00065 #   else
00066 #       error "Your compiler doesn't support unordered_set and unordered_map. Try to compile Ogre with Boost or STLPort."
00067 #   endif
00068 #endif 
00069 
00070 // STL algorithms & functions
00071 #include <algorithm>
00072 #include <functional>
00073 #include <limits>
00074 
00075 // C++ Stream stuff
00076 #include <fstream>
00077 #include <iostream>
00078 #include <iomanip>
00079 #include <sstream>
00080 
00081 #ifdef __BORLANDC__
00082 namespace Ogre
00083 {
00084     using namespace std;
00085 }
00086 #endif
00087 
00088 extern "C" {
00089 
00090 #   include <sys/types.h>
00091 #   include <sys/stat.h>
00092 
00093 }
00094 
00095 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT
00096 #  undef min
00097 #  undef max
00098 #  if defined( __MINGW32__ )
00099 #    include <unistd.h>
00100 #  endif
00101 #endif
00102 
00103 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
00104 extern "C" {
00105 
00106 #   include <unistd.h>
00107 #   include <dlfcn.h>
00108 
00109 }
00110 #endif
00111 
00112 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
00113 extern "C" {
00114 #   include <unistd.h>
00115 #   include <sys/param.h>
00116 #   include <CoreFoundation/CoreFoundation.h>
00117 }
00118 #endif
00119 
00120 #if defined ( OGRE_GCC_VISIBILITY ) && ((OGRE_PLATFORM == OGRE_PLATFORM_APPLE && !__LP64__) && OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS)
00121 #   pragma GCC visibility pop
00122 #endif
00123 #endif

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Mon Jul 27 2020 13:40:47