diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2014-02-15 14:31:30 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2014-02-15 14:31:30 -0500 |
commit | 60ff2fdd9970ba29f5267317a5e7354d2658c1e5 (patch) | |
tree | 1bf03f09220a25a87f2a3bbfda5391a722d83541 /src/backend/tcop/postgres.c | |
parent | 32be1c8e900b89a89ec5e3a064c6b6010869d062 (diff) | |
download | postgresql-60ff2fdd9970ba29f5267317a5e7354d2658c1e5.tar.gz postgresql-60ff2fdd9970ba29f5267317a5e7354d2658c1e5.zip |
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/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index b7612b9b5f7..a230d7eda69 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -32,9 +32,6 @@ #include <sys/time.h> #include <sys/resource.h> #endif -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif #ifndef HAVE_GETRUSAGE #include "rusagestub.h" @@ -55,6 +52,7 @@ #include "pg_trace.h" #include "parser/analyze.h" #include "parser/parser.h" +#include "pg_getopt.h" #include "postmaster/autovacuum.h" #include "postmaster/postmaster.h" #include "replication/walsender.h" @@ -77,14 +75,6 @@ #include "mb/pg_wchar.h" -extern char *optarg; -extern int optind; - -#ifdef HAVE_INT_OPTRESET -extern int optreset; /* might not be declared by system headers */ -#endif - - /* ---------------- * global variables * ---------------- |