== SoC Bullet - Bullet Upgrade to 2.76 ==
[blender.git] / extern / bullet2 / BulletMultiThreaded / PlatformDefinitions.h
1 #ifndef TYPE_DEFINITIONS_H
2 #define TYPE_DEFINITIONS_H
3
4 ///This file provides some platform/compiler checks for common definitions
5
6 #ifdef _WIN32
7
8 typedef union
9 {
10   unsigned int u;
11   void *p;
12 } addr64;
13
14 #define USE_WIN32_THREADING 1
15
16                 #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
17                 #else
18                 #endif //__MINGW32__
19
20                 typedef unsigned char     uint8_t;
21 #ifndef __PHYSICS_COMMON_H__
22 #ifndef __BT_SKIP_UINT64_H
23                 typedef unsigned long int uint64_t;
24 #endif //__BT_SKIP_UINT64_H
25                 typedef unsigned int      uint32_t;
26 #endif //__PHYSICS_COMMON_H__
27                 typedef unsigned short    uint16_t;
28
29                 #include <malloc.h>
30                 #define memalign(alignment, size) malloc(size);
31                         
32 #include <string.h> //memcpy
33
34                 
35
36                 #include <stdio.h>              
37                 #define spu_printf printf
38                 
39 #else
40                 #include <stdint.h>
41                 #include <stdlib.h>
42                 #include <string.h> //for memcpy
43
44 #if defined     (__CELLOS_LV2__)
45         // Playstation 3 Cell SDK
46 #include <spu_printf.h>
47                 
48 #else
49         // posix system
50
51 #define USE_PTHREADS    (1)
52
53 #ifdef USE_LIBSPE2
54 #include <stdio.h>              
55 #define spu_printf printf       
56 #define DWORD unsigned int
57                 
58                         typedef union
59                         {
60                           unsigned long long ull;
61                           unsigned int ui[2];
62                           void *p;
63                         } addr64;
64                 
65                 
66 #else
67
68 #include <stdio.h>              
69 #define spu_printf printf       
70
71 #endif // USE_LIBSPE2
72         
73 #endif  //__CELLOS_LV2__
74         
75 #endif
76
77
78 /* Included here because we need uint*_t typedefs */
79 #include "PpuAddressSpace.h"
80
81 #endif //TYPE_DEFINITIONS_H
82
83
84