mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 17:36:13 +02:00
LazUtf8: fix compilation for WinCE. Issue #0031788.
git-svn-id: trunk@54845 -
This commit is contained in:
parent
92cf9781fa
commit
a3a7c54e1e
@ -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
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user