提交 fa2e3cff 编写于 作者: T Tatsuo Ishii

Remove HAVE_OPTARG per discussion in hackers list.

上级 7c5b2487
此差异已折叠。
......@@ -777,9 +777,6 @@ AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask s
dnl Check whether <unistd.h> declares fdatasync().
AC_EGREP_HEADER(fdatasync, unistd.h, AC_DEFINE(HAVE_FDATASYNC_DECL))
dnl Check whether <unistd.h> declares optarg
AC_EGREP_HEADER(optarg, unistd.h, AC_DEFINE(HAVE_OPTARG_DECL))
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
[AC_TRY_LINK(
[#include <machine/vmparam.h>
......
......@@ -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();
......
......@@ -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)
......
......@@ -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
......
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册