diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-07 21:11:58 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-07 21:11:58 +0000 |
| commit | 33ab177a56b6fe751e70123cf1aa80448d9ca253 (patch) | |
| tree | b86c64fe688b1f4d383e57b836514ec7c1ee1e96 /src/bin/pg_dump | |
| parent | fea2ffa7d8ac6c3bf773247f7aa0a1f5fea653f7 (diff) | |
| download | postgresql-33ab177a56b6fe751e70123cf1aa80448d9ca253.tar.gz | |
Don't assume that struct option is available just because we can find a
getopt_long(). This is more or less the same problem as we saw earlier
with getaddrinfo() and struct addrinfo, and for the same reason: random
user-added libraries might contain the subroutine, but there's no
guarantee we will find the matching header files.
Diffstat (limited to 'src/bin/pg_dump')
| -rw-r--r-- | src/bin/pg_dump/pg_dump.c | 8 | ||||
| -rw-r--r-- | src/bin/pg_dump/pg_dumpall.c | 8 | ||||
| -rw-r--r-- | src/bin/pg_dump/pg_restore.c | 9 |
3 files changed, 9 insertions, 16 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index fb21d04cd6..a6ecda10d6 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.342 2003/08/04 02:40:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.343 2003/08/07 21:11:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -29,9 +29,6 @@ #ifdef ENABLE_NLS #include <locale.h> #endif -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif #ifdef HAVE_TERMIOS_H #include <termios.h> #endif @@ -40,8 +37,9 @@ #include "strdup.h" #endif -#ifndef HAVE_GETOPT_LONG #include "getopt_long.h" + +#ifndef HAVE_OPTRESET int optreset; #endif diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 9be39ecb75..8c83254c81 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.26 2003/08/04 02:40:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.27 2003/08/07 21:11:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,16 +17,14 @@ #ifdef ENABLE_NLS #include <locale.h> #endif -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif #ifndef HAVE_STRDUP #include "strdup.h" #endif #include <errno.h> -#ifndef HAVE_GETOPT_LONG #include "getopt_long.h" + +#ifndef HAVE_OPTRESET int optreset; #endif diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index 0598c9c451..f9217f2c09 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -34,7 +34,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.49 2003/08/04 00:43:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.50 2003/08/07 21:11:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -55,12 +55,9 @@ #include <unistd.h> -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif - -#ifndef HAVE_GETOPT_LONG #include "getopt_long.h" + +#ifndef HAVE_OPTRESET int optreset; #endif |
