blender/extern/bullet2/patches/make_id.patch
Sergey Sharybin a7a79322bf Make blender compilable by gcc-4.7 and strict compilation flags:
- Remove strict flags from files, which are using FFmpeg stuff
  We're still using some symbols which are marked as deprecated.
  Ideally, we shall switch to new API, but it's a bit larger challenge
  because we don't want to break compatibility withotu actual need.
- Replace MAKE_ID with BT_MAKE_ID in bullet library.
  This is needed to prevent re-definition of MAKE_ID in bullet library.
  Seems it's only used to read blender files, so should be quite safe
  change.
2012-05-14 13:31:38 +00:00

43 lines
2.0 KiB
Diff

Index: src/LinearMath/btSerializer.h
===================================================================
--- src/LinearMath/btSerializer.h (revision 46625)
+++ src/LinearMath/btSerializer.h (working copy)
@@ -106,23 +106,23 @@
#define BT_HEADER_LENGTH 12
#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
-# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+# define BT_MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
#else
-# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+# define BT_MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
#endif
-#define BT_SOFTBODY_CODE MAKE_ID('S','B','D','Y')
-#define BT_COLLISIONOBJECT_CODE MAKE_ID('C','O','B','J')
-#define BT_RIGIDBODY_CODE MAKE_ID('R','B','D','Y')
-#define BT_CONSTRAINT_CODE MAKE_ID('C','O','N','S')
-#define BT_BOXSHAPE_CODE MAKE_ID('B','O','X','S')
-#define BT_QUANTIZED_BVH_CODE MAKE_ID('Q','B','V','H')
-#define BT_TRIANLGE_INFO_MAP MAKE_ID('T','M','A','P')
-#define BT_SHAPE_CODE MAKE_ID('S','H','A','P')
-#define BT_ARRAY_CODE MAKE_ID('A','R','A','Y')
-#define BT_SBMATERIAL_CODE MAKE_ID('S','B','M','T')
-#define BT_SBNODE_CODE MAKE_ID('S','B','N','D')
-#define BT_DNA_CODE MAKE_ID('D','N','A','1')
+#define BT_SOFTBODY_CODE BT_MAKE_ID('S','B','D','Y')
+#define BT_COLLISIONOBJECT_CODE BT_MAKE_ID('C','O','B','J')
+#define BT_RIGIDBODY_CODE BT_MAKE_ID('R','B','D','Y')
+#define BT_CONSTRAINT_CODE BT_MAKE_ID('C','O','N','S')
+#define BT_BOXSHAPE_CODE BT_MAKE_ID('B','O','X','S')
+#define BT_QUANTIZED_BVH_CODE BT_MAKE_ID('Q','B','V','H')
+#define BT_TRIANLGE_INFO_MAP BT_MAKE_ID('T','M','A','P')
+#define BT_SHAPE_CODE BT_MAKE_ID('S','H','A','P')
+#define BT_ARRAY_CODE BT_MAKE_ID('A','R','A','Y')
+#define BT_SBMATERIAL_CODE BT_MAKE_ID('S','B','M','T')
+#define BT_SBNODE_CODE BT_MAKE_ID('S','B','N','D')
+#define BT_DNA_CODE BT_MAKE_ID('D','N','A','1')
struct btPointerUid