-
2009.10.28 10:50 "Re: [Tiff] Number of images in a multi-tiff file?", by Brad Hards
-
2009.10.28 16:22 "Re: [Tiff] Number of images in a multi-tiff file?", by Frank Warmerdam
-
2009.10.28 17:47 "Re: [Tiff] Number of images in a multi-tiff file?", by Mark Pereira
-
2009.10.29 17:43 "Re: [Tiff] Tiff Digest, Vol 65, Issue 9", by Richard Nolde
- 2009.10.28 17:46 "Re: [Tiff] extending tags in "a"ppend mode? - solved", by Juergen Buchmueller
- 2009.10.28 22:43 "[Tiff] Libtiff release soon, please advise", by Bob Friesenhahn
- 2009.10.29 18:08 "Re: [Tiff] Tiff Digest, Vol 65, Issue 9", by Bob Friesenhahn
- 2009.10.29 18:21 "Re: [Tiff] Tiff Digest, Vol 65, Issue 9", by Toby Thain
-
2009.10.29 17:43 "Re: [Tiff] Tiff Digest, Vol 65, Issue 9", by Richard Nolde
-
2009.10.28 17:47 "Re: [Tiff] Number of images in a multi-tiff file?", by Mark Pereira
-
2009.10.28 16:22 "Re: [Tiff] Number of images in a multi-tiff file?", by Frank Warmerdam
2009.11.02 03:30 "Re: [Tiff] Tiffcrop warnings", by Edward Lam
It doesn't cause a problem for me with GCC on Linux whether or not
optind is declared external.
According to opengroup.org, getopt()/optind are available via unistd.h which most of the tool sources include. That's why it compiles for you without the declarations. :)
> What is the status of the following define [HAVE_GETOPT] on Windows? I assume you are > not using Gcc under Mingw32 or such.
That is correct, I'm compiling using Visual Studio 2005 (64-bit). Note that port/libport.h defines HAVE_GETOPT for builds that use libport (MSVC does). This is defined in tools/Makefile.vc.
You bring up a good point. It might be better if added "extern int optind" to port/libport.h instead. Ah, but tiffcrop.c (unlike most other tools) is missing an include to "libport.h". So there are two changes to be made if we go with this approach:
- Add "extern int optind" to port/libport.h
- And then in tiffcrop.c:
-#ifndef HAVE_GETOPT
-extern int getopt(int, char**, char*);
+#ifdef NEED_LIBPORT
+# include "libport.h"
#endif
What this approach will NOT fix though are platforms that don't use libport AND do not declare getopt()/optind in unistd.h. Not sure which Unix platforms don't have unistd.h with getopt()/optind though. :)
-Edward