Commit Graph

29 Commits

Author SHA1 Message Date
Michael VAN CANNEYT
dd46dd133a * string -> shortstring 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
6e9537aeeb * Char -> AnsiChar 2023-07-14 17:26:09 +02:00
florian
7baf2461f0 * check paramstr argument for negative values, resolves #39410 2021-10-20 20:04:32 +02:00
ondrej
1a0ba60de6 * revert r47598: implement TRandomGenerator
git-svn-id: trunk@47605 -
2020-11-27 04:53:06 +00:00
ondrej
c4dd3b661a * rtl: implement TRandomGenerator for thread-safe random
git-svn-id: trunk@47598 -
2020-11-26 05:59:00 +00:00
Károly Balogh
7947f1d7a9 haiku: pass SA_SIGINFO flag to the signal handler. This seems correct ucontext IP and BP register contents, for valid stacktraces on signals
git-svn-id: trunk@40844 -
2019-01-11 19:46:10 +00:00
Károly Balogh
d3c0762af0 haiku: pass the stackpointer from the startup code. this adjust stacktop to be closer to the actual stacktop, and fixes shallow stacktraces
git-svn-id: trunk@40843 -
2019-01-11 19:40:08 +00:00
Károly Balogh
66dc27d6b6 haiku: cleaned up the decade old leftovers from 1.x and early 2.x times from system unit, mainly old bits of heap management no longer in use, old defines and workarounds, also added a copyright header.
git-svn-id: trunk@40822 -
2019-01-10 03:45:25 +00:00
Károly Balogh
9ce876e2ae haiku: move i386 also to internal sysinit
git-svn-id: trunk@40791 -
2019-01-07 12:58:02 +00:00
Károly Balogh
634503591b haiku: code cleanup, fixed off-by-one buffer size and removed 'packed' for the TAlternateSignalStack
git-svn-id: trunk@40763 -
2019-01-04 05:10:50 +00:00
Károly Balogh
3508ad0d20 haiku: properly pass on the exitcode to the haltproc on x86_64
git-svn-id: trunk@40760 -
2019-01-04 04:08:00 +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
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
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
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
paul
88a10330c2 rtl: initialize DefaultSystemCodePage on aix,beos,haiku,solaris
git-svn-id: trunk@22428 -
2012-09-21 01:45:18 +00:00
olivier
caf8913ad8 * Some more signal tuning. Supporting SA_SIGINFO would require changing
types in SignalToRunError. I keep the old thing for now. This help pass 
   a few more tests that need proper support for floating point exceptions.

git-svn-id: trunk@20702 -
2012-04-03 23:59:50 +00:00
olivier
8c7d54de5c * Better signal configuration to handle correctly a second exception
like in test texception10.pp.

git-svn-id: trunk@20690 -
2012-04-02 01:06:09 +00:00
olivier
76602008b5 * Updated haiku signal definitions to reflect changes made in Haiku
after alpha release 3.

git-svn-id: trunk@20683 -
2012-04-01 08:03:12 +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
olivier
16de86ef7c - Remove unnecessary call to SysInitStdIO probably added here by me for debugging purpose long time ago. The right one is a few line below.
git-svn-id: trunk@15098 -
2010-03-30 20:06:52 +00:00
olivier
0223697b17 The unit name should start with an upper case to pass tobject5.pp test under Haiku.
git-svn-id: trunk@15034 -
2010-03-23 00:21:55 +00:00
olivier
b17c3bb282 Fix the build under Haiku :
- fix signal handling
 - remove unneeded reference to BeOS in Makefile.fpc
 - updated stat definition to reflect a recent change in Haiku 

git-svn-id: trunk@13408 -
2009-07-19 01:24:46 +00:00
Jonas Maebe
f6d452c2c0 * remove the RTL's installed signal handlers at the end of the system
unit's initialization code in case we're in a library
  + implemented InquireSignal(), AbandonSignalHandler(), HookSignal() and
    UnhookSignal() in the sysutils unit
  * for Kylix compatibility, these routines support operating on
    SIGINT and SIGQUIT as well, although they are not hooked by default
    by FPC. The run time errors/exception codes for these signals are
    resp. 217 and 233 (same as in Kylix; I changed ENoWideStringSupport
    to 234).
  * changed the BSD syscall version of fpsigaction to use pointer
    rather than "var" arguments (compatible with other targets, and
    required to be able to pass nil arguments inside the system unit)
  -> together fixes mantis #12704

git-svn-id: trunk@13077 -
2009-05-02 09:40:44 +00:00
Jonas Maebe
1f6ec36064 * save/restore errno inside reenable_signal, because it can be called
from inside signal handlers

git-svn-id: trunk@12997 -
2009-04-04 09:59:41 +00:00
florian
c127154efa o Haiku patches by Olivier Coursiere
+ add posix thread support
  * improve signal handling
  * synchronize haiku's baseunix unit with the unix one (maybe it will be possible to remove Haiku's one in a future patch, but i keep it for now)
  + add support for standard sockets
  * fix some functions import to use the right libraries under Haiku
  * fix packages compilation

git-svn-id: trunk@12636 -
2009-02-01 10:30:55 +00:00
Jonas Maebe
d4d7b695c7 - removed all "islibrary:=false;" assignments from system unit
initialisation code, because that's a typed constant already initialised
    to that value and it interferes with a generic solution to set islibrary
    to true for libraries

git-svn-id: trunk@12376 -
2008-12-17 17:48:04 +00:00
florian
f97c2968f9 * fixed widestring/unicodemanager initialisiation
git-svn-id: trunk@11743 -
2008-09-10 21:02:50 +00:00
florian
35c0f78642 + Haiku support by Olivier Coursière based on old BeOS support
git-svn-id: trunk@11014 -
2008-05-19 17:33:35 +00:00