SOURCES: xv-c.patch (NEW) - fix build with recent gcc

qboosh qboosh at pld-linux.org
Wed Oct 18 23:55:07 CEST 2006


Author: qboosh                       Date: Wed Oct 18 21:55:07 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix build with recent gcc

---- Files affected:
SOURCES:
   xv-c.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/xv-c.patch
diff -u /dev/null SOURCES/xv-c.patch:1.1
--- /dev/null	Wed Oct 18 23:55:07 2006
+++ SOURCES/xv-c.patch	Wed Oct 18 23:55:02 2006
@@ -0,0 +1,42 @@
+--- xv-3.10a/xvimage.c.orig	2006-10-18 23:40:36.303520000 +0200
++++ xv-3.10a/xvimage.c	2006-10-18 23:50:53.622100250 +0200
+@@ -1721,14 +1721,14 @@
+   case 12:
+   case 15:
+   case 16: {
+-    unsigned short  *imagedata, *ip;
++    unsigned char   *imagedata, *ip;
+     byte  *pp;
+ 
+-    imagedata = (unsigned short *) malloc((size_t) (2*wide*high));
++    imagedata = (unsigned char *) malloc((size_t) (2*wide*high));
+     if (!imagedata) FatalError("couldn't malloc imagedata");
+ 
+     xim = XCreateImage(theDisp,theVisual,dispDEEP,ZPixmap,0,
+-		       (char *) imagedata,  wide,  high, 16, 0);
++		       imagedata,  wide,  high, 16, 0);
+     if (!xim) FatalError("couldn't create xim!");
+ 
+     if (dispDEEP == 12 && xim->bits_per_pixel != 16) {
+@@ -1747,8 +1747,8 @@
+ 	if (dithpic) xcol = ((*pp) ? white : black) & 0xffff;
+ 		else xcol = xcolors[*pp] & 0xffff;
+ 
+-	*((unsigned char *)ip)++ = (xcol>>8) & 0xff;
+-	*((unsigned char *)ip)++ = (xcol) & 0xff;
++	*ip++ = (xcol>>8) & 0xff;
++	*ip++ = (xcol) & 0xff;
+       }
+     }
+     else {   /* LSBFirst */
+@@ -1758,8 +1758,8 @@
+ 	if (dithpic) xcol = ((*pp) ? white : black) & 0xffff;
+ 	        else xcol = xcolors[*pp];
+ 
+-	*((unsigned char *)ip)++ = (xcol) & 0xff;
+-	*((unsigned char *)ip)++ = (xcol>>8) & 0xff;
++	*ip++ = (xcol) & 0xff;
++	*ip++ = (xcol>>8) & 0xff;
+       }
+     }
+   }
================================================================


More information about the pld-cvs-commit mailing list