From fd0072e77cd28d52e00ea77542ba6d11018889b5 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 17 Aug 2008 17:08:00 +0000 Subject: Win64: please check my changes if you ran across them ;) But should be fine since no additional crashes were reported! --- source/kernel/CMakeLists.txt | 2 +- source/kernel/SConscript | 2 +- source/kernel/gen_system/GEN_HashedPtr.cpp | 8 +++----- source/kernel/gen_system/Makefile | 1 + 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'source/kernel') diff --git a/source/kernel/CMakeLists.txt b/source/kernel/CMakeLists.txt index 3d966152cc5..ac759393326 100644 --- a/source/kernel/CMakeLists.txt +++ b/source/kernel/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC gen_messaging gen_system ../../intern/string ../../intern/moto/include) +SET(INC gen_messaging gen_system ../../intern/string ../../intern/moto/include ../../source/blender/blenloader ) FILE(GLOB SRC gen_messaging/intern/messaging.c diff --git a/source/kernel/SConscript b/source/kernel/SConscript index 9e678c041dc..8bd1a18f835 100644 --- a/source/kernel/SConscript +++ b/source/kernel/SConscript @@ -5,6 +5,6 @@ sources = 'gen_messaging/intern/messaging.c gen_system/GEN_HashedPtr.cpp' sources += ' gen_system/GEN_Matrix4x4.cpp gen_system/SYS_SingletonSystem.cpp' sources += ' gen_system/SYS_System.cpp' -incs = 'gen_messaging gen_system #/intern/string #/intern/moto/include' +incs = 'gen_messaging gen_system #/intern/string #/intern/moto/include #/source/blender/blenloader ' env.BlenderLib ( 'bf_kernel', Split(sources), Split(incs), [], libtype = ['common','game2', 'player'], priority = [15, 10, 150] ) diff --git a/source/kernel/gen_system/GEN_HashedPtr.cpp b/source/kernel/gen_system/GEN_HashedPtr.cpp index 49ccb252246..6dbed1fb7a8 100644 --- a/source/kernel/gen_system/GEN_HashedPtr.cpp +++ b/source/kernel/gen_system/GEN_HashedPtr.cpp @@ -33,6 +33,8 @@ #include #endif +#include "BLO_sys_types.h" // for intptr_t support + // // Build hash index from pointer. Even though the final result // is a 32-bit integer, use all the bits of the pointer as long @@ -41,11 +43,7 @@ unsigned int GEN_Hash(void * inDWord) { -#if defined(_WIN64) - unsigned __int64 key = (unsigned __int64)inDWord; -#else - unsigned long key = (unsigned long)inDWord; -#endif + uintptr_t key = (uintptr_t)inDWord; key += ~(key << 16); key ^= (key >> 5); diff --git a/source/kernel/gen_system/Makefile b/source/kernel/gen_system/Makefile index 855af376615..31535ad2a97 100644 --- a/source/kernel/gen_system/Makefile +++ b/source/kernel/gen_system/Makefile @@ -37,4 +37,5 @@ CCFLAGS += $(LEVEL_2_CPP_WARNINGS) CPPFLAGS += -I$(NAN_MOTO)/include CPPFLAGS += -I$(NAN_STRING)/include +CPPFLAGS += -I../../../source/blender/blenloader -- cgit v1.2.3