2 * Copyright (C) 2015, The AROS Development Team
4 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
6 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
9 #include <aros/symbolsets.h>
10 #include <aros/asmcall.h>
11 #include <aros/autoinit.h>
13 #include <exec/libraries.h>
15 #include <proto/exec.h>
16 #include <proto/dos.h>
18 /* Linklib to provide a 'SysBase' symbol. Also verifies that
19 * the symbol is set appropriately.
21 struct ExecBase
*SysBase
;
22 extern const LONG
const __aros_libreq_SysBase
__attribute__((weak
));
24 static int SysBase_autoinit(struct ExecBase
*sysBase
)
31 if (__aros_libreq_SysBase
> SysBase
->LibNode
.lib_Version
) {
33 (IPTR
)(FindTask(NULL
)->tc_Node
.ln_Name
),
34 __aros_libreq_SysBase
,
35 SysBase
->LibNode
.lib_Version
37 __showerror("%s: Requires exec.library v%ld, found v%ld\n",arr
);
44 ADD2INIT(SysBase_autoinit
,-128)