From f2fc63aed25369295e2525f84c35e6c74e5fc779 Mon Sep 17 00:00:00 2001 From: magorium <10467276-magorium@users.noreply.gitlab.com> Date: Fri, 29 Apr 2022 22:03:43 +0200 Subject: [PATCH] AROS 64bit fixes filehandles #2 Solve crashes when opening, closing and managing files for AROS 64-bit when filehandles are located in memory > 32-bit by making sure the used file handles are actually of type BPTR/THandle instead of longint/cardinal (and stays compatible to AROS 32-bit). --- rtl/aros/system.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtl/aros/system.pp b/rtl/aros/system.pp index 6b96811bfc..d4dcfc31fe 100644 --- a/rtl/aros/system.pp +++ b/rtl/aros/system.pp @@ -66,7 +66,7 @@ var ASYS_heapPool : Pointer; { pointer for the OS pool for growing the heap } ASYS_fileSemaphore: Pointer; { mutex semaphore for filelist access arbitration } - ASYS_origDir : LongInt; { original directory on startup } + ASYS_origDir : PtrInt; { original directory on startup } AOS_wbMsg : Pointer; AOS_ConName : PChar ='CON:10/30/620/100/FPC Console Output/AUTO/CLOSE/WAIT'; AOS_ConHandle: THandle; @@ -116,7 +116,7 @@ procedure haltproc(e:longint); cdecl; external name '_haltproc'; procedure System_exit; var - oldDirLock: LongInt; + oldDirLock: PtrInt; begin if Killed then Exit;