[fpc-devel] libc bug on Linux

petr.kristan at epos.cz petr.kristan at epos.cz
Fri Feb 17 15:49:33 CET 2006

Linux, fpc from svn.

program pokus;
uses Libc;
  writeln(CODESET,', ', nl_langinfo(CODESET));

If I compile with Borland dcc, then I get right answer:
14, ISO-8859-2
but with fpc I get:
14, ANSI_X3.4-1968

If I try to modify program to eliminate the rtl errors:

program pokus;
const CODESET = 14;
function nl_langinfo(__item: Integer): pchar;cdecl; external 'libc.so.6' name 'nl_langinfo';
  writeln(CODESET,', ', nl_langinfo(CODESET));

Result is the same as above.

Some linking problem ???

Ing. Petr Kristan
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223    Czech Republic (Eastern Europe) 
fax: +420 466510709

More information about the fpc-devel mailing list