|
From: Ethan M. <merritt@u.washington.edu> - 2008-09-09 18:48:17
|
On Monday 08 September 2008 11:06:50 Ethan Merritt wrote: > On Sunday 07 September 2008 23:48:20 Shigeharu TAKENO wrote: > > > > I found some points that seem to be misprints and problems in CVS > > version. > > > > > diff -uN term/cairo.trm.ORG term/cairo.trm > > --- term/cairo.trm.ORG Mon Sep 8 10:40:53 2008 > > +++ term/cairo.trm Mon Sep 8 13:31:18 2008 > > @@ -505,7 +505,11 @@ > > int stride = cairo_image_surface_get_stride(surface); > > int i, j, x1 = 0, y1 = 0, x2 = width, y2 = height; > > > > +#ifndef __sun > > typedef u_int32_t uint32; > > +#else > > + typedef uint32_t uint32; > > +#endif > > uint32 BG = ~0x0; > > uint32 *row; > > Yeah. That's what I was worried about when I commented on the > pngcairo cropping patch. > > I don't think it is sufficient to test specifically for __sun. > It will break for other compilers and other platforms as well. > That typedef is simply wrong. > It needs to take the type from somewhere in the cairo headers. > Or, at worst, the configure script needs to check for legal types. > > Note that initializing BG = ~0x0 is also wrong, since it assumes > that the background is always solid white. I have now fixed these in CVS by adding tests in configure.in Cropping will fail silently for platforms that both - do not use autoconf - have (sizeof(int) != 4) This can be fixed by adding an explicit definition of GP_UINT32_T in the appropriate platform-specific configuration file. -- Ethan A Merritt |