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:
parent
aeb87392ad
commit
f18e1a2db5
@ -384,7 +384,7 @@ check_symbol_exists(strtol "stdlib.h" HAVE_STRTOL)
|
|||||||
check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL)
|
check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL)
|
||||||
check_symbol_exists(strtoul "stdlib.h" HAVE_STRTOUL)
|
check_symbol_exists(strtoul "stdlib.h" HAVE_STRTOUL)
|
||||||
check_symbol_exists(strtoull "stdlib.h" HAVE_STRTOULL)
|
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)
|
check_symbol_exists(lfind "search.h" HAVE_LFIND)
|
||||||
|
|
||||||
if(NOT HAVE_SNPRINTF)
|
if(NOT HAVE_SNPRINTF)
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include "tif_fax3.h"
|
#include "tif_fax3.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define streq(a,b) (strcmp(a,b) == 0)
|
#define streq(a,b) (strcmp(a,b) == 0)
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define streq(a,b) (strcmp(a,b) == 0)
|
#define streq(a,b) (strcmp(a,b) == 0)
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef O_BINARY
|
#ifndef O_BINARY
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define streq(a,b) (strcmp(a,b) == 0)
|
#define streq(a,b) (strcmp(a,b) == 0)
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EXIT_SUCCESS
|
#ifndef EXIT_SUCCESS
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int stopondiff = 1;
|
static int stopondiff = 1;
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(VMS)
|
#if defined(VMS)
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include "tiffiop.h"
|
#include "tiffiop.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static uint32 width = 0, height = 0; /* window width & height */
|
static uint32 width = 0, height = 0; /* window width & height */
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "tiffio.h"
|
#include "tiffio.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT
|
#ifndef HAVE_GETOPT
|
||||||
extern int getopt(int, char**, char*);
|
extern int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CopyField(tag, v) \
|
#define CopyField(tag, v) \
|
||||||
|
Loading…
Reference in New Issue
Block a user