Răsfoiți Sursa

Assimp cleanups.

Mark Sibly 8 ani în urmă
părinte
comite
531046e0dd

+ 3 - 1
modules/assimp/assimp/MARKS_FIXES.TXT

@@ -1,2 +1,4 @@
 
-Tweaked include/assimp.config.h to #define some stuff like BUILD_DLL etc.
+Tweaked include/assimp.config.h to #define some stuff like BUILD_DLL etc.
+
+Changed pushpack1.h to use __MINGW32__ instead of HOST_MINGW

+ 3 - 5
modules/assimp/assimp/include/assimp/Compiler/poppack1.h

@@ -13,12 +13,10 @@
 #	error pushpack1.h must be included after poppack1.h
 #endif
 
-#ifdef _MSC_VER
-#	pragma pack(pop)
-#else
-#	pragma pack()
+// reset packing to the original value
+#if defined(_MSC_VER) ||  defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+#	pragma pack( pop )
 #endif
-
 #undef PACK_STRUCT
 
 #undef AI_PUSHPACK_IS_DEFINED

+ 8 - 3
modules/assimp/assimp/include/assimp/Compiler/pushpack1.h

@@ -22,12 +22,17 @@
 #	error poppack1.h must be included after pushpack1.h
 #endif
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) ||  defined(__BORLANDC__) ||	defined (__BCPLUSPLUS__)
 #	pragma pack(push,1)
 #	define PACK_STRUCT
+#elif defined( __GNUC__ )
+#	if !defined(__MINGW32__)
+#		define PACK_STRUCT	__attribute__((__packed__))
+#	else
+#		define PACK_STRUCT	__attribute__((gcc_struct, __packed__))
+#	endif
 #else
-#	pragma pack(1)
-#	define PACK_STRUCT
+#	error Compiler not supported
 #endif
 
 #if defined(_MSC_VER)