Posix fixes by Michael Van Canneyt

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@214 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby
2021-06-12 13:27:35 +00:00
parent 9ee9fa486e
commit bdadbd4c7c
5 changed files with 41 additions and 19 deletions

View File

@@ -79,7 +79,11 @@ interface
uses
{$IFNDEF MSWINDOWS}
{$IFNDEF FPC}
Libc,
{$IFNDEF POSIX}
Libc,
{$ELSE}
Posix.Langinfo,
{$ENDIF}
{$ENDIF}
{$ELSE}
Windows,
@@ -1501,7 +1505,11 @@ end;
function GetCurCP: TMimeChar;
begin
{$IFNDEF FPC}
{$IFNDEF POSIX}
Result := GetCPFromID(nl_langinfo(_NL_CTYPE_CODESET_NAME));
{$ELSE}
Result := GetCPFromID(nl_langinfo(CODESET));
{$ENDIF}
{$ELSE}
//How to get system codepage without LIBC?
Result := UTF_8;