rpms/lesstif/devel lesstif-0.95.0-PutPixel32.patch, NONE, 1.1 lesstif.spec, 1.22, 1.23
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Mon Jun 16 20:40:01 UTC 2008
Author: jwrdegoede
Update of /cvs/extras/rpms/lesstif/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25389
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/devel/lesstif.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- lesstif.spec 12 May 2008 15:33:20 -0000 1.22
+++ lesstif.spec 16 Jun 2008 20:39:14 -0000 1.23
@@ -1,7 +1,7 @@
Summary: OSF/Motif(R) library clone
Name: lesstif
Version: 0.95.0
-Release: 24%{?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/
@@ -157,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
@@ -311,6 +313,9 @@
%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
More information about the scm-commits
mailing list