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)
Список
Дерево обсуждения
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>
Re: Small patch: fix warnings during compilation on
FreeBSD Aleksander Alekseev <a.alekseev@postgrespro.ru>
Re: Small patch: fix warnings during compilation on FreeBSD Robert Haas <robertmhaas@gmail.com>
Re: Small patch: fix warnings during compilation on FreeBSD Tom Lane <tgl@sss.pgh.pa.us>
Re: Small patch: fix warnings during compilation on
FreeBSD Aleksander Alekseev <a.alekseev@postgrespro.ru>
Re: Small patch: fix warnings during compilation on FreeBSD Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Small patch: fix warnings during compilation on FreeBSD Tom Lane <tgl@sss.pgh.pa.us>
Re: Small patch: fix warnings during compilation on
FreeBSD Aleksander Alekseev <a.alekseev@postgrespro.ru>
On Fri, Mar 11, 2016 at 9:13 AM, Aleksander Alekseev wrote: > Hello, Tom > >> I think what we need is configure logic to find out where wcstombs_l() >> is declared, and then #include 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 по дате отправления