[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40587] trunk/blender: fix for building on windows, clear some warnings too
Campbell Barton
ideasman42 at gmail.com
Tue Sep 27 03:32:29 CEST 2011
Revision: 40587
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40587
Author: campbellbarton
Date: 2011-09-27 01:32:27 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
fix for building on windows, clear some warnings too
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/source/blender/blenkernel/intern/writeframeserver.c
trunk/blender/source/blender/blenlib/intern/storage.c
trunk/blender/source/blender/blenlib/intern/winstuff.c
trunk/blender/source/blender/editors/include/UI_interface.h
trunk/blender/source/blender/editors/space_node/node_intern.h
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2011-09-27 01:28:15 UTC (rev 40586)
+++ trunk/blender/CMakeLists.txt 2011-09-27 01:32:27 UTC (rev 40587)
@@ -1153,14 +1153,19 @@
# set the endian define
-include(TestBigEndian)
-test_big_endian(_SYSTEM_BIG_ENDIAN)
-if(_SYSTEM_BIG_ENDIAN)
- add_definitions(-D__BIG_ENDIAN__)
+if(MSVC)
+ # for some reason this fails on msvc
+ add_definitions(-D__LITTLE_ENDIAN__)
else()
- add_definitions(-D__LITTLE_ENDIAN__)
+ include(TestBigEndian)
+ test_big_endian(_SYSTEM_BIG_ENDIAN)
+ if(_SYSTEM_BIG_ENDIAN)
+ add_definitions(-D__BIG_ENDIAN__)
+ else()
+ add_definitions(-D__LITTLE_ENDIAN__)
+ endif()
+ unset(_SYSTEM_BIG_ENDIAN)
endif()
-unset(_SYSTEM_BIG_ENDIAN)
if(WITH_IMAGE_OPENJPEG)
Modified: trunk/blender/source/blender/blenkernel/intern/writeframeserver.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/writeframeserver.c 2011-09-27 01:28:15 UTC (rev 40586)
+++ trunk/blender/source/blender/blenkernel/intern/writeframeserver.c 2011-09-27 01:32:27 UTC (rev 40587)
@@ -257,7 +257,11 @@
struct timeval tv;
struct sockaddr_in addr;
int len, rval;
+#ifdef FREE_WINDOWS
+ int socklen;
+#else
unsigned int socklen;
+#endif
char buf[4096];
if (connsock != -1) {
Modified: trunk/blender/source/blender/blenlib/intern/storage.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/storage.c 2011-09-27 01:28:15 UTC (rev 40586)
+++ trunk/blender/source/blender/blenlib/intern/storage.c 2011-09-27 01:32:27 UTC (rev 40587)
@@ -488,7 +488,7 @@
buf= MEM_mallocN(size, "file_as_lines");
if (buf) {
- int i, last= 0;
+ size_t i, last= 0;
/*
* size = because on win32 reading
Modified: trunk/blender/source/blender/blenlib/intern/winstuff.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/winstuff.c 2011-09-27 01:28:15 UTC (rev 40586)
+++ trunk/blender/source/blender/blenlib/intern/winstuff.c 2011-09-27 01:32:27 UTC (rev 40587)
@@ -301,7 +301,7 @@
{
char *p;
if( path == NULL || *path == '\0' )
- return ".";
+ return ".";
p = path + strlen(path) - 1;
while( *p == '/' ) {
if( p == path )
@@ -309,11 +309,11 @@
*p-- = '\0';
}
while( p >= path && *p != '/' )
- p--;
+ p--;
return
- p < path ? "." :
- p == path ? "/" :
- (*p = '\0', path);
+ p < path ? "." :
+ p == path ? "/" :
+ (*p = '\0', path);
}
/* End of copied part */
Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_interface.h 2011-09-27 01:28:15 UTC (rev 40586)
+++ trunk/blender/source/blender/editors/include/UI_interface.h 2011-09-27 01:32:27 UTC (rev 40587)
@@ -34,6 +34,7 @@
#ifndef UI_INTERFACE_H
#define UI_INTERFACE_H
+#include "BLO_sys_types.h" /* size_t */
#include "RNA_types.h"
#include "DNA_userdef_types.h"
Modified: trunk/blender/source/blender/editors/space_node/node_intern.h
===================================================================
--- trunk/blender/source/blender/editors/space_node/node_intern.h 2011-09-27 01:28:15 UTC (rev 40586)
+++ trunk/blender/source/blender/editors/space_node/node_intern.h 2011-09-27 01:32:27 UTC (rev 40587)
@@ -33,6 +33,7 @@
#ifndef ED_NODE_INTERN_H
#define ED_NODE_INTERN_H
+#include <stddef.h> /* for size_t */
#include "UI_interface.h"
/* internal exports only */
More information about the Bf-blender-cvs
mailing list