X-Account-Key: account1
X-UIDL: 6cd27429cf84d7fadcd27a480f38266b
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:                                                                                 
Received: from lists.maptools.org (lothlorien.howardsilvan.com [127.0.0.1])
	by mail.howardsilvan.com (Postfix) with ESMTPS id 6D0C76721B8
	for <faxguy@howardsilvan.com>; Tue, 15 Sep 2015 09:12:09 -0700 (PDT)
Received: from lists.maptools.org ([94.23.4.142] helo=lists.maptools.org)
	by lothlorien.howardsilvan.com
	with SMTP (2.3.3); 15 Sep 2015	09:12:08 -0800
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 906A535C278;
	Tue, 15 Sep 2015 11:10:35 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id 9999335C132
	for <tiff@lists.maptools.org>; Tue, 15 Sep 2015 11:10:17 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4)
	with ESMTP id	t8FGAZB5028239; Tue, 15 Sep 2015 11:10:35 -0500 (CDT)
Date: Tue, 15 Sep 2015 11:10:35 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Edward Lam <edward@sidefx.com>
In-Reply-To: <55F83B03.80400@sidefx.com>
Message-ID: <alpine.GSO.2.01.1509151108250.1959@freddy.simplesystems.org>
References:
	<EE198826B5CB824FAD655FAF95665168743EB4D255@SLUBMAIL.slub-dresden.de>
	<55F8228F.2090707@sidefx.com>
	<alpine.GSO.2.01.1509150930430.1959@freddy.simplesystems.org>
	<55F83B03.80400@sidefx.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);	Tue, 15 Sep 2015 11:10:35 -0500
 (CDT)
Cc: "tiff@lists.maptools.org" <tiff@lists.maptools.org>
Subject: Re: [Tiff] "bad file descriptor" if operating with lseek on
 filedescriptor given by TIFFFileno (Windows only)
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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-Assp-ID: lothlorien.howardsilvan.com m1-33529-05512
X-Assp-Session: 7FE10EF529D8 (mail 1)
X-Assp-Detected-RIP: 65.66.246.65, 65.66.246.74
X-Assp-Source-IP: 65.66.246.65
X-Assp-Envelope-From: tiff-bounces@lists.maptools.org
X-Assp-Intended-For: faxguy@howardsilvan.com
X-Assp-Version: 2.3.3(14029) on lothlorien.howardsilvan.com
X-Assp-Server-TLS: yes
X-Assp-Delay: not delayed (whitelisted); 15 Sep 2015 09:12:09 -0800
X-Assp-Whitelisted: Yes (whitelistdb)
Return-Path: tiff-bounces@lists.maptools.org
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On Tue, 15 Sep 2015, Edward Lam wrote:

> On 15/09/2015 10:33 AM, Bob Friesenhahn wrote:
>>> I second Bob's suggestion. For completeness of the mailing list,
>>> I'd point out again that this is a known problem:
>> 
>> The problem might not be that one.
>
> Sure, but the symptoms sure sound like it. One of the problems with
> tif_win32.c is that TIFFFileno() returns a Windows "HANDLE" type as
> opposed to an int fd that can be used for lseek(). So if he managed to
> cross compile in such a ma
>
>> I am not aware that any of us has tested cross-compilation to WIN32
>> or WIN64 from a Linux system and verified that everything works.  I
>> have only verified compilation and tests under MSYS shell with MinGW
>> (as well as Cygwin) on a Windows 7 system.
>
> If he managed to cross-compile using tif_win32.c, then using the result of 
> TIFFFileno() with lseek() *must* be a problem because it can never work.

Someone previously changed configure so that it uses tif_win32.c by 
default under Windows.  If TIFFFileno() returns a "HANDLE" type, then 
the using code would need to know about that and use appropriate 
measures.  This is in addition to the existing problem that the 
"HANDLE" type does not always fit in the space it is stored in.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/


