TIFF and LibTiff Mail List Archive

2003.06.24 14:09 "Compilation of libtiff with C++ compiler on HP", by Fridiric Delhoume


Compiling libtiff 3.5.7 on HP platform with aCC3.30 generates lots of warnings and

even some errors.

The errors are due to conversion from pointers to int not allowed. It is necessary to first cast to a 64 bits type.

Here is an example (file tif_dirwrite.c)

// my modification.
#if defined(__hpux) && defined(__LP64__)
#define HDROFF(f) ((toff_t)(unsigned long) &(((TIFFHeader*) 0)->f))
// original
#define HDROFF(f) ((toff_t) &(((TIFFHeader*) 0)->f))

Same problem arises in tif_packbits.c
#if defined(__hpux) && defined(__LP64__)
    tsize_t rowsize = (tsize_t)(unsigned long) tif->tif_data;
    tsize_t rowsize = (tsize_t) tif->tif_data;
#if defined(__hpux) && defined(__LP64__)
        rowsize = (tsize_t)(unsigned long) tif->tif_data;
        rowsize = (tsize_t) tif->tif_data;

The other files compile but some have warnings.

I attach a log of the compilation.

Note that some files from the original source might not be present in the log.