2008.08.12 21:53 "Re: [Tiff] tiffdump Win64 patch", by Bob Friesenhahn
While testing large files on Windows, I came across the following bug in
tiffdump. The problem is that off_t is a 32-bit integer type on
Windows. Someone looks to have already fixed the other call to _lseeki64() in tiffdump.c but forgot another place.
This patch is now applied to CVS. Please verify that I did things correctly.
Bob
$ cvs diff -u tiffdump.c
Index: tiffdump.c=================================================================== RCS file: /cvs/maptools/cvsroot/libtiff/tools/tiffdump.c,v retrieving revision 1.17
diff -u -r1.17 tiffdump.c
--- tiffdump.c 9 Apr 2008 09:33:30 -0000 1.17
+++ tiffdump.c 12 Aug 2008 21:12:53 -0000
@@ -434,7 +434,7 @@
if (datamem) {
#if defined(__WIN32__) && defined(_MSC_VER)
if (_lseeki64(fd, (__int64)dataoffset,
SEEK_SET)- != (off_t)dataoffset) {
+ != (__int64)dataoffset) {#else
if (lseek(fd, (off_t)dataoffset, 0) !=
(off_t)dataoffset) {
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/