Re: Patch: make behavior of all versions of the "isinf" function be similar

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch: make behavior of all versions of the "isinf" function be similar
Дата
Msg-id 68333.1454310285@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Patch: make behavior of all versions of the "isinf" function be similar  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Patch: make behavior of all versions of the "isinf" function be similar  (Michael Paquier <michael.paquier@gmail.com>)
Re: Patch: make behavior of all versions of the "isinf" function be similar  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Список pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Mon, Feb 1, 2016 at 2:38 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> Actually, is there actually a reason to keep this file in the code
>> tree? Are there platforms that do not have isinf()? Even for Windows
>> environments using MSVC < 1800 this is emulated using _fpclass.

> Looking at what is in the buildfarm, I noticed that isinf is provided
> everywhere. Attached is a patch. Thoughts?

Two comments:

1. I don't think the buildfarm is sufficient evidence to conclude that
isinf.c is required nowhere.  It was in use as late as 2004, judging
by the git history, and I don't know of good reason to assume we do not
need it now.

2. POSIX:2008 only requires that "The isinf() macro shall return a
non-zero value if and only if its argument has an infinite value."
Therefore, any assumption about the sign of the result is wrong anyway,
and any patch that depends on it will be rejected, regardless of what
isinf.c does.  Or else, if you can convince us that such an assumption
is really valuable, we'd need isinf.c more not less so that we can
replace isinf() on platforms where it doesn't meet the stronger spec.
        regards, tom lane



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: extend pgbench expressions with functions
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [PATCH] Refactoring of LWLock tranches