Commit Graph

313 Commits

Author SHA1 Message Date
Jonas Maebe
5a8959381c + Darwin/AArch64 support
git-svn-id: trunk@29934 -
2015-02-23 22:53:50 +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
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
pierre
7ffca97a68 OpenBSD support for OS version specific syscall numbers
git-svn-id: trunk@29136 -
2014-11-23 21:59:25 +00:00
sergei
3a5e6485b5 - RTL: removed InitVariantManager, it was an empty procedure since day 1.
git-svn-id: trunk@29114 -
2014-11-22 20:35:46 +00:00
pierre
72a0dfecf0 Add code to includee new file to handle changing openbsd syscall numbers
git-svn-id: trunk@28830 -
2014-10-15 23:27:59 +00:00
marco
c4d8a4c5f2 * Stat file patches from OpenBSD ports tree.
git-svn-id: trunk@28739 -
2014-10-04 11:25:45 +00:00
marco
bcd13a856d * Some convenience permission constants, patch by Graeme #26373
git-svn-id: trunk@28038 -
2014-06-23 15:35:43 +00:00
sergei
2f8a1706e6 * x86_64-*bsd: cleaned out handwritten assembler threadvar access from syscall code.
git-svn-id: trunk@27793 -
2014-05-15 16:29:50 +00:00
sergei
7e4b98e735 * i386-*bsd: cleaned out handwritten assembler threadvar access from syscall code.
git-svn-id: trunk@27679 -
2014-04-28 06:21:54 +00:00
marco
a818559481 * clocale moved to rtl-extra.
git-svn-id: trunk@27376 -
2014-03-30 15:27:35 +00:00
marco
d6f5ca21b9 * moved units ipc for *BSD, darwin/iphonesim and linux. The others are
makefile cleanups.

git-svn-id: trunk@27373 -
2014-03-30 13:13:13 +00:00
sergei
9801288cdc * Removed SysInitFPU/SysResetFPU from (remaining) system units initialization code. It is redundant there because it is called from fpc_cpuinit, or, in case of i386, from fpc_cpucodeinit.
* It fixes regression of tw16283b after r27169. 
* BeOS, Haiku: added fpc_cpucodeinit to compensate for removal of SysInitFPU, it also enables use of CPU features like SSE.

git-svn-id: trunk@27171 -
2014-03-17 10:53:52 +00:00
pierre
8a0dccf590 NetBSD getcwd system call also returns string length
git-svn-id: trunk@25661 -
2013-10-05 21:23:47 +00:00
Jonas Maebe
81597bf171 * updated address of FSF (mantis #24646, patch by Alexey Svistunov)
git-svn-id: trunk@24986 -
2013-06-27 14:01:18 +00:00
marco
9554eb2b48 * some O_ constants. Patch by Barlone.
git-svn-id: trunk@24536 -
2013-05-20 15:30:40 +00:00
yury
2b2a68446d * Added new unit unixcp. It contains stuff from winiconv.inc - a table to map Windows code page identifiers to locale names on unix. Also GetSystemCodePage function in this unit can be used to detect which code page is used currently.
* Build unixcp for all unix-like systems.
* Use the unixcp unit in cwstring instead of winiconv.inc.
- Deleted winiconv.inc
- Reverted r22410,r22411,r22428. The compiler will use the unixcp unit to get a default code page for ansistrings.

git-svn-id: trunk@23670 -
2013-02-28 18:21:28 +00:00
Jonas Maebe
69c29a415f * pass the procdef to getintparaloc instead of only the proccalloption, so
that the type of the parameters can be determined automatically
   o added compilerproc declarations for all helpers called in the compiler
     via their assembler name, so we can look up the corresponding procdef

git-svn-id: trunk@23325 -
2013-01-06 15:05:40 +00:00
Jonas Maebe
5f3d762788 * when the stack size is overestimated so much that it's larger than the
stack pointer (can happen for externally started threads), truncate it
    to a legal value (should stop crashes when enabling stack checking on
    iOS 6)

git-svn-id: trunk@23320 -
2013-01-06 15:05:16 +00:00
pierre
7457a0f321 Use new getdirentriesi49 syscall, contributed by Pascal Stumpf
git-svn-id: trunk@23223 -
2012-12-26 14:33:30 +00:00
pierre
bba4932ef9 * Fix commit 23220, by moving declaration from syscallh.inc to syscall.inc
git-svn-id: trunk@23221 -
2012-12-25 22:54:49 +00:00
pierre
70a29668a4 Try to fix simply the fpc_threadvar_relocate_proc problem
git-svn-id: trunk@23220 -
2012-12-24 16:23:30 +00:00
paul
d7d8c10aaf bsd: set DefaultSystemCodePage without cwstring.pas
git-svn-id: trunk@22410 -
2012-09-17 02:33:06 +00:00
marco
1a895a875b * move fpgetenv(pchar) to unit system for syscall based *nix rtls.
It was already available for libc based *nix rtls

git-svn-id: trunk@22365 -
2012-09-10 09:21:56 +00:00
Jonas Maebe
c71cb9dc69 * fixed null termination of cmdline (based on patch by C Western,
mantis #22742) -- that function seems like a good candidate to
    put in a shared include file though

git-svn-id: trunk@22270 -
2012-08-30 21:30:31 +00:00
pierre
23f21254bd + Add USE_SIGACTION_SIGTRAMP
git-svn-id: trunk@21027 -
2012-04-24 23:03:08 +00:00
pierre
e3aabfec79 * OpenBSD uses a special sigprocmask syscall
git-svn-id: trunk@20900 -
2012-04-16 15:43:44 +00:00
pierre
2d130d20e7 + Add forward declaration of InstallDefaultSignalHandler for use inside sighnd.inc
git-svn-id: trunk@20782 -
2012-04-11 12:56:11 +00:00
pierre
db3346994c * Use correct sign extension for FPC_DOSYS1w
git-svn-id: trunk@20775 -
2012-04-09 21:57:13 +00:00
pierre
b98529673c Explicitly set fpSigAction return value
git-svn-id: trunk@20774 -
2012-04-09 21:56:02 +00:00
pierre
78e129931b Add NETBSD_USE_STAT30 conditional for recent NetBSD changes, not yet used
git-svn-id: trunk@20741 -
2012-04-07 15:37:03 +00:00
pierre
67bc3c0e0b st_mode is before st_ino for NetBSD in stat record
git-svn-id: trunk@20737 -
2012-04-06 23:55:57 +00:00
pierre
981ec54226 NetBSD code added
git-svn-id: trunk@20338 -
2012-02-13 16:44:23 +00:00
Jonas Maebe
aefe5acd72 - removed "packed" modifiers from record types, the C versions don't have any
__attribute__((__packed__)) either (and {$packrecords c} is always active
    when compiling this file)

git-svn-id: trunk@19612 -
2011-11-08 22:04:36 +00:00
Jonas Maebe
c7d38570fd * fixed file descriptor control and locking flags (patch by Barlone,
bug #20617)

git-svn-id: trunk@19611 -
2011-11-08 21:44:49 +00:00
pierre
3f4dd5ac9b * Fix parameter type for sigsuspend syscall for OpenBSD
git-svn-id: trunk@19609 -
2011-11-08 17:01:02 +00:00
paul
1ccf16358c rtl: init widestring and unitcodestring managers before initialization of Standard IO files (stdin,stdout,stderr)
git-svn-id: trunk@19542 -
2011-10-25 02:29:29 +00:00
pierre
216113e80d Fix compilation error introduced in my last patch for non-openbsd systems
git-svn-id: trunk@19468 -
2011-10-11 23:07:20 +00:00
marco
199f7535b4 * fix pipe call for openbsd. fpmake now seems to work.
git-svn-id: trunk@19440 -
2011-10-09 19:34:21 +00:00
pierre
a6280de177 * Fix getdirentries problem for openbsd
git-svn-id: trunk@19418 -
2011-10-08 16:46:38 +00:00
pierre
03b4681c1b * Rectify position of BirthTime fields in Stat record for openbsd
git-svn-id: trunk@19416 -
2011-10-08 13:01:05 +00:00
pierre
d1b2e2d439 Fix fpgetcwd for openbsd
git-svn-id: trunk@19410 -
2011-10-07 21:51:03 +00:00
pierre
902ba04ecd * Fix stat type for openbsd
git-svn-id: trunk@19409 -
2011-10-07 21:28:08 +00:00
pierre
7f69e6426d * Try to update i386/openbsd port
git-svn-id: trunk@19350 -
2011-10-03 23:22:28 +00:00
pierre
b9009d8c02 * Fix PIC code for BSD x86_64 syscall and x86_64 freebsd startup assembler files
git-svn-id: trunk@19181 -
2011-09-22 21:16:42 +00:00
marco
07fabab526 * fpgetsid, Mantis #20329
git-svn-id: trunk@19178 -
2011-09-22 13:21:38 +00:00
Jonas Maebe
6920c7a0c1 * fixed stat/fstat-related types for iphonesim platform
(mantis #20249)

git-svn-id: trunk@19078 -
2011-09-17 09:31:32 +00:00
pierre
889caf5911 * fix type of fourth parameter of msgrcv function
git-svn-id: trunk@16409 -
2010-11-23 23:44:34 +00:00
pierre
56a35214ad * Avoid warning at compilation
git-svn-id: trunk@15894 -
2010-08-24 14:57:01 +00:00
marco
6cc641c7bb * another fix for mmap from Chrisopher Key. 32-bit this time. Mostly in
unused arguments atm, but could be important for other uses of mmap.

git-svn-id: trunk@15871 -
2010-08-22 09:46:17 +00:00