mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 07:29:21 +02:00
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:
parent
d6b22af510
commit
f6ee624914
@ -352,7 +352,7 @@ end;
|
|||||||
|
|
||||||
function GetEnvironmentVariableCountUTF8: Integer;
|
function GetEnvironmentVariableCountUTF8: Integer;
|
||||||
begin
|
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;
|
Result:=SysUtils.GetEnvironmentVariableCount;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Result:=GetGetEnvironmentVariableCountWide;
|
Result:=GetGetEnvironmentVariableCountWide;
|
||||||
@ -364,7 +364,7 @@ begin
|
|||||||
{$IFDEF FPC_RTL_UNICODE}
|
{$IFDEF FPC_RTL_UNICODE}
|
||||||
Result:=UTF16ToUTF8(SysUtils.GetEnvironmentString(Index));
|
Result:=UTF16ToUTF8(SysUtils.GetEnvironmentString(Index));
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF Windows}
|
{$IFDEF MSWindows} //not for WinCE, issue #0031788
|
||||||
Result:=UTF16ToUTF8(GetEnvironmentStringWide(Index));
|
Result:=UTF16ToUTF8(GetEnvironmentStringWide(Index));
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
// by default the environment is in console encoding
|
// by default the environment is in console encoding
|
||||||
|
@ -222,6 +222,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFNDEF WINCE}
|
||||||
function GetGetEnvironmentVariableCountWide: integer;
|
function GetGetEnvironmentVariableCountWide: integer;
|
||||||
var
|
var
|
||||||
hp,p : PWideChar;
|
hp,p : PWideChar;
|
||||||
@ -238,6 +239,7 @@ begin
|
|||||||
FreeEnvironmentStringsW(p);
|
FreeEnvironmentStringsW(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function GetEnvironmentStringWide(Index: Integer): UnicodeString;
|
function GetEnvironmentStringWide(Index: Integer): UnicodeString;
|
||||||
var
|
var
|
||||||
hp,p : PWideChar;
|
hp,p : PWideChar;
|
||||||
@ -255,6 +257,7 @@ begin
|
|||||||
Result:=hp;
|
Result:=hp;
|
||||||
FreeEnvironmentStringsW(p);
|
FreeEnvironmentStringsW(p);
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF WINCE}
|
||||||
|
|
||||||
function GetEnvironmentVariableWide(const EnvVar: string): UnicodeString;
|
function GetEnvironmentVariableWide(const EnvVar: string): UnicodeString;
|
||||||
{$IF FPC_FULLVERSION>=30000}
|
{$IF FPC_FULLVERSION>=30000}
|
||||||
@ -287,6 +290,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
|
||||||
//*************** END WideString impementations
|
//*************** END WideString impementations
|
||||||
|
|
||||||
{$ifdef WinCE}
|
{$ifdef WinCE}
|
||||||
|
Loading…
Reference in New Issue
Block a user