2009.05.16 05:38 "[Tiff] Potential problem in libtiff when compiled in MinGW", by Ari Jolma

2009.05.16 05:38 "[Tiff] Potential problem in libtiff when compiled in MinGW", by Ari Jolma

Hi,

As I've explained in a GDAL bug report http://trac.osgeo.org/gdal/ticket/2649, it is not enough to use WIN32 and _MSC_VER to determine whether to use %I64 instead of %ll as MinGW uses msvcrt.dll but does not define _MSC_VER. This is an issue in several places in libtiff sources (tif_dumpmode.c, tif_luv.c, tif_lzw.c, tif_print.c, tif_read.c, tif_strip.c, and tif_thunder.c).

I'd suggest that a similar logic that was introduced for 64 bits in cpl_port.h in GDAL should be implemented also in libtiff. The use of macros in that way would also shorten the code in all those files.

Best regards,

Ari

--
Prof. Ari Jolma
Environmental Management Information Technology
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 4511 address: POBox 5300, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://geoinformatics.tkk.fi