瀏覽代碼

* String -> ansistring

Michael VAN CANNEYT 2 年之前
父節點
當前提交
b9a1a90d6e
共有 1 個文件被更改,包括 4 次插入7 次删除
  1. 4 7
      rtl/unix/sysutils.pp

+ 4 - 7
rtl/unix/sysutils.pp

@@ -18,8 +18,8 @@ interface
 
 
 {$MODE objfpc}
 {$MODE objfpc}
 {$MODESWITCH OUT}
 {$MODESWITCH OUT}
-{ force ansistrings }
-{$H+}
+{$H+} // will result in unicode string in unicode RTL
+
 {$modeswitch typehelpers}
 {$modeswitch typehelpers}
 {$modeswitch advancedrecords}
 {$modeswitch advancedrecords}
 
 
@@ -1527,11 +1527,8 @@ end;
                               OS utility functions
                               OS utility functions
 ****************************************************************************}
 ****************************************************************************}
 
 
-Function GetEnvironmentVariable(Const EnvVar : String) : String;
-
+Function GetEnvironmentVariable(Const EnvVar : AnsiString) : AnsiString;
 begin
 begin
-  { no need to adjust the code page of EnvVar to DefaultSystemCodePage, as only
-    ASCII identifiers are supported }
   Result:=BaseUnix.FPGetenv(PAnsiChar(pointer(EnvVar)));
   Result:=BaseUnix.FPGetenv(PAnsiChar(pointer(EnvVar)));
 end;
 end;
 
 
@@ -1541,7 +1538,7 @@ begin
   Result:=FPCCountEnvVar(EnvP);
   Result:=FPCCountEnvVar(EnvP);
 end;
 end;
 
 
-Function GetEnvironmentString(Index : Integer) : {$ifdef FPC_RTL_UNICODE}UnicodeString{$else}AnsiString{$endif};
+Function GetEnvironmentString(Index : Integer) : RTLString;
 
 
 begin
 begin
   Result:=FPCGetEnvStrFromP(Envp,Index);
   Result:=FPCGetEnvStrFromP(Envp,Index);