Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 1454 invoked from network); 13 Aug 2008 05:35:37 -0000
Received: from judy.telenet-ops.be ([195.130.136.7])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 13 Aug 2008 05:35:37 -0000
Received: from zimbu.telenet-ops.be (zimbu.telenet-ops.be [195.130.136.11])
	by judy.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m7D5Zad2012702
	for <info@awaresystems.be>; Wed, 13 Aug 2008 07:35:36 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])
	by zimbu.telenet-ops.be (Postfix) with SMTP id D7ADA40004
	for <info@awaresystems.be>; Wed, 13 Aug 2008 07:35:36 +0200 (CEST)
Received: from apate.telenet-ops.be (apate.telenet-ops.be [195.130.132.43])
	by zimbu.telenet-ops.be (Postfix) with ESMTP id D14D640002
	for <info@awaresystems.be>; Wed, 13 Aug 2008 07:35:36 +0200 (CEST)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by apate.telenet-ops.be (Postfix) with ESMTP id 8BBAF27EC02
	for <info@awaresystems.be>; Wed, 13 Aug 2008 07:35:36 +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 m7D5WUNQ023241;
	Wed, 13 Aug 2008 01:34:24 -0400
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m7D5WRc6023238
	for <tiff@lists.maptools.org>; Wed, 13 Aug 2008 01:32:28 -0400
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	m7D5WNCI012086; Wed, 13 Aug 2008 00:32:23 -0500 (CDT)
Date: Wed, 13 Aug 2008 00:32:23 -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: <48A261AF.3050109@sidefx.com>
Message-ID: <Pine.SOC.4.64.0808130029570.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>
	<48A261AF.3050109@sidefx.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: tiff@lists.maptools.org
Subject: [Tiff] Re: tif_win32.c patch proposal (was: windows 64 bit build)
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 Wed, 13 Aug 2008, Edward Lam wrote:
>> If you can submit a tested patch, I will be happy to commit it.
>
> Ok, here's a patch attached for discussion. The approach I previously 
> mentioned ran into a slight snag. Once you've created an fd for a HANDLE, the 
> C runtime library (CRT) takes ownership of it. Thus, when you call 
> _close(fd), it closes the associated HANDLE as well. Plus, in 
> _tiffCloseProc(), there was no way (that I found) to query the CRT to return 
> the associated fd given the HANDLE. So in the end, I did something more 
> drastic, albeit cleaner.

It seems that this approach is drastic enough that we should wait for 
some feedback from potentially impacted users before moving ahead with 
it.

Being more from the Unix mind-set than the Windows mind-set, I like 
your approach better than the approach which is currently used.

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/
