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 /contrib/pg_standby | |
| 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 'contrib/pg_standby')
| -rw-r--r-- | contrib/pg_standby/pg_standby.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c index 059c820527..144edd8a07 100644 --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -28,20 +28,9 @@ #include <sys/stat.h> #include <fcntl.h> #include <signal.h> - -#ifdef WIN32 -int getopt(int argc, char *const argv[], const char *optstring); -#else #include <sys/time.h> -#include <unistd.h> - -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif -#endif /* ! WIN32 */ -extern char *optarg; -extern int optind; +#include "pg_getopt.h" const char *progname; |
