1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-20 05:03:10 +03:00

Remove HAVE_OPTARG per discussion in hackers list.

This commit is contained in:
Tatsuo Ishii
2001-03-01 05:05:29 +00:00
parent 7c5b2487b0
commit fa2e3cffd3
6 changed files with 141 additions and 172 deletions

View File

@ -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();

View File

@ -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)

View File

@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.159 2001/02/27 08:13:27 ishii Exp $
* $Id: config.h.in,v 1.160 2001/03/01 05:05:29 ishii Exp $
*/
#ifndef CONFIG_H
@ -579,9 +579,6 @@ extern int fdatasync(int fildes);
/* Set to 1 if you have getopt_long() (GNU long options) */
#undef HAVE_GETOPT_LONG
/* Set to 1 if optarg is declared in unistd.h */
#undef HAVE_OPTARG_DECL
/* Set to 1 if you have union semun */
#undef HAVE_UNION_SEMUN

View File

@ -8,9 +8,6 @@
#ifdef HAVE_GETOPT_H
#include "getopt.h"
#else
extern char *optarg;
extern int optind, opterr, optopt;
#endif
#include "extern.h"
@ -64,6 +61,9 @@ main(int argc, char *const argv[])
out_option = 0;
struct _include_path *ip;
extern int optind;
extern char *optarg;
add_include_path("/usr/include");
add_include_path(INCLUDE_PATH);
add_include_path("/usr/local/include");