- 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  *   dTRIMESH_ENABLED  - enable/disable trimesh support
    00014  *
    00015  ******************************************************************/
    00016
    00017 #define dSINGLE 1
    00018
    00019 #define dTRIMESH_ENABLED 1
    00020
    00021
    00022
    00023 /******************************************************************
    00024  * SYSTEM SETTINGS - you shouldn't need to change these. If you
    00025  *   run into an issue with these settings, please report it to
    00026  *   the ODE bug tracker at:
    00027  *      http://sf.net/tracker/?group_id=24884&atid=382799
    00028  ******************************************************************/
    00029
    00030 /* Try to identify the platform */
    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 /* Additional platform defines used in the code */
    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 /* Define a DLL export symbol for those platforms that need it */
    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 /* Pull in the standard headers */
    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 /* Visual C does not define these functions */
    00084 #if defined(_MSC_VER)
    00085   #define copysignf _copysign
    00086   #define copysign _copysign
    00087 #endif
    00088
    00089
    00090 /* Define a value for infinity */
    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 /* Well-defined common data types...need to define for 64 bit systems */
    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 /* An integer type that can be safely cast to a pointer. This definition
    00132  * should be safe even on 64-bit systems */
    00133 typedef size_t intP;
    00134
    00135
    00136 /* The efficient alignment. most platforms align data structures to some
    00137  * number of bytes, but this is not always the most efficient alignment.
    00138  * for example, many x86 compilers align to 4 bytes, but on a pentium it is
    00139  * important to align doubles to 8 byte boundaries (for speed), and the 4
    00140  * floats in a SIMD register to 16 byte boundaries. many other platforms have
    00141  * similar behavior. setting a larger alignment can waste a (very) small
    00142  * amount of memory. NOTE: this number must be a power of two. */
    00143 #define EFFICIENT_ALIGNMENT 16
    00144
    00145
    00146 /* Define this if your system supports anonymous memory maps (linux does) */
    00147 #define MMAP_ANONYMOUS
    00148
    00149 #endif