[#25815] Patch gcc 4.6
authorCampbell Barton <ideasman42@gmail.com>
Thu, 27 Jan 2011 00:02:25 +0000 (00:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 27 Jan 2011 00:02:25 +0000 (00:02 +0000)
with minor edits, made sure it works in CMake too.

25 files changed:
build_files/scons/config/linux2-config.py
extern/Eigen2/Eigen/Core
extern/bullet2/CMakeLists.txt
intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
source/gameengine/GameLogic/SCA_DelaySensor.cpp
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_PropertyActuator.cpp
source/gameengine/GameLogic/SCA_PropertySensor.cpp
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_RandomActuator.cpp
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp

index 07ff307..5afc223 100644 (file)
@@ -193,6 +193,8 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFIL
 
 CPPFLAGS = []
 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
+# g++ 4.6, only needed for bullet
+CXXFLAGS += ['-fpermissive']
 if WITH_BF_FFMPEG:
   # libavutil needs UINT64_C()
   CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
index f5e315a..ad19f08 100644 (file)
@@ -59,6 +59,7 @@
 #include <cstring>
 #include <string>
 #include <limits>
+#include <malloc.h>
 
 #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS)
   #define EIGEN_EXCEPTIONS
index 5f8901a..a8f8801 100644 (file)
@@ -319,4 +319,9 @@ set(SRC
        src/btBulletDynamicsCommon.h
 )
 
+if(CMAKE_COMPILER_IS_GNUCC)
+       # needed for gcc 4.6+
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
+endif()
+
 blender_add_lib(extern_bullet "${SRC}" "${INC}")
index 50700e3..04c780c 100644 (file)
@@ -20,6 +20,9 @@
  *
  */
 
+/* for types only, not alloc functions */
+#include <malloc.h>
+
 #include "MEM_CacheLimiter.h"
 #include "MEM_CacheLimiterC-Api.h"
 
index 25afdf9..7f334a9 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <stddef.h>
 #include <string>
 
 
index 3e92172..6fe9969 100644 (file)
@@ -23,6 +23,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_IActuator.h"
 #include "SCA_2DFilterActuator.h"
 
index d6c328c..a93ac22 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include <iostream>
 #include "SCA_ActuatorSensor.h"
 #include "SCA_EventManager.h"
index abe72fb..e23135e 100644 (file)
@@ -35,6 +35,8 @@
 #pragma warning( disable : 4786 )     
 #endif
 
+#include <stddef.h>
+
 #include "SCA_DelaySensor.h"
 #include "SCA_LogicManager.h"
 #include "SCA_EventManager.h"
index 0c6b835..6134b22 100644 (file)
@@ -26,6 +26,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_IController.h"
 #include "SCA_LogicManager.h"
 #include "SCA_IActuator.h"
index afda218..6fa8399 100644 (file)
@@ -26,6 +26,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_ILogicBrick.h"
 #include "PyObjectPlus.h"
 
index c655924..bb86b37 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_ISensor.h"
 #include "SCA_EventManager.h"
 #include "SCA_LogicManager.h"
index fe4124e..7368869 100644 (file)
@@ -27,6 +27,9 @@
  * ***** END GPL LICENSE BLOCK *****
  * Sensor for keyboard input
  */
+
+#include <stddef.h>
+
 #include "SCA_KeyboardSensor.h"
 #include "SCA_KeyboardManager.h"
 #include "SCA_LogicManager.h"
index af11353..257a67a 100644 (file)
@@ -30,6 +30,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_MouseSensor.h"
 #include "SCA_EventManager.h"
 #include "SCA_MouseManager.h"
index a5ac565..bc6604b 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_PropertyActuator.h"
 #include "InputParser.h"
 #include "Operator2Expr.h"
index a32cc50..55cd271 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include <iostream>
 #include "SCA_PropertySensor.h"
 #include "Operator2Expr.h"
index b6671c4..bf481b8 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_PythonController.h"
 #include "SCA_LogicManager.h"
 #include "SCA_ISensor.h"
index c3d5988..76bcf52 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "BoolValue.h"
 #include "IntValue.h"
 #include "FloatValue.h"
index 8194f1c..8b18641 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_RandomSensor.h"
 #include "SCA_EventManager.h"
 #include "SCA_RandomEventManager.h"
index 0f563dc..3ac95d7 100644 (file)
@@ -28,6 +28,8 @@
  * Ketsji Logic Extenstion: Network Message Actuator generic implementation
  */
 
+#include <stddef.h>
+
 #include "NG_NetworkScene.h"
 #include "KX_NetworkMessageActuator.h"
 
index 91b0599..5d05534 100644 (file)
@@ -28,6 +28,8 @@
  * Ketsji Logic Extenstion: Network Message Sensor generic implementation
  */
 
+#include <stddef.h>
+
 #include "KX_NetworkMessageSensor.h"
 #include "KX_NetworkEventManager.h"
 #include "NG_NetworkMessage.h"
index 1a19591..4929187 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
 */
 
+#include <stddef.h>
+
 #include "SCA_IActuator.h"
 #include "KX_GameActuator.h"
 //#include <iostream>
index 640816e..974dde6 100644 (file)
@@ -36,6 +36,7 @@
 #pragma warning (disable : 4355) 
 #endif 
 
+#include <stddef.h>
 
 #include "ListValue.h"
 #include "SCA_IObject.h"
index 1f4a349..39f0176 100644 (file)
@@ -25,6 +25,9 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
+#include <stddef.h>
+
 #include "KX_PolygonMaterial.h"
 
 #include "BKE_mesh.h"
index 51a3979..aff4f40 100644 (file)
@@ -35,6 +35,8 @@
 
 // Please look here for revision history.
 
+#include <stddef.h>
+
 #include "KX_SCA_ReplaceMeshActuator.h"
 #include "KX_MeshProxy.h"
 
index 524cffc..86223a0 100644 (file)
@@ -26,6 +26,9 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
+#include <stddef.h>
+
 #include "DummyPhysicsEnvironment.h"
 #include "PHY_IMotionState.h"