AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

1994.07.21 14:10 "Making the TIFF library run on ALPHA machines....", by Dave Wecker

I made a pretty simple patch. I changed all references from:

    long, u_long, unsigned long

to:

    LONG, ULONG

and then added:

    #ifndef LONG
    #ifdef __alpha
    typedef int LONG;
    typedef unsigned int ULONG;
    #else
    typedef long LONG;
    typedef unsigned long ULONG;
    #endif
    #endif

to "tiffcomp.h" and "tiff.h". You also need to warn applications to define their calling variables as type "LONG" instead of "long" (or else zero them out before hand), otherwise the high bits could be any random value. For example in:

        TIFFGetField(tiff,TIFFTAG_IMAGEWIDTH,&width);

`width' can NOT be type `long' (unless you zero it out first).

This is only a temporary patch, but at least it allowed the library to work so I thought you might be interested.

Best Regards,

____________________________________________________________________________
dave                                      ENET:   CRL::WECKER  WECKER@CRL
      Digital Equipment Corporation       CRL:    617/621-6699 DTN: 259-6699
      Cambridge Research Lab              FAX:    617/621-6650 DTN: 259-6650
      One Kendall Square, Bldg 700        INET:   wecker@crl.dec.com
      Cambridge, MA 02139                 PROJS:  IGOR, Multimedia Research
           http://www.crl.dec.com/crl/people/biographies/wecker.html

Disclaimer: The opinions expressed are my own and in no way should be taken
            as representative of my employer Digital Equipment Corporation.
____________________________________________________________________________