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