summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolle <olle@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-09-03 14:11:56 +0000
committerolle <olle@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-09-03 14:11:56 +0000
commitddd36ef43ba8eb6f1f46995172525a3a1658fea0 (patch)
tree48f0ed8c73d498699e0ed0192ecd5dae95d75250
parent3770e3f7110844c377fc067bf50667b328229667 (diff)
downloadfpc-ddd36ef43ba8eb6f1f46995172525a3a1658fea0.tar.gz
Target macos: added a fake sysutils for use by compiler only, minor fixes to tests
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/fixes_2_0@4542 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/MPWMake2
-rw-r--r--compiler/catch.pas4
-rw-r--r--compiler/comphook.pas18
-rw-r--r--compiler/compiler.pas6
-rw-r--r--compiler/fpcdefs.inc2
-rw-r--r--compiler/globals.pas38
-rw-r--r--compiler/nadd.pas6
-rw-r--r--compiler/parser.pas6
-rw-r--r--compiler/utils/ppumove.pp10
-rw-r--r--compiler/verbose.pas4
-rw-r--r--tests/webtbs/tw3082.pp1
-rw-r--r--tests/webtbs/tw4390.pp1
-rw-r--r--tests/webtbs/tw4950.pp1
13 files changed, 44 insertions, 55 deletions
diff --git a/compiler/MPWMake b/compiler/MPWMake
index 4ba478f4ca..cce6ba6bb7 100644
--- a/compiler/MPWMake
+++ b/compiler/MPWMake
@@ -1 +1 @@
-# Make file for MPW make. # To run it, use: # Make <target> -f MPWMake > Makeout ; Makeout # where <target> should be replaced with actual make target. ############################################# # TIPS (TODO move to Wiki or something # # Defined variables: No quoting # Command lines: quote paths, dont quote option strings, since # they might contain several options, which must be separated. # Recursive call to Make: # - give options as -d XXX="{XXX}" # - in same dir, remember to ensure to have different Makeout files, # e g Makeout2. # # NOTE Currently cycle is stopped after three rounds, no diff is checked. FPC = {FPCDIR}bin:ppcppc # Default language for the compiler (english): FPCLANG = e MSGFILE = :msg:error{FPCLANG}.msg msg2inc Ä :utils:msg2inc.pp {FPC} -FE: -WT :utils:msg2inc.pp # The msgtxt.inc only depends on the error?.msg file, not on msg2inc, # because that one will be new almost everytime msgtxt.inc Ä {MSGFILE} Make msg2inc -f MPWMake > Makeout3 ; Makeout3 msg2inc {MSGFILE} msg msg msg Ä msgtxt.inc compiler Ä msg Set Exit 0 NewFolder :powerpc:units: ³ Dev:Null NewFolder :powerpc:units:powerpc-macos: ³ Dev:Null Set Exit 1 "{FPC}" {OPT} "-Fu{RTLDIR}" -Fu:systems: -Fu:powerpc: -dGDB -dBROWSERLOG -dNOOPT ¶ -dpowerpc -WT -FE: -FU:powerpc:units:powerpc-macos: pp.pas Rename -y pp ppcppc clean Ä utils_clean Set Exit 0 Delete -y :powerpc:units:powerpc-macos Delete -y ppcppc oldfpc msg2inc Delete -y Å.xcoff Set Exit 1 cycleclean Ä Set Exit 0 Delete -y :powerpc:units:powerpc-macos Set Exit 1 install Ä If {FPCDIR} == '' Set -e FPCDIR `GetFileName -wd -m 'Select where to install the FreePascal folder'`FreePascal: Set -e Commands "{Commands},{FPCDIR}bin:" Echo "Set -e FPCDIR ¶'{FPCDIR}¶'" > "{MPW}Startup Items:FPC Startup" Echo 'Set -e Commands "{Commands},{FPCDIR}bin:"' >> "{MPW}Startup Items:FPC Startup" End Set Exit 0 NewFolder "{FPCDIR}" ³ Dev:Null NewFolder "{FPCDIR}bin:" ³ Dev:Null Set Exit 1 Duplicate -y :ppcppc :utils:ppudump :utils:ppufiles :utils:ppumove ¶ :utils:fpc "{FPCDIR}bin:" Echo "# Configuration file for Free Pascal for MPW" > "{FPCDIR}bin:fpc.cfg" Echo "-Fu¶'{FPCDIR}units:rtl:¶'" >> "{FPCDIR}bin:fpc.cfg" Echo "-l" >> "{FPCDIR}bin:fpc.cfg" Echo "-vi" >> "{FPCDIR}bin:fpc.cfg" cycle Ä Directory ::rtl:macos Make clean -f MPWMake > Makeout ; Makeout Make all -d FPC="{FPC}" -d OPT="{OPT}" -f MPWMake > Makeout ; Makeout Directory :::compiler Make clean -f MPWMake > Makeout2 ; Makeout2 Make compiler -d FPC="{FPC}" -d OPT="{OPT}" -d RTLDIR=::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 # Echo '******************** SECOND ROUND *********************' Rename -y ppcppc oldfpc Directory ::rtl:macos Make clean -f MPWMake > Makeout ; Makeout Make all -d FPC=:::compiler:oldfpc -d OPT="{OPT}" -f MPWMake > Makeout ; Makeout Directory :::compiler Make cycleclean -f MPWMake > Makeout2 ; Makeout2 Make compiler -d FPC=oldfpc -d OPT="{OPT}" -d RTLDIR=::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 # Echo '********************* THIRD ROUND *********************' Rename -y ppcppc oldfpc Directory ::rtl:macos Make clean -f MPWMake > Makeout ; Makeout Make all -d FPC=:::compiler:oldfpc -d OPT="{OPT}" -f MPWMake > Makeout ; Makeout Directory :::compiler Make cycleclean -f MPWMake > Makeout2 ; Makeout2 Make compiler -d FPC=oldfpc -d OPT="{OPT}" -d RTLDIR=::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 # Make utils_clean -f MPWMake > Makeout2 ; Makeout2 Make utils_all -d FPC=::oldfpc -d OPT="{OPT}" -d RTLDIR=:::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 utils_all Ä Directory :utils Set Exit 0 NewFolder :units: ³ Dev:Null NewFolder :units:powerpc-macos: ³ Dev:Null Set Exit 1 "{FPC}" {OPT} "-Fu{RTLDIR}" -FE: -FU:units:powerpc-macos -Fu:: -WT ppudump.pp "{FPC}" {OPT} "-Fu{RTLDIR}" -FE: -FU:units:powerpc-macos -Fu:: -WT ppufiles.pp "{FPC}" {OPT} "-Fu{RTLDIR}" -FE: -FU:units:powerpc-macos -Fu:: -WT ppumove.pp Duplicate -y fpc.mpw fpc Directory :: utils_clean Ä Directory :utils Set Exit 0 Delete -y :units:powerpc-macos Delete -y fpc ppudump ppufiles ppumove msg2inc Delete -y Å.xcoff Set Exit 1 Directory :: \ No newline at end of file
+# Make file for MPW make. # To run it, use: # Make <target> -f MPWMake > Makeout ; Makeout # where <target> should be replaced with actual make target. ############################################# # TIPS (TODO move to Wiki or something # # Defined variables: No quoting # Command lines: quote paths, dont quote option strings, since # they might contain several options, which must be separated. # Recursive call to Make: # - give options as -d XXX="{XXX}" # - in same dir, remember to ensure to have different Makeout files, # e g Makeout2. # # NOTE Currently cycle is stopped after three rounds, no diff is checked. FPC = {FPCDIR}bin:ppcppc # Default language for the compiler (english): FPCLANG = e MSGFILE = :msg:error{FPCLANG}.msg msg2inc Ä :utils:msg2inc.pp {FPC} -FE: -WT :utils:msg2inc.pp # The msgtxt.inc only depends on the error?.msg file, not on msg2inc, # because that one will be new almost everytime msgtxt.inc Ä {MSGFILE} Make msg2inc -f MPWMake > Makeout3 ; Makeout3 msg2inc {MSGFILE} msg msg msg Ä msgtxt.inc compiler Ä msg Set Exit 0 NewFolder :powerpc:units: ³ Dev:Null NewFolder :powerpc:units:powerpc-macos: ³ Dev:Null Set Exit 1 "{FPC}" {OPT} "-Fu{RTLDIR}" -Fu:systems: -Fu:powerpc: -Fi::rtl:objpas:sysutils -dGDB -dBROWSERLOG -dNOOPT ¶ -dpowerpc -WT -FE: -FU:powerpc:units:powerpc-macos: pp.pas Rename -y pp ppcppc clean Ä utils_clean Set Exit 0 Delete -y :powerpc:units:powerpc-macos Delete -y ppcppc oldfpc msg2inc Delete -y Å.xcoff Set Exit 1 cycleclean Ä Set Exit 0 Delete -y :powerpc:units:powerpc-macos Set Exit 1 install Ä If {FPCDIR} == '' Set -e FPCDIR `GetFileName -wd -m 'Select where to install the FreePascal folder'`FreePascal: Set -e Commands "{Commands},{FPCDIR}bin:" Echo "Set -e FPCDIR ¶'{FPCDIR}¶'" > "{MPW}Startup Items:FPC Startup" Echo 'Set -e Commands "{Commands},{FPCDIR}bin:"' >> "{MPW}Startup Items:FPC Startup" End Set Exit 0 NewFolder "{FPCDIR}" ³ Dev:Null NewFolder "{FPCDIR}bin:" ³ Dev:Null Set Exit 1 Duplicate -y :ppcppc :utils:ppudump :utils:ppufiles :utils:ppumove ¶ :utils:fpc "{FPCDIR}bin:" Echo "# Configuration file for Free Pascal for MPW" > "{FPCDIR}bin:fpc.cfg" Echo "-Fu¶'{FPCDIR}units:rtl:¶'" >> "{FPCDIR}bin:fpc.cfg" Echo "-l" >> "{FPCDIR}bin:fpc.cfg" Echo "-vi" >> "{FPCDIR}bin:fpc.cfg" cycle Ä Directory ::rtl:macos Make clean -f MPWMake > Makeout ; Makeout Make all -d FPC="{FPC}" -d OPT="{OPT}" -f MPWMake > Makeout ; Makeout Directory :::compiler Make clean -f MPWMake > Makeout2 ; Makeout2 Make compiler -d FPC="{FPC}" -d OPT="{OPT}" -d RTLDIR=::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 # Echo '******************** SECOND ROUND *********************' Rename -y ppcppc oldfpc Directory ::rtl:macos Make clean -f MPWMake > Makeout ; Makeout Make all -d FPC=:::compiler:oldfpc -d OPT="{OPT}" -f MPWMake > Makeout ; Makeout Directory :::compiler Make cycleclean -f MPWMake > Makeout2 ; Makeout2 Make compiler -d FPC=oldfpc -d OPT="{OPT}" -d RTLDIR=::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 # Echo '********************* THIRD ROUND *********************' Rename -y ppcppc oldfpc Directory ::rtl:macos Make clean -f MPWMake > Makeout ; Makeout Make all -d FPC=:::compiler:oldfpc -d OPT="{OPT}" -f MPWMake > Makeout ; Makeout Directory :::compiler Make cycleclean -f MPWMake > Makeout2 ; Makeout2 Make compiler -d FPC=oldfpc -d OPT="{OPT}" -d RTLDIR=::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 # Make utils_clean -f MPWMake > Makeout2 ; Makeout2 Make utils_all -d FPC=::oldfpc -d OPT="{OPT}" -d RTLDIR=:::rtl:units:powerpc-macos -f MPWMake > Makeout2 ; Makeout2 utils_all Ä Directory :utils Set Exit 0 NewFolder :units: ³ Dev:Null NewFolder :units:powerpc-macos: ³ Dev:Null Set Exit 1 "{FPC}" {OPT} "-Fu{RTLDIR}" -FE: -FU:units:powerpc-macos -Fu:: -WT ppudump.pp "{FPC}" {OPT} "-Fu{RTLDIR}" -FE: -FU:units:powerpc-macos -Fu:: -WT ppufiles.pp "{FPC}" {OPT} "-Fu{RTLDIR}" -FE: -FU:units:powerpc-macos -Fu:: -WT ppumove.pp Duplicate -y fpc.mpw fpc Directory :: utils_clean Ä Directory :utils Set Exit 0 Delete -y :units:powerpc-macos Delete -y fpc ppudump ppufiles ppumove msg2inc Delete -y Å.xcoff Set Exit 1 Directory :: \ No newline at end of file
diff --git a/compiler/catch.pas b/compiler/catch.pas
index 794680de40..cd0ea71af1 100644
--- a/compiler/catch.pas
+++ b/compiler/catch.pas
@@ -60,10 +60,10 @@ Const in_const_evaluation : boolean = false;
Implementation
-{$IFNDEF MACOS_USE_FAKE_SYSUTILS}
+//{$IFNDEF USE_FAKE_SYSUTILS}
uses
comphook;
-{$ENDIF MACOS_USE_FAKE_SYSUTILS}
+//{$ENDIF USE_FAKE_SYSUTILS}
{$ifdef has_signal}
{$ifdef unix}
diff --git a/compiler/comphook.pas b/compiler/comphook.pas
index 5c77e2511d..8054f5d6a0 100644
--- a/compiler/comphook.pas
+++ b/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}
finput;
@@ -194,31 +194,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;
diff --git a/compiler/compiler.pas b/compiler/compiler.pas
index ef43dd3fd1..5aed24b077 100644
--- a/compiler/compiler.pas
+++ b/compiler/compiler.pas
@@ -136,9 +136,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,import,export,tokens,pass_1
diff --git a/compiler/fpcdefs.inc b/compiler/fpcdefs.inc
index 0faa5e1ebc..dbc1b559b3 100644
--- a/compiler/fpcdefs.inc
+++ b/compiler/fpcdefs.inc
@@ -77,6 +77,6 @@
{$endif m68k}
{$IFDEF MACOS}
-{$DEFINE MACOS_USE_FAKE_SYSUTILS}
+{$DEFINE USE_FAKE_SYSUTILS}
{$ENDIF MACOS}
diff --git a/compiler/globals.pas b/compiler/globals.pas
index fafca5b4d9..5519da6039 100644
--- a/compiler/globals.pas
+++ b/compiler/globals.pas
@@ -39,8 +39,14 @@ interface
Baseunix,unix,
{$endif}
{$endif}
+
+{$IFNDEF USE_FAKE_SYSUTILS}
+ sysutils,
+{$ELSE}
+ fksysutl,
+{$ENDIF}
+
{ comphook pulls in sysutils anyways }
- SysUtils,
{$IFDEF USE_SYSUTILS}
{$ELSE USE_SYSUTILS}
strings,
@@ -368,32 +374,6 @@ interface
be placed in data/const segment, according to the current alignment requirements }
function const_align(siz: longint): longint;
-{$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
@@ -630,7 +610,11 @@ implementation
Function DirectoryExists ( Const F : String) : Boolean;
begin
+{$IFNDEF USE_FAKE_SYSUTILS}
Result:=SysUtils.DirectoryExists(f);
+{$ELSE}
+ Result:=fksysutl.DirectoryExists(f);
+{$ENDIF}
end;
diff --git a/compiler/nadd.pas b/compiler/nadd.pas
index b57f1b3cf4..da633833bd 100644
--- a/compiler/nadd.pas
+++ b/compiler/nadd.pas
@@ -68,9 +68,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,symtype,symdef,symsym,symtable,defutil,defcmp,
diff --git a/compiler/parser.pas b/compiler/parser.pas
index 116d4559ab..fdbea99e59 100644
--- a/compiler/parser.pas
+++ b/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,
diff --git a/compiler/utils/ppumove.pp b/compiler/utils/ppumove.pp
index 8fe1bbcc0f..5bb1233844 100644
--- a/compiler/utils/ppumove.pp
+++ b/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}
diff --git a/compiler/verbose.pas b/compiler/verbose.pas
index 29d69a03ef..dbb097f4b2 100644
--- a/compiler/verbose.pas
+++ b/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,
diff --git a/tests/webtbs/tw3082.pp b/tests/webtbs/tw3082.pp
index fb57c691df..25503539a8 100644
--- a/tests/webtbs/tw3082.pp
+++ b/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
diff --git a/tests/webtbs/tw4390.pp b/tests/webtbs/tw4390.pp
index c0c2b3701c..30c456d8df 100644
--- a/tests/webtbs/tw4390.pp
+++ b/tests/webtbs/tw4390.pp
@@ -2,7 +2,6 @@
{ Submitted by "Benjamin Rosseaux" on 2005-09-28 }
{ e-mail: benjamin@0ok.de }
PROGRAM Test;
-{$APPTYPE CONSOLE}
{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF}
diff --git a/tests/webtbs/tw4950.pp b/tests/webtbs/tw4950.pp
index ed65272b72..24020b0f34 100644
--- a/tests/webtbs/tw4950.pp
+++ b/tests/webtbs/tw4950.pp
@@ -10,7 +10,6 @@
{$mode delphi}
program FunctionRedirectionProblem;
-{$APPTYPE CONSOLE}
var
cnt : longint;