Re: Sanity checking for ./configure options? - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Sanity checking for ./configure options?
Date
Msg-id 56E5C4E3.5090404@BlueTreble.com
Whole thread Raw
In response to Re: Sanity checking for ./configure options?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Sanity checking for ./configure options?
Re: Sanity checking for ./configure options?
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Improve error handling in pltcl
Next
From: Peter Geoghegan
Date:
Subject: Re: amcheck (B-Tree integrity checking tool)