Initialize libbullet git in 2.0_beta.
[platform/upstream/libbullet.git] / Extras / PhysicsEffects / src / util / pfx_util_common.h
1 /*\r
2 Physics Effects Copyright(C) 2010 Sony Computer Entertainment Inc.\r
3 All rights reserved.\r
4 \r
5 Physics Effects is open software; you can redistribute it and/or\r
6 modify it under the terms of the BSD License.\r
7 \r
8 Physics Effects is distributed in the hope that it will be useful,\r
9 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
11 See the BSD License for more details.\r
12 \r
13 A copy of the BSD License is distributed with\r
14 Physics Effects under the filename: physics_effects_license.txt\r
15 */\r
16 \r
17 #ifndef _SCE_PFX_UTIL_COMMON_H\r
18 #define _SCE_PFX_UTIL_COMMON_H\r
19 \r
20 #include <string.h>\r
21 \r
22 #ifdef _WIN32\r
23         #define SCE_PFX_UTIL_ALLOC(align,size) _aligned_malloc(size,align)\r
24         #define SCE_PFX_UTIL_REALLOC(ptr,align,size) _aligned_realloc(ptr,size,align)\r
25         #define SCE_PFX_UTIL_FREE(ptr) if(ptr) {_aligned_free(ptr);ptr=NULL;}\r
26 #else\r
27         #define SCE_PFX_UTIL_ALLOC(align,size) malloc(size)\r
28         #define SCE_PFX_UTIL_REALLOC(ptr,align,size) realloc(ptr,size)\r
29         #define SCE_PFX_UTIL_FREE(ptr) if(ptr) {free(ptr);ptr=NULL;}\r
30 #endif\r
31 \r
32 #endif // _SCE_PFX_UTIL_COMMON_H\r