1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

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.
This commit is contained in:
Tom Lane
2003-08-07 21:11:58 +00:00
parent fea2ffa7d8
commit 33ab177a56
11 changed files with 200 additions and 44 deletions

View File

@ -6,7 +6,7 @@
#include "postgres_fe.h"
#include <unistd.h>
#ifdef __GLIBC__
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include <time.h>

View File

@ -1,7 +1,7 @@
/* -------------------------------------------------------------------------
* pg_dumplo
*
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.17 2003/08/04 00:43:11 momjian Exp $
* $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.18 2003/08/07 21:11:57 tgl Exp $
*
* Karel Zak 1999-2000
* -------------------------------------------------------------------------
@ -11,9 +11,6 @@
#include <errno.h>
#include <unistd.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "libpq-fe.h"
#include "libpq/libpq-fs.h"
@ -24,8 +21,9 @@
#include "strdup.h"
#endif
#ifndef HAVE_GETOPT_LONG
#include "getopt_long.h"
#ifndef HAVE_OPTRESET
int optreset;
#endif