Browse Source

amicommon: m68k-amiga legacy support

git-svn-id: trunk@44566 -
Károly Balogh 5 years ago
parent
commit
086c897981

+ 8 - 0
rtl/amicommon/athreads.pp

@@ -38,6 +38,14 @@ uses
 {$include timerd.inc}
 {$include doslibd.inc}
 {$include doslibf.inc}
+
+{$ifdef cpum68k}
+{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
+{$include legacyexech.inc}
+{$include legacydosh.inc}
+{$endif}
+{$endif}
+
 {$ENDIF}
 
 const

+ 8 - 0
rtl/amicommon/dos.pp

@@ -76,6 +76,14 @@ implementation
 {$include doslibf.inc}
 {$include utilf.inc}
 
+{$ifdef cpum68k}
+{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
+{$include legacyexech.inc}
+{$include legacydosh.inc}
+{$include legacyutilh.inc}
+{$endif}
+{$endif}
+
 {$packrecords default}
 
 const

+ 6 - 0
rtl/amicommon/sysfile.inc

@@ -287,7 +287,9 @@ begin
   end;
 end;
 
+{$IFNDEF AMIGA_LEGACY}
 {$DEFINE ASYS_FILESIZE_USE_EXAMINEFH}
+{$ENDIF}
 { I changed the double-Seek filesize method which we
   were using for 10+ years to the new ExamineFH() method.
   It should be available AmigaOS 2.0+, and much faster.
@@ -335,12 +337,16 @@ end;
 procedure do_truncate(handle: THandle; pos: longint);
 begin
   checkCTRLC;
+{$IFNDEF AMIGA_LEGACY}
   if CheckInList(ASYS_fileList,handle)<>nil then begin
 
     { Seeking from OFFSET_BEGINNING }
     if SetFileSize(handle,pos,OFFSET_BEGINNING)<0 then
       dosError2InOut(IoErr);
   end;
+{$ELSE}
+  dosError2InOut(ERROR_NOT_IMPLEMENTED);
+{$ENDIF}
 end;
 
 procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);

+ 7 - 0
rtl/amicommon/sysos.inc

@@ -31,6 +31,13 @@
 {$include execf.inc}
 {$include doslibf.inc}
 
+{$ifdef cpum68k}
+{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
+{$include legacyexec.inc}
+{$include legacydos.inc}
+{$include legacyutil.inc}
+{$endif}
+{$endif}
 
 {*****************************************************************************
                              CPU specific

+ 8 - 0
rtl/amicommon/sysutils.pp

@@ -77,6 +77,14 @@ uses
 {$include doslibf.inc}
 {$include utilf.inc}
 
+{$ifdef cpum68k}
+{$if defined(amiga_v1_0_only) or defined(amiga_v1_2_only)}
+{$include legacyexech.inc}
+{$include legacydosh.inc}
+{$include legacyutilh.inc}
+{$endif}
+{$endif}
+
 { * Followings are implemented in the system unit! * }
 function PathConv(path: shortstring): shortstring; external name 'PATHCONV';
 function PathConv(path: RawByteString): RawByteString; external name 'PATHCONVRBS';