00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KEOS_PLATFORM_H
00023 #define KEOS_PLATFORM_H
00024
00025 #include "KeosConfig.h"
00026
00027 namespace Keos
00028 {
00029
00030
00031
00032 #define KEOS_PLATFORM_WIN32 1
00033
00034 #define KEOS_COMPILER_MSVC 1
00035 #define KEOS_COMPILER_GNUC 2
00036
00037
00038
00039 #if defined( _MSC_VER )
00040 # define KEOS_COMPILER KEOS_COMPILER_MSVC
00041 # define KEOS_COMP_VER _MSC_VER
00042
00043 #elif defined( __GNUC__ )
00044 # define KEOS_COMPILER KEOS_COMPILER_GNUC
00045 # define KEOS_COMP_VER (((__GNUC__)*100)+__GNUC_MINOR__)
00046
00047 #else
00048 # pragma error "Work only under MSVC or GNU compiler !!"
00049
00050 #endif
00051
00052 #define MSVC_VER_6 1200
00053 #define MSVC_VER_7 1300
00054
00055
00056
00057 #if defined( __WIN32__ ) || defined( _WIN32 )
00058 # define KEOS_PLATFORM KEOS_PLATFORM_WIN32
00059 #else
00060 # pragma error "Work only under Windows system !!"
00061 #endif
00062
00063
00064
00065
00066 #define KEOS_QUOTE_INPLACE(x) # x
00067 #define KEOS_QUOTE(x) KEOS_QUOTE_INPLACE(x)
00068 #define KEOS_WARN( x ) message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )
00069
00070
00071
00072 #if KEOS_PLATFORM == KEOS_PLATFORM_WIN32
00073
00074
00075
00076 # if defined( __MINGW32__ )
00077
00078 # define KEOS_EXPORT
00079 # else
00080 # if defined( KEOSENGINE_EXPORTS )
00081 # define KEOS_EXPORT __declspec( dllexport )
00082 # else
00083 # define KEOS_EXPORT __declspec( dllimport )
00084 # endif
00085 # endif
00086
00087
00088 # ifdef _DEBUG
00089 # define KEOS_DEBUG_MODE 1
00090 # else
00091 # define KEOS_DEBUG_MODE 0
00092 # endif
00093
00094 #if defined( __MINGW32__ )
00095 #define GCC_3_1
00096 #define EXT_HASH
00097 #else
00098 #define snprintf _snprintf
00099 #define vsnprintf _vsnprintf
00100 #endif
00101
00102 #if KEOS_DEBUG_MODE
00103 #define KEOS_PLATFORM_LIB "PlatformManager_Win32_d.dll"
00104 #else
00105 #define KEOS_PLATFORM_LIB "PlatformManager_Win32.dll"
00106 #endif
00107
00108 #endif
00109
00110 #if KEOS_COMPILER == KEOS_COMPILER_MSVC
00111
00112
00113
00114 # pragma warning (disable : 4786)
00115
00116
00117
00118 # pragma warning (disable : 4503)
00119
00120
00121 # pragma warning (disable : 4244)
00122
00123
00124 # pragma warning (disable : 4305)
00125
00126
00127
00128 # pragma warning (disable : 4251)
00129
00130
00131
00132
00133 # pragma warning (disable : 4275)
00134
00135
00136
00137
00138 # pragma warning( disable : 4290 )
00139
00140
00141
00142
00143 # pragma warning( disable: 4661)
00144
00145
00146
00147
00148
00149
00150 # pragma warning( disable: 4996)
00151 #endif
00152
00153 #if KEOS_COMPILER == KEOS_COMPILER_MSVC
00154 # undef _DEFINE_DEPRECATED_HASH_CLASSES
00155 # if KEOS_COMP_VER > MSVC_VER_7
00156 # define _DEFINE_DEPRECATED_HASH_CLASSES 0
00157 # else
00158 # define _DEFINE_DEPRECATED_HASH_CLASSES 1
00159 # endif
00160 #endif
00161
00162 }
00163
00164 #endif // KEOS_PLATFORM_H