PATCH: psiconv on Mac (was: Psiconv compilation)


Subject: PATCH: psiconv on Mac (was: Psiconv compilation)
From: Frodo Looijaard (frodol@dds.nl)
Date: Sat Jan 20 2001 - 06:32:20 CST


Hubert Figuiere wrote:
>
> At 11:23 +0100 20/01/01, Hubert Figuiere wrote:
>
> >Lines 266-267 are
> > if
> >(decode_byte(lev+3,off+len+datanr,*result,&pixelnr,temp,bits_per_pixel,
> > linelen,&linepos,picsize)) {
> >
> >decodebyte take a int * as a last parameter while picsize is
> >declared as psiconv_u32.
> >
> >Basically, this is a type problem, and since there is no guarantee
> >that 'int' be a 32-bits value (it is in the present case, ie PowerPC
> >code, but in 68k it may not be), I think that this should be
> >avoided. What shall I do (instead of a mad wild typecase) ?
>
> I messed up. It is not picsize but pixelnr. But the problem is still the same.

Ah. That's exactly the kind of problem that only turns up when you compile
on an entirely different architecture. I have attached a small patch
that fixes this; but you may encounter more of these problems. I tried to
keep it as type-clean as possible, but without a rigorous test like yours,
it is very difficult to catch all cases.

Good luck,
  Frodo

-- 
Frodo Looijaard <frodol@dds.nl>  PGP key and more: http://huizen.dds.nl/~frodol
Defenestration n. (formal or joc.):
  The act of removing Windows from your computer in disgust, usually followed
  by the installation of Linux or some other Unix-like operating system.




This archive was generated by hypermail 2b25 : Sat Jan 20 2001 - 06:32:35 CST