| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Add support for optional_argument to our own getopt_long() imple |
| Date: | 2014-09-10 15:26:30 |
| Message-ID: | E1XRjmw-0007mE-Cg@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add support for optional_argument to our own getopt_long() implementation.
07c8651dd91d5a currently causes compilation errors on mscv (and
probably some other) compilers because our getopt_long()
implementation doesn't have support for optional_argument.
Thus implement optional_argument in our fallback implemenation. It's
quite possibly also useful in other cases.
Arguably this needs a configure check for optional_argument, but it
has existed pretty much since getopt_long() was introduced and thus
doesn't seem worth the configure runtime.
Normally I'd would not push a patch this fast, but this allows msvc to
build again and has low risk as only optional_argument behaviour has
changed.
Author: Michael Paquier and Andres Freund
Discussion: CAB7nPqS5VeedSCxrK=QouokbawgGKLpyc1Q++RRFCa_sjcSVrg(at)mail(dot)gmail(dot)com
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/311da16439ef69fc2054af3f4377fd4acd29a0e3
Modified Files
--------------
src/include/getopt_long.h | 1 +
src/port/getopt_long.c | 16 ++++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2014-09-10 18:25:07 | pgsql: Pack tuples in a hash join batch densely, to save memory. |
| Previous Message | Andres Freund | 2014-09-10 15:06:46 | Re: pgsql: Add new psql help topics, accessible to both --help and \?. |