rpms/lesstif/F-9 lesstif-0.95.0-PutPixel32.patch, NONE, 1.1 lesstif.spec, 1.21, 1.22

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Mon Jun 16 20:49:25 UTC 2008


Author: jwrdegoede

Update of /cvs/extras/rpms/lesstif/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26461

Modified Files:
	lesstif.spec 
Added Files:
	lesstif-0.95.0-PutPixel32.patch 
Log Message:
* Mon Jun 16 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-25
- Fix PutPixel32 crashing on 64 bit (bz 437133)


lesstif-0.95.0-PutPixel32.patch:

--- NEW FILE lesstif-0.95.0-PutPixel32.patch ---
diff -up lesstif-0.95.0/lib/Xm-2.1/Xpmcreate.c~ lesstif-0.95.0/lib/Xm-2.1/Xpmcreate.c
--- lesstif-0.95.0/lib/Xm-2.1/Xpmcreate.c~	2008-06-16 22:22:43.000000000 +0200
+++ lesstif-0.95.0/lib/Xm-2.1/Xpmcreate.c	2008-06-16 22:22:43.000000000 +0200
@@ -179,9 +179,7 @@ LFUNC(PutImagePixels1, void, (XImage *im
 
 LFUNC(PutPixel1, int, (XImage *ximage, int x, int y, unsigned long pixel));
 LFUNC(PutPixel, int, (XImage *ximage, int x, int y, unsigned long pixel));
-#if !defined(WORD64) && !defined(LONG64)
 LFUNC(PutPixel32, int, (XImage *ximage, int x, int y, unsigned long pixel));
-#endif
 LFUNC(PutPixel32MSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
 LFUNC(PutPixel32LSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
 LFUNC(PutPixel16MSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
@@ -1879,7 +1877,6 @@ PutPixel(ximage, x, y, pixel)
     return 1;
 }
 
-#if !defined(WORD64) && !defined(LONG64)
 static int
 PutPixel32(ximage, x, y, pixel)
     register XImage *ximage;
@@ -1893,10 +1890,9 @@ PutPixel32(ximage, x, y, pixel)
     	return 0;
 
     addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)];
-    *((unsigned long *)addr) = pixel;
+    *((unsigned int *)addr) = pixel;
     return 1;
 }
-#endif
 
 static int
 PutPixel32MSB(ximage, x, y, pixel)
@@ -2211,15 +2207,12 @@ xpmParseDataAndCreate(display, data, ima
 	    else
 		ximage->f.put_pixel = PutPixel16LSB;
 	else if (ximage->bits_per_pixel == 32)
-#if !defined(WORD64) && !defined(LONG64)
 	    if (*((char *)&byteorderpixel) == ximage->byte_order)
 		ximage->f.put_pixel = PutPixel32;
+	    else if (ximage->bitmap_bit_order == MSBFirst)
+		ximage->f.put_pixel = PutPixel32MSB;
 	    else
-#endif
-		if (ximage->bitmap_bit_order == MSBFirst)
-		    ximage->f.put_pixel = PutPixel32MSB;
-		else
-		    ximage->f.put_pixel = PutPixel32LSB;
+		ximage->f.put_pixel = PutPixel32LSB;
 	else if ((ximage->bits_per_pixel | ximage->depth) == 1)
 	    ximage->f.put_pixel = PutPixel1;
 	else


Index: lesstif.spec
===================================================================
RCS file: /cvs/extras/rpms/lesstif/F-9/lesstif.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- lesstif.spec	19 Feb 2008 18:18:25 -0000	1.21
+++ lesstif.spec	16 Jun 2008 20:48:41 -0000	1.22
@@ -1,7 +1,7 @@
 Summary: OSF/Motif(R) library clone
 Name: lesstif
 Version: 0.95.0
-Release: 23%{?dist}
+Release: 25%{?dist}
 License: LGPLv2+
 # in Xm-2.1/
 # some files are MIT
@@ -55,6 +55,7 @@
 # remove reference to libdir, since it is not necessary, and leads to
 # conflict in multiarch setups
 Patch14: lesstif-0.95.0-nolibdir.patch
+Patch15: lesstif-0.95.0-PutPixel32.patch
 
 Url: http://www.lesstif.org/
 
@@ -67,7 +68,9 @@
 # lynx is used to transform html in txt
 BuildRequires: lynx
 # for tests
-BuildRequires: libGLw-devel
+# the libGLw-devel leads to a circular build dependency and the test suite
+# is not run, so this BuildRequires is not used.
+#BuildRequires: libGLw-devel
 BuildRequires: bitmap-devel
 # needed for aclocal, to find the aclocal dir for the autoconf macro
 BuildRequires: automake
@@ -155,6 +158,7 @@
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1 -b .nolibdir
+%patch15 -p1
 
 # and pick up some fixes from Debian
 patch -p1 < debian/patches/020_xpmpipethrough.diff
@@ -309,6 +313,13 @@
 
 
 %changelog
+* Mon Jun 16 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-25
+- Fix PutPixel32 crashing on 64 bit (bz 437133)
+
+* Mon May 12 2008 Patrice Dumas <pertusus at free.fr> 0.95.0-24
+- remove the BuildRequires: libGLw-devel, it leads to circular build 
+  dependency with no gain
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.95.0-23
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list