|
@@ -21,9 +21,15 @@ unit System;
|
|
interface
|
|
interface
|
|
|
|
|
|
{$define FPC_IS_SYSTEM}
|
|
{$define FPC_IS_SYSTEM}
|
|
-{$define FPC_HAS_ANSI_TEXTFILEREC}
|
|
|
|
|
|
+{$define FPC_ANSI_TEXTFILEREC}
|
|
|
|
|
|
-{.$define FPC_AMIGA_USE_TINYHEAP}
|
|
|
|
|
|
+{$if defined(AMIGA_V1_0_ONLY) or defined(AMIGA_V1_2_ONLY)}
|
|
|
|
+{$define AMIGA_LEGACY}
|
|
|
|
+{$endif}
|
|
|
|
+
|
|
|
|
+{$ifdef AMIGA_LEGACY}
|
|
|
|
+{$.define FPC_AMIGA_USE_TINYHEAP}
|
|
|
|
+{$endif}
|
|
|
|
|
|
{$ifdef FPC_AMIGA_USE_TINYHEAP}
|
|
{$ifdef FPC_AMIGA_USE_TINYHEAP}
|
|
{$define HAS_MEMORYMANAGER}
|
|
{$define HAS_MEMORYMANAGER}
|
|
@@ -41,6 +47,17 @@ interface
|
|
{$undef fpc_softfpu_interface}
|
|
{$undef fpc_softfpu_interface}
|
|
{$endif defined(cpum68k) and defined(fpusoft)}
|
|
{$endif defined(cpum68k) and defined(fpusoft)}
|
|
|
|
|
|
|
|
+const
|
|
|
|
+{$if defined(AMIGA_V1_0_ONLY)}
|
|
|
|
+ OS_MINVERSION = 0;
|
|
|
|
+{$else}
|
|
|
|
+{$if defined(AMIGA_V1_2_ONLY)}
|
|
|
|
+ OS_MINVERSION = 33;
|
|
|
|
+{$else}
|
|
|
|
+ OS_MINVERSION = 37;
|
|
|
|
+{$endif}
|
|
|
|
+{$endif}
|
|
|
|
+
|
|
const
|
|
const
|
|
LineEnding = #10;
|
|
LineEnding = #10;
|
|
LFNSupport = True;
|
|
LFNSupport = True;
|
|
@@ -250,11 +267,13 @@ begin
|
|
AOS_wbMsg:=GetMsg(@self^.pr_MsgPort);
|
|
AOS_wbMsg:=GetMsg(@self^.pr_MsgPort);
|
|
end;
|
|
end;
|
|
|
|
|
|
- AOS_DOSBase:=OpenLibrary('dos.library',37);
|
|
|
|
|
|
+ AOS_DOSBase:=OpenLibrary('dos.library',OS_MINVERSION);
|
|
if AOS_DOSBase=nil then Halt(1);
|
|
if AOS_DOSBase=nil then Halt(1);
|
|
- AOS_UtilityBase:=OpenLibrary('utility.library',37);
|
|
|
|
|
|
+{$ifndef AMIGA_LEGACY}
|
|
|
|
+ AOS_UtilityBase:=OpenLibrary('utility.library',OS_MINVERSION);
|
|
if AOS_UtilityBase=nil then Halt(1);
|
|
if AOS_UtilityBase=nil then Halt(1);
|
|
- AOS_IntuitionBase:=OpenLibrary('intuition.library',37); { amunits support kludge }
|
|
|
|
|
|
+{$endif}
|
|
|
|
+ AOS_IntuitionBase:=OpenLibrary('intuition.library',OS_MINVERSION); { amunits support kludge }
|
|
if AOS_IntuitionBase=nil then Halt(1);
|
|
if AOS_IntuitionBase=nil then Halt(1);
|
|
|
|
|
|
{$IFDEF AMIGAOS4}
|
|
{$IFDEF AMIGAOS4}
|
|
@@ -295,10 +314,11 @@ procedure SysInitStdIO;
|
|
begin
|
|
begin
|
|
OpenStdIO(Input,fmInput,StdInputHandle);
|
|
OpenStdIO(Input,fmInput,StdInputHandle);
|
|
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
|
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
|
|
|
+ OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
|
|
|
+{$ifndef FPC_STDOUT_TRUE_ALIAS}
|
|
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
|
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
|
-
|
|
|
|
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
|
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
|
- OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
|
|
|
|
|
+{$endif FPC_STDOUT_TRUE_ALIAS}
|
|
end;
|
|
end;
|
|
|
|
|
|
function GetProcessID: SizeUInt;
|
|
function GetProcessID: SizeUInt;
|