Fix Cmake HAVE_GETOPT for systems which declare getopt in stdio.h.

Fix utility baked-in getopt prototype which appears when HAVE_GETOPT is not defined.
This commit is contained in:
Bob Friesenhahn 2019-11-03 11:21:26 -06:00
parent aeb87392ad
commit f18e1a2db5
11 changed files with 11 additions and 11 deletions

View File

@ -384,7 +384,7 @@ check_symbol_exists(strtol "stdlib.h" HAVE_STRTOL)
check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL)
check_symbol_exists(strtoul "stdlib.h" HAVE_STRTOUL)
check_symbol_exists(strtoull "stdlib.h" HAVE_STRTOULL)
check_symbol_exists(getopt "unistd.h" HAVE_GETOPT)
check_symbol_exists(getopt "unistd.h;stdio.h" HAVE_GETOPT)
check_symbol_exists(lfind "search.h" HAVE_LFIND)
if(NOT HAVE_SNPRINTF)

View File

@ -40,7 +40,7 @@
#include "tif_fax3.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#define streq(a,b) (strcmp(a,b) == 0)

View File

@ -48,7 +48,7 @@
#include "tiffio.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#define streq(a,b) (strcmp(a,b) == 0)

View File

@ -60,7 +60,7 @@
#include "tiffio.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#ifndef O_BINARY

View File

@ -40,7 +40,7 @@
#include "tiffio.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#define streq(a,b) (strcmp(a,b) == 0)

View File

@ -54,7 +54,7 @@
#include "tiffio.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#ifndef EXIT_SUCCESS

View File

@ -40,7 +40,7 @@
#include "tiffio.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
static int stopondiff = 1;

View File

@ -52,7 +52,7 @@
#include "tiffio.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#if defined(VMS)

View File

@ -51,7 +51,7 @@
#endif
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#include "tiffio.h"

View File

@ -49,7 +49,7 @@
#include "tiffiop.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
static uint32 width = 0, height = 0; /* window width & height */

View File

@ -31,7 +31,7 @@
#include "tiffio.h"
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#define CopyField(tag, v) \