Browse Source

macos: added a fake sysutils for use by compiler, and fixed some tests

git-svn-id: trunk@4549 -
olle 19 years ago
parent
commit
05d6f0e94d

File diff suppressed because it is too large
+ 0 - 0
compiler/MPWMake


+ 0 - 2
compiler/catch.pas

@@ -60,10 +60,8 @@ Const in_const_evaluation : boolean = false;
 
 Implementation
 
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
 uses
   comphook;
-{$ENDIF MACOS_USE_FAKE_SYSUTILS}
 
 {$ifdef has_signal}
 {$ifdef unix}

+ 4 - 0
compiler/cclasses.pas

@@ -26,7 +26,11 @@ unit cclasses;
 interface
 
     uses
+{$IFNDEF USE_FAKE_SYSUTILS}
       SysUtils,
+{$ELSE}
+      fksysutl,
+{$ENDIF}
       CUtils,CStreams;
 
 {********************************************

+ 3 - 15
compiler/comphook.pas

@@ -26,10 +26,10 @@ unit comphook;
 interface
 
 uses
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
-  SysUtils,
+{$IFNDEF USE_FAKE_SYSUTILS}
+  sysutils,
 {$ELSE}
-  globals,
+  fksysutl,
 {$ENDIF}
   globtype,
   finput;
@@ -201,31 +201,19 @@ end;
 
      constructor EControlCAbort.Create;
        begin
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
          inherited Create('Ctrl-C Signaled!');
-{$ELSE}
-         inherited Create;
-{$ENDIF}
        end;
 
 
      constructor ECompilerAbort.Create;
        begin
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
          inherited Create('Compilation Aborted');
-{$ELSE}
-         inherited Create;
-{$ENDIF}
        end;
 
 
      constructor ECompilerAbortSilent.Create;
        begin
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
          inherited Create('Compilation Aborted');
-{$ELSE}
-         inherited Create;
-{$ENDIF}
        end;
 
 

+ 4 - 2
compiler/compiler.pas

@@ -144,9 +144,11 @@ uses
 {$ELSE USE_SYSUTILS}
   dos,
 {$ENDIF USE_SYSUTILS}
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
+{$IFNDEF USE_FAKE_SYSUTILS}
   sysutils,
-{$ENDIF MACOS_USE_FAKE_SYSUTILS}
+{$ELSE}
+  fksysutl,
+{$ENDIF}
   verbose,comphook,systems,
   cutils,cclasses,globals,options,fmodule,parser,symtable,
   assemble,link,dbgbase,import,export,tokens,pass_1

+ 1 - 1
compiler/fpcdefs.inc

@@ -90,7 +90,7 @@
 {$endif m68k}
 
 {$IFDEF MACOS}
-{$DEFINE MACOS_USE_FAKE_SYSUTILS}
+{$DEFINE USE_FAKE_SYSUTILS}
 {$ENDIF MACOS}
 
 {$define SUPPORT_UNALIGNED}

+ 11 - 27
compiler/globals.pas

@@ -32,8 +32,14 @@ interface
 {$ifdef hasunix}
       Baseunix,unix,
 {$endif}
+
+{$IFNDEF USE_FAKE_SYSUTILS}
+      sysutils,
+{$ELSE}
+      fksysutl,
+{$ENDIF}
+
       { comphook pulls in sysutils anyways }
-      SysUtils,
 {$IFDEF USE_SYSUTILS}
 {$ELSE USE_SYSUTILS}
       strings,
@@ -374,32 +380,6 @@ interface
        be placed in data/const segment, according to the current alignment requirements }
     function const_align(siz: shortint): shortint;
 
-{$IFDEF MACOS_USE_FAKE_SYSUTILS}
-
-{Since SysUtils is not yet available for MacOS, fake
- Exceptions classes are included here.}
-
-type
-   { exceptions }
-   Exception = class(TObject);
-
-   EExternal = class(Exception);
-
-   { integer math exceptions }
-   EInterror    = Class(EExternal);
-   EDivByZero   = Class(EIntError);
-   ERangeError  = Class(EIntError);
-   EIntOverflow = Class(EIntError);
-
-   { General math errors }
-   EMathError  = Class(EExternal);
-   EInvalidOp  = Class(EMathError);
-   EZeroDivide = Class(EMathError);
-   EOverflow   = Class(EMathError);
-   EUnderflow  = Class(EMathError);
-
-{$ENDIF MACOS_USE_FAKE_SYSUTILS}
-
 implementation
 
     uses
@@ -636,7 +616,11 @@ implementation
 
     Function DirectoryExists ( Const F : String) : Boolean;
       begin
+{$IFNDEF USE_FAKE_SYSUTILS}
         Result:=SysUtils.DirectoryExists(f);
+{$ELSE}
+        Result:=fksysutl.DirectoryExists(f);
+{$ENDIF}
       end;
 
 

+ 4 - 2
compiler/nadd.pas

@@ -80,9 +80,11 @@ interface
 implementation
 
     uses
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
+{$IFNDEF USE_FAKE_SYSUTILS}
       sysutils,
-{$ENDIF MACOS_USE_FAKE_SYSUTILS}
+{$ELSE}
+      fksysutl,
+{$ENDIF}
       globtype,systems,
       cutils,verbose,globals,widestr,
       symconst,symdef,symsym,symtable,defutil,defcmp,

+ 4 - 2
compiler/parser.pas

@@ -35,9 +35,11 @@ interface
 implementation
 
     uses
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
+{$IFNDEF USE_FAKE_SYSUTILS}
       sysutils,
-{$ENDIF MACOS_USE_FAKE_SYSUTILS}
+{$ELSE}
+      fksysutl,
+{$ENDIF}
       cutils,cclasses,
       globtype,version,tokens,systems,globals,verbose,
       symbase,symtable,symsym,

+ 10 - 0
compiler/utils/ppumove.pp

@@ -23,7 +23,17 @@
 {$endif}
 Program ppumove;
 uses
+
+{$IFDEF MACOS}
+{$DEFINE USE_FAKE_SYSUTILS}
+{$ENDIF MACOS}
+
+{$IFNDEF USE_FAKE_SYSUTILS}
   sysutils,
+{$ELSE}
+  fksysutl,
+{$ENDIF}
+
 {$ifdef unix}
   Baseunix,Unix, UnixUtil,
 {$else unix}

+ 3 - 1
compiler/verbose.pas

@@ -26,8 +26,10 @@ unit verbose;
 interface
 
     uses
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
+{$IFNDEF USE_FAKE_SYSUTILS}
       sysutils,
+{$ELSE}
+      fksysutl,
 {$ENDIF}
       cutils,
       globals,finput,

+ 1 - 0
tests/webtbs/tw3082.pp

@@ -1,5 +1,6 @@
 { %norun }
 { %cpu=x86_64,i386,powerpc,sparc}
+{ %skiptarget = macos }
 { execute this test only on reasonable fast cpus }
 library lib;
 const

+ 0 - 1
tests/webtbs/tw4390.pp

@@ -2,7 +2,6 @@
 { Submitted by "Benjamin Rosseaux" on  2005-09-28 }
 { e-mail: [email protected] }
 PROGRAM Test;
-{$APPTYPE CONSOLE}
 {$IFDEF FPC}
  {$MODE DELPHI}
 {$ENDIF}

+ 0 - 1
tests/webtbs/tw4950.pp

@@ -10,7 +10,6 @@
 {$mode delphi}
 
 program FunctionRedirectionProblem;
-{$APPTYPE CONSOLE}
 
 var
   cnt : longint;

Some files were not shown because too many files changed in this diff