Windows broken build

Michael Dürig <[email protected]> Mon, 27 Feb 2006 18:12:13 +0100
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
I had to apply the following patch in order to get Chromium to build on 
Windows.

Michael
cr.patch (text/plain, 5.3 KB)
Index: dlm/Makefile
===================================================================
RCS file: /cvsroot/chromium/cr/dlm/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- dlm/Makefile	1 Feb 2006 17:11:27 -0000	1.5
+++ dlm/Makefile	21 Feb 2006 12:41:52 -0000
@@ -8,7 +8,7 @@
 include $(TOP)/arch.mk
 
 LIBRARY = crdlm
-LIBRARIES = spuload crutil crmothership
+LIBRARIES = spuload crutil crmothership crstate
 SHARED = 1
 FILES = dlm dlm_lists dlm_generated dlm_pointers dlm_arrays dlm_checklist dlm_error dlm_calllist dlm_bbox
 LIB_DEFS = dlm.def
Index: dlm/dlm_bbox.c
===================================================================
RCS file: /cvsroot/chromium/cr/dlm/dlm_bbox.c,v
retrieving revision 1.3
diff -u -r1.3 dlm_bbox.c
--- dlm/dlm_bbox.c	24 Feb 2006 22:01:06 -0000	1.3
+++ dlm/dlm_bbox.c	27 Feb 2006 10:38:24 -0000
@@ -378,27 +378,28 @@
 {
 	crMemZero(t, sizeof(*t));
 	crSPUInitDispatchNops(t);
-	t->MatrixMode = MatrixMode;
-	t->LoadIdentity = LoadIdentity;
-	t->LoadMatrixf = LoadMatrixf;
-	t->LoadMatrixd = LoadMatrixd;
-	t->PushMatrix = PushMatrix;
-	t->PopMatrix = PopMatrix;
-	t->MultMatrixf = MultMatrixf;
-	t->MultMatrixd = MultMatrixd;
-	t->Rotatef = Rotatef;
-                   	t->Rotated = Rotated;
-	t->Translatef = Translatef;
-	t->Translated = Translated;
-	t->Scalef = Scalef;
-	t->Scaled = Scaled;
-	t->Vertex2f = Vertex2f;
-	t->Vertex2fv = Vertex2fv;
-	t->Vertex3f = Vertex3f;
-	t->Vertex3fv = Vertex3fv;
-	t->Vertex4f = Vertex4f;
-	t->Vertex4fv = Vertex4fv;
-	t->VertexAttrib3fARB = VertexAttrib3fARB;
+  /* drm1 */
+	t->MatrixMode = (MatrixModeFunc_t)MatrixMode;
+	t->LoadIdentity = (LoadIdentityFunc_t)LoadIdentity;
+	t->LoadMatrixf = (LoadMatrixfFunc_t)LoadMatrixf;
+	t->LoadMatrixd = (LoadMatrixdFunc_t)LoadMatrixd;
+	t->PushMatrix = (PushMatrixFunc_t)PushMatrix;
+	t->PopMatrix = (PopMatrixFunc_t)PopMatrix;
+	t->MultMatrixf = (MultMatrixfFunc_t)MultMatrixf;
+	t->MultMatrixd = (MultMatrixdFunc_t)MultMatrixd;
+	t->Rotatef = (RotatefFunc_t)Rotatef;
+  t->Rotated = (RotatedFunc_t)Rotated;
+	t->Translatef = (TranslatefFunc_t)Translatef;
+	t->Translated = (TranslatedFunc_t)Translated;
+	t->Scalef = (ScalefFunc_t)Scalef;
+	t->Scaled = (ScaledFunc_t)Scaled;
+	t->Vertex2f = (Vertex2fFunc_t)Vertex2f;
+	t->Vertex2fv = (Vertex2fvFunc_t)Vertex2fv;
+	t->Vertex3f = (Vertex3fFunc_t)Vertex3f;
+	t->Vertex3fv = (Vertex3fvFunc_t)Vertex3fv;
+	t->Vertex4f = (Vertex4fFunc_t)Vertex4f;
+	t->Vertex4fv = (Vertex4fvFunc_t)Vertex4fv;
+	t->VertexAttrib3fARB = (VertexAttrib3fARBFunc_t)VertexAttrib3fARB;
 }
 
 
Index: include/cr_threads.h
===================================================================
RCS file: /cvsroot/chromium/cr/include/cr_threads.h,v
retrieving revision 1.10
diff -u -r1.10 cr_threads.h
--- include/cr_threads.h	3 Feb 2006 22:50:44 -0000	1.10
+++ include/cr_threads.h	21 Feb 2006 11:06:33 -0000
@@ -59,7 +59,7 @@
 
 /* Condition variable datatype */
 #ifdef WINDOWS
-typedef int CRcondition;
+typedef int CRcondition;  /* drm1 */
 #else
 typedef pthread_cond_t CRcondition;
 #endif
@@ -89,7 +89,7 @@
 
 /* Semaphores */
 #ifdef WINDOWS
-	typedef in CRsemaphore;
+	typedef int CRsemaphore;
 #else
 	typedef sem_t CRsemaphore;
 #endif
Index: mothership/client/client.def
===================================================================
RCS file: /cvsroot/chromium/cr/mothership/client/client.def,v
retrieving revision 1.23
diff -u -r1.23 client.def
--- mothership/client/client.def	2 Feb 2005 04:18:46 -0000	1.23
+++ mothership/client/client.def	21 Feb 2006 13:44:45 -0000
@@ -35,3 +35,4 @@
 crMothershipIdentifyCRUTProxy
 crMothershipIdentifyCRUTServer
 crMothershipExit
+crMothershipReset
Index: opengl_stub/context.c
===================================================================
RCS file: /cvsroot/chromium/cr/opengl_stub/context.c,v
retrieving revision 1.71
diff -u -r1.71 context.c
--- opengl_stub/context.c	5 Jan 2006 17:49:24 -0000	1.71
+++ opengl_stub/context.c	21 Feb 2006 13:29:00 -0000
@@ -246,8 +246,14 @@
 	crStrncpy(context->dpyName, dpyName, MAX_DPY_NAME);
 	context->dpyName[MAX_DPY_NAME-1] = 0;
 
+/* drm1 */  
+#ifdef DARWIN
 	context->share = (ContextInfo *)
 		crHashtableSearch(stub.contextTable, (unsigned long) shareCtx);
+#elif defined(GLX)
+	context->share = (ContextInfo *)
+		crHashtableSearch(stub.contextTable, (unsigned long) shareCtx);
+#endif
 
 	crHashtableAdd(stub.contextTable, context->id, (void *) context);
 
@@ -778,7 +784,16 @@
 			/*
 			 * Create a Chromium context.
 			 */
+       
+/* drm1 */         
+#ifdef DARWIN
 			GLint spuShareCtx = context->share ? context->share->spuContext : 0;
+#elif defined(GLX)
+			GLint spuShareCtx = context->share ? context->share->spuContext : 0;
+#else
+      GLint spuShareCtx = 0;
+#endif
+
 			CRASSERT(stub.spu);
 			CRASSERT(stub.spu->dispatch_table.CreateContext);
 			context->type = CHROMIUM;
Index: packer/pack_init.c
===================================================================
RCS file: /cvsroot/chromium/cr/packer/pack_init.c,v
retrieving revision 1.8
diff -u -r1.8 pack_init.c
--- packer/pack_init.c	10 Aug 2004 22:29:26 -0000	1.8
+++ packer/pack_init.c	21 Feb 2006 11:06:37 -0000
@@ -13,6 +13,7 @@
 CRtsd _PackerTSD;
 int cr_packer_globals;  /* dummy - for the sake of packer.def */
 #else
+int _PackerTSD;         /* dummy - for the sake of packer.def */  /* drm1 */
 DLLDATA CRPackContext cr_packer_globals;
 #endif