Browse Source

* dos compile fixes

git-svn-id: trunk@5111 -
peter 19 years ago
parent
commit
3997ef0253
2 changed files with 8 additions and 7 deletions
  1. 4 6
      compiler/cfileutils.pas
  2. 4 1
      compiler/globals.pas

+ 4 - 6
compiler/cfileutils.pas

@@ -34,6 +34,9 @@ interface
 {$ifdef win32}
 {$ifdef win32}
       Windows,
       Windows,
 {$endif win32}
 {$endif win32}
+{$if defined(go32v2) or defined(watcom)}
+      Dos,
+{$endif}
 {$IFNDEF USE_FAKE_SYSUTILS}
 {$IFNDEF USE_FAKE_SYSUTILS}
       SysUtils,
       SysUtils,
 {$ELSE}
 {$ELSE}
@@ -1037,12 +1040,7 @@ implementation
             GetShortName:=hs2;
             GetShortName:=hs2;
           end;
           end;
 {$endif}
 {$endif}
-{$ifdef go32v2}
-        hs:=n;
-        if Dos.GetShortName(hs) then
-         GetShortName:=hs;
-{$endif}
-{$ifdef watcom}
+{$if defined(go32v2) or defined(watcom)}
         hs:=n;
         hs:=n;
         if Dos.GetShortName(hs) then
         if Dos.GetShortName(hs) then
          GetShortName:=hs;
          GetShortName:=hs;

+ 4 - 1
compiler/globals.pas

@@ -29,6 +29,9 @@ interface
 {$ifdef win32}
 {$ifdef win32}
       windows,
       windows,
 {$endif}
 {$endif}
+{$ifdef os2}
+      dos,
+{$endif os2}
 {$ifdef hasunix}
 {$ifdef hasunix}
       Baseunix,unix,
       Baseunix,unix,
 {$endif}
 {$endif}
@@ -479,7 +482,7 @@ implementation
       {$ifdef GETENVOK}
       {$ifdef GETENVOK}
         {$undef GETENVOK}
         {$undef GETENVOK}
       {$else}
       {$else}
-        GetEnvPchar:=StrPNew(Dos.Getenv(envname));
+        GetEnvPchar:=StrPNew(GetEnvironmentVariable(envname));
       {$endif}
       {$endif}
       end;
       end;