Re: Sanity checking for ./configure options?

Поиск
Список
Период
Сортировка
Искать
От
Jim Nasby
Тема
Re: Sanity checking for ./configure options?
Дата
Msg-id
56E5C4E3.5090404@BlueTreble.com
Ответ на
Список
Дерево обсуждения
Sanity checking for ./configure options? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Sanity checking for ./configure options? David Fetter <david@fetter.org>
Re: Sanity checking for ./configure options? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Sanity checking for ./configure options? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Sanity checking for ./configure options? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Sanity checking for ./configure options? David Fetter <david@fetter.org>
Re: Sanity checking for ./configure options? Robert Haas <robertmhaas@gmail.com>
Re: Sanity checking for ./configure options? David Fetter <david@fetter.org>
Re: Sanity checking for ./configure options? Tom Lane <tgl@sss.pgh.pa.us>
Re: Sanity checking for ./configure options? Ivan Kartyshov <i.kartyshov@postgrespro.ru>
Re: Sanity checking for ./configure options? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Sanity checking for ./configure options? Peter Eisentraut <peter_e@gmx.net>
Re: Sanity checking for ./configure options? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Sanity checking for ./configure options? Andres Freund <andres@anarazel.de>
Re: Sanity checking for ./configure options? Robert Haas <robertmhaas@gmail.com>
Re: Sanity checking for ./configure options? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Sanity checking for ./configure options? Tom Lane <tgl@sss.pgh.pa.us>
Re: Sanity checking for ./configure options? Alex Shulgin <alex.shulgin@gmail.com>
On 2/26/16 9:29 PM, Peter Eisentraut wrote:
> Your code and comments suggest that you can specify the port to
> configure by setting PGPORT, but that is not the case.
>
> test == is not portable (bashism).
>
> Error messages should have consistent capitalization.
>
> Indentation in configure is two spaces.
>
>> >As the comment states, it doesn't catch things like --with-pgport=1a in
>> >configure, but the compile error you get with that isn't too hard to
>> >figure out, so I think it's OK.
> Passing a non-integer as argument will produce an error message like
> (depending on shell)
>
> ./configure: line 3107: test: 11a: integer expression expected
>
> but will not actually abort configure.
>
> It would work more robustly if you did something like this
>
> elif test "$default_port" -ge "1" -a "$default_port" -le "65535"; then
>    :
> else
>    AC_MSG_ERROR([port must be between 1 and 65535])
> fi
>
> but that still leaks the shell's error message.
>
> There is also the risk of someone specifying a number with a leading
> zero, which C would interpret as octal but the shell would not.

All issues should now be addressed.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
В списке pgsql-hackers по дате отправления
От: Jim Nasby
Дата:
От: Peter Geoghegan
Дата:
FAQ