- Main Page
- Modules
- Data Structures
- Files

# config.h

    00001 /* This file was autogenerated by Premake */
    00002 #ifndef _ODE_CONFIG_H_
    00003 #define _ODE_CONFIG_H_
    00004
    00005
    00006 /******************************************************************
    00007  * CONFIGURATON SETTINGS - you can change these, and then rebuild
    00008  *   ODE to modify the behavior of the library.
    00009  *
    00010  *   dSINGLE/dDOUBLE   - force ODE to use single-precision (float)
    00011  *                       or double-precision (double) for numbers
    00012  *
    00013  *   dCYLINDER_ENABLED - enable/disable cylinder support
    00014  *
    00015  *   dTRIMESH_ENABLED  - enable/disable trimesh support
    00016  *
    00017  ******************************************************************/
    00018
    00019 #define dSINGLE 1
    00020
    00021 #define dCYLINDER_ENABLED 1
    00022
    00023 #define dTRIMESH_ENABLED 1
    00024
    00025
    00026
    00027 /******************************************************************
    00028  * SYSTEM SETTINGS - you shouldn't need to change these. If you
    00029  *   run into an issue with these settings, please report it to
    00030  *   the ODE bug tracker at:
    00031  *      http://sf.net/tracker/?group_id=24884&atid=382799
    00032  ******************************************************************/
    00033
    00034 /* Try to identify the platform */
    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 /* Additional platform defines used in the code */
    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 /* Define a DLL export symbol for those platforms that need it */
    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 /* Pull in the standard headers */
    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 /* Visual C does not define these functions */
    00088 #if defined(_MSC_VER)
    00089   #define copysignf _copysign
    00090   #define copysign _copysign
    00091 #endif
    00092
    00093
    00094 /* Define a value for infinity */
    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 /* Well-defined common data types...need to define for 64 bit systems */
    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 /* An integer type that can be safely cast to a pointer. This definition
    00136  * should be safe even on 64-bit systems */
    00137 typedef size_t intP;
    00138
    00139
    00140 /* The efficient alignment. most platforms align data structures to some
    00141  * number of bytes, but this is not always the most efficient alignment.
    00142  * for example, many x86 compilers align to 4 bytes, but on a pentium it is
    00143  * important to align doubles to 8 byte boundaries (for speed), and the 4
    00144  * floats in a SIMD register to 16 byte boundaries. many other platforms have
    00145  * similar behavior. setting a larger alignment can waste a (very) small
    00146  * amount of memory. NOTE: this number must be a power of two. */
    00147 #define EFFICIENT_ALIGNMENT 16
    00148
    00149
    00150 /* Define this if your system supports anonymous memory maps (linux does) */
    00151 #define MMAP_ANONYMOUS
    00152
    00153 #endif