소스 검색

* fixed windows compilation (currently uses Dos again instead of sysutils)

git-svn-id: trunk@12362 -
Jonas Maebe 16 년 전
부모
커밋
3a56f2403c
1개의 변경된 파일10개의 추가작업 그리고 3개의 파일을 삭제
  1. 10 3
      tests/utils/redir.pp

+ 10 - 3
tests/utils/redir.pp

@@ -90,7 +90,7 @@ const
 
 Implementation
 
-{$ifdef macos}
+{$if defined(macos) or defined(windows)}
 {$define usedos}
 {$endif}
 
@@ -342,7 +342,10 @@ end;
 
 function LocateExeFile(var FileName:string): boolean;
 var
-  dir,s,d,n,e : string;
+  dir,s: string;
+  d: dirstr;
+  n: namestr;
+  e: extstr;
   i : longint;
 begin
   LocateExeFile:=False;
@@ -1037,11 +1040,15 @@ end;
   {$endif windows}
     DosError:=0;
     If UseComSpec then
+      {$ifndef usedos}
       Sysutils.ExecuteProcess (Getenv('COMSPEC'),'/C '+FixPath(progname)+' '+Comline)
+      {$else}
+      Exec (Getenv('COMSPEC'),'/C '+FixPath(progname)+' '+Comline)
+      {$endif}
     else
       begin
         if LocateExeFile(progname) then
-          {$ifndef macos}
+          {$ifndef usedos}
           Sysutils.ExecuteProcess(ProgName,Comline)
           {$else}
           Dos.Exec(''''+ProgName+'''',Comline) {Quotes needed !}