2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Add a library to the public list of libraries.
8 #include <aros/debug.h>
9 #include <exec/execbase.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
17 AROS_LH1(void, AddLibrary
,
20 AROS_LHA(struct Library
*, library
,A1
),
23 struct ExecBase
*, SysBase
, 66, Exec
)
26 Adds a given library to the system's library list after checksumming
27 the library vectors. This function is not for general use but
28 (of course) for building shared librarys that don't use exec's
29 MakeLibrary() mechanism.
32 library - Pointer to a ready for use library structure.
37 Some old Amiga software expects that AddLibrary returns the
38 library which was just added. When in binary compatibility mode
46 RemLibrary(), MakeLibrary(), MakeFunctions(), InitStruct(), SumLibrary().
50 ******************************************************************************/
54 ASSERT_VALID_PTR(library
);
56 /* Just in case the user forgot them */
57 library
->lib_Node
.ln_Type
=NT_LIBRARY
;
58 library
->lib_Flags
|=LIBF_CHANGED
;
60 /* Build checksum for library vectors */
63 /* Arbitrate for the library list */
66 /* And add the library */
67 Enqueue(&SysBase
->LibList
,&library
->lib_Node
);
72 AROS_COMPAT_SETD0(library
);