pgsql: Fix portability breakage in pg_dump.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix portability breakage in pg_dump.
Date: 2015-01-11 18:28:32
Message-ID: E1YANFY-0002at-Cj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix portability breakage in pg_dump.

Commit 0eea8047bf0e15b402b951e383e39236bdfe57d5 introduced some overly
optimistic assumptions about what could be in a local struct variable's
initializer. (This might in fact be valid code according to C99, but I've
got at least one pre-C99 compiler that falls over on those nonconstant
address expressions.) There is no reason whatsoever for main()'s workspace
to not be static, so revert long_options[] to a static and make the
DumpOptions struct static as well.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/44096f1c6644a97c92da6c96dc1d8d4e200d4a38

Modified Files
--------------
src/bin/pg_dump/pg_backup.h | 1 +
src/bin/pg_dump/pg_backup_archiver.c | 20 +++--
src/bin/pg_dump/pg_dump.c | 154 +++++++++++++++++-----------------
3 files changed, 91 insertions(+), 84 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2015-01-12 16:33:07 pgsql: Skip dead backends in MinimumActiveBackends
Previous Message Tom Lane 2015-01-11 17:52:40 pgsql: Remove configure test for nonstandard variants of getpwuid_r().