Merged revision(s) 54845 #a3a7c54e1e from trunk:

LazUtf8: fix compilation for WinCE. Issue #0031788.
........

git-svn-id: branches/fixes_1_8@54869 -
This commit is contained in:
maxim 2017-05-10 22:47:41 +00:00
parent d6b22af510
commit f6ee624914
2 changed files with 6 additions and 2 deletions

View File

@ -352,7 +352,7 @@ end;
function GetEnvironmentVariableCountUTF8: Integer;
begin
{$IF defined(FPC_RTL_UNICODE) or not defined(Windows)}
{$IF defined(FPC_RTL_UNICODE) or not defined(MSWindows)} //also WinCE, issue #0031788
Result:=SysUtils.GetEnvironmentVariableCount;
{$ELSE}
Result:=GetGetEnvironmentVariableCountWide;
@ -364,7 +364,7 @@ begin
{$IFDEF FPC_RTL_UNICODE}
Result:=UTF16ToUTF8(SysUtils.GetEnvironmentString(Index));
{$ELSE}
{$IFDEF Windows}
{$IFDEF MSWindows} //not for WinCE, issue #0031788
Result:=UTF16ToUTF8(GetEnvironmentStringWide(Index));
{$ELSE}
// by default the environment is in console encoding

View File

@ -222,6 +222,7 @@ begin
end;
end;
{$IFNDEF WINCE}
function GetGetEnvironmentVariableCountWide: integer;
var
hp,p : PWideChar;
@ -238,6 +239,7 @@ begin
FreeEnvironmentStringsW(p);
end;
function GetEnvironmentStringWide(Index: Integer): UnicodeString;
var
hp,p : PWideChar;
@ -255,6 +257,7 @@ begin
Result:=hp;
FreeEnvironmentStringsW(p);
end;
{$ENDIF WINCE}
function GetEnvironmentVariableWide(const EnvVar: string): UnicodeString;
{$IF FPC_FULLVERSION>=30000}
@ -287,6 +290,7 @@ begin
end;
{$ENDIF}
//*************** END WideString impementations
{$ifdef WinCE}