Re: Sanity checking for ./configure options?
От | Jim Nasby |
---|---|
Тема | Re: Sanity checking for ./configure options? |
Дата | |
Msg-id | 56E5C4E3.5090404@BlueTreble.com обсуждение исходный текст |
Ответ на | Re: Sanity checking for ./configure options? (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Sanity checking for ./configure options?
Re: Sanity checking for ./configure options? |
Список | 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
Вложения
В списке pgsql-hackers по дате отправления: