Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 14526 invoked from network); 12 Aug 2008 03:56:37 -0000
Received: from floyd.telenet-ops.be ([195.130.136.4])
          (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 03:56:37 -0000
Received: from waldo.telenet-ops.be (waldo.telenet-ops.be [195.130.136.10])
	by floyd.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m7C3ubLm024678
	for <info@awaresystems.be>; Tue, 12 Aug 2008 05:56:37 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])
	by waldo.telenet-ops.be (Postfix) with SMTP id BC7661C004
	for <info@awaresystems.be>; Tue, 12 Aug 2008 05:56:37 +0200 (CEST)
Received: from penia.telenet-ops.be (penia.telenet-ops.be [195.130.132.39])
	by waldo.telenet-ops.be (Postfix) with ESMTP id B6FB01C002
	for <info@awaresystems.be>; Tue, 12 Aug 2008 05:56:37 +0200 (CEST)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by penia.telenet-ops.be (Postfix) with ESMTP id 7212B33E602
	for <info@awaresystems.be>; Tue, 12 Aug 2008 05:56:37 +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 m7C3rFG7024526;
	Mon, 11 Aug 2008 23:54:54 -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 m7C3rCoo024523
	for <tiff@lists.maptools.org>; Mon, 11 Aug 2008 23:53:12 -0400
Received: from www.sidefx.com (unknown [149.99.58.193])
	by mail.sidefx.com (Postfix) with ESMTP id DBA355C03B;
	Mon, 11 Aug 2008 23:53:10 -0400 (EDT)
Received: from 99.237.126.63 (SquirrelMail authenticated user edward)
	by www.sidefx.com with HTTP; Mon, 11 Aug 2008 23:53:10 -0400 (EDT)
Message-ID: <52089.99.237.126.63.1218513190.squirrel@www.sidefx.com>
In-Reply-To: <Pine.SOC.4.64.0808112142330.1107@freddy.simplesystems.org>
References: <5a28e8c20808111057k7bec8c86r1f56a7239d468afe@mail.gmail.com>
	<Pine.SOC.4.64.0808111422260.1107@freddy.simplesystems.org>
	<5a28e8c20808111235o3faede7o69900dc9d55633be@mail.gmail.com>
	<Pine.SOC.4.64.0808111523170.1107@freddy.simplesystems.org>
	<57562.99.237.126.63.1218501383.squirrel@www.sidefx.com>
	<Pine.SOC.4.64.0808112142330.1107@freddy.simplesystems.org>
Date: Mon, 11 Aug 2008 23:53:10 -0400 (EDT)
Subject: Re: [Tiff] windows 64 bit build
From: "Edward Lam" <edward@sidefx.com>
To: "Bob Friesenhahn" <bfriesen@simple.dallas.tx.us>
User-Agent: SquirrelMail/1.4.9a
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Cc: tiff@lists.maptools.org
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: 10 [X]

On Mon, August 11, 2008 22:44, Bob Friesenhahn wrote:
> On Mon, 11 Aug 2008, Edward Lam wrote:
>> OK, second take then. We keep everything the same but fix it differently
>> in tif_win32.c. In TIFFFdOpen(), we use _get_osfhandle() to convert the
>> given ifd into a HANDLE that we pass to TIFFClientOpen(). In the calls
>> to
>> TIFFFdOpen(), we call _open_osfhandle() to allocate an fd corresponding
>> to
>> the HANDLE.
>
> If you can submit a tested patch, I will be happy to commit it.

Does anyone know where I can get a test file? :) Is it enough to generate
sufficiently large image (say of constant color) with no compression?

> Are the _get_osfhandle() and _open_osfhandle() functions available in
> older versions of Windows? (e.g. Windows '98?).

According to MSDN [1], it is. But then I have no idea how accurate MSDN
is. :) MSDN also shows _get_osfhandle() as returning an int but on my MSVC
2005 io.h I see it returning an intptr_t.

1. http://msdn.microsoft.com/en-us/library/bdts1c9x(VS.71).aspx

-Edward

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