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 #else
    00059 #   if (OGRE_COMPILER == OGRE_COMPILER_MSVC) && !defined(STLPORT) && OGRE_COMP_VER >= 1600 // VC++ 10.0
    00060 #       include <unordered_map>
    00061 #       include <unordered_set>
    00062 #   else
    00063 #       include <hash_set>
    00064 #       include <hash_map>
    00065 #   endif
    00066 #endif
    00067
    00068 // STL algorithms & functions
    00069 #include <algorithm>
    00070 #include <functional>
    00071 #include <limits>
    00072
    00073 // C++ Stream stuff
    00074 #include <fstream>
    00075 #include <iostream>
    00076 #include <iomanip>
    00077 #include <sstream>
    00078
    00079 #ifdef __BORLANDC__
    00080 namespace Ogre
    00081 {
    00082     using namespace std;
    00083 }
    00084 #endif
    00085
    00086 extern "C" {
    00087
    00088 #   include <sys/types.h>
    00089 #   include <sys/stat.h>
    00090
    00091 }
    00092
    00093 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
    00094 #  undef min
    00095 #  undef max
    00096 #  if defined( __MINGW32__ )
    00097 #    include <unistd.h>
    00098 #  endif
    00099 #endif
    00100
    00101 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
    00102 extern "C" {
    00103
    00104 #   include <unistd.h>
    00105 #   include <dlfcn.h>
    00106
    00107 }
    00108 #endif
    00109
    00110 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
    00111 extern "C" {
    00112 #   include <unistd.h>
    00113 #   include <sys/param.h>
    00114 #   include <CoreFoundation/CoreFoundation.h>
    00115 }
    00116 #endif
    00117
    00118 #if OGRE_THREAD_SUPPORT
    00119 #   if !defined(NOMINMAX) && defined(_MSC_VER)
    00120 #       define NOMINMAX // required to stop windows.h messing up std::min
    00121 #   endif
    00122 #   include "Threading/OgreThreadHeaders.h"
    00123 #endif
    00124
    00125 #if defined ( OGRE_GCC_VISIBILITY ) && ((OGRE_PLATFORM == OGRE_PLATFORM_APPLE && !__LP64__) && OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS)
    00126 #   pragma GCC visibility pop
    00127 #endif
    00128 #endif

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:24