Received: from mailgate002.isp.belgacom.be (mailgate002.isp.belgacom.be [195.238.6.87])
	by maildelivery012.isp.belgacom.be (Postfix) with ESMTP id 84A6C254005
	for <joris.at.lebbeke@skynet.be>; Mon, 26 May 2008 18:38:55 +0200 (CEST)
Authentication-Results: in.mx.skynet.be; dkim=neutral (message not signed) header.i=none
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 26 May 2008 18:38:52 +0200
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 m4QGFHZ0001083;
	Mon, 26 May 2008 12:16:35 -0400
Received: from cgp2.pu.ru (cgp2.pu.ru [195.70.197.22])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m4QGFDSY001080
	for <tiff@lists.maptools.org>; Mon, 26 May 2008 12:15:14 -0400
Received: from [195.70.196.218] (HELO wg.pu.ru)
	by cgp2.pu.ru (CommuniGate Pro SMTP 5.2.0)
	with ESMTP id 34957499 for tiff@lists.maptools.org;
	Mon, 26 May 2008 20:15:12 +0400
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id QAA15232
	for tiff@lists.maptools.org; Mon, 26 May 2008 16:15:12 GMT
Received: from ak4719.spb.edu (localhost.localdomain [127.0.0.1])
	by ak4719.spb.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4QG7hOT009184
	for <tiff@lists.maptools.org>; Mon, 26 May 2008 20:07:43 +0400
Received: (from dron@localhost)
	by ak4719.spb.edu (8.13.8/8.13.8/Submit) id m4QG7hVa009183
	for tiff@lists.maptools.org; Mon, 26 May 2008 20:07:43 +0400
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Mon, 26 May 2008 20:07:43 +0400
To: tiff@lists.maptools.org
Subject: Re: [Tiff] beta2 release - lfind() problem on Win64
Message-ID: <20080526160743.GA9060@ak4719.spb.edu>
Mail-Followup-To: tiff@lists.maptools.org
References: <48378FEB.3090402@pobox.com> <483AC835.8020202@sidefx.com>
	<Pine.SOC.4.64.0805261021590.1131@freddy.simplesystems.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.SOC.4.64.0805261021590.1131@freddy.simplesystems.org>
X-GnuPG-Key: http://www.srces.spb.org/dron/export.home.key
X-Face: "t+se9s~+y~[XUH]L|pmeO3Pt/Q@DNv**S, d@_1-C=}/,
	c%<3Qp]eu!ok<"2lYJm$!9qVcg F?7o*L; |$`6|Q|>Rt-cU%2_y@6tQ|`!Li}TsvZvEKx;
	>fuY=fc(=sX^`7Wmw8%SsR`AvM$a; 0U/eN\ P?B\FTyqD, 0np$U2!*'z_4D,
	VPlFf?bN0&zYf"zF0s!7Tl7?$we)xD0@lL>[h|8bhys0i.g|zLnu@C
	Ti@d]i=[!:j1CB\5/TF[m]`lfHfaqSN[0qn@T3zeosV/[LAss{@p_?],x*j8P_9t[}uHD^X-;
	j~\M! gyTly;fj`}&Y~i{<#bN.#QmkE}#T`dxP.I1\.)_MEN{@#W
User-Agent: Mutt/1.5.13 (2006-08-11)
X-Null-Tag: 4aaf7e310773dea994afd91fe0f405e6
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-UIDL: 000000000023ceae.00002d0c
X-MSP-STORE: Mon, 26 May 2008 18:38:55 +0200
Status:   

On Mon, May 26, 2008 at 10:31:36AM -0500, Bob Friesenhahn wrote:
> The recent libtiff updates in this area were necessary so that libtiff
> works properly in 64-bit applications.  This is supposed to be the
> prototype for lfind:
> 
>      void *lfind(const void *key, const void *base, size_t *nelp,
>      size_t width, int (*compar)(const void *, const void *));
> 
> It seems that the only cure is to add Windows specific code to handle
> this specific case.

We have such a code (see port/ directory) and it was used on Windows
platform until I discovered that lfind is hidden under _lfind name
there. So we can just continue using our implementation.

Other option is to use _lfind_s() function which is advertised as a
"safe" replacement to the old one, but then we will need to modify
comparison functions declarations too, because _lfind_s passes extra
parameter down there. The first way is simpler, of course.

Best regards,
Andrey

PS.
OFF: do they seriously thinking that their "safe" functions really help
people?


-- 
Andrey V. Kiselev
ICQ# 26871517
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
