pgsql: Centralize getopt-related declarations in a new header file pg_g

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Centralize getopt-related declarations in a new header file pg_g
Date: 2014-02-15 19:31:41
Message-ID: E1WEkxh-0006d6-FE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Centralize getopt-related declarations in a new header file pg_getopt.h.

We used to have externs for getopt() and its API variables scattered
all over the place. Now that we find we're going to need to tweak the
variable declarations for Cygwin, it seems like a good idea to have
just one place to tweak.

In this commit, the variables are declared "#ifndef HAVE_GETOPT_H".
That may or may not work everywhere, but we'll soon find out.

Andres Freund

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/60ff2fdd9970ba29f5267317a5e7354d2658c1e5

Modified Files
--------------
contrib/oid2name/oid2name.c | 8 +----
contrib/pg_archivecleanup/pg_archivecleanup.c | 13 +-------
contrib/pg_standby/pg_standby.c | 13 +-------
contrib/pg_upgrade/option.c | 2 +-
contrib/pgbench/pgbench.c | 8 -----
contrib/vacuumlo/vacuumlo.c | 5 +--
src/backend/bootstrap/bootstrap.c | 7 +----
src/backend/postmaster/postmaster.c | 13 +-------
src/backend/tcop/postgres.c | 12 +------
src/bin/pg_dump/pg_dump.c | 4 ---
src/bin/pg_dump/pg_restore.c | 8 +----
src/bin/pg_resetxlog/pg_resetxlog.c | 7 +----
src/bin/psql/startup.c | 2 --
src/include/getopt_long.h | 10 +-----
src/include/pg_getopt.h | 42 +++++++++++++++++++++++++
src/include/port.h | 4 ---
src/port/getopt.c | 9 ++----
src/test/isolation/isolationtester.c | 14 +--------
src/timezone/zic.c | 6 +---
19 files changed, 57 insertions(+), 130 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-02-15 22:10:04 pgsql: Fix unportable coding in DetermineSleepTime().
Previous Message Bruce Momjian 2014-02-15 16:51:03 pgsql: Remove use of sscanf in pg_upgrade, and add C comment to pg_dump