Commit Graph

39 Commits

Author SHA1 Message Date
svenbarth
d5c8fe7455 * on targets with indirect main entry argc, argv and envp are provided through the indirect entry information instead of externals
git-svn-id: trunk@36686 -
2017-07-08 19:18:20 +00:00
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
Tomas Hajny
d442d14e0c + FileNameCasePreserving added - see in Mantis
git-svn-id: trunk@20894 -
2012-04-15 20:56:13 +00:00
Jonas Maebe
8d8fc0fdee + RTL for AIX
git-svn-id: trunk@20786 -
2012-04-11 17:59:49 +00:00
Tomas Hajny
03f52902f3 * do not use / as DriveSeparator
git-svn-id: trunk@15454 -
2010-06-19 16:22:10 +00:00
florian
d955c9b4f7 + proper handling of lineinfo retrival for dyn. libs in unix
git-svn-id: trunk@11010 -
2008-05-18 18:42:09 +00:00
peter
f4f3ae84d0 * AllowDirectorySeparators and AllowDriveSeparators typed constants
added to allow customization of path and directory parsing in the rtl
  * Use the new sets instead of the hardcoded / and \

git-svn-id: trunk@10105 -
2008-01-29 23:04:56 +00:00
Tomas Hajny
3b3849c02c + AllFilesMask constant added
git-svn-id: trunk@8492 -
2007-09-15 12:09:25 +00:00
Almindor
57d5ce9713 * some unix changes mainly on freeBSD and fix to MAXPATHLEN constant
+ added kld* syscalls for freeBSD (tested)
  + changed "directives" macro for freeBSD unit to "extdecl" for Lazarus
  + changed MAXPATHLEN from 255 (wrong on all unices known to fpc since 1993) to 1024 for non-linux and 4096 for linux as per source code (2.4+ for linux, 1993 BSD for BSDs, Solaris 10)

git-svn-id: trunk@4779 -
2006-10-03 20:35:07 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
peter
b68af1b0e3 * post 2.0.0 fixes from cvs
git-svn-id: trunk@7 -
2005-05-16 20:59:02 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
michael
2e48181661 + Added maxpathlen constant (maximum length of filename path) 2005-05-12 20:29:04 +00:00
Tomas Hajny
d3c103dfd7 * EOF_CTRLZ conditional define replaced with CtrlZMarksEOF, handling made more consistent (fix for bug ) 2005-04-03 21:10:59 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
f4011dabba * solaris updates 2005-02-14 16:32:41 +00:00
peter
2fbaae2b91 * threading in system unit
* removed systhrds unit
2005-02-06 11:20:52 +00:00
olle
9a4855aa43 + added maxExitCode to all System.pp
* constrained error code to be below maxExitCode in RunError et. al.
2004-09-03 19:25:21 +00:00
daniel
74d50c5f11 * No envp,argv,argc declaration for Darwin 2004-07-03 22:52:33 +00:00
daniel
a1229ff8fe * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
longer necessary
2004-07-03 21:50:30 +00:00
peter
1ca09822a6 * unix thandle is always 32bit
* textrec fixed for 64bit
2004-05-18 20:16:23 +00:00
olle
8a1b525ff7 * Changed m68k to cpum68k 2003-10-17 20:49:02 +00:00
peter
d0eac29ab9 * THandle is platform dependent 2003-10-16 15:43:13 +00:00
peter
906b37ffa1 * remove threadh.inc include 2002-10-15 19:30:15 +00:00
peter
9f31783a0a * old logs removed and tabs fixed 2002-09-07 16:01:16 +00:00
peter
71a1ae2136 * sLineBreak changed to normal constant like Kylix 2002-07-01 16:29:05 +00:00
marco
94d9d8fe46 * Fixed a ifdef linux to ifdef unix (related to TRTL change) 2001-11-08 13:56:35 +00:00
peter
5d62342562 * criticalsection renamed to rtlcriticalsection for kylix compatibility 2001-10-23 21:51:02 +00:00
peter
4c26674c00 * start of thread support for linux 2001-10-14 13:33:20 +00:00
peter
49481a0c63 * v10 merges 2001-06-27 21:37:36 +00:00
Jonas Maebe
94b50cf56c * move platform independent constant declarations after inclusion of
systemh.inc
2001-06-18 14:26:16 +00:00
Tomas Hajny
72e3212dad + platform specific information 2001-06-13 22:20:10 +00:00
peter
46b58ded78 * fixes for the stricter compiler 2001-04-13 23:49:48 +00:00
peter
4738f23949 * added filenamecasesensitive var 2001-04-13 22:30:55 +00:00
florian
942958770c * typo fixed 2001-03-22 21:56:27 +00:00
florian
54b50c539a + header and log added 2001-03-21 23:32:13 +00:00
florian
1f91d1d88e + sLineBreak and misc. stuff for Kylix compatiblity 2001-03-21 23:29:40 +00:00
marco
e5c42e6704 * Global Linux +bsd to (rtl/freebsd rtl/unix rtl/linux structure) 2000-09-18 13:14:49 +00:00