On Fri, Mar 11, 2016 at 9:13 AM, Aleksander Alekseev
<a.aleks...@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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to