diff -purN hylafax-6.0.5.orig//configure hylafax-6.0.5//configure --- hylafax-6.0.5.orig//configure 2010-09-15 16:42:36.000000000 +0200 +++ hylafax-6.0.5//configure 2012-01-27 05:42:50.514762593 +0100 @@ -2548,11 +2548,8 @@ EOF header_ver=\1;lib_ver=\2/p'` Note " Found tiffio.h version ${header_ver}" Note " Found libtiff version ${lib_ver}" - if [ ${header_ver} -ge 19960307 ]; then - case ${lib_ver} in - 3.4) tiff_runlen_t="uint16" ;; - 3.[56789]) tiff_runlen_t="uint32" ;; - esac + if [ ${header_ver} -ge 20111221 ]; then + tiff_runlen_t="uint32" fi else cat 1>&2 <= 0) { union { char buf[512]; - TIFFHeader h; + TIFFHeaderClassic h; } b; ssize_t cc = Sys::read(fd, (char*) &b, sizeof (b)); - if (cc > (ssize_t)sizeof (b.h) && b.h.tiff_version == TIFF_VERSION && + if (cc > (ssize_t)sizeof (b.h) && b.h.tiff_version == TIFFLIB_VERSION && (b.h.tiff_magic == TIFF_BIGENDIAN || b.h.tiff_magic == TIFF_LITTLEENDIAN)) { (void) lseek(fd, 0L, SEEK_SET); // rewind @@ -318,12 +327,12 @@ HylaFAXServer::sendTIFFData(TIFF* tif, F } static void -getLong(TIFF* tif, TIFFDirEntry& de) +getLong(TIFF* tif, OldClassicTIFFDirEntry& de) { TIFFGetField(tif, de.tdir_tag, &de.tdir_offset); } static void -getShort(TIFF* tif, TIFFDirEntry& de) +getShort(TIFF* tif, OldClassicTIFFDirEntry& de) { uint16 v; TIFFGetField(tif, de.tdir_tag, &v); @@ -343,7 +352,7 @@ HylaFAXServer::sendTIFFHeader(TIFF* tif, { static DirTemplate templ = { #define TIFFdiroff(v) \ - (uint32) (sizeof (TIFFHeader) + sizeof (uint16) + \ + (uint32) (sizeof (TIFFHeaderClassic) + sizeof (uint16) + \ (intptr_t) &(((DirTemplate*) 0)->v)) { TIFFTAG_SUBFILETYPE, TIFF_LONG, 1 }, { TIFFTAG_IMAGEWIDTH, TIFF_LONG, 1 }, @@ -368,7 +377,7 @@ HylaFAXServer::sendTIFFHeader(TIFF* tif, 0, // next directory { 0, 1 }, { 0, 1 }, // x+y resolutions }; -#define NTAGS ((TIFFdiroff(link)-TIFFdiroff(SubFileType)) / sizeof (TIFFDirEntry)) +#define NTAGS ((TIFFdiroff(link)-TIFFdiroff(SubFileType)) / sizeof (OldClassicTIFFDirEntry)) /* * Construct the TIFF header for this IFD using * the preconstructed template above. We extract @@ -377,14 +386,14 @@ HylaFAXServer::sendTIFFHeader(TIFF* tif, * of things about the contents of the TIFF file. */ struct { - TIFFHeader h; + TIFFHeaderClassic h; uint16 dircount; u_char dirstuff[sizeof (templ)]; } buf; union { int32 i; char c[4]; } u; u.i = 1; buf.h.tiff_magic = (u.c[0] == 0 ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN); - buf.h.tiff_version = TIFF_VERSION; - buf.h.tiff_diroff = sizeof (TIFFHeader); + buf.h.tiff_version = TIFFLIB_VERSION; + buf.h.tiff_diroff = sizeof (TIFFHeaderClassic); buf.dircount = (uint16) NTAGS; getLong(tif, templ.SubFileType); getLong(tif, templ.ImageWidth); @@ -412,7 +421,7 @@ HylaFAXServer::sendTIFFHeader(TIFF* tif, getShort(tif, templ.CleanFaxData); getLong(tif, templ.ConsecutiveBadFaxLines); if (buf.h.tiff_magic == TIFF_BIGENDIAN) { - TIFFDirEntry* dp = &templ.SubFileType; + OldClassicTIFFDirEntry* dp = &templ.SubFileType; for (u_int i = 0; i < NTAGS; i++) { if (dp->tdir_type == TIFF_SHORT) dp->tdir_offset <<= 16; @@ -957,7 +966,7 @@ HylaFAXServer::docType(const char* docna if (FileCache::lookup(docname, sb) && S_ISREG(sb.st_mode)) { union { char buf[512]; - TIFFHeader h; + TIFFHeaderClassic h; } b; ssize_t cc = Sys::read(fd, (char*) &b, sizeof (b)); if (cc > 2 && b.buf[0] == '%' && b.buf[1] == '!')