Browse Source

* fixed compilation of embedded system unit: path helper functions depend now on the avaibility of the textio/fileio feature

git-svn-id: trunk@12599 -
florian 16 years ago
parent
commit
2510af64d1
2 changed files with 11 additions and 5 deletions
  1. 8 5
      rtl/embedded/system.pp
  2. 3 0
      rtl/inc/system.inc

+ 8 - 5
rtl/embedded/system.pp

@@ -29,18 +29,21 @@ Unit System;
 {$I systemh.inc}
 
 const
-{
-  fix me
+{$ifdef FPC_HAS_FEATURE_TEXTIO}
  LineEnding = #10;
+{$endif FPC_HAS_FEATURE_TEXTIO}
+{$ifdef FPC_HAS_FEATURE_FILEIO}
  LFNSupport = true;
  DirectorySeparator = '/';
  DriveSeparator = ':';
  ExtensionSeparator = '.';
  PathSeparator = ':';
-  AllowDirectorySeparators : set of char = ['\','/'];
-  AllowDriveSeparators : set of char = [':'];
+ AllowDirectorySeparators : set of char = ['\','/'];
+ AllowDriveSeparators : set of char = [':'];
+{$endif FPC_HAS_FEATURE_FILEIO}
+
 { FileNameCaseSensitive is defined below! }
-}
+
 {$ifdef FPC_HAS_FEATURE_EXITCODE}
  maxExitCode = 255;
 {$endif FPC_HAS_FEATURE_EXITCODE}

+ 3 - 0
rtl/inc/system.inc

@@ -1284,6 +1284,8 @@ end;
                             File Handling
 *****************************************************************************}
 
+
+{$ifdef FPC_HAS_FEATURE_FILEIO}
 { Allow slash and backslash as separators }
 procedure DoDirSeparators(p:Pchar);
 var
@@ -1302,6 +1304,7 @@ begin
     if p[i] in AllowDirectorySeparators then
       p[i]:=DirectorySeparator;
 end;
+{$endif FPC_HAS_FEATURE_FILEIO}
 
 { OS dependent low level file functions }
 {$ifdef FPC_HAS_FEATURE_FILEIO}