summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-02-15 14:31:30 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2014-02-15 14:31:30 -0500
commit60ff2fdd9970ba29f5267317a5e7354d2658c1e5 (patch)
tree1bf03f09220a25a87f2a3bbfda5391a722d83541 /src/backend/bootstrap/bootstrap.c
parent32be1c8e900b89a89ec5e3a064c6b6010869d062 (diff)
Centralize getopt-related declarations in a new header file pg_getopt.h.
We used to have externs for getopt() and its API variables scattered all over the place. Now that we find we're going to need to tweak the variable declarations for Cygwin, it seems like a good idea to have just one place to tweak. In this commit, the variables are declared "#ifndef HAVE_GETOPT_H". That may or may not work everywhere, but we'll soon find out. Andres Freund
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index ef6311b075b..c36e71d8066 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -17,9 +17,6 @@
#include <time.h>
#include <unistd.h>
#include <signal.h>
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
#include "access/htup_details.h"
#include "bootstrap/bootstrap.h"
@@ -29,6 +26,7 @@
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
+#include "pg_getopt.h"
#include "postmaster/bgwriter.h"
#include "postmaster/startup.h"
#include "postmaster/walwriter.h"
@@ -46,9 +44,6 @@
#include "utils/relmapper.h"
#include "utils/tqual.h"
-extern int optind;
-extern char *optarg;
-
uint32 bootstrap_data_checksum_version = 0; /* No checksum */