diff --git a/compiler/catch.pas b/compiler/catch.pas index 76d99ca744..fdd5d1dc94 100644 --- a/compiler/catch.pas +++ b/compiler/catch.pas @@ -61,8 +61,10 @@ Const in_const_evaluation : boolean = false; Implementation +{$IFNDEF MACOS_USE_FAKE_SYSUTILS} uses sysutils; +{$ENDIF MACOS_USE_FAKE_SYSUTILS} {$ifdef has_signal} {$ifdef unix} @@ -92,7 +94,10 @@ end. { $Log$ - Revision 1.21 2005-01-26 16:23:28 peter + Revision 1.22 2005-01-31 21:30:56 olle + + Added fake Exception classes, only for MACOS. + + Revision 1.21 2005/01/26 16:23:28 peter * detect arithmetic overflows for constants at compile time * use try..except instead of setjmp diff --git a/compiler/compiler.pas b/compiler/compiler.pas index 433992a634..b5849a1cb5 100644 --- a/compiler/compiler.pas +++ b/compiler/compiler.pas @@ -129,7 +129,9 @@ uses {$ELSE USE_SYSUTILS} dos, {$ENDIF USE_SYSUTILS} +{$IFNDEF MACOS_USE_FAKE_SYSUTILS} sysutils, +{$ENDIF MACOS_USE_FAKE_SYSUTILS} verbose,comphook,systems, cutils,cclasses,globals,options,fmodule,parser,symtable, assemble,link,import,export,tokens,pass_1 @@ -425,7 +427,10 @@ end; end. { $Log$ - Revision 1.52 2005-01-26 16:23:28 peter + Revision 1.53 2005-01-31 21:30:56 olle + + Added fake Exception classes, only for MACOS. + + Revision 1.52 2005/01/26 16:23:28 peter * detect arithmetic overflows for constants at compile time * use try..except instead of setjmp diff --git a/compiler/globals.pas b/compiler/globals.pas index 6da9b9f87e..46cbf099e8 100644 --- a/compiler/globals.pas +++ b/compiler/globals.pas @@ -354,6 +354,33 @@ interface be placed in data/const segment, according to the current alignment requirements } function const_align(siz: longint): longint; +{$IFDEF MACOS} + +{Since SysUtils is not yet available for MacOS, fake + Exceptions classes are included here.} + +{$DEFINE MACOS_USE_FAKE_SYSUTILS} + +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} implementation @@ -2191,7 +2218,10 @@ end; end. { $Log$ - Revision 1.163 2005-01-23 22:13:50 florian + Revision 1.164 2005-01-31 21:30:56 olle + + Added fake Exception classes, only for MACOS. + + Revision 1.163 2005/01/23 22:13:50 florian * fixed math constants for big endian cpus Revision 1.162 2005/01/23 21:09:11 florian diff --git a/compiler/nadd.pas b/compiler/nadd.pas index df3580abe8..f34830c4c2 100644 --- a/compiler/nadd.pas +++ b/compiler/nadd.pas @@ -69,7 +69,9 @@ interface implementation uses +{$IFNDEF MACOS_USE_FAKE_SYSUTILS} sysutils, +{$ENDIF MACOS_USE_FAKE_SYSUTILS} globtype,systems, cutils,verbose,globals,widestr, symconst,symtype,symdef,symsym,symtable,defutil,defcmp, @@ -2137,7 +2139,10 @@ begin end. { $Log$ - Revision 1.138 2005-01-31 16:15:04 peter + Revision 1.139 2005-01-31 21:30:56 olle + + Added fake Exception classes, only for MACOS. + + Revision 1.138 2005/01/31 16:15:04 peter * zero based array with elementsize>1 fix Revision 1.137 2005/01/26 16:23:28 peter