Re: Small patch: fix warnings during compilation on FreeBSD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Small patch: fix warnings during compilation on FreeBSD
Дата
Msg-id 20535.1457710838@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Small patch: fix warnings during compilation on FreeBSD  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Small patch: fix warnings during compilation on FreeBSD  (Aleksander Alekseev <a.alekseev@postgrespro.ru>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Mar 11, 2016 at 9:13 AM, Aleksander Alekseev
> <a.alekseev@postgrespro.ru> wrote:
>> Sounds like quite a dirty hack to me. Besides so far we have only two
>> procedures from xlocale.h and this requires two checks. If we go this
>> way someday there will be 15 checks for every procedure from xlocale.h

> Eh, probably not.  Most likely, if you check whether one of the
> functions you care about is in that file, that's good enough.

Yeah.  In practice, there are exactly two cases we care about: either
both of these functions will be declared in <stdlib.h> like POSIX
says, or both of them will be in <xlocale.h>.  There's no need to
work harder than we have to do to figure that out.

I'm totally unimpressed with the proposal of depending on the __FreeBSD__
macro instead of having a proper configure check.  For one thing, we
have no idea whether NetBSD or OpenBSD have this same issue.  For
another, it might be version-specific, or might become so if FreeBSD
decides to start following POSIX on this point someday.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Small patch: fix warnings during compilation on FreeBSD
Следующее
От: Gilles Darold
Дата:
Сообщение: Re: Patch to implement pg_current_logfile() function