00001
00002 #ifndef _ODE_CONFIG_H_
00003 #define _ODE_CONFIG_H_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #define dSINGLE
00025
00026
00027 #define dTRIMESH_ENABLED 1
00028 #define dTRIMESH_OPCODE 1
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #if defined(_XENON)
00042 #define ODE_PLATFORM_XBOX360
00043 #elif defined(SN_TARGET_PSP_HW)
00044 #define ODE_PLATFORM_PSP
00045 #elif defined(SN_TARGET_PS3)
00046 #define ODE_PLATFORM_PS3
00047 #elif defined(_MSC_VER) || defined(__CYGWIN32__) || defined(__MINGW32__)
00048 #define ODE_PLATFORM_WINDOWS
00049 #elif defined(__linux__)
00050 #define ODE_PLATFORM_LINUX
00051 #elif defined(__APPLE__) && defined(__MACH__)
00052 #define ODE_PLATFORM_OSX
00053 #else
00054 #error "Need some help identifying the platform!"
00055 #endif
00056
00057
00058 #if defined(ODE_PLATFORM_WINDOWS) && !defined(WIN32)
00059 #define WIN32
00060 #endif
00061
00062 #if defined(__CYGWIN32__) || defined(__MINGW32__)
00063 #define CYGWIN
00064 #endif
00065
00066 #if defined(ODE_PLATFORM_OSX)
00067 #define macintosh
00068 #endif
00069
00070
00071
00072 #if defined(ODE_PLATFORM_WINDOWS)
00073 #if defined(ODE_DLL)
00074 #define ODE_API __declspec(dllexport)
00075 #elif !defined(ODE_LIB)
00076 #define ODE_DLL_API __declspec(dllimport)
00077 #endif
00078 #endif
00079
00080 #if !defined(ODE_API)
00081 #define ODE_API
00082 #endif
00083
00084
00085
00086 #include <stdio.h>
00087 #include <stdlib.h>
00088 #include <stdarg.h>
00089 #include <math.h>
00090 #include <string.h>
00091 #include <float.h>
00092
00093 #if !defined(ODE_PLATFORM_PS3)
00094 #include <stdlib.h>
00095 #endif
00096
00097 #if !defined(ODE_PLATFORM_WINDOWS)
00098 #include <alloca.h>
00099 #endif
00100
00101
00102
00103 #if defined(_MSC_VER)
00104 #define copysignf _copysign
00105 #define copysign _copysign
00106 #endif
00107
00108
00109
00110 #if defined(HUGE_VALF)
00111 #define ODE_INFINITY4 HUGE_VALF
00112 #define ODE_INFINITY8 HUGE_VAL
00113 #elif defined(FLT_MAX)
00114 #define ODE_INFINITY4 FLT_MAX
00115 #define ODE_INFINITY8 DBL_MAX
00116 #else
00117 static union { unsigned char __c[4]; float __f; } __ode_huge_valf = {{0,0,0x80,0x7f}};
00118 static union { unsigned char __c[8]; double __d; } __ode_huge_val = {{0,0,0,0,0,0,0xf0,0x7f}};
00119 #define ODE_INFINITY4 (__ode_huge_valf.__f)
00120 #define ODE_INFINITY8 (__ode_huge_val.__d)
00121 #endif
00122
00123 #ifdef dSINGLE
00124 #define dInfinity ODE_INFINITY4
00125 #define dEpsilon FLT_EPSILON
00126 #else
00127 #define dInfinity ODE_INFINITY8
00128 #define dEpsilon DBL_EPSILON
00129 #endif
00130
00131
00132
00133 #if defined(_M_IA64) || defined(__ia64__) || defined(_M_AMD64) || defined(__x86_64__)
00134 #define X86_64_SYSTEM 1
00135 typedef int int32;
00136 typedef unsigned int uint32;
00137 typedef short int16;
00138 typedef unsigned short uint16;
00139 typedef char int8;
00140 typedef unsigned char uint8;
00141 #else
00142 typedef int int32;
00143 typedef unsigned int uint32;
00144 typedef short int16;
00145 typedef unsigned short uint16;
00146 typedef char int8;
00147 typedef unsigned char uint8;
00148 #endif
00149
00150
00151
00152 typedef size_t intP;
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162 #define EFFICIENT_ALIGNMENT 16
00163
00164
00165
00166 #define MMAP_ANONYMOUS
00167
00168 #endif