summaryrefslogtreecommitdiff
path: root/src/timezone/zic.c
diff options
context:
space:
mode:
authorTom Lane2014-02-15 19:31:30 +0000
committerTom Lane2014-02-15 19:31:30 +0000
commit60ff2fdd9970ba29f5267317a5e7354d2658c1e5 (patch)
tree1bf03f09220a25a87f2a3bbfda5391a722d83541 /src/timezone/zic.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/timezone/zic.c')
-rw-r--r--src/timezone/zic.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index a399d1f0f1..cda704266a 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -8,15 +8,11 @@
#include "postgres_fe.h"
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
#include <limits.h>
#include <locale.h>
#include <time.h>
-extern int optind;
-extern char *optarg;
+#include "pg_getopt.h"
#include "private.h"
#include "pgtz.h"