[#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 07ff30763c0f715e3459499ffc5eca55b07f1a7b..5afc2234c7b2a773d7bd2847cb8971a42588d953 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 f5e315a2c9d076e91031e72a3622e9b92a99cf57..ad19f0883a31b285616ce3799ff1ab7f24870922 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 5f8901a646c129ca86a515e03d41427bd1306434..a8f8801af702e6510a435e541a7eeea129549ec0 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 50700e392039dc6257e0c6a178c4a02628c3d7fd..04c780cdf8e43b2b11fc3314c219b0ef334c3cf8 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 25afdf95f0529731e284abc1348b155c16d89915..7f334a9f1ad02f05a5e60c66c99fa9e308d563e3 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <stddef.h>
 #include <string>
 
 
index 3e9217251b5ed09ba90a5f77dd184638050089d1..6fe996992c8d46dd7be00f85cf7027eb606a36fd 100644 (file)
@@ -23,6 +23,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_IActuator.h"
 #include "SCA_2DFilterActuator.h"
 
index d6c328cd73087830f9d5dfe59b0291787dd46ac8..a93ac2207e11abe5770c7d7cc1a67db57bf7f1f5 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include <iostream>
 #include "SCA_ActuatorSensor.h"
 #include "SCA_EventManager.h"
index abe72fb6757a1192e53b1a92d5030d489dce971f..e23135eb14fdb30536dd1aaa4b93e6c06b5c88d2 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 0c6b8350bca6841c4b1bc5789455bcb49e092f59..6134b229266aa97aec14d109603580d4475324e3 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 afda218c99c9c97da71c0ef7276296a75dae7f9a..6fa83994bd61aab87cb236c30eb9c65a1612656e 100644 (file)
@@ -26,6 +26,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_ILogicBrick.h"
 #include "PyObjectPlus.h"
 
index c655924aa485537ebb4d51dfca3a9a81977e273d..bb86b3735bcebc4b28e87a92ad8ce990c2832f2e 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 fe4124eb833a23ba865fb8626341b15e3c79cbd3..7368869bc2dc641b945bc92a2c4a95485298963b 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 af11353c93e0672f5b7e37789e60e4d54d61f215..257a67ad94713b3b67a6028bf95c03c77209dfe9 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 a5ac5654e21435e73b1a152daf319efb6bd9e26b..bc6604bebd8e0646366736f4c25c9d7887e43c50 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "SCA_PropertyActuator.h"
 #include "InputParser.h"
 #include "Operator2Expr.h"
index a32cc50fd63658a48aad4c944a6b006e144d8e2d..55cd2713c3515e4cb3feb9aec43546fbbfcbeccd 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include <iostream>
 #include "SCA_PropertySensor.h"
 #include "Operator2Expr.h"
index b6671c45d7d885c5096ce99180a2341541a0583f..bf481b8e79922408fc77473bcf2083601a4859a8 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 c3d5988be24670fceba6723ab9c8331a508dbf3e..76bcf52c295209ed05d3892bf266c6b6189b2430 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#include <stddef.h>
+
 #include "BoolValue.h"
 #include "IntValue.h"
 #include "FloatValue.h"
index 8194f1c97c8939ed6468d46a78ed8648c886f552..8b18641c165cc849335133cc8509e672b3f4cfc5 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 0f563dc4fe44289fa90cc2ae225d2d74074aeb45..3ac95d7eaf82e28193c3da941b38290158cf79ef 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 91b05990ba122703558135e585ca5177c93d4bfb..5d05534b258375a2924d3ef09a03454752077f39 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 1a195913e4a707f855eb9192502b0d7de56b9d78..4929187c3eee05eba5f1927454d0635ec69b0660 100644 (file)
@@ -29,6 +29,8 @@
  * ***** END GPL LICENSE BLOCK *****
 */
 
+#include <stddef.h>
+
 #include "SCA_IActuator.h"
 #include "KX_GameActuator.h"
 //#include <iostream>
index 640816e19ca925a147418e24da29c00836fb858c..974dde6de00e2d00c03007ec18ee567f851e038c 100644 (file)
@@ -36,6 +36,7 @@
 #pragma warning (disable : 4355) 
 #endif 
 
+#include <stddef.h>
 
 #include "ListValue.h"
 #include "SCA_IObject.h"
index 1f4a34916954651fd942f8f743b7549ecc9f74b2..39f017625dd16a99545d213c2a8891e90f0c42ef 100644 (file)
@@ -25,6 +25,9 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
+#include <stddef.h>
+
 #include "KX_PolygonMaterial.h"
 
 #include "BKE_mesh.h"
index 51a3979830da81c7739f256d00c47f285a99aff8..aff4f4080fdc6d8f63640b9c75930510d4673704 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 524cffc27324584ca4dfba6d9b713aa53087fd20..86223a0ea604e142862b9260e291598dd3e01add 100644 (file)
@@ -26,6 +26,9 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
+#include <stddef.h>
+
 #include "DummyPhysicsEnvironment.h"
 #include "PHY_IMotionState.h"