[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15560] branches/apricot: svn merge -r15549:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Campbell Barton
ideasman42 at gmail.com
Sun Jul 13 23:07:44 CEST 2008
Revision: 15560
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15560
Author: campbellbarton
Date: 2008-07-13 23:07:44 +0200 (Sun, 13 Jul 2008)
Log Message:
-----------
svn merge -r15549:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/blender
- mainly to fix the free() crash with the file selector
Modified Paths:
--------------
branches/apricot/CMakeLists.txt
branches/apricot/intern/bsp/intern/BSP_CSGMesh.cpp
branches/apricot/intern/container/CTR_TaggedIndex.h
branches/apricot/intern/decimation/intern/LOD_ManMesh2.cpp
branches/apricot/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/apricot/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/apricot/source/blender/blenlib/intern/storage.c
branches/apricot/source/blender/src/buttons_editing.c
Modified: branches/apricot/CMakeLists.txt
===================================================================
--- branches/apricot/CMakeLists.txt 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/CMakeLists.txt 2008-07-13 21:07:44 UTC (rev 15560)
@@ -204,10 +204,17 @@
ENDIF(UNIX)
IF(WIN32)
+
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
-
+
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+ # Setup 64bit and 64bit windows systems
+ IF(CMAKE_CL_64)
+ message("64 bit compiler detected.")
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+ ENDIF(CMAKE_CL_64)
+
SET(PYTHON ${LIBDIR}/python)
SET(PYTHON_VERSION 2.5)
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
@@ -221,12 +228,20 @@
SET(OPENAL_LIB openal_static)
SET(OPENAL_LIBPATH ${OPENAL}/lib)
- SET(PNG_LIB libpng_st)
+ IF(CMAKE_CL_64)
+ SET(PNG_LIB libpng)
+ ELSE(CMAKE_CL_64)
+ SET(PNG_LIB libpng_st)
+ ENDIF(CMAKE_CL_64)
SET(JPEG_LIB libjpeg)
SET(ZLIB ${LIBDIR}/zlib)
SET(ZLIB_INC ${ZLIB}/include)
- SET(ZLIB_LIB libz)
+ IF(CMAKE_CL_64)
+ SET(ZLIB_LIB zlib)
+ ELSE(CMAKE_CL_64)
+ SET(ZLIB_LIB libz)
+ ENDIF(CMAKE_CL_64)
SET(ZLIB_LIBPATH ${ZLIB}/lib)
SET(PTHREADS ${LIBDIR}/pthreads)
@@ -309,7 +324,11 @@
SET(WINTAB_INC ${LIBDIR}/wintab/include)
- SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib")
+ IF(CMAKE_CL_64)
+ SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib;MSVCRT.lib ")
+ ELSE(CMAKE_CL_64)
+ SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
+ ENDIF(CMAKE_CL_64)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib ")
ENDIF(WIN32)
Modified: branches/apricot/intern/bsp/intern/BSP_CSGMesh.cpp
===================================================================
--- branches/apricot/intern/bsp/intern/BSP_CSGMesh.cpp 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/intern/bsp/intern/BSP_CSGMesh.cpp 2008-07-13 21:07:44 UTC (rev 15560)
@@ -197,7 +197,7 @@
for (int vert = 0; vert < vertex_num; ++vert) {
- BSP_FaceInd fi(f_it - f_it_begin);
+ BSP_FaceInd fi(size_t (f_it - f_it_begin));
InsertEdge(prev_vi,face.m_verts[vert],fi,dummy);
prev_vi = face.m_verts[vert];
}
Modified: branches/apricot/intern/container/CTR_TaggedIndex.h
===================================================================
--- branches/apricot/intern/container/CTR_TaggedIndex.h 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/intern/container/CTR_TaggedIndex.h 2008-07-13 21:07:44 UTC (rev 15560)
@@ -93,7 +93,17 @@
}
+#if defined(_WIN64)
CTR_TaggedIndex(
+ const unsigned __int64 val
+ ) :
+ m_val ( ((unsigned __int64)val & index_mask)
+ | ( (empty_tag << tag_shift)
+ & (~index_mask) ) ) {
+ }
+#endif
+
+ CTR_TaggedIndex(
const CTR_TaggedIndex &my_index
):
m_val(my_index.m_val)
@@ -124,6 +134,12 @@
return (long int)(m_val & index_mask);
}
+#if defined(_WIN64)
+ operator unsigned __int64 () const {
+ return (unsigned __int64)(m_val & index_mask);
+ }
+#endif
+
bool
IsEmpty(
) const {
Modified: branches/apricot/intern/decimation/intern/LOD_ManMesh2.cpp
===================================================================
--- branches/apricot/intern/decimation/intern/LOD_ManMesh2.cpp 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/intern/decimation/intern/LOD_ManMesh2.cpp 2008-07-13 21:07:44 UTC (rev 15560)
@@ -477,7 +477,7 @@
return;
}
- LOD_VertexInd last = LOD_VertexInd(verts.end() - verts.begin() - 1);
+ LOD_VertexInd last = LOD_VertexInd(size_t(verts.end() - verts.begin() - 1));
if (!(last == v)) {
@@ -533,7 +533,7 @@
return;
}
- LOD_EdgeInd last = LOD_EdgeInd(edges.end() - edges.begin() - 1);
+ LOD_EdgeInd last = LOD_EdgeInd(size_t(edges.end() - edges.begin() - 1));
if (!(last == e)) {
vector<LOD_EdgeInd> e_verts;
@@ -573,7 +573,7 @@
return;
}
- LOD_FaceInd last = LOD_FaceInd(faces.end() - faces.begin() - 1);
+ LOD_FaceInd last = LOD_FaceInd(size_t (faces.end() - faces.begin() - 1));
if (!(last == f)) {
Modified: branches/apricot/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/apricot/intern/ghost/intern/GHOST_SystemWin32.cpp 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/intern/ghost/intern/GHOST_SystemWin32.cpp 2008-07-13 21:07:44 UTC (rev 15560)
@@ -42,6 +42,14 @@
#include "GHOST_SystemWin32.h"
+// win64 doesn't define GWL_USERDATA
+#ifdef WIN32
+#ifndef GWL_USERDATA
+#define GWL_USERDATA GWLP_USERDATA
+#define GWL_WNDPROC GWLP_WNDPROC
+#endif
+#endif
+
/*
* According to the docs the mouse wheel message is supported from windows 98
* upwards. Leaving WINVER at default value, the WM_MOUSEWHEEL message and the
Modified: branches/apricot/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/apricot/intern/ghost/intern/GHOST_WindowWin32.cpp 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/intern/ghost/intern/GHOST_WindowWin32.cpp 2008-07-13 21:07:44 UTC (rev 15560)
@@ -48,6 +48,14 @@
#define M_PI 3.1415926536
#endif
+// win64 doesn't define GWL_USERDATA
+#ifdef WIN32
+#ifndef GWL_USERDATA
+#define GWL_USERDATA GWLP_USERDATA
+#define GWL_WNDPROC GWLP_WNDPROC
+#endif
+#endif
+
LPCSTR GHOST_WindowWin32::s_windowClassName = "GHOST_WindowClass";
const int GHOST_WindowWin32::s_maxTitleLength = 128;
HGLRC GHOST_WindowWin32::s_firsthGLRc = NULL;
Modified: branches/apricot/source/blender/blenlib/intern/storage.c
===================================================================
--- branches/apricot/source/blender/blenlib/intern/storage.c 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/source/blender/blenlib/intern/storage.c 2008-07-13 21:07:44 UTC (rev 15560)
@@ -382,7 +382,6 @@
pwuser = getpwuid(files[num].s.st_uid);
if ( pwuser ) {
strcpy(files[num].owner, pwuser->pw_name);
- free(pwuser);
} else {
sprintf(files[num].owner, "%d", files[num].s.st_uid);
}
Modified: branches/apricot/source/blender/src/buttons_editing.c
===================================================================
--- branches/apricot/source/blender/src/buttons_editing.c 2008-07-13 18:29:07 UTC (rev 15559)
+++ branches/apricot/source/blender/src/buttons_editing.c 2008-07-13 21:07:44 UTC (rev 15560)
@@ -513,7 +513,6 @@
} else {
editmesh_deselect_by_material(G.obedit->actcol-1);
}
- allqueue(REDRAWVIEW3D, 0);
}
else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) {
nu= editNurb.first;
@@ -553,8 +552,9 @@
nu= nu->next;
}
BIF_undo_push("Select material index");
- allqueue(REDRAWVIEW3D, 0);
}
+ allqueue(REDRAWIMAGE, 0);
+ allqueue(REDRAWVIEW3D, 0);
}
countall();
break;
More information about the Bf-blender-cvs
mailing list