Revision: 16170 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16170 Author: blendix Date: 2008-08-18 14:09:33 +0200 (Mon, 18 Aug 2008)
Log Message: ----------- Apricot Branch ============== svn merge -r16142:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/blender Modified Paths: -------------- branches/apricot/intern/guardedalloc/MEM_guardedalloc.h branches/apricot/intern/guardedalloc/intern/mallocn.c branches/apricot/intern/guardedalloc/intern/mmap_win.c branches/apricot/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj branches/apricot/intern/guardedalloc/mmap_win.h branches/apricot/intern/opennl/make/msvc_7_0/opennl.vcproj branches/apricot/intern/opennl/superlu/smemory.c branches/apricot/projectfiles_vc7/kernel/system/SYS_system.vcproj branches/apricot/release/datafiles/datatoc.c branches/apricot/source/blender/blenkernel/BKE_customdata.h branches/apricot/source/blender/blenkernel/BKE_effect.h branches/apricot/source/blender/blenkernel/BKE_endian.h branches/apricot/source/blender/blenkernel/BKE_utildefines.h branches/apricot/source/blender/blenkernel/intern/CCGSubSurf.c branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c branches/apricot/source/blender/blenkernel/intern/cloth.c branches/apricot/source/blender/blenkernel/intern/displist.c branches/apricot/source/blender/blenkernel/intern/effect.c branches/apricot/source/blender/blenkernel/intern/icons.c branches/apricot/source/blender/blenkernel/intern/image.c branches/apricot/source/blender/blenkernel/intern/implicit.c branches/apricot/source/blender/blenkernel/intern/particle_system.c branches/apricot/source/blender/blenlib/BLI_editVert.h branches/apricot/source/blender/blenlib/BLI_rand.h branches/apricot/source/blender/blenlib/intern/BLI_ghash.c branches/apricot/source/blender/blenlib/intern/BLI_kdopbvh.c branches/apricot/source/blender/blenlib/intern/fileops.c branches/apricot/source/blender/blenlib/intern/psfont.c branches/apricot/source/blender/blenlib/intern/rand.c branches/apricot/source/blender/blenlib/intern/util.c branches/apricot/source/blender/blenloader/BLO_sys_types.h branches/apricot/source/blender/blenloader/intern/genfile.c branches/apricot/source/blender/blenloader/intern/readblenentry.c branches/apricot/source/blender/blenloader/intern/readfile.c branches/apricot/source/blender/blenpluginapi/intern/pluginapi.c branches/apricot/source/blender/imbuf/intern/cineon/cineonlib.c branches/apricot/source/blender/imbuf/intern/cineon/dpxlib.c branches/apricot/source/blender/imbuf/intern/cineon/logImageCore.h branches/apricot/source/blender/imbuf/intern/cineon/logmemfile.c branches/apricot/source/blender/imbuf/intern/cineon/logmemfile.h branches/apricot/source/blender/imbuf/intern/scaling.c branches/apricot/source/blender/include/BIF_meshtools.h branches/apricot/source/blender/makesdna/DNA_object_force.h branches/apricot/source/blender/makesdna/intern/makesdna.c branches/apricot/source/blender/python/api2_2x/Draw.c branches/apricot/source/blender/python/api2_2x/doc/Mathutils.py branches/apricot/source/blender/python/api2_2x/vector.c branches/apricot/source/blender/python/api2_2x/vector.h branches/apricot/source/blender/radiosity/CMakeLists.txt branches/apricot/source/blender/radiosity/SConscript branches/apricot/source/blender/radiosity/intern/source/Makefile branches/apricot/source/blender/radiosity/intern/source/radnode.c branches/apricot/source/blender/radiosity/intern/source/radpreprocess.c branches/apricot/source/blender/render/CMakeLists.txt branches/apricot/source/blender/render/SConscript branches/apricot/source/blender/render/intern/include/render_types.h branches/apricot/source/blender/render/intern/source/occlusion.c branches/apricot/source/blender/render/intern/source/pipeline.c branches/apricot/source/blender/render/intern/source/rendercore.c branches/apricot/source/blender/render/intern/source/shadbuf.c branches/apricot/source/blender/render/intern/source/strand.c branches/apricot/source/blender/render/intern/source/zbuf.c branches/apricot/source/blender/src/buttons_editing.c branches/apricot/source/blender/src/buttons_logic.c branches/apricot/source/blender/src/buttons_object.c branches/apricot/source/blender/src/buttons_scene.c branches/apricot/source/blender/src/drawmesh.c branches/apricot/source/blender/src/drawobject.c branches/apricot/source/blender/src/editkey.c branches/apricot/source/blender/src/editmesh_mods.c branches/apricot/source/blender/src/editmesh_tools.c branches/apricot/source/blender/src/header_info.c branches/apricot/source/blender/src/header_script.c branches/apricot/source/blender/src/interface.c branches/apricot/source/blender/src/meshlaplacian.c branches/apricot/source/blender/src/meshtools.c branches/apricot/source/blender/src/parametrizer.c branches/apricot/source/blender/src/parametrizer.h branches/apricot/source/blender/src/parametrizer_intern.h branches/apricot/source/blender/src/renderwin.c branches/apricot/source/blender/src/space.c branches/apricot/source/blender/src/toolbox.c branches/apricot/source/blender/src/transform_conversions.c branches/apricot/source/blender/src/transform_generics.c branches/apricot/source/blender/yafray/intern/export_Plugin.cpp branches/apricot/source/gameengine/Ketsji/KX_MaterialIpoController.cpp branches/apricot/source/kernel/CMakeLists.txt branches/apricot/source/kernel/SConscript branches/apricot/source/kernel/gen_system/GEN_HashedPtr.cpp branches/apricot/source/kernel/gen_system/Makefile Added Paths: ----------- branches/apricot/intern/guardedalloc/BLO_sys_types.h branches/apricot/intern/opennl/superlu/BLO_sys_types.h Copied: branches/apricot/intern/guardedalloc/BLO_sys_types.h (from rev 16169, trunk/blender/intern/guardedalloc/BLO_sys_types.h) =================================================================== --- branches/apricot/intern/guardedalloc/BLO_sys_types.h (rev 0) +++ branches/apricot/intern/guardedalloc/BLO_sys_types.h 2008-08-18 12:09:33 UTC (rev 16170) @@ -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/apricot/intern/guardedalloc/MEM_guardedalloc.h =================================================================== --- branches/apricot/intern/guardedalloc/MEM_guardedalloc.h 2008-08-18 11:55:40 UTC (rev 16169) +++ branches/apricot/intern/guardedalloc/MEM_guardedalloc.h 2008-08-18 12:09:33 UTC (rev 16170) @@ -58,8 +58,8 @@ #ifndef MEM_MALLOCN_H #define MEM_MALLOCN_H -/* Needed for FILE* */ -#include "stdio.h" +#include "stdio.h" /* needed for FILE* */ +#include "BLO_sys_types.h" /* needed for intptr_t */ #ifdef __cplusplus extern "C" { @@ -126,8 +126,8 @@ /* Memory usage stats * - MEM_get_memory_in_use is all memory * - MEM_get_mapped_memory_in_use is a subset of all memory */ - unsigned long MEM_get_memory_in_use(void); - unsigned long MEM_get_mapped_memory_in_use(void); + uintptr_t MEM_get_memory_in_use(void); + uintptr_t MEM_get_mapped_memory_in_use(void); int MEM_get_memory_blocks_in_use(void); #ifdef __cplusplus Modified: branches/apricot/intern/guardedalloc/intern/mallocn.c =================================================================== --- branches/apricot/intern/guardedalloc/intern/mallocn.c 2008-08-18 11:55:40 UTC (rev 16169) +++ branches/apricot/intern/guardedalloc/intern/mallocn.c 2008-08-18 12:09:33 UTC (rev 16170) @@ -112,7 +112,7 @@ static volatile int totblock= 0; -static volatile unsigned long mem_in_use= 0, mmap_in_use= 0; +static volatile uintptr_t mem_in_use= 0, mmap_in_use= 0; static volatile struct localListBase _membase; static volatile struct localListBase *membase = &_membase; @@ -335,7 +335,7 @@ /* Memory statistics print */ typedef struct MemPrintBlock { const char *name; - unsigned long len; + uintptr_t len; int items; } MemPrintBlock; @@ -485,14 +485,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/apricot/intern/guardedalloc/intern/mmap_win.c =================================================================== --- branches/apricot/intern/guardedalloc/intern/mmap_win.c 2008-08-18 11:55:40 UTC (rev 16169) +++ branches/apricot/intern/guardedalloc/intern/mmap_win.c 2008-08-18 12:09:33 UTC (rev 16170) @@ -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/apricot/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj =================================================================== --- branches/apricot/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj 2008-08-18 11:55:40 UTC (rev 16169) +++ branches/apricot/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj 2008-08-18 12:09:33 UTC (rev 16170) @@ -262,6 +262,9 @@ Name="extern" Filter=""> <File + RelativePath="..\..\BLO_sys_types.h"> + </File> + <File RelativePath="..\..\MEM_guardedalloc.h"> </File> <File Modified: branches/apricot/intern/guardedalloc/mmap_win.h =================================================================== --- branches/apricot/intern/guardedalloc/mmap_win.h 2008-08-18 11:55:40 UTC (rev 16169) +++ branches/apricot/intern/guardedalloc/mmap_win.h 2008-08-18 12:09:33 UTC (rev 16170) @@ -45,8 +45,10 @@ #define MAP_FAILED ((void *)-1) +#include "BLO_sys_types.h" // needed for intptr_t + void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset); -long munmap(void *ptr, long size); +intptr_t munmap(void *ptr, intptr_t size); #endif Modified: branches/apricot/intern/opennl/make/msvc_7_0/opennl.vcproj =================================================================== --- branches/apricot/intern/opennl/make/msvc_7_0/opennl.vcproj 2008-08-18 11:55:40 UTC (rev 16169) +++ branches/apricot/intern/opennl/make/msvc_7_0/opennl.vcproj 2008-08-18 12:09:33 UTC (rev 16170) @@ -716,6 +716,9 @@ Name="superlu" Filter=""> <File + RelativePath="..\..\superlu\BLO_sys_types.h"> + </File> + <File RelativePath="..\..\superlu\Cnames.h"> </File> <File Copied: branches/apricot/intern/opennl/superlu/BLO_sys_types.h (from rev 16169, trunk/blender/intern/opennl/superlu/BLO_sys_types.h) =================================================================== --- branches/apricot/intern/opennl/superlu/BLO_sys_types.h (rev 0) +++ branches/apricot/intern/opennl/superlu/BLO_sys_types.h 2008-08-18 12:09:33 UTC (rev 16170) @@ -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; @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs