Re: Small patch: fix warnings during compilation on FreeBSD

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Small patch: fix warnings during compilation on FreeBSD
Дата
Msg-id CA+TgmoZP90nJ0-kO9g114M+F7QgrWGx3GxWo+X+2zqOQz-244w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Small patch: fix warnings during compilation on FreeBSD  (Aleksander Alekseev <a.alekseev@postgrespro.ru>)
Ответы Re: Small patch: fix warnings during compilation on FreeBSD  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Mar 11, 2016 at 9:13 AM, Aleksander Alekseev
<a.alekseev@postgrespro.ru> wrote:
> Hello, Tom
>
>> I think what we need is configure logic to find out where wcstombs_l()
>> is declared, and then #include <xlocale.h> only if it's necessary to
>> get that definition.  I haven't experimented but probably you could
>> make such a check with nested uses of AC_CHECK_DECL.
>
> 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.  Either
all of them will be there or none of them.  That may sound
unprincipled, but I think in practice it works pretty well, and I
think it's basically the autoconf way.  You make the checks just
sophisticated enough to work on all of the platforms that actually
exist, and don't worry about hypothetical platforms where the header
file authors conspire to hose you.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: PostgreSQL 9.6 Release Management Team (RMT)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Small patch: fix warnings during compilation on FreeBSD