macos: patched up the system unit to build at least on m68k

git-svn-id: trunk@37031 -
This commit is contained in:
Károly Balogh 2017-08-22 10:51:39 +00:00
parent 925ffcc744
commit 3c5011aedc
2 changed files with 47 additions and 7 deletions

View File

@ -1039,7 +1039,8 @@ external 'InterfaceLib';
{************** from Quickdraw ***************} {************** from Quickdraw ***************}
TYPE TYPE
Bits16 = ARRAY [0..15] OF INTEGER; { this was called 'Bits16', but that conflicts with softfpu internal types on m68k (KB) }
MacBits16 = ARRAY [0..15] OF INTEGER;
PatternPtr = ^Pattern; PatternPtr = ^Pattern;
Pattern = RECORD Pattern = RECORD
@ -1057,8 +1058,8 @@ TYPE
CursorPtr = ^Cursor; CursorPtr = ^Cursor;
Cursor = RECORD Cursor = RECORD
data: Bits16; data: MacBits16;
mask: Bits16; mask: MacBits16;
hotSpot: Point; hotSpot: Point;
END; END;
CursPtr = ^Cursor; CursPtr = ^Cursor;

View File

@ -21,6 +21,12 @@ interface
{ include system-independent routine headers } { include system-independent routine headers }
{$I systemh.inc} {$I systemh.inc}
{$if defined(cpum68k) and defined(fpusoft)}
{$define fpc_softfpu_interface}
{$i softfpu.pp}
{$undef fpc_softfpu_interface}
{$endif defined(cpum68k) and defined(fpusoft)}
const const
LineEnding = #13; LineEnding = #13;
LFNSupport = true; LFNSupport = true;
@ -185,6 +191,28 @@ Perhaps handle readonly filesystems, as in sysunix.inc
} }
{$if defined(cpum68k) and defined(fpusoft)}
{$define fpc_softfpu_implementation}
{$define softfpu_compiler_mul32to64}
{$define softfpu_inline}
{$i softfpu.pp}
{$undef fpc_softfpu_implementation}
{ we get these functions and types from the softfpu code }
{$define FPC_SYSTEM_HAS_float64}
{$define FPC_SYSTEM_HAS_float32}
{$define FPC_SYSTEM_HAS_flag}
{$define FPC_SYSTEM_HAS_extractFloat64Frac0}
{$define FPC_SYSTEM_HAS_extractFloat64Frac1}
{$define FPC_SYSTEM_HAS_extractFloat64Exp}
{$define FPC_SYSTEM_HAS_extractFloat64Sign}
{$define FPC_SYSTEM_HAS_ExtractFloat32Frac}
{$define FPC_SYSTEM_HAS_extractFloat32Exp}
{$define FPC_SYSTEM_HAS_extractFloat32Sign}
{$endif defined(cpum68k) and defined(fpusoft)}
{******** include system independent routines **********} {******** include system independent routines **********}
{$I system.inc} {$I system.inc}
@ -296,6 +324,14 @@ begin
FindSysFolder:= err; FindSysFolder:= err;
end; end;
{$ifdef CPUM68K}
{$WARNING FIXME: Dummy TrapAvailable!}
function TrapAvailable(_trap: Word): Boolean;
begin
TrapAvailable:=false;
end;
{$endif CPUM68K}
procedure InvestigateSystem; procedure InvestigateSystem;
{$IFDEF CPUM68K} {$IFDEF CPUM68K}
@ -351,7 +387,9 @@ begin
macosSystemVersion := 0; macosSystemVersion := 0;
end; end;
macosHasSysDebugger := (LongintPtr(MacJmp)^ <> 0); {$WARNING FIXME: MacJmp}
//macosHasSysDebugger := (LongintPtr(MacJmp)^ <> 0);
macosHasSysDebugger := false;
macosHasCFM := false; macosHasCFM := false;
macosHasAppleEvents := false; macosHasAppleEvents := false;
@ -367,10 +405,11 @@ begin
if (macosHasScriptMgr) then if (macosHasScriptMgr) then
macosNrOfScriptsInstalled := GetEnvirons(smEnabled); macosNrOfScriptsInstalled := GetEnvirons(smEnabled);
{$ELSE} {$ELSE}
if (macosHasScriptMgr) then {$WARNING FIXME: GetScriptManagerVariable and smEnabled}
macosNrOfScriptsInstalled := GetScriptManagerVariable(smEnabled); {Gamla rutinnamnet var GetEnvirons.} //if (macosHasScriptMgr) then
{$ENDIF} // macosNrOfScriptsInstalled := GetScriptManagerVariable(smEnabled); {Gamla rutinnamnet var GetEnvirons.}
{$ENDIF} {$ENDIF}
{$ENDIF CPUM68K}
end end
else else
begin begin