Browse Source

* Added AnsiString overload for getdir(). make cycle works for win32 with RtlString=UnicodeString.

git-svn-id: branches/unicodertl@12185 -
yury 17 years ago
parent
commit
fa617e0bc4
2 changed files with 6 additions and 8 deletions
  1. 3 5
      rtl/inc/system.inc
  2. 3 3
      rtl/inc/systemh.inc

+ 3 - 5
rtl/inc/system.inc

@@ -586,18 +586,16 @@ End;
                              Directory support.
                              Directory support.
 *****************************************************************************}
 *****************************************************************************}
 
 
-{$if defined(FPC_HAS_FEATURE_FILEIO) and defined(FPC_HAS_FEATURE_ANSISTRINGS)}
-(*
-Procedure getdir(drivenr:byte;Var dir:RtlString);
+{$if defined(FPC_HAS_FEATURE_FILEIO) and defined(FPC_HAS_FEATURE_ANSISTRINGS) and defined(FPC_RTLSTRING_UTF16)}
+Procedure getdir(drivenr:byte;Var dir:AnsiString);
 { this is needed to also allow ansistrings, the shortstring version is
 { this is needed to also allow ansistrings, the shortstring version is
   OS dependent }
   OS dependent }
 var
 var
-  s : shortstring;
+  s : RtlString;
 begin
 begin
   getdir(drivenr,s);
   getdir(drivenr,s);
   dir:=s;
   dir:=s;
 end;
 end;
-*)
 {$endif}
 {$endif}
 
 
 {$ifopt R+}
 {$ifopt R+}

+ 3 - 3
rtl/inc/systemh.inc

@@ -883,9 +883,9 @@ Procedure chdir(const s:RtlString);
 Procedure mkdir(const s:RtlString);
 Procedure mkdir(const s:RtlString);
 Procedure rmdir(const s:RtlString);
 Procedure rmdir(const s:RtlString);
 Procedure getdir(drivenr:byte;var dir:RtlString);
 Procedure getdir(drivenr:byte;var dir:RtlString);
-{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
-//Procedure getdir(drivenr:byte;var dir:RtlString);
-{$endif FPC_HAS_FEATURE_ANSISTRINGS}
+{$if defined(FPC_HAS_FEATURE_ANSISTRINGS) and defined(FPC_RTLSTRING_UTF16)}
+Procedure getdir(drivenr:byte;var dir:AnsiString);
+{$endif}
 {$endif FPC_HAS_FEATURE_FILEIO}
 {$endif FPC_HAS_FEATURE_FILEIO}