fpc/rtl/morphos
svenbarth 2d454dc8fa Move DynLibs support to System unit using a manager approach like for Threads, WideStrings, etc.. This is needed so that we can support features like "delayed" and loading of dynamic packages.
Each port that allows the usage of dynamic libraries should call InitSystemDynLibs during initialization of the System unit.
The DynLibs unit has been adjusted to be a forwarder for the functions that now reside in the System unit (for backwards compatiblity just in case). Additionally the unit will register the DynLibsManager if it doesn't reside in the System unit anyway.
Currently only the Windows targets (Win32, Win64 and WinCE) implement the DynLibsManager inside the System unit. For other systems using the LoadLibrary, etc. functions will lead to a run error/exception.
If a port wants to implement its own DynLibsManager then it needs to define DISABLE_NO_DYNLIBS_MANAGER. TLibHandle, NilHandle and optionally TOrdinalEntry (it's set to SizeUInt otherwise) should be defined in sysdlh.inc which needs to be enabled using the define FPC_SYSTEM_HAS_SYSDLH (because there are targets which have FEATURE_DYNLIBS enabled, but don't support them... e.g. powerpc-wii -.-).
The DynLibsManager contains methods for loading a library based on a RawByteString and based on a UnicodeString. BOTH should be implemented, but internally one can forward to the other.
The loading by ordinal *can* be be implemented. If it is set to Nil then the implementation of GetProcAddress(lib,ordinal) will return Nil.

+ new functions SetDynLibsManager and GetDynLibsManager to set and retrieve the current DynLibsManager
* provide interface of DynLibs unit in unit System

git-svn-id: trunk@29613 -
2015-02-03 20:00:00 +00:00
..
doslibd.inc
doslibf.inc MorphOS: use LongBool instead of Boolean in syscalls, because we have C-style booleans as return values everywhere. this probably should be done for *all* Amiga-like syscalls everywhere... 2014-09-15 22:49:18 +00:00
emuld.inc
execd.inc
execf.inc
Makefile * version updated to 3.1.1 2015-01-04 21:09:04 +00:00
Makefile.fpc MorphOS: moved system dependent units outside the RTL into the new morphunits package. also renamed some units to match classic Amiga and/or AROS naming 2014-08-25 02:17:16 +00:00
prt0.as
sysosh.inc
system.pp Move DynLibs support to System unit using a manager approach like for Threads, WideStrings, etc.. This is needed so that we can support features like "delayed" and loading of dynamic packages. 2015-02-03 20:00:00 +00:00
timerd.inc
timerf.inc
tthread.inc Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
utild1.inc
utild2.inc
utilf.inc MorphOS: use LongBool instead of Boolean in syscalls, because we have C-style booleans as return values everywhere. this probably should be done for *all* Amiga-like syscalls everywhere... 2014-09-15 22:49:18 +00:00