Browse Source

* errorhandling fixed

marco 21 năm trước cách đây
mục cha
commit
c032cd36e8
1 tập tin đã thay đổi với 8 bổ sung3 xóa
  1. 8 3
      compiler/utils/fpc.pp

+ 8 - 3
compiler/utils/fpc.pp

@@ -94,6 +94,7 @@ program fpc;
      processorstr   : string;
      processorstr   : string;
      ppccommandline : ansistring;
      ppccommandline : ansistring;
      i : longint;
      i : longint;
+     errorvalue     : Longint;
   begin
   begin
      ppccommandline:='';
      ppccommandline:='';
 {$ifdef i386}
 {$ifdef i386}
@@ -165,18 +166,22 @@ program fpc;
      { call ppcXXX }
      { call ppcXXX }
      swapvectors;
      swapvectors;
      {$ifdef unix}
      {$ifdef unix}
-     SysUtils.exec(ppcbin,ppccommandline);
+     errorvalue:=SysUtils.exec(ppcbin,ppccommandline);
      {$else}
      {$else}
      Dos.exec(ppcbin,ppccommandline);
      Dos.exec(ppcbin,ppccommandline);
+     errorvalue:=doserror;
      {$endif}
      {$endif}
      swapvectors;
      swapvectors;
-     if doserror<>0 then
+     if errorvalue<>0 then
        error(ppcbin+' can''t be executed');
        error(ppcbin+' can''t be executed');
      halt(dosexitcode);
      halt(dosexitcode);
   end.
   end.
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2004-01-03 09:12:23  marco
+  Revision 1.10  2004-01-03 09:20:45  marco
+   * errorhandling fixed
+
+  Revision 1.9  2004/01/03 09:12:23  marco
    * unix does ansistring exec
    * unix does ansistring exec
 
 
   Revision 1.8  2003/10/08 19:16:50  peter
   Revision 1.8  2003/10/08 19:16:50  peter