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/test/isolation/isolationtester.c | |
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/test/isolation/isolationtester.c')
-rw-r--r-- | src/test/isolation/isolationtester.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c index e936c01532f..ad6732aee78 100644 --- a/src/test/isolation/isolationtester.c +++ b/src/test/isolation/isolationtester.c @@ -10,29 +10,17 @@ #ifdef WIN32 #include <windows.h> #endif - -#ifndef WIN32 #include <sys/time.h> -#include <unistd.h> - -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif -#else -int getopt(int argc, char *const argv[], const char *optstring); -#endif /* ! WIN32 */ - #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif #include "libpq-fe.h" #include "pqexpbuffer.h" +#include "pg_getopt.h" #include "isolationtester.h" -extern int optind; - #define PREP_WAITING "isolationtester_waiting" /* |