[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16223] branches/fluidcontrol: svn merge -r 16060:16222 https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Daniel Genrich
daniel.genrich at gmx.net
Fri Aug 22 11:31:32 CEST 2008
Revision: 16223
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16223
Author: genscher
Date: 2008-08-22 11:31:32 +0200 (Fri, 22 Aug 2008)
Log Message:
-----------
svn merge -r 16060:16222 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Modified Paths:
--------------
branches/fluidcontrol/CMakeLists.txt
branches/fluidcontrol/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
branches/fluidcontrol/intern/guardedalloc/intern/mallocn.c
branches/fluidcontrol/intern/guardedalloc/intern/mmap_win.c
branches/fluidcontrol/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj
branches/fluidcontrol/intern/guardedalloc/mmap_win.h
branches/fluidcontrol/intern/opennl/make/msvc_7_0/opennl.vcproj
branches/fluidcontrol/intern/opennl/superlu/smemory.c
branches/fluidcontrol/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj
branches/fluidcontrol/projectfiles_vc7/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
branches/fluidcontrol/projectfiles_vc7/kernel/system/SYS_system.vcproj
branches/fluidcontrol/release/VERSION
branches/fluidcontrol/release/datafiles/datatoc.c
branches/fluidcontrol/release/datafiles/splash.jpg
branches/fluidcontrol/release/scripts/flt_properties.py
branches/fluidcontrol/source/blender/blenkernel/BKE_blender.h
branches/fluidcontrol/source/blender/blenkernel/BKE_collision.h
branches/fluidcontrol/source/blender/blenkernel/BKE_customdata.h
branches/fluidcontrol/source/blender/blenkernel/BKE_deform.h
branches/fluidcontrol/source/blender/blenkernel/BKE_effect.h
branches/fluidcontrol/source/blender/blenkernel/BKE_endian.h
branches/fluidcontrol/source/blender/blenkernel/BKE_utildefines.h
branches/fluidcontrol/source/blender/blenkernel/intern/CCGSubSurf.c
branches/fluidcontrol/source/blender/blenkernel/intern/DerivedMesh.c
branches/fluidcontrol/source/blender/blenkernel/intern/bvhutils.c
branches/fluidcontrol/source/blender/blenkernel/intern/cloth.c
branches/fluidcontrol/source/blender/blenkernel/intern/collision.c
branches/fluidcontrol/source/blender/blenkernel/intern/deform.c
branches/fluidcontrol/source/blender/blenkernel/intern/displist.c
branches/fluidcontrol/source/blender/blenkernel/intern/effect.c
branches/fluidcontrol/source/blender/blenkernel/intern/icons.c
branches/fluidcontrol/source/blender/blenkernel/intern/image.c
branches/fluidcontrol/source/blender/blenkernel/intern/implicit.c
branches/fluidcontrol/source/blender/blenkernel/intern/ipo.c
branches/fluidcontrol/source/blender/blenkernel/intern/modifier.c
branches/fluidcontrol/source/blender/blenkernel/intern/particle.c
branches/fluidcontrol/source/blender/blenkernel/intern/particle_system.c
branches/fluidcontrol/source/blender/blenkernel/intern/sca.c
branches/fluidcontrol/source/blender/blenlib/BLI_editVert.h
branches/fluidcontrol/source/blender/blenlib/BLI_rand.h
branches/fluidcontrol/source/blender/blenlib/intern/BLI_ghash.c
branches/fluidcontrol/source/blender/blenlib/intern/BLI_kdopbvh.c
branches/fluidcontrol/source/blender/blenlib/intern/fileops.c
branches/fluidcontrol/source/blender/blenlib/intern/psfont.c
branches/fluidcontrol/source/blender/blenlib/intern/rand.c
branches/fluidcontrol/source/blender/blenlib/intern/util.c
branches/fluidcontrol/source/blender/blenloader/BLO_sys_types.h
branches/fluidcontrol/source/blender/blenloader/intern/genfile.c
branches/fluidcontrol/source/blender/blenloader/intern/readblenentry.c
branches/fluidcontrol/source/blender/blenloader/intern/readfile.c
branches/fluidcontrol/source/blender/blenloader/intern/writefile.c
branches/fluidcontrol/source/blender/blenpluginapi/intern/pluginapi.c
branches/fluidcontrol/source/blender/imbuf/intern/cineon/cineonlib.c
branches/fluidcontrol/source/blender/imbuf/intern/cineon/dpxlib.c
branches/fluidcontrol/source/blender/imbuf/intern/cineon/logImageCore.h
branches/fluidcontrol/source/blender/imbuf/intern/cineon/logmemfile.c
branches/fluidcontrol/source/blender/imbuf/intern/cineon/logmemfile.h
branches/fluidcontrol/source/blender/imbuf/intern/scaling.c
branches/fluidcontrol/source/blender/include/BDR_gpencil.h
branches/fluidcontrol/source/blender/include/BIF_drawgpencil.h
branches/fluidcontrol/source/blender/include/BIF_meshtools.h
branches/fluidcontrol/source/blender/include/BIF_resources.h
branches/fluidcontrol/source/blender/makesdna/DNA_gpencil_types.h
branches/fluidcontrol/source/blender/makesdna/DNA_ipo_types.h
branches/fluidcontrol/source/blender/makesdna/DNA_modifier_types.h
branches/fluidcontrol/source/blender/makesdna/DNA_object_force.h
branches/fluidcontrol/source/blender/makesdna/DNA_particle_types.h
branches/fluidcontrol/source/blender/makesdna/DNA_sensor_types.h
branches/fluidcontrol/source/blender/makesdna/DNA_space_types.h
branches/fluidcontrol/source/blender/makesdna/DNA_userdef_types.h
branches/fluidcontrol/source/blender/makesdna/intern/makesdna.c
branches/fluidcontrol/source/blender/python/api2_2x/Draw.c
branches/fluidcontrol/source/blender/python/api2_2x/Material.c
branches/fluidcontrol/source/blender/python/api2_2x/Mesh.c
branches/fluidcontrol/source/blender/python/api2_2x/Object.c
branches/fluidcontrol/source/blender/python/api2_2x/Text3d.c
branches/fluidcontrol/source/blender/python/api2_2x/doc/Material.py
branches/fluidcontrol/source/blender/python/api2_2x/doc/Mathutils.py
branches/fluidcontrol/source/blender/python/api2_2x/doc/Object.py
branches/fluidcontrol/source/blender/python/api2_2x/doc/Text3d.py
branches/fluidcontrol/source/blender/python/api2_2x/vector.c
branches/fluidcontrol/source/blender/python/api2_2x/vector.h
branches/fluidcontrol/source/blender/radiosity/CMakeLists.txt
branches/fluidcontrol/source/blender/radiosity/SConscript
branches/fluidcontrol/source/blender/radiosity/intern/source/Makefile
branches/fluidcontrol/source/blender/radiosity/intern/source/radnode.c
branches/fluidcontrol/source/blender/radiosity/intern/source/radpreprocess.c
branches/fluidcontrol/source/blender/render/CMakeLists.txt
branches/fluidcontrol/source/blender/render/SConscript
branches/fluidcontrol/source/blender/render/intern/include/render_types.h
branches/fluidcontrol/source/blender/render/intern/source/occlusion.c
branches/fluidcontrol/source/blender/render/intern/source/pipeline.c
branches/fluidcontrol/source/blender/render/intern/source/rendercore.c
branches/fluidcontrol/source/blender/render/intern/source/shadbuf.c
branches/fluidcontrol/source/blender/render/intern/source/strand.c
branches/fluidcontrol/source/blender/render/intern/source/zbuf.c
branches/fluidcontrol/source/blender/src/buttons_editing.c
branches/fluidcontrol/source/blender/src/buttons_logic.c
branches/fluidcontrol/source/blender/src/buttons_object.c
branches/fluidcontrol/source/blender/src/buttons_scene.c
branches/fluidcontrol/source/blender/src/drawgpencil.c
branches/fluidcontrol/source/blender/src/drawipo.c
branches/fluidcontrol/source/blender/src/drawmesh.c
branches/fluidcontrol/source/blender/src/drawobject.c
branches/fluidcontrol/source/blender/src/editipo.c
branches/fluidcontrol/source/blender/src/editipo_lib.c
branches/fluidcontrol/source/blender/src/editkey.c
branches/fluidcontrol/source/blender/src/editmesh_mods.c
branches/fluidcontrol/source/blender/src/editmesh_tools.c
branches/fluidcontrol/source/blender/src/gpencil.c
branches/fluidcontrol/source/blender/src/header_info.c
branches/fluidcontrol/source/blender/src/header_script.c
branches/fluidcontrol/source/blender/src/header_view3d.c
branches/fluidcontrol/source/blender/src/interface.c
branches/fluidcontrol/source/blender/src/meshlaplacian.c
branches/fluidcontrol/source/blender/src/meshtools.c
branches/fluidcontrol/source/blender/src/parametrizer.c
branches/fluidcontrol/source/blender/src/parametrizer.h
branches/fluidcontrol/source/blender/src/parametrizer_intern.h
branches/fluidcontrol/source/blender/src/renderwin.c
branches/fluidcontrol/source/blender/src/resources.c
branches/fluidcontrol/source/blender/src/space.c
branches/fluidcontrol/source/blender/src/splash.jpg.c
branches/fluidcontrol/source/blender/src/toolbox.c
branches/fluidcontrol/source/blender/src/transform_conversions.c
branches/fluidcontrol/source/blender/src/transform_generics.c
branches/fluidcontrol/source/blender/src/usiblender.c
branches/fluidcontrol/source/blender/yafray/intern/export_Plugin.cpp
branches/fluidcontrol/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
branches/fluidcontrol/source/gameengine/Converter/BL_ActionActuator.cpp
branches/fluidcontrol/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/fluidcontrol/source/gameengine/Converter/BL_ShapeActionActuator.cpp
branches/fluidcontrol/source/gameengine/Converter/KX_ConvertActuators.cpp
branches/fluidcontrol/source/gameengine/Converter/KX_ConvertSensors.cpp
branches/fluidcontrol/source/gameengine/Expressions/InputParser.cpp
branches/fluidcontrol/source/gameengine/Expressions/ListValue.cpp
branches/fluidcontrol/source/gameengine/Expressions/PyObjectPlus.cpp
branches/fluidcontrol/source/gameengine/Expressions/PyObjectPlus.h
branches/fluidcontrol/source/gameengine/Expressions/Value.cpp
branches/fluidcontrol/source/gameengine/Expressions/Value.h
branches/fluidcontrol/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
branches/fluidcontrol/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
branches/fluidcontrol/source/gameengine/GameLogic/SCA_ISensor.cpp
branches/fluidcontrol/source/gameengine/GameLogic/SCA_ISensor.h
branches/fluidcontrol/source/gameengine/GameLogic/SCA_PythonController.cpp
branches/fluidcontrol/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
branches/fluidcontrol/source/gameengine/GamePlayer/ghost/GPG_Application.h
branches/fluidcontrol/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
branches/fluidcontrol/source/gameengine/Ketsji/BL_Shader.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_CameraActuator.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_CameraActuator.h
branches/fluidcontrol/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_GameObject.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_GameObject.h
branches/fluidcontrol/source/gameengine/Ketsji/KX_IpoActuator.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_MaterialIpoController.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_MeshProxy.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_ObjectActuator.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_ParentActuator.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_ParentActuator.h
branches/fluidcontrol/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_PythonInit.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
branches/fluidcontrol/source/gameengine/Ketsji/KX_Scene.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_Scene.h
branches/fluidcontrol/source/gameengine/Ketsji/KX_TrackToActuator.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_TrackToActuator.h
branches/fluidcontrol/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
branches/fluidcontrol/source/gameengine/Physics/Bullet/CMakeLists.txt
branches/fluidcontrol/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
branches/fluidcontrol/source/gameengine/Physics/Bullet/CcdPhysicsController.h
branches/fluidcontrol/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
branches/fluidcontrol/source/gameengine/Physics/Bullet/SConscript
branches/fluidcontrol/source/gameengine/Physics/common/PHY_DynamicTypes.h
branches/fluidcontrol/source/gameengine/PyDoc/GameLogic.py
branches/fluidcontrol/source/gameengine/PyDoc/KX_CameraActuator.py
branches/fluidcontrol/source/gameengine/PyDoc/KX_ParentActuator.py
branches/fluidcontrol/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
branches/fluidcontrol/source/gameengine/PyDoc/KX_TrackToActuator.py
branches/fluidcontrol/source/gameengine/PyDoc/SCA_ISensor.py
branches/fluidcontrol/source/kernel/CMakeLists.txt
branches/fluidcontrol/source/kernel/SConscript
branches/fluidcontrol/source/kernel/gen_system/GEN_HashedPtr.cpp
branches/fluidcontrol/source/kernel/gen_system/Makefile
Added Paths:
-----------
branches/fluidcontrol/intern/guardedalloc/BLO_sys_types.h
branches/fluidcontrol/intern/opennl/superlu/BLO_sys_types.h
branches/fluidcontrol/release/scripts/flt_dofedit.py
branches/fluidcontrol/release/scripts/flt_lodedit.py
branches/fluidcontrol/release/text/release_247.txt
branches/fluidcontrol/source/blender/blenkernel/BKE_shrinkwrap.h
branches/fluidcontrol/source/blender/blenkernel/intern/shrinkwrap.c
branches/fluidcontrol/source/gameengine/GameLogic/SCA_DelaySensor.cpp
branches/fluidcontrol/source/gameengine/GameLogic/SCA_DelaySensor.h
branches/fluidcontrol/source/gameengine/PyDoc/SCA_DelaySensor.py
Removed Paths:
-------------
branches/fluidcontrol/release/text/release_246.txt
Modified: branches/fluidcontrol/CMakeLists.txt
===================================================================
--- branches/fluidcontrol/CMakeLists.txt 2008-08-22 08:36:29 UTC (rev 16222)
+++ branches/fluidcontrol/CMakeLists.txt 2008-08-22 09:31:32 UTC (rev 16223)
@@ -63,7 +63,6 @@
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
-OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF)
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
Modified: branches/fluidcontrol/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
===================================================================
--- branches/fluidcontrol/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp 2008-08-22 08:36:29 UTC (rev 16222)
+++ branches/fluidcontrol/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp 2008-08-22 09:31:32 UTC (rev 16223)
@@ -856,10 +856,26 @@
btScalar radius = coneShape->getRadius();//+coneShape->getMargin();
btScalar height = coneShape->getHeight();//+coneShape->getMargin();
btVector3 start = worldTransform.getOrigin();
- getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(radius,btScalar(0.),btScalar(-0.5)*height),color);
- getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(-radius,btScalar(0.),btScalar(-0.5)*height),color);
- getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),radius,btScalar(-0.5)*height),color);
- getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),-radius,btScalar(-0.5)*height),color);
+ // insert here Bullet 2.69 that fixes representation of cone
+ int upAxis= coneShape->getConeUpIndex();
+
+ btVector3 offsetHeight(0,0,0);
+ offsetHeight[upAxis] = height * btScalar(0.5);
+ btVector3 offsetRadius(0,0,0);
+ offsetRadius[(upAxis+1)%3] = radius;
+ btVector3 offset2Radius(0,0,0);
+ offset2Radius[(upAxis+2)%3] = radius;
+
+ getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight+offsetRadius),color);
+ getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight-offsetRadius),color);
+ getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight+offset2Radius),color);
+ getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight-offset2Radius),color);
+
+ // buggy code that does not take into account the direction of the cone
+ //getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(radius,btScalar(0.),btScalar(-0.5)*height),color);
+ //getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(-radius,btScalar(0.),btScalar(-0.5)*height),color);
+ //getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),radius,btScalar(-0.5)*height),color);
+ //getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),-radius,btScalar(-0.5)*height),color);
break;
}
Copied: branches/fluidcontrol/intern/guardedalloc/BLO_sys_types.h (from rev 16222, trunk/blender/intern/guardedalloc/BLO_sys_types.h)
===================================================================
--- branches/fluidcontrol/intern/guardedalloc/BLO_sys_types.h (rev 0)
+++ branches/fluidcontrol/intern/guardedalloc/BLO_sys_types.h 2008-08-22 09:31:32 UTC (rev 16223)
@@ -0,0 +1,125 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ * A platform-independent definition of [u]intXX_t
+ * Plus the accompanying header include for htonl/ntohl
+ *
+ * This file includes <sys/types.h> to define [u]intXX_t types, where
+ * XX can be 8, 16, 32 or 64. Unfortunately, not all systems have this
+ * file.
+ * - Windows uses __intXX compiler-builtin types. These are signed,
+ * so we have to flip the signs.
+ * For these rogue platforms, we make the typedefs ourselves.
+ *
+ */
+
+/*
+// DG: original BLO_sys_types.h is in source/blender/blenkernel
+// but is not allowed be accessed here because of bad-level-call
+*/
+
+#ifndef BLO_SYS_TYPES_H
+#define BLO_SYS_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
+
+/* The __intXX are built-in types of the visual complier! So we don't
+ * need to include anything else here. */
+
+typedef signed __int8 int8_t;
+typedef signed __int16 int16_t;
+typedef signed __int32 int32_t;
+typedef signed __int64 int64_t;
+
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+
+#ifndef _INTPTR_T_DEFINED
+#ifdef _WIN64
+typedef __int64 intptr_t;
+#else
+typedef long intptr_t;
+#endif
+#define _INTPTR_T_DEFINED
+#endif
+
+#ifndef _UINTPTR_T_DEFINED
+#ifdef _WIN64
+typedef unsigned __int64 uintptr_t;
+#else
+typedef unsigned long uintptr_t;
+#endif
+#define _UINTPTR_T_DEFINED
+#endif
+
+#elif defined(__linux__)
+
+ /* Linux-i386, Linux-Alpha, Linux-ppc */
+#include <stdint.h>
+
+#elif defined (__APPLE__)
+
+#include <inttypes.h>
+
+#elif defined(FREE_WINDOWS)
+
+#include <stdint.h>
+
+#else
+
+ /* FreeBSD, Irix, Solaris */
+#include <sys/types.h>
+
+#endif /* ifdef platform for types */
+
+#ifdef _WIN32
+#ifndef htonl
+#define htonl(x) correctByteOrder(x)
+#endif
+#ifndef ntohl
+#define ntohl(x) correctByteOrder(x)
+#endif
+#elif defined (__FreeBSD__) || defined (__OpenBSD__)
+#include <sys/param.h>
+#elif defined (__APPLE__)
+#include <sys/types.h>
+#else /* irix sun linux */
+#include <netinet/in.h>
+#endif /* ifdef platform for htonl/ntohl */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* eof */
+
Modified: branches/fluidcontrol/intern/guardedalloc/intern/mallocn.c
===================================================================
--- branches/fluidcontrol/intern/guardedalloc/intern/mallocn.c 2008-08-22 08:36:29 UTC (rev 16222)
+++ branches/fluidcontrol/intern/guardedalloc/intern/mallocn.c 2008-08-22 09:31:32 UTC (rev 16223)
@@ -49,6 +49,8 @@
#include "MEM_guardedalloc.h"
+#include "BLO_sys_types.h" // needed for intptr_t
+
/* --------------------------------------------------------------------- */
/* Data definition */
/* --------------------------------------------------------------------- */
@@ -112,7 +114,7 @@
volatile int totblock= 0;
-volatile unsigned long mem_in_use= 0, mmap_in_use= 0;
+volatile uintptr_t mem_in_use= 0, mmap_in_use= 0;
static volatile struct localListBase _membase;
static volatile struct localListBase *membase = &_membase;
@@ -335,7 +337,7 @@
/* Memory statistics print */
typedef struct MemPrintBlock {
const char *name;
- unsigned long len;
+ uintptr_t len;
int items;
} MemPrintBlock;
@@ -485,14 +487,14 @@
return(-1);
}
- if(sizeof(long)==8) {
- if (((long) memh) & 0x7) {
+ if(sizeof(intptr_t)==8) {
+ if (((intptr_t) memh) & 0x7) {
MemorY_ErroR("free","attempt to free illegal pointer");
return(-1);
}
}
else {
- if (((long) memh) & 0x3) {
+ if (((intptr_t) memh) & 0x3) {
MemorY_ErroR("free","attempt to free illegal pointer");
return(-1);
}
Modified: branches/fluidcontrol/intern/guardedalloc/intern/mmap_win.c
===================================================================
--- branches/fluidcontrol/intern/guardedalloc/intern/mmap_win.c 2008-08-22 08:36:29 UTC (rev 16222)
+++ branches/fluidcontrol/intern/guardedalloc/intern/mmap_win.c 2008-08-22 09:31:32 UTC (rev 16223)
@@ -151,7 +151,7 @@
}
/* munmap for windows */
-long munmap(void *ptr, long size)
+intptr_t munmap(void *ptr, intptr_t size)
{
MemMap *mm = mmap_findlink(mmapbase, ptr);
if (!mm) {
Modified: branches/fluidcontrol/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj
===================================================================
--- branches/fluidcontrol/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj 2008-08-22 08:36:29 UTC (rev 16222)
+++ branches/fluidcontrol/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj 2008-08-22 09:31:32 UTC (rev 16223)
@@ -262,6 +262,9 @@
Name="extern"
Filter="">
<File
+ RelativePath="..\..\BLO_sys_types.h">
+ </File>
+ <File
RelativePath="..\..\MEM_guardedalloc.h">
</File>
<File
Modified: branches/fluidcontrol/intern/guardedalloc/mmap_win.h
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list