4 Versionstring: $VER: example_lib.c 1.2 (21.06.2007)
7 Description: shows how the SDI_lib.h header include can be used
9 1.0 05.10.04 : initial version showing how the SDI_lib.h headers can help
10 when used for maintaining AmigaOS compatible shared library
11 interfaces upon compatible operating systems like AmigaOS3,
14 1.1 20.06.07 : moved LIBFUNC to be first in line acording to changes in
15 SDI_lib.h. (Guido Mersmann)
17 1.2 21.06.07 : added missing libvector to MorphOS/AmigaOS3 libvectors[]
20 Please note that this example is just for educational purposes and wasn't
21 checked for complete correctness. However, it should compile and probably also
22 work as expected. But please note that its purpose is to show how a shared
23 library can held platform independent over all different available AmigaOS
24 platforms like OS3, OS4 and MorphOS.
26 Feel free to comment and submit any suggestions directly to
27 Jens.Langner@light-speed.de
31 #include <exec/types.h>
32 #include <exec/libraries.h>
33 #include <exec/resident.h>
36 #include <proto/exec.h>
39 #include <exec/emulation.h>
47 #include <SDI_stdarg.h>
51 #define DATE "25.08.2014"
52 #define VERS "example.library 1.4"
53 #define VSTRING "example.library 1.4 25.08.2014)\r\n"
54 #define VERSTAG "\0$VER: example.library 1.4 25.08.2014)"
56 static const char UserLibName
[] = "example.library";
57 static const char UserLibID
[] = "\0$VER: example.library 1.4 25.08.2014)";
59 #if defined(__MORPHOS__)
60 struct ExecBase
*SysBase
;
63 /******************************************************************************/
64 /* >> User defineable library functions start here << */
65 /* The following section should illustrate how the SDI_lib.h macros make it */
66 /* possible to easily maintain a typical Amiga shared library interface if */
67 /* compatibility over all common (OS3/OS4, MorphOS) is required */
68 /******************************************************************************/
70 /******************************************************************************/
71 /* Local Structures & Prototypes */
72 /******************************************************************************/
76 struct Library libBase
;
77 struct Library
*sysBase
;
81 #if defined(__amigaos4__)
82 #define __BASE_OR_IFACE_TYPE struct ExampleIFace *
83 #define __BASE_OR_IFACE_VAR IExample
85 #define __BASE_OR_IFACE_TYPE struct LibraryHeader *
86 #define __BASE_OR_IFACE_VAR ExampleBase
88 #define __BASE_OR_IFACE __BASE_OR_IFACE_TYPE __BASE_OR_IFACE_VAR
90 // first the prototypes of all our public library functions
91 LIBPROTO(SayHelloOS4
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
92 LIBPROTO(SayHelloOS3
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
93 LIBPROTO(SayHelloMOS
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
94 LIBPROTO(Uppercase
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *txt
));
95 LIBPROTO(SPrintfA
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), REG(a2
, APTR args
));
96 LIBPROTOVA(SPrintf
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), ...);
98 // let us now create the libvector.
99 // Please note that the start of the vectors has to be always the "LFUNC_FAS"
101 #define libvector LFUNC_FAS(SayHelloOS4) \
102 LFUNC_FA_(SayHelloOS3) \
103 LFUNC_FA_(SayHelloMOS) \
104 LFUNC_FA_(Uppercase) \
105 LFUNC_FA_(SPrintfA) \
108 // Now the real implementations of the library functions above like in
109 // a normal AmigaOS shared library follow
110 LIBPROTO(SayHelloOS4
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
))
112 return "Hello AmigaOS4!!!";
115 LIBPROTO(SayHelloOS3
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
))
117 return "Hello AmigaOS3!!!";
120 LIBPROTO(SayHelloMOS
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
))
122 return "Hello MorphOS!!!";
125 LIBPROTO(Uppercase
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *txt
))
138 LIBPROTO(SPrintfA
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), REG(a2
, APTR args
))
140 RawDoFmt(format
, args
, NULL
, buf
);
145 #if defined(__amigaos4__)
146 // for AmigaOS4 varargs functions are separate entries in the interface structure and
147 // hence must be defined as separate functions
148 LIBPROTOVA(SPrintf
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), ...)
153 VA_START(args
, format
);
154 // the SPrintf function will be call via the interface
155 ret
= SPrintfA(buf
, format
, VA_ARG(args
, ULONG
));
160 #elif defined(__MORPHOS__)
161 // define stub functions for all functions in the jump table which take the
162 // parameters from the emulated 68k registers. The parameters don't need to
163 // be specified again, because these are really functions taking no direct
164 // parameters. Only the type of the returned value is required.
165 LIBSTUB(SayHelloOS4
, char *)
167 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
168 return CALL_LFUNC_NP(SayHelloOS4
);
171 LIBSTUB(SayHelloOS3
, char *)
173 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
174 return CALL_LFUNC_NP(SayHelloOS3
);
177 LIBSTUB(SayHelloMOS
, char *)
179 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
180 return CALL_LFUNC_NP(SayHelloMOS
);
183 LIBSTUB(Uppercase
, char *)
185 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
186 return CALL_LFUNC(Uppercase
, (char *)REG_A0
);
189 LIBSTUB(SPrintfA
, char *)
191 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
192 return CALL_LFUNC(SprintfA
, (char)REG_A0
, (char *)REG_A1
, (APTR
)REG_A2
);
194 #elif defined(__AROS__)
195 AROS_LH0(char *, SayHelloOS4
, struct Library
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
198 return CALL_LFUNC_NP(SayHelloOS4
);
202 AROS_LH0(char *, SayHelloOS3
, struct Library
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
205 return CALL_LFUNC_NP(SayHelloOS3
);
209 AROS_LH0(char *, SayHelloMOS
, struct Library
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
212 return CALL_LFUNC_NP(SayHelloMOS
);
216 AROS_LH1(char *, Uppercase
, AROS_LHA(char *, txt
, A0
), struct Library
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
219 return CALL_LFUNC(Uppercase
, txt
);
223 AROS_LH3(char *, SPrintfA
,
224 AROS_LHA(char *, buf
, A0
),
225 AROS_LHA(char *, format
, A1
),
226 AROS_LHA(APTR
, args
, A1
),
227 struct Library
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
231 return CALL_LFUNC(SPrintfA
, buf
, format
, args
);
236 /******************************************************************************/
237 /* Starting from here starts the "standard" Amiga library initialization. */
238 /* All the above should have illustrated enough how "easy" it is to use the */
239 /* SDI_lib.h header file and how it can help in developing a shared library */
240 /* for multiple AmigaOS compatible platforms. */
241 /******************************************************************************/
243 #if defined(__amigaos4__)
245 LIBFUNC
static struct LibraryHeader
* LibInit (struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecIFace
*pIExec
);
246 LIBFUNC
static BPTR
LibExpunge (struct LibraryManagerInterface
*Self
);
247 LIBFUNC
static struct LibraryHeader
* LibOpen (struct LibraryManagerInterface
*Self
, ULONG version
);
248 LIBFUNC
static BPTR
LibClose (struct LibraryManagerInterface
*Self
);
250 #elif defined(__MORPHOS__)
252 LIBFUNC
static struct LibraryHeader
* LibInit (struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecBase
*sb
);
253 LIBFUNC
static BPTR
LibExpunge(void);
254 LIBFUNC
static struct LibraryHeader
* LibOpen (void);
255 LIBFUNC
static BPTR
LibClose (void);
256 LIBFUNC
static LONG
LibNull (void);
258 #elif defined(__AROS__)
260 #include <aros/libcall.h>
262 //#define example_LibOpen LibOpen
263 //#define example_LibClose LibClose
264 #define example_3_LibExpunge LibExpunge
266 static AROS_UFP3 (struct LibraryHeader
*, LibInit
,
267 AROS_UFPA(struct LibraryHeader
*, base
, D0
),
268 AROS_UFPA(BPTR
, librarySegment
, A0
),
269 AROS_UFPA(struct ExecBase
*, sb
, A6
)
271 static AROS_LD1 (struct LibraryHeader
*, LibOpen
,
272 AROS_LPA (UNUSED ULONG
, version
, D0
),
273 struct LibraryHeader
*, base
, 1, example
275 static AROS_LD0 (BPTR
, LibClose
,
276 struct LibraryHeader
*, base
, 2, example
278 static AROS_LD1(BPTR
, LibExpunge
,
279 AROS_LPA(UNUSED
struct LibraryHeader
*, __extrabase
, D0
),
280 struct LibraryHeader
*, base
, 3, example
285 LIBFUNC
static struct LibraryHeader
* LibInit (REG(a0
, BPTR Segment
), REG(d0
, struct LibraryHeader
*lh
), REG(a6
, struct ExecBase
*sb
));
286 LIBFUNC
static BPTR
LibExpunge (REG(a6
, struct LibraryHeader
*base
));
287 LIBFUNC
static struct LibraryHeader
* LibOpen (REG(a6
, struct LibraryHeader
*base
));
288 LIBFUNC
static BPTR
LibClose (REG(a6
, struct LibraryHeader
*base
));
289 LIBFUNC
static LONG
LibNull (void);
293 /******************************************************************************/
294 /* Dummy entry point and LibNull() function all in one */
295 /******************************************************************************/
297 #if defined(__amigaos4__)
306 #if !defined(__amigaos4__)
307 LIBFUNC
static LONG
LibNull(VOID
)
313 /******************************************************************************/
314 /* Local data structures */
315 /******************************************************************************/
317 #if defined(__amigaos4__)
318 /* ------------------- OS4 Manager Interface ------------------------ */
319 STATIC ULONG
LibObtain(struct LibraryManagerInterface
*Self
)
321 return(Self
->Data
.RefCount
++);
324 STATIC ULONG
LibRelease(struct LibraryManagerInterface
*Self
)
326 return(Self
->Data
.RefCount
--);
329 STATIC CONST APTR LibManagerVectors
[] =
342 STATIC CONST
struct TagItem LibManagerTags
[] =
344 {MIT_Name
, (ULONG
)"__library"},
345 {MIT_VectorTable
, (ULONG
)LibManagerVectors
},
350 /* ------------------- Library Interface(s) ------------------------ */
352 STATIC CONST APTR LibVectors
[] =
362 STATIC CONST
struct TagItem MainTags
[] =
364 {MIT_Name
, (ULONG
)"main"},
365 {MIT_VectorTable
, (ULONG
)LibVectors
},
371 STATIC CONST ULONG LibInterfaces
[] =
373 (ULONG
)LibManagerTags
,
378 /* --------------------- m68k Library stubs ------------------------ */
380 STATIC ULONG
stub_OpenPPC(ULONG
*regarray
)
382 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
383 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
384 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
386 return (ULONG
) Self
->Open(0);
388 struct EmuTrap stub_Open
= { TRAPINST
, TRAPTYPE
, stub_OpenPPC
};
390 STATIC ULONG
stub_ClosePPC(ULONG
*regarray
)
392 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
393 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
394 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
396 return (ULONG
) Self
->Close();
398 struct EmuTrap stub_Close
= { TRAPINST
, TRAPTYPE
, stub_ClosePPC
};
400 STATIC ULONG
stub_ExpungePPC(ULONG
*regarray
)
404 struct EmuTrap stub_Expunge
= { TRAPINST
, TRAPTYPE
, stub_ExpungePPC
};
406 STATIC ULONG
stub_ReservedPPC(ULONG
*regarray
)
410 struct EmuTrap stub_Reserved
= { TRAPINST
, TRAPTYPE
, stub_ReservedPPC
};
412 STATIC ULONG
stub_SayHelloOS4PPC(ULONG
*regarray
)
414 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
415 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
416 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
418 return (char *)Self
->SayHelloOS4();
420 struct EmuTrap stub_SayHelloOS4
= { TRAPINST
, TRAPTYPE
, stub_SayHelloOS4PPC
};
422 STATIC ULONG
stub_SayHelloOS3PPC(ULONG
*regarray
)
424 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
425 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
426 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
428 return (char *)Self
->SayHelloOS3();
430 struct EmuTrap stub_SayHelloOS3
= { TRAPINST
, TRAPTYPE
, stub_SayHelloOS3PPC
};
432 STATIC ULONG
stub_SayHelloMOSPPC(ULONG
*regarray
)
434 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
435 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
436 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
438 return (char *)Self
->SayHelloMOS();
440 struct EmuTrap stub_SayHelloMOS
= { TRAPINST
, TRAPTYPE
, stub_SayHelloMOSPPC
};
442 STATIC ULONG
stub_UppercasePPC(ULONG
*regarray
)
444 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
445 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
446 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
448 return (char *)Self
->Uppercase(
452 struct EmuTrap stub_Uppercase
= { TRAPINST
, TRAPTYPE
, stub_UppercasePPC
};
454 STATIC ULONG
stub_SPrintfAPPC(ULONG
*regarray
)
456 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
457 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
458 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
460 return (char *)Self
->SPrintfA(
466 struct EmuTrap stub_SPrintfA
= { TRAPINST
, TRAPTYPE
, stub_SPrintfAPPC
};
468 STATIC ULONG VecTable68K
[] =
472 (ULONG
)&stub_Expunge
,
473 (ULONG
)&stub_Reserved
,
474 (ULONG
)&stub_SayHelloOS4
,
475 (ULONG
)&stub_SayHelloOS3
,
476 (ULONG
)&stub_SayHelloMOS
,
477 (ULONG
)&stub_Uppercase
,
478 (ULONG
)&stub_SprintfA
,
482 /* ----------------------- LibCreate Tags -------------------------- */
484 STATIC CONST
struct TagItem LibCreateTags
[] =
486 {CLT_DataSize
, (ULONG
)(sizeof(struct LibraryHeader
))},
487 {CLT_InitFunc
, (ULONG
)LibInit
},
488 {CLT_Interfaces
, (ULONG
)LibInterfaces
},
489 {CLT_Vector68K
, (ULONG
)VecTable68K
},
495 STATIC CONST APTR LibVectors
[] =
498 (APTR
)FUNCARRAY_32BIT_NATIVE
,
500 #if defined(__AROS__)
502 AROS_SLIB_ENTRY(LibOpen
, example
, 1),
503 AROS_SLIB_ENTRY(LibClose
, example
, 2),
504 AROS_SLIB_ENTRY(LibExpunge
, example
, 3),
506 AROS_SLIB_ENTRY(LibOpen
, example
),
507 AROS_SLIB_ENTRY(LibClose
, example
),
508 AROS_SLIB_ENTRY(LibExpunge
, example
),
520 STATIC CONST ULONG LibInitTab
[] =
522 sizeof(struct LibraryHeader
),
530 /* ------------------- ROM Tag ------------------------ */
531 static const USED_VAR
struct Resident ROMTag
=
534 (struct Resident
*)&ROMTag
,
535 (struct Resident
*)&ROMTag
+ 1,
536 #if defined(__amigaos4__)
537 RTF_AUTOINIT
|RTF_NATIVE
, // The Library should be set up according to the given table.
538 #elif defined(__MORPHOS__)
539 RTF_AUTOINIT
|RTF_PPC
,
540 #elif defined(__AROS__)
541 RTF_AUTOINIT
|RTF_EXTENDED
,
550 #if defined(__amigaos4__)
551 (APTR
)LibCreateTags
// This table is for initializing the Library.
557 #if defined(__MORPHOS__)
559 * To tell the loader that this is a new emulppc elf and not
560 * one for the ppc.library.
563 ULONG USED_VAR __amigappc__
=1;
564 ULONG USED_VAR __abox__
=1;
566 #endif /* __MORPHOS */
568 /******************************************************************************/
569 /* Standard Library Functions, all of them are called in Forbid() state. */
570 /******************************************************************************/
573 #define DeleteLibrary(LIB) \
574 FreeMem((STRPTR)(LIB)-(LIB)->lib_NegSize, (ULONG)((LIB)->lib_NegSize+(LIB)->lib_PosSize))
577 #if defined(__amigaos4__)
578 static struct LibraryHeader
* LibInit(struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecIFace
*pIExec
)
580 struct ExecBase
*sb
= (struct ExecBase
*)pIExec
->Data
.LibBase
;
582 #elif defined(__MORPHOS__)
583 static struct LibraryHeader
* LibInit(struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecBase
*sb
)
585 #elif defined(__AROS__)
586 static AROS_UFH3(struct LibraryHeader
*, LibInit
,
587 AROS_UFHA(struct LibraryHeader
*, base
, D0
),
588 AROS_UFHA(BPTR
, librarySegment
, A0
),
589 AROS_UFHA(struct ExecBase
*, sb
, A6
)
594 LIBFUNC
static struct LibraryHeader
* LibInit(REG(a0
, BPTR librarySegment
), REG(d0
, struct LibraryHeader
*base
), REG(a6
, struct ExecBase
*sb
))
600 base
->libBase
.lib_Node
.ln_Type
= NT_LIBRARY
;
601 base
->libBase
.lib_Node
.ln_Pri
= 0;
602 base
->libBase
.lib_Node
.ln_Name
= (char *)UserLibName
;
603 base
->libBase
.lib_Flags
= LIBF_CHANGED
| LIBF_SUMUSED
;
604 base
->libBase
.lib_Version
= VERSION
;
605 base
->libBase
.lib_Revision
= REVISION
;
606 base
->libBase
.lib_IdString
= (char *)UserLibID
;
608 base
->segList
= librarySegment
;
609 base
->sysBase
= (APTR
)SysBase
;
612 #if defined(__AROS__)
617 #if defined(__amigaos4__)
618 static BPTR
LibExpunge(struct LibraryManagerInterface
*Self
)
620 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
621 #elif defined(__MORPHOS__)
622 static BPTR
LibExpunge(void)
624 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
625 #elif defined(__AROS__)
626 static AROS_LH1(BPTR
, LibExpunge
,
627 AROS_LHA(UNUSED
struct LibraryHeader
*, __extrabase
, D0
),
628 struct LibraryHeader
*, base
, 3, example
633 LIBFUNC
static BPTR
LibExpunge(REG(a6
, struct LibraryHeader
*base
))
638 if(base
->libBase
.lib_OpenCnt
> 0)
640 base
->libBase
.lib_Flags
|= LIBF_DELEXP
;
644 SysBase
= (APTR
)base
->sysBase
;
647 Remove((struct Node
*)base
);
648 DeleteLibrary(&base
->libBase
);
651 #if defined(__AROS__)
656 #if defined(__amigaos4__)
657 static struct LibraryHeader
*LibOpen(struct LibraryManagerInterface
*Self
, ULONG version
)
659 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
660 #elif defined(__MORPHOS__)
661 static struct LibraryHeader
*LibOpen(void)
663 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
664 #elif defined(__AROS__)
665 static AROS_LH1(struct LibraryHeader
*, LibOpen
,
666 AROS_LHA(UNUSED ULONG
, version
, D0
),
667 struct LibraryHeader
*, base
, 1, example
672 LIBFUNC
static struct LibraryHeader
* LibOpen(REG(a6
, struct LibraryHeader
*base
))
676 base
->libBase
.lib_Flags
&= ~LIBF_DELEXP
;
677 base
->libBase
.lib_OpenCnt
++;
680 #if defined(__AROS__)
685 #if defined(__amigaos4__)
686 static BPTR
LibClose(struct LibraryManagerInterface
*Self
)
688 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
689 #elif defined(__MORPHOS__)
690 static BPTR
LibClose(void)
692 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
693 #elif defined(__AROS__)
694 static AROS_LH0(BPTR
, LibClose
,
695 struct LibraryHeader
*, base
, 2, example
700 LIBFUNC
static BPTR
LibClose(REG(a6
, struct LibraryHeader
*base
))
704 if(base
->libBase
.lib_OpenCnt
> 0 &&
705 --base
->libBase
.lib_OpenCnt
== 0)
707 if(base
->libBase
.lib_Flags
& LIBF_DELEXP
)
709 #if defined(__amigaos4__)
710 return LibExpunge(Self
);
711 #elif defined(__MORPHOS__)
713 #elif defined(__AROS__)
714 return example_3_LibExpunge(base
, base
);
716 return LibExpunge(base
);
722 #if defined(__AROS__)