are using our own ports of getopt or getopt_long, those will define
the variable for themselves; and if not, we don't need these, because
we never touch the variable anyway.
opterr;
#ifdef HAVE_INT_OPTRESET
-extern int optreset;
+extern int optreset; /* might not be declared by system headers */
#endif
/*
#include "getopt_long.h"
#include "miscadmin.h"
-#ifndef HAVE_INT_OPTRESET
-int optreset;
-#endif
-
/*
* these values are passed in by makefile defines
#undef WIN32
#endif
-#ifndef HAVE_INT_OPTRESET
-int optreset;
-#endif
-
/* PID can be negative for standalone backend */
typedef long pgpid_t;
#include "getopt_long.h"
-#ifndef HAVE_INT_OPTRESET
-int optreset;
-#endif
-
#include "access/attnum.h"
#include "access/sysattr.h"
#include "catalog/pg_cast.h"
#include "getopt_long.h"
-#ifndef HAVE_INT_OPTRESET
-int optreset;
-#endif
-
#include "dumputils.h"
#include "pg_backup.h"
extern char *optarg;
extern int optind;
-#ifndef HAVE_INT_OPTRESET
-int optreset;
-#endif
-
#ifdef ENABLE_NLS
#include <locale.h>
#endif
#include "getopt_long.h"
-#ifndef HAVE_INT_OPTRESET
-int optreset;
-#endif
-
#include <locale.h>
-
#include "command.h"
#include "common.h"
#include "describe.h"
static void SetCancelConn(PGconn *conn);
static void ResetCancelConn(void);
-#ifndef HAVE_INT_OPTRESET
-int optreset;
-#endif
-
static PGcancel *volatile cancelConn = NULL;
#ifdef WIN32
#include "getopt_long.h"
#include "pqexpbuffer.h"
-#ifndef HAVE_INT_OPTRESET
-extern int optreset;
-#endif
-
enum trivalue
{
TRI_DEFAULT,
extern int optind;
extern int optopt;
extern char *optarg;
-
-/* Some systems have this, otherwise you need to define it somewhere. */
extern int optreset;
#ifndef HAVE_STRUCT_OPTION
#ifndef HAVE_INT_OPTRESET
int optreset;
+/* else the "extern" was provided by getopt_long.h */
#endif
#define BADCH '?'