On 5-10-2012 11:53, Lukas Gebauer wrote: >> The FPC_USE_LIBC clause is wrong. That directive governs FPC's own >> Unix libraries to base on /library/ libc. > > Thank you! I revised code, and I need it on one place only. I need to > call: > > nl_langinfo(_NL_CTYPE_CODESET_NAME)
There is currently no way to do this in FPC. But anything is better than using unit libc (including copy and pasting of the relevant symbols to a separate unit). This because the separate unit at least _might_ work on non x86 linux and be fixable for others, while unit libc won't (as a former Kylix unit it is confined to linux/x86). A further complication is that this is part of libiconv not the core "libc". Linux and Solaris concatenate libiconv to libc however. Aix, Mac, *BSD do not (iconv or libiconv). Haiku/BeOS also don't, so the calls are in standalone libraries. Haiku goes one step further and renames it. In versions to come, usage of unit libc will start to throw deprecated warnings. ---------- As for the immediate need, is isolated the code below from cwstring. It should encapsulate that call for multiple platforms: http://www.stack.nl/~marcov/nllanghelp.pp It should also do the required setlocale(LC_ALL) call that is required on some systems before calling nllanginfo > ...for get current system charset. How to get this information in > Freepascal correctly? In current release versions: not. In 2.7.1 it is retrieved to construct a value defaultsystemcodepage, and the value that that returns as a windows codepage number. (D2009+ compatible). (that is the code where the above unit comes from). ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public