Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ONIPLATFORMWIN32_H
00022 #define ONIPLATFORMWIN32_H
00023
00024
00025
00026
00027 #ifndef WINVER // Allow use of features specific to Windows XP or later
00028 #define WINVER 0x0501
00029 #endif
00030 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later
00031 #define _WIN32_WINNT 0x0501
00032 #endif
00033 #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later
00034 #define _WIN32_WINDOWS 0x0410
00035 #endif
00036 #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later
00037 #define _WIN32_IE 0x0600
00038 #endif
00039 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
00040
00041
00042 #ifndef _CRT_SECURE_NO_DEPRECATE
00043 #define _CRT_SECURE_NO_DEPRECATE 1
00044 #endif
00045
00046
00047
00048
00049 #include <windows.h>
00050 #include <stdlib.h>
00051 #include <stdio.h>
00052 #include <malloc.h>
00053 #include <io.h>
00054 #include <time.h>
00055 #include <assert.h>
00056 #include <float.h>
00057 #include <crtdbg.h>
00058
00059 #if _MSC_VER < 1600 // Visual Studio 2008 and older doesn't have stdint.h...
00060 typedef signed char int8_t;
00061 typedef short int16_t;
00062 typedef int int32_t;
00063 typedef __int64 int64_t;
00064
00065 typedef unsigned char uint8_t;
00066 typedef unsigned short uint16_t;
00067 typedef unsigned int uint32_t;
00068 typedef unsigned __int64 uint64_t;
00069 #else
00070 #include <stdint.h>
00071 #endif
00072
00073
00074
00075
00076 #define ONI_PLATFORM ONI_PLATFORM_WIN32
00077 #define ONI_PLATFORM_STRING "Win32"
00078
00079
00080
00081
00082 #define ONI_PLATFORM_ENDIAN_TYPE ONI_PLATFORM_IS_LITTLE_ENDIAN
00083
00084 #define ONI_PLATFORM_SUPPORTS_DYNAMIC_LIBS 1
00085
00086
00087
00088
00090 #define ONI_DEFAULT_MEM_ALIGN 16
00091
00093 #define ONI_THREAD_STATIC __declspec(thread)
00094
00095
00096
00097
00099 #define ONI_FILE_MAX_PATH MAX_PATH
00100
00101
00102
00103
00105 #define ONI_STDCALL __stdcall
00106
00108 #define ONI_CALLBACK_TYPE ONI_STDCALL
00109
00111 #define ONI_C_DECL __cdecl
00112
00113
00114
00115
00117 #define ONI_TIMESTAMP __DATE__ " " __TIME__
00118
00120 #define ONI_STRINGIFY(n) ONI_STRINGIFY_HELPER(n)
00121 #define ONI_STRINGIFY_HELPER(n) #n
00122
00123
00124
00125
00127 #define ONI_API_EXPORT __declspec(dllexport)
00128
00130 #define ONI_API_IMPORT __declspec(dllimport)
00131
00133 #if _MSC_VER < 1400 // Before VS2005 there was no support for declspec deprecated...
00134 #define ONI_API_DEPRECATED(msg)
00135 #else
00136 #define ONI_API_DEPRECATED(msg) __declspec(deprecated(msg))
00137 #endif
00138
00139 #endif // ONIPLATFORMWIN32_H