Browse Source

* avoid cutting of HOME variable to 255 characters when compiled with $H+ (sysutils)

git-svn-id: trunk@3727 -
Tomas Hajny 19 years ago
parent
commit
53103216ef
1 changed files with 7 additions and 3 deletions
  1. 7 3
      rtl/inc/fexpand.inc

+ 7 - 3
rtl/inc/fexpand.inc

@@ -161,11 +161,15 @@ begin
     if (Length (Pa) >= 1) and (Pa [1] = '~') and
     if (Length (Pa) >= 1) and (Pa [1] = '~') and
                       ((Pa [2] = DirectorySeparator) or (Length (Pa) = 1)) then
                       ((Pa [2] = DirectorySeparator) or (Length (Pa) = 1)) then
         begin
         begin
- {$IFDEF FPC_FEXPAND_GETENV_PCHAR}
+ {$IFOPT H-}
+  {$IFDEF FPC_FEXPAND_GETENV_PCHAR}
             S := StrPas (GetEnv ('HOME'));
             S := StrPas (GetEnv ('HOME'));
- {$ELSE FPC_FEXPAND_GETENV_PCHAR}
+  {$ELSE FPC_FEXPAND_GETENV_PCHAR}
+ {$ENDIF H-}
             S := GetEnv ('HOME');
             S := GetEnv ('HOME');
- {$ENDIF FPC_FEXPAND_GETENV_PCHAR}
+ {$IFOPT H-}
+  {$ENDIF FPC_FEXPAND_GETENV_PCHAR}
+ {$ENDIF H-}
             if (S = '') or (Length (S) = 1)
             if (S = '') or (Length (S) = 1)
                                           and (S [1] = DirectorySeparator) then
                                           and (S [1] = DirectorySeparator) then
                 Delete (Pa, 1, 1)
                 Delete (Pa, 1, 1)