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

2009.11.02 08:22 "Re: [Tiff] Tiffcrop warnings", by Juergen Buchmueller

On Sun, 01 Nov 2009 22:30:34 -0500

Not sure which Unix platforms don't have unistd.h with getopt()/optind though. :)

FWIW here's the condition for NetBSD when to include the declarations in unistd.h

/*

#if (_POSIX_C_SOURCE - 0) >= 2 || defined(_XOPEN_SOURCE) || \
    defined(_NETBSD_SOURCE)

int      getopt(int, char * const [], const char *);

extern   char *optarg;              /* getopt(3) external variables */
extern   int opterr; 
extern   int optind;
extern   int optopt;

#endif

So it looks like you'll have to define _POSIX_C_SOURCE=2 or _XOPEN_SOURCE to get the defines.

Juergen