1993.08.12 09:55 "libtiff on Alpha...", by Craig Hockenberry
Has anybody ported the library to the DEC Alpha? Our first effort, without modifying anything, produced a library that fails in tif_readdir.c It looks like the offset used in lseek fails since it is a long. Longs on the Alpha are 8 bytes (64 bits), rather than 4 bytes as on most other platforms. It seems fairly obvious to define/cast it as an off_t, but I suspect there will be more to it than this...
Rather than dive in and try to fix these types of problems, we are wondering if anyone else has already done this. From our experience in porting the other parts of our product (a GIS system), it could be quite a task. There have been problems with literals getting the sign bit shifted into the upper word of a long. For example:
unsigned long value;
unsigned int n;
value = 1 << n;
produces a value with what you'd expect in the lower word and all 1's in the upper word (the sign bit of the int literal). This happens with boolean operations as well. I can just imagine the fun one would have with the bit/byte ordering in the library.
Also, there is a version of "xv" on the Alpha on which we are doing the port. It behaves really strangely with TIFF files. I can't read any files that were created on another system. I can, however, read a file that was created on the Alpha (I saved the internal image as TIFF and it loads back fine). Any ideas?
Any suggestions, code or experience will be greatly appreciated. Thanks in advance.
Craig Hockenberry | Genasys II Pty. Ltd.
| 13th Level, 33 Berry St., North Sydney, NSW, Australia
Tobacco, | Phone: +61-2-954-0022 (-9930 FAX)
e Venere. | Internet: firstname.lastname@example.org