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 -
- fixed to always update the stacksize in __stklen, so the RTL knows the correct stacksize (StackLength in system unit is correct)
- this probably also fixes stack checking or opens the way to have a working stack checking on AROS, but that was not tested
+ call PASCALMAIN via exec/NewStackSwap() and provide a larger stack when the pre-set value is higher than what the system provides
+ use operatingsystem_result to simplify return code handling
These changes bring the AROS startup's stack handling to the Amiga/m68k and MorphOS level
git-svn-id: trunk@28611 -
- fixed all Amiga-like system units to not leak the last directory
lock while changing back to the original dir in System_exit;
(a bug found by Marcus Sackrow, thanks!)
* renamed AOS_origDir to ASYS_origDir
git-svn-id: trunk@28537 -