Re: missing isinf declaration on solaris

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: missing isinf declaration on solaris
Дата
Msg-id 54234660.4010106@gmx.net
обсуждение исходный текст
Ответ на Re: missing isinf declaration on solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 9/24/14 4:26 PM, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> On 9/24/14 9:21 AM, Tom Lane wrote:
>>> Agreed, but what about non-GCC compilers?
> 
>> Stick AC_PROG_CC_C99 into configure.in.
> 
> I think that's a bad idea, unless you mean to do it only on Solaris.
> If we do that unconditionally, we will pretty much stop getting any
> warnings about C99-isms on modern platforms.  I am not aware that
> there has been any agreement to move our portability goalposts up
> to C99.

I don't disagree with that concern.  But let's look at it this way.

isinf() is a C99 function.  If we want to have it, the canonical way is
to put the compiler into C99 mode.  Anything else is just pure luck
(a.k.a. GNU extension).  It's conceivable that on other platforms we
fail to detect a system isinf() function because of that.  The only way
we learned about this is because the current configure check is
inconsistent on Solaris.

The first thing to fix is the configure check.  It shouldn't detect a
function if it creates a warning when used.

What will happen then is probably that isinf() isn't detected on
Solaris, and we use the fallback implementation.  Are we happy with
that?  Maybe.

If not, well, then we need to put the compiler into C99 mode.  But then
it's not a Solaris-specific problem anymore, because Solaris will then
behave like any other platform in this regard.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Add CREATE support to event triggers
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: proposal: rounding up time value less than its unit.