Patch for Windows build

Michael Dürig <[email protected]> Thu, 23 Nov 2006 14:08:09 +0100
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------040506080300070604060905
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


The following patch is required for building on Windows.

regards,
Michael

--------------040506080300070604060905
Content-Type: text/plain;
 name="patch1.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch1.patch"

Index: packer/pack_bbox.h
===================================================================
RCS file: /cvsroot/chromium/cr/packer/pack_bbox.h,v
retrieving revision 1.6
diff -u -r1.6 pack_bbox.h
--- packer/pack_bbox.h	25 Oct 2006 16:26:05 -0000	1.6
+++ packer/pack_bbox.h	23 Nov 2006 12:25:58 -0000
@@ -10,28 +10,28 @@
 #include "cr_pack.h"
 
 #define UPDATE_1D_BBOX(X) \
-if (pc->bounds_min.x > (X))   pc->bounds_min.x = (X);\
+if (pc->bounds_min.x > (GLfloat) (X))   pc->bounds_min.x = (GLfloat) (X);\
 if (pc->bounds_min.y > 0.0f)  pc->bounds_min.y = 0.0f;\
 if (pc->bounds_min.z > 0.0f)  pc->bounds_min.z = 0.0f;\
-if (pc->bounds_max.x < (X))   pc->bounds_max.x = (X);\
+if (pc->bounds_max.x < (GLfloat) (X))   pc->bounds_max.x = (GLfloat) (X);\
 if (pc->bounds_max.y < 0.0f)  pc->bounds_max.y = 0.0f;\
 if (pc->bounds_max.z < 0.0f)  pc->bounds_max.z = 0.0f
 
 #define UPDATE_2D_BBOX(X, Y) \
-if (pc->bounds_min.x > (X))   pc->bounds_min.x = (X);\
-if (pc->bounds_min.y > (Y))   pc->bounds_min.y = (Y);\
+if (pc->bounds_min.x > (GLfloat) (X))   pc->bounds_min.x = (GLfloat) (X);\
+if (pc->bounds_min.y > (GLfloat) (Y))   pc->bounds_min.y = (GLfloat) (Y);\
 if (pc->bounds_min.z > 0.0f)  pc->bounds_min.z = 0.0f;\
-if (pc->bounds_max.x < (X))   pc->bounds_max.x = (X);\
-if (pc->bounds_max.y < (Y))   pc->bounds_max.y = (Y);\
+if (pc->bounds_max.x < (GLfloat) (X))   pc->bounds_max.x = (GLfloat) (X);\
+if (pc->bounds_max.y < (GLfloat) (Y))   pc->bounds_max.y = (GLfloat) (Y);\
 if (pc->bounds_max.z < 0.0f)  pc->bounds_max.z = 0.0f
 
 #define UPDATE_3D_BBOX(X, Y, Z) \
-if (pc->bounds_min.x > (X))   pc->bounds_min.x = (X); \
-if (pc->bounds_min.y > (Y))   pc->bounds_min.y = (Y); \
-if (pc->bounds_min.z > (Z))   pc->bounds_min.z = (Z); \
-if (pc->bounds_max.x < (X))   pc->bounds_max.x = (X); \
-if (pc->bounds_max.y < (Y))   pc->bounds_max.y = (Y); \
-if (pc->bounds_max.z < (Z))   pc->bounds_max.z = (Z)
+if (pc->bounds_min.x > (GLfloat) (X))   pc->bounds_min.x = (GLfloat) (X); \
+if (pc->bounds_min.y > (GLfloat) (Y))   pc->bounds_min.y = (GLfloat) (Y); \
+if (pc->bounds_min.z > (GLfloat) (Z))   pc->bounds_min.z = (GLfloat) (Z); \
+if (pc->bounds_max.x < (GLfloat) (X))   pc->bounds_max.x = (GLfloat) (X); \
+if (pc->bounds_max.y < (GLfloat) (Y))   pc->bounds_max.y = (GLfloat) (Y); \
+if (pc->bounds_max.z < (GLfloat) (Z))   pc->bounds_max.z = (GLfloat) (Z)
 
 #define UPDATE_4D_BBOX UPDATE_3D_BBOX
 
Index: spu/hiddenline/hiddenlinespu_init.c
===================================================================
RCS file: /cvsroot/chromium/cr/spu/hiddenline/hiddenlinespu_init.c,v
retrieving revision 1.15
diff -u -r1.15 hiddenlinespu_init.c
--- spu/hiddenline/hiddenlinespu_init.c	28 Oct 2006 16:58:03 -0000	1.15
+++ spu/hiddenline/hiddenlinespu_init.c	23 Nov 2006 12:27:37 -0000
@@ -51,7 +51,7 @@
 	hiddenlinespuCreateFunctions();
 
 	hiddenline_spu.contextTable = crAllocHashtable();
-#ifndef CHROMIUM_THREADSAFE
+#ifdef CHROMIUM_THREADSAFE
 	crInitTSD(&_HiddenlineTSD);
 	hiddenline_spu.currentContext = NULL;
 #endif
Index: util/util.def
===================================================================
RCS file: /cvsroot/chromium/cr/util/util.def,v
retrieving revision 1.58
diff -u -r1.58 util.def
--- util/util.def	28 Oct 2006 16:56:49 -0000	1.58
+++ util/util.def	23 Nov 2006 12:30:48 -0000
@@ -80,7 +80,6 @@
 crHashtableSearch
 crHashtableReplace
 crHashtableNumElements
-crHashtableWalk
 crAllocHashtable
 crFreeHashtable
 crDetermineEndianness
@@ -100,9 +99,6 @@
 crMemcpy
 crMemcmp
 crMemZero
-crCalloc
-crSetTSD
-crGetTSD
 crInitMutex
 crFreeMutex
 crLockMutex
@@ -121,7 +117,7 @@
 crInitTSD
 crInitTSDF
 crSetTSD
-crGetTSD
+crGetTSD=TlsGetValue
 crFreeTSD
 crRandFloat
 crRandInt

--------------040506080300070604060905
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--------------040506080300070604060905
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Chromium-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-dev

--------------040506080300070604060905--