Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 29401 invoked from network); 12 Aug 2008 21:20:40 -0000
Received: from cheryl.telenet-ops.be ([195.130.136.3])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 12 Aug 2008 21:20:40 -0000
Received: from mindy.telenet-ops.be (mindy.telenet-ops.be [195.130.136.8])
	by cheryl.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m7CLKeqN003406
	for <info@awaresystems.be>; Tue, 12 Aug 2008 23:20:40 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mindy.telenet-ops.be (Postfix) with SMTP id 90ECE60003
	for <info@awaresystems.be>; Tue, 12 Aug 2008 23:20:40 +0200 (CEST)
Received: from circe.telenet-ops.be (circe.telenet-ops.be [195.130.132.51])
	by mindy.telenet-ops.be (Postfix) with ESMTP id 8AC1D60002
	for <info@awaresystems.be>; Tue, 12 Aug 2008 23:20:40 +0200 (CEST)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by circe.telenet-ops.be (Postfix) with ESMTP id 45F3B33E6A
	for <info@awaresystems.be>; Tue, 12 Aug 2008 23:20:40 +0200 (CEST)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m7CLHVrG013880;
	Tue, 12 Aug 2008 17:18:57 -0400
Received: from mail.sidefx.com (mail.sidefx.com [38.99.137.163])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m7CLHSCB013877
	for <tiff@lists.maptools.org>; Tue, 12 Aug 2008 17:17:28 -0400
Received: from [192.168.235.105] (unknown [192.168.235.105])
	by mail.sidefx.com (Postfix) with ESMTP id 368585C00F
	for <tiff@lists.maptools.org>; Tue, 12 Aug 2008 17:17:27 -0400 (EDT)
Message-ID: <48A1FDE9.1070800@sidefx.com>
Date: Tue, 12 Aug 2008 17:17:29 -0400
From: Edward Lam <edward@sidefx.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: TIFF mailing list <tiff@lists.maptools.org>
References: <48378FEB.3090402@pobox.com> <483AC835.8020202@sidefx.com>
In-Reply-To: <483AC835.8020202@sidefx.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [Tiff] tiffdump Win64 patch
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-SpamCatcher-Score: 50 [XX]

Hi,

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.

$ 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) {


Cheers,
-Edward
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
