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