Browse Source

--- Merging r29614 into '.':
U rtl/amiga/Makefile.fpc
U rtl/amiga/Makefile
--- Recording mergeinfo for merge of r29614 into '.':
U .
--- Merging r29643 into '.':
G rtl/amiga/Makefile
G rtl/amiga/Makefile.fpc
--- Recording mergeinfo for merge of r29643 into '.':
G .
--- Merging r29754 into '.':
U packages/arosunits/src/exec.pas
U packages/arosunits/src/amigados.pas
--- Recording mergeinfo for merge of r29754 into '.':
G .
--- Merging r30060 into '.':
U rtl/m68k/m68k.inc
--- Recording mergeinfo for merge of r30060 into '.':
G .
--- Merging r30092 into '.':
U packages/amunits/src/otherlibs/mui.pas
--- Recording mergeinfo for merge of r30092 into '.':
G .
--- Merging r30355 into '.':
U rtl/morphos/system.pp
--- Recording mergeinfo for merge of r30355 into '.':
G .
--- Merging r30356 into '.':
U rtl/amicommon/sysheap.inc
U rtl/amiga/system.pp
--- Recording mergeinfo for merge of r30356 into '.':
G .
--- Merging r30358 into '.':
U rtl/amicommon/dos.pp
U rtl/amicommon/sysutils.pp
--- Recording mergeinfo for merge of r30358 into '.':
G .
--- Merging r30536 into '.':
U packages/amunits/src/coreunits/agraphics.pas
U packages/morphunits/src/agraphics.pas
--- Recording mergeinfo for merge of r30536 into '.':
G .
--- Merging r30537 into '.':
G packages/morphunits/src/agraphics.pas
G packages/amunits/src/coreunits/agraphics.pas
U packages/amunits/src/otherlibs/render.pas
U packages/amunits/src/utilunits/doublebuffer.pas
--- Recording mergeinfo for merge of r30537 into '.':
G .
--- Merging r30538 into '.':
U packages/rtl-console/src/amicommon/video.pp
--- Recording mergeinfo for merge of r30538 into '.':
G .
--- Merging r30539 into '.':
G packages/rtl-console/src/amicommon/video.pp
--- Recording mergeinfo for merge of r30539 into '.':
G .

# revisions: 29614,29643,29754,30060,30092,30355,30356,30358,30536,30537,30538,30539

git-svn-id: branches/fixes_3_0@31075 -

marco 10 years ago
parent
commit
829a5c2d31

+ 6 - 6
packages/amunits/src/coreunits/agraphics.pas

@@ -89,7 +89,7 @@ type
         x,y     : Word;
         x,y     : Word;
     end;
     end;
 
 
-    PLANEPTR = Pointer;
+    TPLANEPTR = PByte;
 
 
     pBitMap = ^tBitMap;
     pBitMap = ^tBitMap;
     tBitMap = record
     tBitMap = record
@@ -98,7 +98,7 @@ type
         Flags           : Byte;
         Flags           : Byte;
         Depth           : Byte;
         Depth           : Byte;
         pad             : Word;
         pad             : Word;
-        Planes          : Array [0..7] of PLANEPTR;
+        Planes          : Array [0..7] of TPLANEPTR;
     end;
     end;
 {* flags for AllocBitMap, etc. *}
 {* flags for AllocBitMap, etc. *}
 const
 const
@@ -2242,7 +2242,7 @@ PROCEDURE AddFont(textFont : pTextFont location 'a1'); syscall GfxBase 480;
 PROCEDURE AddVSprite(vSprite : pVSprite location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 102;
 PROCEDURE AddVSprite(vSprite : pVSprite location 'a0'; rp : pRastPort location 'a1'); syscall GfxBase 102;
 FUNCTION AllocBitMap(sizex : ULONG location 'd0'; sizey : ULONG location 'd1'; depth : ULONG location 'd2'; flags : ULONG location 'd3'; const friend_bitmap : pBitMap location 'a0') : pBitMap; syscall GfxBase 918;
 FUNCTION AllocBitMap(sizex : ULONG location 'd0'; sizey : ULONG location 'd1'; depth : ULONG location 'd2'; flags : ULONG location 'd3'; const friend_bitmap : pBitMap location 'a0') : pBitMap; syscall GfxBase 918;
 FUNCTION AllocDBufInfo(vp : pViewPort location 'a0') : pDBufInfo; syscall GfxBase 966;
 FUNCTION AllocDBufInfo(vp : pViewPort location 'a0') : pDBufInfo; syscall GfxBase 966;
-FUNCTION AllocRaster(width : ULONG location 'd0'; height : ULONG location 'd1') : pCHAR; syscall GfxBase 492;
+FUNCTION AllocRaster(width : ULONG location 'd0'; height : ULONG location 'd1') : TPlanePtr; syscall GfxBase 492;
 FUNCTION AllocSpriteDataA(const bm : pBitMap location 'a2';const tags : pTagItem location 'a1') : pExtSprite; syscall GfxBase 1020;
 FUNCTION AllocSpriteDataA(const bm : pBitMap location 'a2';const tags : pTagItem location 'a1') : pExtSprite; syscall GfxBase 1020;
 PROCEDURE AndRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1'); syscall GfxBase 504;
 PROCEDURE AndRectRegion(region : pRegion location 'a0';const rectangle : pRectangle location 'a1'); syscall GfxBase 504;
 FUNCTION AndRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 624;
 FUNCTION AndRegionRegion(const srcRegion : pRegion location 'a0'; destRegion : pRegion location 'a1') : LongBool; syscall GfxBase 624;
@@ -2262,7 +2262,7 @@ PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap location 'a0'; xSrc : LONG
 PROCEDURE BltClear(memBlock : pCHAR location 'a1'; byteCount : ULONG location 'd0'; flags : ULONG location 'd1'); syscall GfxBase 300;
 PROCEDURE BltClear(memBlock : pCHAR location 'a1'; byteCount : ULONG location 'd0'; flags : ULONG location 'd1'); syscall GfxBase 300;
 PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6';const bltMask : pCHAR location 'a2'); syscall GfxBase 636;
 PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap location 'a0'; xSrc : LONGINT location 'd0'; ySrc : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'; minterm : ULONG location 'd6';const bltMask : pCHAR location 'a2'); syscall GfxBase 636;
 PROCEDURE BltPattern(rp : pRastPort location 'a1';const mask : pCHAR location 'a0'; xMin : LONGINT location 'd0'; yMin : LONGINT location 'd1'; xMax : LONGINT location 'd2'; yMax : LONGINT location 'd3'; maskBPR : ULONG location 'd4'); syscall GfxBase 312;
 PROCEDURE BltPattern(rp : pRastPort location 'a1';const mask : pCHAR location 'a0'; xMin : LONGINT location 'd0'; yMin : LONGINT location 'd1'; xMax : LONGINT location 'd2'; yMax : LONGINT location 'd3'; maskBPR : ULONG location 'd4'); syscall GfxBase 312;
-PROCEDURE BltTemplate(const source : pCHAR location 'a0'; xSrc : LONGINT location 'd0'; srcMod : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'); syscall GfxBase 036;
+PROCEDURE BltTemplate(const source : pWORD location 'a0'; xSrc : LONGINT location 'd0'; srcMod : LONGINT location 'd1'; destRP : pRastPort location 'a1'; xDest : LONGINT location 'd2'; yDest : LONGINT location 'd3'; xSize : LONGINT location 'd4'; ySize : LONGINT location 'd5'); syscall GfxBase 036;
 FUNCTION CalcIVG(v : pView location 'a0'; vp : pViewPort location 'a1') : WORD; syscall GfxBase 828;
 FUNCTION CalcIVG(v : pView location 'a0'; vp : pViewPort location 'a1') : WORD; syscall GfxBase 828;
 PROCEDURE CBump(copList : pUCopList location 'a1'); syscall GfxBase 366;
 PROCEDURE CBump(copList : pUCopList location 'a1'); syscall GfxBase 366;
 FUNCTION ChangeExtSpriteA(vp : pViewPort location 'a0'; oldsprite : pExtSprite location 'a1'; newsprite : pExtSprite location 'a2';const tags : pTagItem location 'a3') : LONGINT; syscall GfxBase 1026;
 FUNCTION ChangeExtSpriteA(vp : pViewPort location 'a0'; oldsprite : pExtSprite location 'a1'; newsprite : pExtSprite location 'a2';const tags : pTagItem location 'a3') : LONGINT; syscall GfxBase 1026;
@@ -2297,7 +2297,7 @@ PROCEDURE FreeCopList(copList : pCopList location 'a0'); syscall GfxBase 546;
 PROCEDURE FreeCprList(cprList : pcprlist location 'a0'); syscall GfxBase 564;
 PROCEDURE FreeCprList(cprList : pcprlist location 'a0'); syscall GfxBase 564;
 PROCEDURE FreeDBufInfo(dbi : pDBufInfo location 'a1'); syscall GfxBase 972;
 PROCEDURE FreeDBufInfo(dbi : pDBufInfo location 'a1'); syscall GfxBase 972;
 PROCEDURE FreeGBuffers(anOb : pAnimOb location 'a0'; rp : pRastPort location 'a1'; flag : LONGINT location 'd0'); syscall GfxBase 600;
 PROCEDURE FreeGBuffers(anOb : pAnimOb location 'a0'; rp : pRastPort location 'a1'; flag : LONGINT location 'd0'); syscall GfxBase 600;
-PROCEDURE FreeRaster(p : pCHAR location 'a0'; width : ULONG location 'd0'; height : ULONG location 'd1'); syscall GfxBase 498;
+PROCEDURE FreeRaster(p : TPlanePtr location 'a0'; width : ULONG location 'd0'; height : ULONG location 'd1'); syscall GfxBase 498;
 PROCEDURE FreeSprite(num : LONGINT location 'd0'); syscall GfxBase 414;
 PROCEDURE FreeSprite(num : LONGINT location 'd0'); syscall GfxBase 414;
 PROCEDURE FreeSpriteData(sp : pExtSprite location 'a2'); syscall GfxBase 1032;
 PROCEDURE FreeSpriteData(sp : pExtSprite location 'a2'); syscall GfxBase 1032;
 PROCEDURE FreeVPortCopLists(vp : pViewPort location 'a0'); syscall GfxBase 540;
 PROCEDURE FreeVPortCopLists(vp : pViewPort location 'a0'); syscall GfxBase 540;
@@ -2325,7 +2325,7 @@ PROCEDURE InitGels(head : pVSprite location 'a0'; tail : pVSprite location 'a1';
 PROCEDURE InitGMasks(anOb : pAnimOb location 'a0'); syscall GfxBase 174;
 PROCEDURE InitGMasks(anOb : pAnimOb location 'a0'); syscall GfxBase 174;
 PROCEDURE InitMasks(vSprite : pVSprite location 'a0'); syscall GfxBase 126;
 PROCEDURE InitMasks(vSprite : pVSprite location 'a0'); syscall GfxBase 126;
 PROCEDURE InitRastPort(rp : pRastPort location 'a1'); syscall GfxBase 198;
 PROCEDURE InitRastPort(rp : pRastPort location 'a1'); syscall GfxBase 198;
-FUNCTION InitTmpRas(tmpRas : pTmpRas location 'a0'; buffer : PLANEPTR location 'a1'; size : LONGINT location 'd0') : pTmpRas; syscall GfxBase 468;
+FUNCTION InitTmpRas(tmpRas : pTmpRas location 'a0'; buffer : Pointer location 'a1'; size : LONGINT location 'd0') : pTmpRas; syscall GfxBase 468;
 PROCEDURE InitView(view : pView location 'a1'); syscall GfxBase 360;
 PROCEDURE InitView(view : pView location 'a1'); syscall GfxBase 360;
 PROCEDURE InitVPort(vp : pViewPort location 'a0'); syscall GfxBase 204;
 PROCEDURE InitVPort(vp : pViewPort location 'a0'); syscall GfxBase 204;
 PROCEDURE LoadRGB32(vp : pViewPort location 'a0';const table : pULONG location 'a1'); syscall GfxBase 882;
 PROCEDURE LoadRGB32(vp : pViewPort location 'a0';const table : pULONG location 'a1'); syscall GfxBase 882;

+ 26 - 363
packages/amunits/src/otherlibs/mui.pas

@@ -3478,32 +3478,33 @@ uses exec, intuition,utility,agraphics,iffparse;
          end;
          end;
        pMUI_CustomClass = ^tMUI_CustomClass;
        pMUI_CustomClass = ^tMUI_CustomClass;
 
 
-FUNCTION MUI_NewObjectA(class_ : pChar; tags : pTagItem) : pObject_;
-PROCEDURE MUI_DisposeObject(obj : pObject_);
-FUNCTION MUI_RequestA(app : POINTER; win : POINTER; flags : LONGBITS; title : pChar; gadgets : pChar; format : pChar; params : POINTER) : LONGINT;
-FUNCTION MUI_AllocAslRequest(typ : ULONG; tags : pTagItem) : POINTER;
-FUNCTION MUI_AslRequest(req : POINTER; tags : pTagItem) : BOOLEAN;
-PROCEDURE MUI_FreeAslRequest(req : POINTER);
-FUNCTION MUI_Error : LONGINT;
-FUNCTION MUI_SetError(errnum : LONGINT) : LONGINT;
-FUNCTION MUI_GetClass(name : pCHar) : pIClass;
-PROCEDURE MUI_FreeClass(cl : pIClass);
-PROCEDURE MUI_RequestIDCMP(obj : pObject_; flags : ULONG);
-PROCEDURE MUI_RejectIDCMP(obj : pObject_; flags : ULONG);
-PROCEDURE MUI_Redraw(obj : pObject_; flags : ULONG);
-FUNCTION MUI_CreateCustomClass(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER) : pMUI_CustomClass;
-FUNCTION MUI_DeleteCustomClass(mcc : pMUI_CustomClass) : BOOLEAN;
-FUNCTION MUI_MakeObjectA(typ: LONGINT; params : pULONG) : pObject_;
-FUNCTION MUI_Layout(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG) : BOOLEAN;
-FUNCTION MUI_ObtainPen(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG) : LONGINT;
-PROCEDURE MUI_ReleasePen(mri : pMUI_RenderInfo; pen : LONGINT);
-FUNCTION MUI_AddClipping(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint) : POINTER;
-PROCEDURE MUI_RemoveClipping(mri : pMUI_RenderInfo; h : POINTER);
-FUNCTION MUI_AddClipRegion(mri : pMUI_RenderInfo; region : pRegion) : POINTER;
-PROCEDURE MUI_RemoveClipRegion(mri : pMUI_RenderInfo; region : POINTER);
-FUNCTION MUI_BeginRefresh(mri : pMUI_RenderInfo; flags : ULONG) : BOOLEAN;
-PROCEDURE MUI_EndRefresh(mri : pMUI_RenderInfo; flags : ULONG);
+VAR MUIMasterBase : pLibrary;
 
 
+FUNCTION MUI_NewObjectA(class_ : pCHar location 'a0'; tags : pTagItem location 'a1') : pObject_; syscall MUIMasterBase 030;
+PROCEDURE MUI_DisposeObject(obj : pObject_ location 'a0'); syscall MUIMasterBase 036;
+FUNCTION MUI_RequestA(app : POINTER location 'd0'; win : POINTER location 'd1'; flags : LONGBITS location 'd2'; title : pCHar location 'a0'; gadgets : pChar location 'a1'; format : pChar location 'a2'; params : POINTER location 'a3') : LONGINT; syscall MUIMasterBase 042;
+FUNCTION MUI_AllocAslRequest(typ : ULONG location 'd0'; tags : pTagItem location 'a0') : POINTER; syscall MUIMasterBase 048;
+FUNCTION MUI_AslRequest(req : POINTER location 'a0'; tags : pTagItem location 'a1') : WordBool; syscall MUIMasterBase 054;
+PROCEDURE MUI_FreeAslRequest(req : POINTER location 'a0'); syscall MUIMasterBase 060;
+FUNCTION MUI_Error : LONGINT; syscall MUIMasterBase 066;
+FUNCTION MUI_SetError(errnum : LONGINT location 'd0') : LONGINT; syscall MUIMasterBase 072;
+FUNCTION MUI_GetClass(name : pChar location 'a0') : pIClass; syscall MUIMasterBase 078;
+PROCEDURE MUI_FreeClass(cl : pIClass location 'a0'); syscall MUIMasterBase 084;
+PROCEDURE MUI_RequestIDCMP(obj : pObject_ location 'a0'; flags : ULONG location 'd0'); syscall MUIMasterBase 090;
+PROCEDURE MUI_RejectIDCMP(obj : pObject_ location 'a0'; flags : ULONG location 'd0'); syscall MUIMasterBase 096;
+PROCEDURE MUI_Redraw(obj : pObject_ location 'a0'; flags : ULONG location 'd0'); syscall MUIMasterBase 102;
+FUNCTION MUI_CreateCustomClass(base : pLibrary location 'a0'; supername : pChar location 'a1'; supermcc : pMUI_CustomClass location 'a2'; datasize : LONGINT location 'd0'; dispatcher : POINTER location 'a3') : pMUI_CustomClass; syscall MUIMasterBase 108;
+FUNCTION MUI_DeleteCustomClass(mcc : pMUI_CustomClass location 'a0') : WordBool; syscall MUIMasterBase 114;
+FUNCTION MUI_MakeObjectA(typ : LONGINT location 'd0'; params : pULONG location 'a0') : pObject_; syscall MUIMasterBase 120;
+FUNCTION MUI_Layout(obj : pObject_ location 'a0'; l : LONGINT location 'd0'; t : LONGINT location 'd1'; w : LONGINT location 'd2'; h : LONGINT location 'd3'; flags : ULONG location 'd4') : WordBool; syscall MUIMasterBase 126;
+FUNCTION MUI_ObtainPen(mri : pMUI_RenderInfo location 'a0'; spec : pMUI_PenSpec location 'a1'; flags : ULONG location 'd0') : LONGINT; syscall MUIMasterBase 156;
+PROCEDURE MUI_ReleasePen(mri : pMUI_RenderInfo location 'a0'; pen : LONGINT location 'd0'); syscall MUIMasterBase 162;
+FUNCTION MUI_AddClipping(mri : pMUI_RenderInfo location 'a0'; l : smallint location 'd0'; t : smallint location 'd1'; w : smallint location 'd2'; h : smallint location 'd3') : POINTER; syscall MUIMasterBase 168;
+PROCEDURE MUI_RemoveClipping(mri : pMUI_RenderInfo location 'a0'; h : POINTER location 'a1'); syscall MUIMasterBase 174;
+FUNCTION MUI_AddClipRegion(mri : pMUI_RenderInfo location 'a0'; region : pRegion location 'a1') : POINTER; syscall MUIMasterBase 180;
+PROCEDURE MUI_RemoveClipRegion(mri : pMUI_RenderInfo location 'a0'; region : POINTER location 'a1'); syscall MUIMAsterBase 186;
+FUNCTION MUI_BeginRefresh(mri : pMUI_RenderInfo location 'a0'; flags : ULONG location 'd0') : WordBool; syscall MUIMasterBase 192;
+PROCEDURE MUI_EndRefresh(mri : pMUI_RenderInfo location 'a0'; flags : ULONG location 'd0'); syscall MUIMasterBase 198;
 
 
 (*
 (*
 ** some procedures to get some information about our object
 ** some procedures to get some information about our object
@@ -3582,8 +3583,6 @@ FUNCTION MUI_MakeObject(_type : LONGINT; const params : Array Of Const) : pULONG
 FUNCTION MUI_NewObject(a0arg : pCHAR; const tags : Array Of Const) : pULONG;
 FUNCTION MUI_NewObject(a0arg : pCHAR; const tags : Array Of Const) : pULONG;
 FUNCTION MUI_Request(app : POINTER; win : POINTER; flags : longword; title : pCHAR; gadgets : pCHAR; format : pCHAR; const params : Array Of Const) : LONGINT;
 FUNCTION MUI_Request(app : POINTER; win : POINTER; flags : longword; title : pCHAR; gadgets : pCHAR; format : pCHAR; const params : Array Of Const) : LONGINT;
 
 
-VAR MUIMasterBase : pLibrary;
-
 {You can remove this include and use a define instead}
 {You can remove this include and use a define instead}
 {$I useautoopenlib.inc}
 {$I useautoopenlib.inc}
 {$ifdef use_init_openlib}
 {$ifdef use_init_openlib}
@@ -3873,342 +3872,6 @@ begin
     MUIV_Window_Width_Screen := (-200 - (p));
     MUIV_Window_Width_Screen := (-200 - (p));
 end;
 end;
 
 
-FUNCTION MUI_NewObjectA(class_ : pCHar; tags : pTagItem) : pObject_;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L class_,A0
-        MOVEA.L tags,A1
-        MOVEA.L MUIMasterBase,A6
-        JSR     -030(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-PROCEDURE MUI_DisposeObject(obj : pObject_);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L obj,A0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -036(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-FUNCTION MUI_RequestA(app : POINTER; win : POINTER; flags : LONGBITS; title : pCHar; gadgets : pChar; format : pChar; params : POINTER) : LONGINT;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVE.L  app,D0
-        MOVE.L  win,D1
-        MOVE.L  flags,D2
-        MOVEA.L title,A0
-        MOVEA.L gadgets,A1
-        MOVEA.L format,A2
-        MOVEA.L params,A3
-        MOVEA.L MUIMasterBase,A6
-        JSR     -042(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_AllocAslRequest(typ : ULONG; tags : pTagItem) : POINTER;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVE.L  typ,D0
-        MOVEA.L tags,A0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -048(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_AslRequest(req : POINTER; tags : pTagItem) : BOOLEAN;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L req,A0
-        MOVEA.L tags,A1
-        MOVEA.L MUIMasterBase,A6
-        JSR     -054(A6)
-        MOVEA.L (A7)+,A6
-        TST.W   D0
-        BEQ.B   @end
-        MOVEQ   #1,D0
-  @end: MOVE.B  D0,@RESULT
-  END;
-END;
-
-PROCEDURE MUI_FreeAslRequest(req : POINTER);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L req,A0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -060(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-FUNCTION MUI_Error : LONGINT;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L MUIMasterBase,A6
-        JSR     -066(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_SetError(errnum : LONGINT) : LONGINT;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVE.L  errnum,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -072(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_GetClass(name : pChar) : pIClass;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L name,A0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -078(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-PROCEDURE MUI_FreeClass(cl : pIClass);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L cl,A0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -084(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-PROCEDURE MUI_RequestIDCMP(obj : pObject_; flags : ULONG);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L obj,A0
-        MOVE.L  flags,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -090(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-PROCEDURE MUI_RejectIDCMP(obj : pObject_; flags : ULONG);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L obj,A0
-        MOVE.L  flags,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -096(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-PROCEDURE MUI_Redraw(obj : pObject_; flags : ULONG);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L obj,A0
-        MOVE.L  flags,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -102(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-FUNCTION MUI_CreateCustomClass(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER) : pMUI_CustomClass;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L base,A0
-        MOVEA.L supername,A1
-        MOVEA.L supermcc,A2
-        MOVE.L  datasize,D0
-        MOVEA.L dispatcher,A3
-        MOVEA.L MUIMasterBase,A6
-        JSR     -108(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_DeleteCustomClass(mcc : pMUI_CustomClass) : BOOLEAN;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mcc,A0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -114(A6)
-        MOVEA.L (A7)+,A6
-        TST.W   D0
-        BEQ.B   @end
-        MOVEQ   #1,D0
-  @end: MOVE.B  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_MakeObjectA(typ : LONGINT; params : pULONG) : pObject_;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVE.L  typ,D0
-        MOVEA.L params,A0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -120(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_Layout(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG) : BOOLEAN;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L obj,A0
-        MOVE.L  l,D0
-        MOVE.L  t,D1
-        MOVE.L  w,D2
-        MOVE.L  h,D3
-        MOVE.L  flags,D4
-        MOVEA.L MUIMasterBase,A6
-        JSR     -126(A6)
-        MOVEA.L (A7)+,A6
-        TST.W   D0
-        BEQ.B   @end
-        MOVEQ   #1,D0
-  @end: MOVE.B  D0,@RESULT
-  END;
-END;
-
-FUNCTION MUI_ObtainPen(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG) : LONGINT;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVEA.L spec,A1
-        MOVE.L  flags,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -156(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-PROCEDURE MUI_ReleasePen(mri : pMUI_RenderInfo; pen : LONGINT);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVE.L  pen,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -162(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-FUNCTION MUI_AddClipping(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint) : POINTER;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVE.L  l,D0
-        MOVE.L  t,D1
-        MOVE.L  w,D2
-        MOVE.L  h,D3
-        MOVEA.L MUIMasterBase,A6
-        JSR     -168(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-PROCEDURE MUI_RemoveClipping(mri : pMUI_RenderInfo; h : POINTER);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVEA.L h,A1
-        MOVEA.L MUIMasterBase,A6
-        JSR     -174(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-FUNCTION MUI_AddClipRegion(mri : pMUI_RenderInfo; region : pRegion) : POINTER;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVEA.L region,A1
-        MOVEA.L MUIMasterBase,A6
-        JSR     -180(A6)
-        MOVEA.L (A7)+,A6
-        MOVE.L  D0,@RESULT
-  END;
-END;
-
-PROCEDURE MUI_RemoveClipRegion(mri : pMUI_RenderInfo; region : POINTER);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVEA.L region,A1
-        MOVEA.L MUIMasterBase,A6
-        JSR     -186(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-FUNCTION MUI_BeginRefresh(mri : pMUI_RenderInfo; flags : ULONG) : BOOLEAN;
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVE.L  flags,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -192(A6)
-        MOVEA.L (A7)+,A6
-        TST.W   D0
-        BEQ.B   @end
-        MOVEQ   #1,D0
-  @end: MOVE.B  D0,@RESULT
-  END;
-END;
-
-PROCEDURE MUI_EndRefresh(mri : pMUI_RenderInfo; flags : ULONG);
-BEGIN
-  ASM
-        MOVE.L  A6,-(A7)
-        MOVEA.L mri,A0
-        MOVE.L  flags,D0
-        MOVEA.L MUIMasterBase,A6
-        JSR     -198(A6)
-        MOVEA.L (A7)+,A6
-  END;
-END;
-
-
 {
 {
  Functions and procedures with array of const go here
  Functions and procedures with array of const go here
 }
 }

+ 1 - 1
packages/amunits/src/otherlibs/render.pas

@@ -42,7 +42,7 @@ USES Exec,utility,agraphics;
 VAR RenderBase : pLibrary;
 VAR RenderBase : pLibrary;
 
 
 type
 type
-    pPLANEPTR = ^PLANEPTR;
+    pPLANEPTR = ^TPLANEPTR;
 
 
 const
 const
     RENDERNAME : PChar = 'render.library';
     RENDERNAME : PChar = 'render.library';

+ 1 - 1
packages/amunits/src/utilunits/doublebuffer.pas

@@ -181,7 +181,7 @@ var
     bm1,
     bm1,
     bm2 : pBitMap;
     bm2 : pBitMap;
     rp : pRastPort;
     rp : pRastPort;
-    Temp : Array [0..7] of PLANEPTR;
+    Temp : Array [0..7] of TPLANEPTR;
 begin
 begin
     s := w^.WScreen;
     s := w^.WScreen;
     rp := w^.RPort;
     rp := w^.RPort;

+ 359 - 2
packages/arosunits/src/amigados.pas

@@ -13,7 +13,6 @@
 
 
  **********************************************************************}
  **********************************************************************}
 {
 {
- missing elf.h // Elfheader
  BSTR Funktions
  BSTR Funktions
  
  
  defines:
  defines:
@@ -1936,8 +1935,316 @@ const
   ERROR_BROKEN_PIPE = 400;  // An attempt to write on a pipe without any reader has been made
   ERROR_BROKEN_PIPE = 400;  // An attempt to write on a pipe without any reader has been made
   ERROR_WOULD_BLOCK = 401;  // A Read() or a Write() on a file opened with the FMF_NONBLOCK flag would block
   ERROR_WOULD_BLOCK = 401;  // A Read() or a Write() on a file opened with the FMF_NONBLOCK flag would block
   ERROR_INTERRUPTED = 402;  // The I/O file operation has been interrupted for some reason  
   ERROR_INTERRUPTED = 402;  // The I/O file operation has been interrupted for some reason  
-{$endif}
+  
+// elf.h  
+  
+type
+  //*
+  //* Define one of ELF_64BIT or ELF_32BIT in your code if you want to enforce specific
+  //* version of ELF structures. Otherwize it fails back to your native machine's size.
+  //*  
+  {$IFDEF ELF_64BIT}
+  {$define elf_ptr_t}
+  elf_ptr_t             = UQUAD;
+  elf_uintptr_t         = UQUAD;
+  elf_intptr_t          = QUAD;
+  {$ENDIF}
+
+  {$IFDEF ELF_32BIT}
+  {$define elf_ptr_t}
+  elf_ptr_t             = ULONG;
+  elf_uintptr_t         = ULONG;
+  elf_intptr_t          = LONG;
+  {$ENDIF}
+
+  {$IFNDEF elf_ptr_t}
+  elf_ptr_t             = APTR;
+  elf_uintptr_t         = IPTR;
+  elf_intptr_t          = SIPTR;
+  {$ENDIF}
+
+
+Const
+  SHT_PROGBITS          =  1;
+  SHT_SYMTAB            =  2;
+  SHT_STRTAB            =  3;
+  SHT_RELA              =  4;
+  SHT_NOBITS            =  8;
+  SHT_REL               =  9;
+  SHT_SYMTAB_SHNDX      = 18;
+  SHT_ARM_ATTRIBUTES    = $70000003;
+  
+  ET_REL                =  1;
+  ET_EXEC               =  2;
+  
+  EM_386                =  3;
+  EM_68K                =  4;
+  EM_PPC                = 20;
+  EM_ARM                = 40;
+  EM_X86_64             = 62;     //* AMD x86-64 */
+  
+  R_386_NONE            = 0;
+  R_386_32              = 1;
+  R_386_PC32            = 2;
+
+  //* AMD x86-64 relocations.  */
+  R_X86_64_NONE         =  0;      //* No reloc */
+  R_X86_64_64           =  1;      //* Direct 64 bit  */
+  R_X86_64_PC32         =  2;      //* PC relative 32 bit signed */
+  R_X86_64_32           = 10;
+  R_X86_64_32S          = 11;
+  
+  R_68K_NONE            = 0;
+  R_68K_32              = 1;
+  R_68K_16              = 2;
+  R_68K_8               = 3;
+  R_68K_PC32            = 4;
+  R_68K_PC16            = 5;
+  R_68K_PC8             = 6;
+  
+  R_PPC_NONE            =   0;
+  R_PPC_ADDR32          =   1;
+  R_PPC_ADDR16_LO       =   4;
+  R_PPC_ADDR16_HA       =   6;
+  R_PPC_REL24           =  10;
+  R_PPC_REL32           =  26;
+  R_PPC_REL16_LO        = 250;
+  R_PPC_REL16_HA        = 252;
+  
+  R_ARM_NONE            =  0;
+  R_ARM_PC24            =  1;
+  R_ARM_ABS32           =  2;
+  R_ARM_CALL            = 28;
+  R_ARM_JUMP24          = 29;
+  R_ARM_TARGET1         = 38;
+  R_ARM_V4BX            = 40;
+  R_ARM_TARGET2         = 41;
+  R_ARM_PREL31          = 42;
+  R_ARM_MOVW_ABS_NC     = 43;
+  R_ARM_MOVT_ABS        = 44;
+  R_ARM_THM_CALL        = 10;
+  R_ARM_THM_JUMP24      = 30;
+  R_ARM_THM_MOVW_ABS_NC = 47;
+  R_ARM_THM_MOVT_ABS    = 48;
+ 
+  STT_NOTYPE            =  0;
+  STT_OBJECT            =  1;
+  STT_FUNC              =  2;
+  STT_SECTION           =  3;
+  STT_FILE              =  4;
+  STT_LOPROC            = 13;
+  STT_HIPROC            = 15;
+ 
+  STB_LOCAL             =  0;
+  STB_GLOBAL            =  1;
+  STB_WEAK              =  2;
+  STB_LOOS              = 10;
+  STB_GNU_UNIQUE        = 10;
+  STB_HIOS              = 12;
+  STB_LOPROC            = 13;
+  STB_HIPROC            = 15;
+ 
+  SHN_UNDEF             = 0;
+  SHN_LORESERVE         = $ff00;
+  SHN_ABS               = $fff1;
+  SHN_COMMON            = $fff2;
+  SHN_XINDEX            = $ffff;
+  SHN_HIRESERVE         = $ffff;
+ 
+  SHF_WRITE             = (1 shl 0);
+  SHF_ALLOC             = (1 shl 1);
+  SHF_EXECINSTR         = (1 shl 2);
+ 
+  //  ELF_ST_TYPE(i)    ((i) & 0x0F)
+ 
+  EI_VERSION            =  6;
+  EV_CURRENT            =  1;
+ 
+  EI_DATA               =  5;
+  ELFDATA2LSB           =  1;
+  ELFDATA2MSB           =  2;
+ 
+  EI_CLASS              =  4;
+  ELFCLASS32            =  1;
+  ELFCLASS64            =  2;             //* 64-bit objects */
+ 
+  EI_OSABI              =  7;
+  EI_ABIVERSION         =  8;
+ 
+  ELFOSABI_AROS         = 15;
+ 
+  PF_X                  = (1 shl 0);
+  
+  ATTR_VERSION_CURRENT  = $41;
 
 
+type
+  PElfHeader = ^TELFHeader;
+  TElfHeader = record
+    Ident:     array [0..16-1] of Byte;
+    Type_:     Word;
+    Machine:   Word;
+    Version:   LongWord;
+    Entry:     elf_ptr_t;
+    PhOff:     elf_uintptr_t;
+    ShOff:     elf_uintptr_t;
+    Flags:     LongWord;
+    EhSize:    Word;
+    PhentSize: Word;
+    PhNum:     Word;
+    ShentSize: Word;
+    ShNum:     Word;
+    ShStrndx:  Word;  
+  end;
+  
+  PSHeader  = ^TSHeader;
+  TSHeader = record
+    Name:      LongWord;
+    Type_:     LongWord;
+    Flags:     elf_uintptr_t ;
+    Addr:      elf_ptr_t     ;
+    Offset:    elf_uintptr_t ;
+    Size:      elf_uintptr_t ;
+    Link:      LongWord;
+    Info:      LongWord;
+    AddrAlign: elf_uintptr_t ;
+    EntSize:   elf_uintptr_t ;
+  end;
+  
+  {$DEFINE PT_LOAD}
+
+{$IFDEF ELF_64BIT}
+  TPHeader = record
+    Type_:  LongWord;
+    Flags:  LongWord;
+    Offset: elf_uintptr_t;
+    VAddr:  elf_ptr_t;
+    PAddr:  elf_ptr_t;  
+    Filesz: elf_uintptr_t;
+    Memsz:  elf_uintptr_t;
+    Align:  elf_uintptr_t;
+  end;
+  
+  TSymbol = record
+    Name:    LongWord; // Offset of the name string in the string table
+    Info:    Byte;     // What kind of symbol is this ? (global, variable, etc)
+    Other:   Byte;     // undefined                                        
+    ShIndex: Word;     // In which section is the symbol defined ?               
+    Value:   elf_uintptr_t ; // Varies; eg. the offset of the symbol in its hunk
+    Size:    elf_uintptr_t ; // How much memory does the symbol occupy    
+  end;
+
+  // 209 #define ELF_R_SYM(i)          (ULONG)((i) >> 32)
+  // 210 #define ELF_R_TYPE(i)         (ULONG)((i) & 0xffffffffULL)
+  // 211 #define ELF_R_INFO(sym, type) (((UQUAD)(sym) << 32) + (type))
+
+{$ELSE ELF_64BIT}
+  TPHeader = record
+    Type_:  LongWord;
+    Offset: LongWord;
+    VAddr:  elf_ptr_t;
+    PAddr:  elf_ptr_t;  
+    Filesz: LongWord;
+    Memsz:  LongWord;
+    Flags:  LongWord;
+    Align:  LongWord;
+  end;
+  
+  TSymbol = record
+    Name:    LongWord;       // Offset of the name string in the string table
+    Value:   elf_uintptr_t;  // Varies; eg. the offset of the symbol in its hunk
+    Size:    elf_uintptr_t;  // How much memory does the symbol occupy
+    Info:    Byte;           // What kind of symbol is this ? (global, variable, etc)
+    Other:   Byte;           // undefined
+    ShIndex: Word;           // In which section is the symbol defined?
+  end;
+  
+  // 237 #define ELF_R_SYM(val)        ((val) >> 8)
+  // 238 #define ELF_R_TYPE(val)       ((val) & 0xff)
+  // 239 #define ELF_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
+{$ENDIF}
+
+
+  // 243 #define ELF_S_BIND(val)         ((val) >> 4)
+  // 244 #define ELF_S_TYPE(val)         ((val) & 0xF)
+  // 245 #define ELF_S_INFO(bind, type)  (((bind) << 4) + ((type) & 0xF))
+
+  TRel = record
+    Offset: elf_uintptr_t;     // Address of the relocation relative to the section it refers to
+    Info:   elf_uintptr_t;     // Type of the relocation
+  end;
+
+  TRelA = record
+    Offset: elf_uintptr_t;     // Address of the relocation relative to the section it refers to
+    Info:   elf_uintptr_t;     // Type of the relocation
+    Addend: elf_uintptr_t;     // Constant addend used to compute value
+  end;
+
+
+  (*
+ 260 /* Note: the conversion below is not in line with ELF specification and is fixed in GNU binutils since 2008
+ 261  * See: https://sourceware.org/bugzilla/show_bug.cgi?id=5900
+ 262  */
+ 263 /* convert section header number to array index */
+ 264 /*#define SHINDEX(n) \
+ 265     ((n) < SHN_LORESERVE ? (n) : ((n) <= SHN_HIRESERVE ? 0 : (n) - (SHN_HIRESERVE + 1 - SHN_LORESERVE)))*/
+ 266 
+ 267 /* convert section header array index to section number */
+ 268 /*#define SHNUM(i) \
+ 269     ((i) < SHN_LORESERVE ? (i) : (i) + (SHN_HIRESERVE + 1 - SHN_LORESERVE))*/
+ 270 
+ 271 /* ARM-specific attributes section definitions follow */
+ 272 
+ 273 #define  
+  *)
+ 
+  TAttrs_Section = record
+    Size:   LongWord;
+    Vendor: array[0..0] of char;   // NULL-terminated name
+  end;                             // Vendor-specific subsections follow
+ 
+  TAttrs_SubSection = packed record
+    Tag: Byte;
+    Size: LongWord;  
+  end;
+
+const 
+  Tag_File                 = 1;
+  Tag_Section              = 2;
+  Tag_Symbol               = 3;
+  Tag_CPU_raw_name         = 4;
+  Tag_CPU_name             = 5;
+  Tag_CPU_arch             = 6;
+  Tag_FP_arch              = 10;
+  Tag_compatibility        = 32;
+  Tag_also_compatible_with = 65;
+  Tag_conformance          = 67;
+
+  // Tag_CPU_arch values
+  ELF_CPU_PREv4    = 0;
+  ELF_CPU_ARMv4    = 1;
+  ELF_CPU_ARMv4T   = 2;
+  ELF_CPU_ARMv5T   = 3;
+  ELF_CPU_ARMv5TE  = 4;
+  ELF_CPU_ARMv5TEJ = 5;
+  ELF_CPU_ARMv6    = 6;
+  ELF_CPU_ARMv6KZ  = 7;
+  ELF_CPU_ARMv6T2  = 8;
+  ELF_CPU_ARMv6K   = 9;
+  ELF_CPU_ARMv7    = 10;
+  ELF_CPU_ARM_v6M  = 11;
+  ELF_CPU_ARMv6SM  = 12;
+  ELF_CPU_ARMv7EM  = 13;
+
+  //* Tag_FP_arch values */
+  ELF_FP_None     = 0;
+  ELF_FP_v1       = 1;
+  ELF_FP_v2       = 2;
+  ELF_FP_v3       = 3;
+  ELF_FP_v3_Short = 4;
+  ELF_FP_v4       = 5;
+  ELF_FP_v4_Short = 6;  
+
+{$endif}
 
 
 
 
 procedure AbortPkt(Port: PMsgPort; Pkt: PDosPacket); syscall AOS_DOSBase 44;
 procedure AbortPkt(Port: PMsgPort; Pkt: PDosPacket); syscall AOS_DOSBase 44;
@@ -2117,6 +2424,20 @@ function CreateNewProcTags(const Tags: array of const): PProcess;
 function NewLoadSegTags(const File_: STRPTR; const Tags: array of const): BPTR;
 function NewLoadSegTags(const File_: STRPTR; const Tags: array of const): BPTR;
 function SystemTags(const Command: STRPTR; const Tags: array of const): LongInt;
 function SystemTags(const Command: STRPTR; const Tags: array of const): LongInt;
 
 
+// elf.h
+
+function ELF_ST_TYPE(i: LongWord): LongWord;
+{$ifdef ELF_64BIT}
+function ELF_R_SYM(i: QWord): QWord;
+function ELF_R_TYPE(i: QWord): QWord;
+function ELF_R_INFO(Sym: QWord; Type_: QWord): QWord;
+{$else}
+function ELF_R_SYM(i: LongWord): LongWord;
+function ELF_R_TYPE(i: LongWord): LongWord;
+function ELF_R_INFO(Sym: LongWord; Type_: LongWord): LongWord;
+{$endif}
+
+
 const
 const
   BNULL = nil;
   BNULL = nil;
 
 
@@ -2127,7 +2448,43 @@ implementation
 
 
 uses
 uses
   tagsarray;
   tagsarray;
+
+function ELF_ST_TYPE(i: LongWord): LongWord;
+begin
+  Result := i and $0F;
+end;   
+
+{$ifdef ELF_64BIT}
+  function ELF_R_SYM(i: QWord): QWord;
+  begin
+    Result := i shr 32;
+  end;
+  
+  function ELF_R_TYPE(i: QWord): QWord;
+  begin
+    Result := i and $ffffffff;
+  end;
+  
+  function ELF_R_INFO(Sym: QWord; Type_: QWord): QWord;
+  begin
+    Result := Sym shl 32 + Type_;
+  end;
+{$else}
+  function ELF_R_SYM(i: LongWord): LongWord;
+  begin
+    Result := i shr 8;
+  end;
   
   
+  function ELF_R_TYPE(i: LongWord): LongWord;
+  begin
+    Result := i and $ff;
+  end;
+  
+  function ELF_R_INFO(Sym: LongWord; Type_: LongWord): LongWord;
+  begin
+    Result := Sym shl 8 + (Type_ and $ff);
+  end;
+{$endif}
   
   
 function AllocDosObjectTags(const Type_: LongWord; const Tags: array of const): APTR;
 function AllocDosObjectTags(const Type_: LongWord; const Tags: array of const): APTR;
 var
 var

+ 1 - 0
packages/arosunits/src/exec.pas

@@ -38,6 +38,7 @@ type
   QUAD         = Int64;
   QUAD         = Int64;
   UQUAD        = QWord;
   UQUAD        = QWord;
   IPTR         = NativeUInt;
   IPTR         = NativeUInt;
+  SIPTR        = NativeInt;
   PIPTR        = ^IPTR;
   PIPTR        = ^IPTR;
   STRPTR       = PChar;
   STRPTR       = PChar;
   CONST_STRPTR = PChar;  
   CONST_STRPTR = PChar;  

+ 6 - 6
packages/morphunits/src/agraphics.pas

@@ -48,7 +48,7 @@ type
         x,y     : Word;
         x,y     : Word;
     end;
     end;
 
 
-    PLANEPTR = Pointer;
+    TPLANEPTR = PByte;
 
 
     pBitMap = ^tBitMap;
     pBitMap = ^tBitMap;
     tBitMap = record
     tBitMap = record
@@ -57,7 +57,7 @@ type
         Flags           : Byte;
         Flags           : Byte;
         Depth           : Byte;
         Depth           : Byte;
         pad             : Word;
         pad             : Word;
-        Planes          : Array [0..7] of PLANEPTR;
+        Planes          : Array [0..7] of TPLANEPTR;
     end;
     end;
 {* flags for AllocBitMap, etc. *}
 {* flags for AllocBitMap, etc. *}
 const
 const
@@ -2199,7 +2199,7 @@ var
 function BltBitMap(srcBitMap : pBitMap location 'a0'; xSrc : LongInt location 'd0'; ySrc : LongInt location 'd1'; destBitMap : pBitMap location 'a1'; xDest : LongInt location 'd2'; yDest : LongInt location 'd3'; xSize : LongInt location 'd4'; ySize : LongInt location 'd5'; minterm : CARDINAL location 'd6'; mask : CARDINAL location 'd7'; tempA : pCHAR location 'a2') : LongInt;
 function BltBitMap(srcBitMap : pBitMap location 'a0'; xSrc : LongInt location 'd0'; ySrc : LongInt location 'd1'; destBitMap : pBitMap location 'a1'; xDest : LongInt location 'd2'; yDest : LongInt location 'd3'; xSize : LongInt location 'd4'; ySize : LongInt location 'd5'; minterm : CARDINAL location 'd6'; mask : CARDINAL location 'd7'; tempA : pCHAR location 'a2') : LongInt;
 SysCall GfxBase 030;
 SysCall GfxBase 030;
 
 
-procedure BltTemplate(source : pCHAR location 'a0'; xSrc : LongInt location 'd0'; srcMod : LongInt location 'd1'; destRP : pRastPort location 'a1'; xDest : LongInt location 'd2'; yDest : LongInt location 'd3'; xSize : LongInt location 'd4'; ySize : LongInt location 'd5');
+procedure BltTemplate(source : pWORD location 'a0'; xSrc : LongInt location 'd0'; srcMod : LongInt location 'd1'; destRP : pRastPort location 'a1'; xDest : LongInt location 'd2'; yDest : LongInt location 'd3'; xSize : LongInt location 'd4'; ySize : LongInt location 'd5');
 SysCall GfxBase 036;
 SysCall GfxBase 036;
 
 
 procedure ClearEOL(rp : pRastPort location 'a1');
 procedure ClearEOL(rp : pRastPort location 'a1');
@@ -2412,7 +2412,7 @@ SysCall GfxBase 456;
 procedure DisownBlitter;
 procedure DisownBlitter;
 SysCall GfxBase 462;
 SysCall GfxBase 462;
 
 
-function InitTmpRas(tmpRas : pTmpRas location 'a0'; buffer : pCHAR location 'a1'; size : LongInt location 'd0') : pTmpRas;
+function InitTmpRas(tmpRas : pTmpRas location 'a0'; buffer : Pointer location 'a1'; size : LongInt location 'd0') : pTmpRas;
 SysCall GfxBase 468;
 SysCall GfxBase 468;
 
 
 procedure AskFont(rp : pRastPort location 'a1'; textAttr : pTextAttr location 'a0');
 procedure AskFont(rp : pRastPort location 'a1'; textAttr : pTextAttr location 'a0');
@@ -2424,10 +2424,10 @@ SysCall GfxBase 480;
 procedure RemFont(textFont : pTextFont location 'a1');
 procedure RemFont(textFont : pTextFont location 'a1');
 SysCall GfxBase 486;
 SysCall GfxBase 486;
 
 
-function AllocRaster(width : CARDINAL location 'd0'; height : CARDINAL location 'd1') : pCHAR;
+function AllocRaster(width : CARDINAL location 'd0'; height : CARDINAL location 'd1') : TPlanePtr;
 SysCall GfxBase 492;
 SysCall GfxBase 492;
 
 
-procedure FreeRaster(p : pCHAR location 'a0'; width : CARDINAL location 'd0'; height : CARDINAL location 'd1');
+procedure FreeRaster(p : TPlanePtr location 'a0'; width : CARDINAL location 'd0'; height : CARDINAL location 'd1');
 SysCall GfxBase 498;
 SysCall GfxBase 498;
 
 
 procedure AndRectRegion(region : pRegion location 'a0'; rectangle : pRectangle location 'a1');
 procedure AndRectRegion(region : pRegion location 'a0'; rectangle : pRectangle location 'a1');

+ 40 - 4
packages/rtl-console/src/amicommon/video.pp

@@ -78,7 +78,7 @@ var
 
 
   OldSH, OldSW          : longint;
   OldSH, OldSW          : longint;
 
 
-  OldCursorX, 
+  OldCursorX,
   OldCursorY            : LongInt;
   OldCursorY            : LongInt;
   CursorType            : Word;
   CursorType            : Word;
   OldCursorType         : Word;
   OldCursorType         : Word;
@@ -100,6 +100,10 @@ var
   LastW, LastH: Integer;
   LastW, LastH: Integer;
   WindowForReqSave: PWindow;
   WindowForReqSave: PWindow;
   Process: PProcess;
   Process: PProcess;
+
+{$IFNDEF AROS}
+  FontBitmap: PBitmap;
+{$ENDIF}
 (*
 (*
   GetScreen: pScreen;
   GetScreen: pScreen;
 
 
@@ -122,7 +126,7 @@ begin
     SA_Type           , PUBLICSCREEN_F, // pubscreen
     SA_Type           , PUBLICSCREEN_F, // pubscreen
     SA_PubName        , PtrUInt(PChar(VIDEOSCREENNAME)),
     SA_PubName        , PtrUInt(PChar(VIDEOSCREENNAME)),
     SA_Quiet          , 1,
     SA_Quiet          , 1,
-    SA_LikeWorkbench  , 1     // Let OS  
+    SA_LikeWorkbench  , 1     // Let OS
   ]);
   ]);
   {$ifdef VIDEODEBUG}
   {$ifdef VIDEODEBUG}
   if (GetScreen <> nil) then
   if (GetScreen <> nil) then
@@ -225,7 +229,9 @@ end;
 
 
 procedure SysInitVideo;
 procedure SysInitVideo;
 var
 var
-  Counter: LongInt;
+  Counter,
+  Counter2: LongInt;
+  P: PWord;
 begin
 begin
 {$IFDEF MORPHOS}
 {$IFDEF MORPHOS}
   InitGraphicsLibrary;
   InitGraphicsLibrary;
@@ -292,6 +298,27 @@ begin
      {$endif}
      {$endif}
    end;
    end;
 
 
+{$IFNDEF AROS}
+   { Obtain Friend bitmap for font blitting }
+   FontBitmap:=AllocBitMap(16,16*256,1,0,VideoWindow^.RPort^.Bitmap);
+
+   { We need to make the data word wide, otherwise the blit will fail
+     miserably on classics (tested on 3.1 + AGA) }
+   if FontBitmap <> nil then
+   begin
+     { Locking the bitmap would be better, but that requires CGFX/P96/etc specific calls }
+     Forbid();
+     p:=PWord(FontBitmap^.Planes[0]);
+     for counter:=0 to 255 do
+       for counter2:=0 to 15 do
+         begin
+           p^:=vgafont[counter,counter2] shl 8;
+           inc(p);
+         end;
+     Permit();
+   end;
+{$ENDIF}
+
    CursorX := 0;
    CursorX := 0;
    CursorY := 0;
    CursorY := 0;
    OldCursorX := 0;
    OldCursorX := 0;
@@ -333,6 +360,11 @@ begin
     CloseWindow(videoWindow);
     CloseWindow(videoWindow);
     VideoWindow := nil;
     VideoWindow := nil;
   end;
   end;
+
+{$IFNDEF AROS}
+  FreeBitMap(FontBitmap);
+{$ENDIF}
+
   {$ifdef WITHBUFFERING}
   {$ifdef WITHBUFFERING}
   FreeBitmap(BufRp^.Bitmap);
   FreeBitmap(BufRp^.Bitmap);
   BufRp^.Bitmap := nil;
   BufRp^.Bitmap := nil;
@@ -358,7 +390,7 @@ begin
     begin
     begin
       LastT := 50;
       LastT := 50;
       LastL := 50;
       LastL := 50;
-      
+
       LastW := 80;
       LastW := 80;
       LastH := 25;
       LastH := 25;
     end;
     end;
@@ -412,7 +444,11 @@ begin
     SetABPenDrMd(rp, VideoPens[tmpBGColor], VideoPens[tmpFGColor], JAM2);
     SetABPenDrMd(rp, VideoPens[tmpBGColor], VideoPens[tmpFGColor], JAM2);
   end;
   end;
 
 
+{$IFNDEF AROS}
+  BltTemplate(@(PWord(FontBitmap^.Planes[0])[tmpChar * 16]), 0, 2, rp, sX, sY, 8, 16);
+{$ELSE}
   BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16);
   BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16);
+{$ENDIF}
 
 
   if crType = crUnderLine then
   if crType = crUnderLine then
   begin
   begin

+ 1 - 0
rtl/amicommon/dos.pp

@@ -64,6 +64,7 @@ implementation
 {$DEFINE FPC_FEXPAND_VOLUMES} (* Full paths begin with drive specification *)
 {$DEFINE FPC_FEXPAND_VOLUMES} (* Full paths begin with drive specification *)
 {$DEFINE FPC_FEXPAND_DRIVESEP_IS_ROOT}
 {$DEFINE FPC_FEXPAND_DRIVESEP_IS_ROOT}
 {$DEFINE FPC_FEXPAND_NO_DEFAULT_PATHS}
 {$DEFINE FPC_FEXPAND_NO_DEFAULT_PATHS}
+{$DEFINE FPC_FEXPAND_DIRSEP_IS_UPDIR}
 {$I dos.inc}
 {$I dos.inc}
 
 
 
 

+ 13 - 0
rtl/amicommon/sysheap.inc

@@ -25,7 +25,14 @@ function SysOSAlloc(size: ptruint): pointer;
 var values: array[0..2] of dword;
 var values: array[0..2] of dword;
 {$ENDIF}
 {$ENDIF}
 begin
 begin
+{$IFDEF AMIGA}
+  { The mutex locking is only needed for AmigaOS, AROS and MorphOS has MEMF_SEM_PROTECTED }
+  ObtainSemaphore(ASYS_heapSemaphore);
+{$ENDIF}
   result:=AllocPooled(ASYS_heapPool,size);
   result:=AllocPooled(ASYS_heapPool,size);
+{$IFDEF AMIGA}
+  ReleaseSemaphore(ASYS_heapSemaphore);
+{$ENDIF}
 {$IFDEF ASYS_FPC_MEMDEBUG}
 {$IFDEF ASYS_FPC_MEMDEBUG}
   values[0]:=dword(result);
   values[0]:=dword(result);
   values[1]:=dword(size);
   values[1]:=dword(size);
@@ -41,7 +48,13 @@ procedure SysOSFree(p: pointer; size: ptruint);
 var values: array[0..2] of dword;
 var values: array[0..2] of dword;
 {$ENDIF}
 {$ENDIF}
 begin
 begin
+{$IFDEF AMIGA}
+  ObtainSemaphore(ASYS_heapSemaphore);
+{$ENDIF}
   FreePooled(ASYS_heapPool,p,size);
   FreePooled(ASYS_heapPool,p,size);
+{$IFDEF AMIGA}
+  ReleaseSemaphore(ASYS_heapSemaphore);
+{$ENDIF}
 {$IFDEF ASYS_FPC_MEMDEBUG}
 {$IFDEF ASYS_FPC_MEMDEBUG}
   values[0]:=dword(p);
   values[0]:=dword(p);
   values[1]:=dword(size);
   values[1]:=dword(size);

+ 1 - 0
rtl/amicommon/sysutils.pp

@@ -57,6 +57,7 @@ uses
 {$DEFINE FPC_FEXPAND_VOLUMES} (* Full paths begin with drive specification *)
 {$DEFINE FPC_FEXPAND_VOLUMES} (* Full paths begin with drive specification *)
 {$DEFINE FPC_FEXPAND_DRIVESEP_IS_ROOT}
 {$DEFINE FPC_FEXPAND_DRIVESEP_IS_ROOT}
 {$DEFINE FPC_FEXPAND_NO_DEFAULT_PATHS}
 {$DEFINE FPC_FEXPAND_NO_DEFAULT_PATHS}
+{$DEFINE FPC_FEXPAND_DIRSEP_IS_UPDIR}
 
 
 { Include platform independent implementation part }
 { Include platform independent implementation part }
 {$i sysutils.inc}
 {$i sysutils.inc}

+ 9 - 1
rtl/amiga/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2015-01-04 rev 29399]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2015/02/07]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-dragonfly arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-msdos
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android i386-aros m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-dragonfly arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-msdos
@@ -2936,13 +2936,18 @@ prt0$(OEXT) : $(CPU_TARGET)/prt0.as
 $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
 $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
 	$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
 	$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
 uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
 uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
+	$(COMPILER) $(INC)/uuchar.pp
 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
 	$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
 		   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
 		   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
 		   $(SYSTEMUNIT)$(PPUEXT)
 		   $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/strings.pp
+iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/iso7185.pp
 dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
 dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
 	       $(SYSTEMUNIT)$(PPUEXT)
 	       $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(AMIINC)/dos.pp
 sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
 sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
 		    objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT)
 		    objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT)
 	$(COMPILER) -Fi$(OBJPASDIR)/sysutils $(AMIINC)/sysutils.pp
 	$(COMPILER) -Fi$(OBJPASDIR)/sysutils $(AMIINC)/sysutils.pp
@@ -2966,9 +2971,12 @@ dateutil$(PPUEXT) : $(OBJPASDIR)/dateutil.pp
 macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
 macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
 	$(COMPILER) $(INC)/macpas.pp $(REDIR)
 	$(COMPILER) $(INC)/macpas.pp $(REDIR)
 ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/ucomplex.pp
 getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
 getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/getopts.pp
 heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
 heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
 	$(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
 charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
 charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/charset.pp
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
 	$(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
 	$(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas

+ 12 - 2
rtl/amiga/Makefile.fpc

@@ -11,7 +11,7 @@ units=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings \
       dos heaptrc lineinfo ctypes \
       dos heaptrc lineinfo ctypes \
       sysutils fgl classes math typinfo \
       sysutils fgl classes math typinfo \
       charset cpall getopts \
       charset cpall getopts \
-      types rtlconsts sysconst 
+      types rtlconsts sysconst
 implicitunits=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
 implicitunits=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
       cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852
       cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852
 # \
 # \
@@ -19,7 +19,7 @@ implicitunits=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
 #      intuition aboxlib mui \
 #      intuition aboxlib mui \
 # these can be moved to packages later
 # these can be moved to packages later
 #      clipboard datatypes asl ahi tinygl get9 muihelper \
 #      clipboard datatypes asl ahi tinygl get9 muihelper \
-rsts=math rtlconsts typinfo classes sysconst 
+rsts=math rtlconsts typinfo classes sysconst
 #implicitunits=exeinfo
 #implicitunits=exeinfo
 
 
 [require]
 [require]
@@ -90,6 +90,7 @@ $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
         $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
         $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
 
 
 uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
 uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
+	$(COMPILER) $(INC)/uuchar.pp
 
 
 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
         $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
@@ -97,6 +98,10 @@ objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
                    $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
                    $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
                    $(SYSTEMUNIT)$(PPUEXT)
                    $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/strings.pp
+
+iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(INC)/iso7185.pp
 
 
 #
 #
 # System Dependent Units
 # System Dependent Units
@@ -112,6 +117,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
 
 
 dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
 dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
                $(SYSTEMUNIT)$(PPUEXT)
                $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(AMIINC)/dos.pp
 
 
 #crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
 #crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
 
 
@@ -172,15 +178,19 @@ macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
 #
 #
 
 
 ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/ucomplex.pp
 
 
 getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
 getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/getopts.pp
 
 
 heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
 heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
         $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
 
 
 #lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
 #lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
+#        $(COMPILER) $(INC)/lineinfo.pp
 
 
 charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
 charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/charset.pp
 
 
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
         $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
         $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas

+ 3 - 0
rtl/amiga/system.pp

@@ -79,6 +79,7 @@ var
 {$ENDIF}
 {$ENDIF}
 
 
   ASYS_heapPool : Pointer; { pointer for the OS pool for growing the heap }
   ASYS_heapPool : Pointer; { pointer for the OS pool for growing the heap }
+  ASYS_heapSemaphore: Pointer; { 68k OS from 3.x has no MEMF_SEM_PROTECTED for pools, have to do it ourselves }
   ASYS_origDir  : LongInt; { original directory on startup }
   ASYS_origDir  : LongInt; { original directory on startup }
   AOS_wbMsg    : Pointer; public name '_WBenchMsg'; { the "public" part is amunits compatibility kludge }
   AOS_wbMsg    : Pointer; public name '_WBenchMsg'; { the "public" part is amunits compatibility kludge }
   _WBenchMsg   : Pointer; external name '_WBenchMsg'; { amunits compatibility kludge }
   _WBenchMsg   : Pointer; external name '_WBenchMsg'; { amunits compatibility kludge }
@@ -353,6 +354,8 @@ begin
   { Creating the memory pool for growing heap }
   { Creating the memory pool for growing heap }
   ASYS_heapPool:=CreatePool(MEMF_FAST,growheapsize2,growheapsize1);
   ASYS_heapPool:=CreatePool(MEMF_FAST,growheapsize2,growheapsize1);
   if ASYS_heapPool=nil then Halt(1);
   if ASYS_heapPool=nil then Halt(1);
+  ASYS_heapSemaphore:=AllocPooled(ASYS_heapPool,sizeof(TSignalSemaphore));
+  InitSemaphore(ASYS_heapSemaphore);
 
 
   if AOS_wbMsg=nil then begin
   if AOS_wbMsg=nil then begin
     StdInputHandle:=dosInput;
     StdInputHandle:=dosInput;

+ 48 - 0
rtl/m68k/m68k.inc

@@ -29,6 +29,54 @@
 {****************************************************************************}
 {****************************************************************************}
 
 
 
 
+{               68881/2 FPCR Encodings
+   Rounding Mode                 Rounding Precision
+    (RND Field)        Encoding    (PREC Field)
+ To Nearest (RN)         0 0        Extend (X)
+ To Zero (RZ)            0 1        Single (S)
+ To Minus Infinity (RM)  1 0        Double (D)
+ To Plus Infinity (RP)   1 1        Undefined
+}
+
+{ 68881/2 FPCR layout }
+{ Exception Enable Byte: }
+{ 15 - BSUN  - Branch/Set on Unordered }
+{ 14 - SNAN  - Signal Not A Number }
+{ 13 - OPERR - Operand Error }
+{ 12 - OVFL  - Overflow }
+{ 11 - UNFL  - Underflow }
+{ 10 - DZ    - Divide by Zero }
+{ 09 - INEX2 - Inexact Operation }
+{ 08 - INEX1 - Inexact Decimal Input }
+{ Mode Control Byte: }
+{ 07 - PREC  - Rounding Precision }
+{ 06 - PREC  - Rounding Precision }
+{ 05 - RND   - Rounding Mode }
+{ 04 - RND   - Rounding Mode }
+{ 03 - 0     - Reserved, Set to zero }
+{ 02 - 0     - Reserved, Set to zero }
+{ 01 - 0     - Reserved, Set to zero }
+{ 00 - 0     - Reserved, Set to zero }
+
+
+{$IFNDEF FPU_SOFT}
+{$DEFINE FPC_SYSTEM_HAS_SYSRESETFPU}
+procedure SysResetFPU; assembler;
+asm
+  clr.l    d0
+  fmove.l  d0,fpcr
+end;
+
+{$DEFINE FPC_SYSTEM_HAS_SYSINITFPU}
+procedure SysInitFPU; assembler;
+asm
+  clr.l   d0
+  // FIX ME:
+  // move.w 0,d0 // enable a sane set of exception flags here
+  fmove.l d0,fpcr
+end;
+{$ENDIF}
+
 procedure fpc_cpuinit;
 procedure fpc_cpuinit;
   begin
   begin
     SysResetFPU;
     SysResetFPU;

+ 1 - 1
rtl/morphos/system.pp

@@ -365,7 +365,7 @@ begin
  if MOS_UtilityBase=nil then Halt(1);
  if MOS_UtilityBase=nil then Halt(1);
 
 
  { Creating the memory pool for growing heap }
  { Creating the memory pool for growing heap }
- ASYS_heapPool:=CreatePool(MEMF_FAST,growheapsize2,growheapsize1);
+ ASYS_heapPool:=CreatePool(MEMF_FAST or MEMF_SEM_PROTECTED,growheapsize2,growheapsize1);
  if ASYS_heapPool=nil then Halt(1);
  if ASYS_heapPool=nil then Halt(1);
 
 
  if MOS_ambMsg=nil then begin
  if MOS_ambMsg=nil then begin