aboutsummaryrefslogtreecommitdiff
path: root/src/port/getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/getopt.c')
-rw-r--r--src/port/getopt.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/port/getopt.c b/src/port/getopt.c
index eb50cba1ca4..b81fba14b07 100644
--- a/src/port/getopt.c
+++ b/src/port/getopt.c
@@ -32,6 +32,8 @@
#include "c.h"
+#include "pg_getopt.h"
+
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95";
#endif /* LIBC_SCCS and not lint */
@@ -49,20 +51,13 @@ int opterr = 1, /* if error message should be printed */
optind = 1, /* index into parent argv vector */
optopt; /* character checked for validity */
char *optarg; /* argument associated with option */
-#else
-extern int opterr;
-extern int optind;
-extern int optopt;
-extern char *optarg;
#endif
#define BADCH (int)'?'
#define BADARG (int)':'
#define EMSG ""
-int getopt(int nargc, char *const * nargv, const char *ostr);
-
/*
* getopt
* Parse argc/argv argument vector.