-
2008.05.23 21:36 "Re: [Tiff] Unitialized Variable Caused a Problem in TIFFCP", by Bob Friesenhahn
-
2008.05.23 23:50 "Re: [Tiff] Unitialized Variable Caused a Problem in TIFFCP", by Gene Amtower
- 2008.05.24 01:15 "Re: [Tiff] Unitialized Variable Caused a Problem in TIFFCP", by Bob Friesenhahn
- 2008.05.26 15:47 "Re: [Tiff] beta2 release - lfind() problem on Win64", by Edward Lam
-
2008.05.23 23:50 "Re: [Tiff] Unitialized Variable Caused a Problem in TIFFCP", by Gene Amtower
2008.05.26 15:47 "Re: [Tiff] beta2 release - lfind() problem on Win64", by Edward Lam
Bob,
Oh I absolute agree, it's awful on MS's part.
> It seems that the only cure is to add Windows specific code to handle
> this specific case.
An alternative is to roll our own. Since it's only doing a linear search, rolling our own and taking out the use of the callback function would probably be faster anyhow. Also, adding an explicit linear search hardly adds any complexity.
Cheers,
-Edward
Bob Friesenhahn wrote:
> On Mon, 26 May 2008, Edward Lam wrote:
>>
>> In trying to compile libtiff 4.0 beta 2 on Win64 with MSVC 8, I've >> encountered the following warning which I think needs fixing:
>>
>> tif_dirinfo.c(508): warning C4133: 'function': incompatible types -
>> from 'size_t *' to 'unsigned int *'
>>
>> The problem is that the call to lfind() on Win64 is redirected to
>> _lfind() from search.h. For its 3rd argument, it hasn't been updated >> to size_t * (pointer to 64-bits) and still uses unsigned int *
>> (pointer to 32-bits). I'm
>
> This is just awful. Why did Microsoft do that?
>
> 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.
Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/