2009.10.28 09:01 "[Tiff] Number of images in a multi-tiff file?", by Mark Pereira

2009.11.02 00:15 "Re: [Tiff] Tiffcrop warnings", by Richard Nolde

Edward,

I've added your patch to my working copy and will upload the latest code for Bob to commit to CVS when I finish testing tomorrow. With Bob's most recent patch to tif_dirwrite.c and my latest code based on Toby's suggestions, albeit with the endian options reversed, I get no compile warnings and the float tigers smile with the rest of them.

What is the status of the following define on Windows? I assume you are
not using Gcc under Mingw32 or such.

#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);

#endif

It doesn't cause a problem for me with GCC on Linux whether or not
optind is declared external.

Thanks,
    Richard

On 11/01/2009 11:49 AM, Edward Lam wrote:

On Thu, October 29, 2009 23:18, Richard Nolde wrote:

I have a clean compile with tiffcrop updated from CVS Head and patched with new code based on Toby's suggestion. I will test on Friday and advise so we can get tiffcrop into the new release warning free.

I just compiled libtiff CVS HEAD and run into an error compiling tiff_crop.c. On Windows, optind must be explicitly declared as extern. Here is the patch I applied in order for it to compile on Windows:

----------8<------------------------------------------------------------ diff -u -p -r1.14 tiffcrop.c

--- tiffcrop.c  24 Sep 2009 21:57:11 -0000      1.14

+++ tiffcrop.c 1 Nov 2009 18:48:36 -0000
@@ -2084,6 +2084,7 @@ update_output_file (TIFF **tiffout, char
 int
 main(int argc, char* argv[])
   {
+ extern int optind;
   uint16 defconfig = (uint16) -1;
   uint16 deffillorder = 0;
   uint32 deftilewidth = (uint32) 0;
---------->8------------------------------------------------------------