diff options
| author | Tom Lane | 2014-02-15 19:31:30 +0000 |
|---|---|---|
| committer | Tom Lane | 2014-02-15 19:31:30 +0000 |
| commit | 60ff2fdd9970ba29f5267317a5e7354d2658c1e5 (patch) | |
| tree | 1bf03f09220a25a87f2a3bbfda5391a722d83541 /src/backend/postmaster | |
| parent | 32be1c8e900b89a89ec5e3a064c6b6010869d062 (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/postmaster')
| -rw-r--r-- | src/backend/postmaster/postmaster.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 7adc410b43a..6bb2a474857 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -83,10 +83,6 @@ #include <sys/select.h> #endif -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif - #ifdef USE_BONJOUR #include <dns_sd.h> #endif @@ -101,6 +97,7 @@ #include "libpq/libpq.h" #include "libpq/pqsignal.h" #include "miscadmin.h" +#include "pg_getopt.h" #include "pgstat.h" #include "postmaster/autovacuum.h" #include "postmaster/bgworker_internals.h" @@ -352,14 +349,6 @@ static volatile bool HaveCrashedWorker = false; static unsigned int random_seed = 0; static struct timeval random_start_time; -extern char *optarg; -extern int optind, - opterr; - -#ifdef HAVE_INT_OPTRESET -extern int optreset; /* might not be declared by system headers */ -#endif - #ifdef USE_BONJOUR static DNSServiceRef bonjour_sdref = NULL; #endif |
