summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorTatsuo Ishii2001-03-01 05:05:29 +0000
committerTatsuo Ishii2001-03-01 05:05:29 +0000
commitfa2e3cffd3ce9910334d9be2f7813fe6e5a45e7c (patch)
tree4bd23d147071bd61a08599db90ed5664ad042935 /src/bin
parent7c5b2487b0fd9c730cdc48b08407456325bcc21b (diff)
Remove HAVE_OPTARG per discussion in hackers list.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pg_dump/pg_restore.c11
-rw-r--r--src/bin/pg_id/pg_id.c14
2 files changed, 8 insertions, 17 deletions
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 7e446ac21f4..546b90c2508 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -67,14 +67,7 @@
#ifdef HAVE_GETOPT_H
#include <getopt.h>
-#else
-#ifdef HAVE_OPTARG_DECL
-#include <unistd.h>
-#else
-extern char *optarg;
-extern int optind, opterr, optopt;
-#endif /* HAVE_OPTARG_DECL */
-#endif /* HAVE_GETOPT_H */
+#endif
/* Forward decls */
static void usage(const char *progname);
@@ -120,6 +113,8 @@ int main(int argc, char **argv)
int c;
Archive* AH;
char *fileSpec = NULL;
+ extern int optind;
+ extern char *optarg;
opts = NewRestoreOptions();
diff --git a/src/bin/pg_id/pg_id.c b/src/bin/pg_id/pg_id.c
index 325d6d6b142..41bd6733c33 100644
--- a/src/bin/pg_id/pg_id.c
+++ b/src/bin/pg_id/pg_id.c
@@ -6,20 +6,13 @@
*
* Copyright (C) 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.18 2001/02/27 08:13:28 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.19 2001/03/01 05:05:29 ishii Exp $
*/
#include "postgres_fe.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
-#else
-#ifdef HAVE_OPTARG_DECL
-#include <unistd.h>
-#else
-extern char *optarg;
-extern int optind, opterr, optopt;
-#endif /* HAVE_OPTARG_DECL */
-#endif /* HAVE_GETOPT_H */
+#endif
#include <pwd.h>
#include <stdio.h>
@@ -38,6 +31,9 @@ main(int argc, char *argv[])
struct passwd *pw;
+ extern int optind;
+ extern char *optarg;
+
while ((c = getopt(argc, argv, "nru")) != -1)
{
switch (c)