Commit Graph

13489 Commits

Author SHA1 Message Date
marco
d80d564a20 * realgetwindowclass, mantis 035551
git-svn-id: trunk@42028 -
2019-05-10 15:11:48 +00:00
marco
d942509db4 * add getshellwindow, by 440bx mantis 035548
git-svn-id: trunk@42027 -
2019-05-10 14:56:09 +00:00
pierre
83d72bdf19 Use TIOCtlRequest type for local variable nr inside TCSetAttr function
git-svn-id: trunk@42024 -
2019-05-10 07:23:31 +00:00
pierre
ebf2e277ab Update syscall number for sparc and sparc64 based on results from unix/scripts/check_sys.sh
git-svn-id: trunk@42019 -
2019-05-07 11:26:44 +00:00
pierre
a7a67f3d3c * Improve handling of command line args setting variables (did not work if it contained spaces)
+ Group all recognized macros into list_defines in preproc.awk file
  + Convert Pascal style hexadecimal constants into C style

git-svn-id: trunk@42018 -
2019-05-07 08:13:38 +00:00
pierre
0a3a35152d Also remove -m32 option for arm native GNU C compiler
git-svn-id: trunk@42017 -
2019-05-06 22:07:49 +00:00
pierre
fae45b2075 Add first linux RTL compliance test file t_linux.h2paschk
git-svn-id: trunk@42016 -
2019-05-06 21:13:42 +00:00
pierre
12647c348e Add script to use h2paschk on t_OS.h2paschk file for rtl tests for system header compliance
git-svn-id: trunk@42015 -
2019-05-06 21:10:12 +00:00
pierre
cb4b085a99 * Also allow '-' in include file names
+ Add os_cpu and cpu_source variables
  * Cope with aarch64 GNU C compiler that does not support -m64 option
  + Add support for arm test on aarch64 machine
  * Better accept expressions instead of constants in C #define

git-svn-id: trunk@42014 -
2019-05-06 21:08:47 +00:00
marco
eae156d07e * fix for mantis 035530 by 440bx, process_ and thread_ constants.
git-svn-id: trunk@42013 -
2019-05-06 15:48:11 +00:00
pierre
1e4442f1fa Add more system header constants
git-svn-id: trunk@42010 -
2019-05-06 13:25:56 +00:00
marco
caa5e54b00 * add openthread, mantis 035529 by 440bx
git-svn-id: trunk@42008 -
2019-05-06 11:33:40 +00:00
Jonas Maebe
3a1fb45315 * synchronised with trunk till r41976
git-svn-id: branches/debug_eh@41977 -
2019-05-02 19:44:41 +00:00
pierre
ae5a9e033a Add flags field to TStatfs record
git-svn-id: trunk@41973 -
2019-05-02 12:59:11 +00:00
pierre
ce1ba76ce5 Add st_ctime_nsec field for stat powerpc record
git-svn-id: trunk@41972 -
2019-05-02 12:57:51 +00:00
pierre
0690df1733 Update syscall numbers for powerpc-linux and powerpc64-linux
git-svn-id: trunk@41971 -
2019-05-02 12:56:56 +00:00
pierre
0100c4abf8 More improvements to script testing syscall numbers
git-svn-id: trunk@41970 -
2019-05-02 12:55:51 +00:00
pierre
5f4a0c7af7 * freebsd and openbsd also use sys/syscall.h header
+ Add AWK parser to removed parts of source not concerning current CPU
    (only handles CPUXXX like CPUI386)

git-svn-id: trunk@41969 -
2019-05-01 22:00:06 +00:00
pierre
429bd929e8 Update dev_t, ino_t and nlink_t types to cunit64
git-svn-id: trunk@41968 -
2019-05-01 16:04:38 +00:00
pierre
5fb61dc386 FreeBSD fixes for stat and dirent records
git-svn-id: trunk@41967 -
2019-05-01 15:59:52 +00:00
pierre
6f7d2a798c Change ssize_t type to clong and specify pthread_once_t_rec record
git-svn-id: trunk@41966 -
2019-05-01 14:51:20 +00:00
pierre
5c7adf9af3 Add simple types and some constants
git-svn-id: trunk@41965 -
2019-05-01 14:49:14 +00:00
pierre
819752c334 Avoid warnings when -v0 is used by using $push/$pop
git-svn-id: trunk@41960 -
2019-04-29 14:19:16 +00:00
michael
a254a49e84 * Patch from Ondrej Pokorny to fix bug ID : #32961 reflect system code page change in TEncoding
git-svn-id: trunk@41951 -
2019-04-28 09:02:41 +00:00
pierre
a06e5d0fe9 Comment out ports, doscalls, crt printer and graph rules completely to avoid multiple calls to compiler for same unit
git-svn-id: trunk@41949 -
2019-04-28 05:48:27 +00:00
svenbarth
b7a716cd81 * correct return a pointer to the list so that List^[x] works as it did before 3.2
+ added test

git-svn-id: trunk@41938 -
2019-04-26 08:13:11 +00:00
pierre
639adc314f Eliminate wrong line (bug report 35441)
git-svn-id: trunk@41934 -
2019-04-25 13:04:39 +00:00
marco
8a23e813ca * GetPhysicallyInstalledSystemMemory mantis 035439 by 440bx
git-svn-id: trunk@41930 -
2019-04-25 09:06:23 +00:00
pierre
66401652fd * Update syscall list for i386 and x86_64 cpus,
based on values found on gcc121 machine,
     CentOS Linux release 7.6.1810 (Core)
   * Commented out values not accepted by GNU C compiler.
     For i386: madvise1(219), security(223),set_zone_reclaim(251)
     New last number: 382(pkey_free).
     For x86_64: 331(pkey_free).

git-svn-id: trunk@41929 -
2019-04-25 06:23:37 +00:00
pierre
a83bc62639 Improve syscall number testing script:
+ Add support for parameters:
    -v sets verbose variable to 1
    VAR=value gets evaluated.
  * moves to rtl/$os if called at diferent level.
  + check if there is a incude directive in sysnr.inc file.
  + Add compilation of C source code with the C variant of the syscall number.
  + Support 32 and 64-bit version of C compilation for systems
    allowing 32 and 64-bit executable (like x86_64-linux).
  + Add 'preprocessing' using AWK to test {$ifdef CPUXXX} macro.
  + Add summary at end of script.
  * Rename check_syscall_number to check_c_syscall_from_fpc_rtl
  * Rename check_syscall_number_reverse to check_c_syscall_in_fpc_rtl
  * Try to remove most intermediate files.
  + Generate add_missing_syscalls.inc file if numbers are missing.

git-svn-id: trunk@41928 -
2019-04-25 06:10:43 +00:00
marco
982bef0ed8 * iswow64present and enable*fsredirection with a byte as param because the BOOLEAN type is a byte according to MSDN. Mantis 035429
git-svn-id: trunk@41926 -
2019-04-23 07:50:12 +00:00
marco
573666405d * wow64 related functions from mantis 034328
git-svn-id: trunk@41925 -
2019-04-22 19:51:41 +00:00
marco
75cdae9836 * add uint typecast to some negative message numbers Mantis 035324
git-svn-id: trunk@41922 -
2019-04-22 09:42:44 +00:00
marco
febb1aab0b * IsDebuggerPresent, bug #35422
git-svn-id: trunk@41921 -
2019-04-21 18:12:57 +00:00
marco
7acd242683 * PROCESS_QUERY_LIMITED_INFORMATION, mantis 35423
git-svn-id: trunk@41920 -
2019-04-21 18:10:12 +00:00
marco
afa6aaab95 * PROCESS_NAME_NATIVE constant
git-svn-id: trunk@41919 -
2019-04-21 18:06:09 +00:00
marco
6559033d2d * QueryFullProcessImageName
git-svn-id: trunk@41918 -
2019-04-21 18:00:24 +00:00
Jonas Maebe
128bf046b4 * regenerated Makefiles with LLVM bitcode installation support
git-svn-id: branches/debug_eh@41914 -
2019-04-20 18:56:45 +00:00
Jonas Maebe
2923e484fd * synchronised with trunk till r41907
git-svn-id: branches/debug_eh@41908 -
2019-04-20 18:22:52 +00:00
Jeppe Johansen
12879adc2f - Adds intrinsics to save/restore SREG when disabling interrupts.
- Adds nostackframe to stack frame investigation stubs.

git-svn-id: trunk@41898 -
2019-04-18 18:26:51 +00:00
marco
28c15a95d5 * Mantis 35257 modifyworldtransform, defined with var parameter could also take NIL. Split into straight pointer + redef var overload.
git-svn-id: trunk@41893 -
2019-04-18 09:00:42 +00:00
marco
07c21e5128 * and the setters.
git-svn-id: trunk@41892 -
2019-04-17 16:01:50 +00:00
marco
e9c2f46172 * fix mantis 35368 and mantis 35369
git-svn-id: trunk@41891 -
2019-04-17 15:57:05 +00:00
Jonas Maebe
a0f850d57f * synchronised with trunk till r41885
git-svn-id: branches/debug_eh@41886 -
2019-04-16 16:20:44 +00:00
pierre
7b3e027dc8 Move update of fields counting allocated memory to after SysGetMem call
git-svn-id: trunk@41882 -
2019-04-16 15:05:13 +00:00
svenbarth
9d10f21b07 * applied patch by Thaddy de Koning to fix Mantis #35378: correctly declare TNativeIntHelper.MinValue
git-svn-id: trunk@41881 -
2019-04-16 09:24:05 +00:00
nickysn
e2a139ee19 * updated the openbsd tstatfs structure to be compatible with the currently
supported openbsd versions (6.3 and 6.4)

git-svn-id: trunk@41878 -
2019-04-15 17:11:13 +00:00
nickysn
924b4c6f10 + more structures added to the openbsd structure checker file: utimbuf, flock,
tms, timezone, rusage, TRLimit and iovec

git-svn-id: trunk@41877 -
2019-04-15 15:02:24 +00:00
nickysn
f6e13c50a9 + added pollfd to the openbsd structure checker file
git-svn-id: trunk@41875 -
2019-04-15 14:33:33 +00:00
nickysn
9b7cbb0e0b + added OpenBSD RTL structure checker description file for use with the h2paschk
tool. Currently only checks the stat and dirent structures, but more will be
  added in the future.

git-svn-id: trunk@41874 -
2019-04-15 14:22:44 +00:00
Jeppe Johansen
53542b7c5e - Port RISC-V64 startup code to native inline routines.
git-svn-id: trunk@41871 -
2019-04-14 23:36:08 +00:00
Jonas Maebe
a7bd37d17a * synchronised with trunk till r40776
git-svn-id: branches/debug_eh@41867 -
2019-04-13 15:16:09 +00:00
marco
0d87116b81 * add MB_CANCELTRYCONTINUE and MB*MASK constants. mantis 35244
git-svn-id: trunk@41861 -
2019-04-11 08:11:31 +00:00
marco
8564fe7f24 * add readdirectorychangedw (only -W function) mantis 35311
git-svn-id: trunk@41857 -
2019-04-10 14:48:27 +00:00
marco
d5f2764dd3 * readd bottomleft #35350
git-svn-id: trunk@41854 -
2019-04-09 13:21:17 +00:00
michael
27894ebe68 * Patch from Serge Anvarov to improve TStrings.GetNextLine and TStrings.GetNextLineBreak (bug ID 35331)
git-svn-id: trunk@41853 -
2019-04-09 11:35:56 +00:00
michael
08d6b446f0 * Fix bug ID #35345, allow tstrings.text to exceed 2Gb
git-svn-id: trunk@41852 -
2019-04-09 11:16:56 +00:00
michael
cae2c94e90 * Patch from Ondrej Pokorny to let AddStrings call beginupdate/endupdate under all circumstances (bug ID 35341)
git-svn-id: trunk@41849 -
2019-04-08 07:51:19 +00:00
marco
162bd5e251 * metrics constants by Gareth and 440bx. Added SM_CARETBLINKINGENABLED for good measure.
git-svn-id: trunk@41845 -
2019-04-06 14:57:50 +00:00
nickysn
d25e7b1074 * separated the OpenBSD version of the stat structure to a separate ifdef block.
* Fixed some incompatibilities in the OpenBSD stat structure - removed st_lspare
  and changed the type of st_blksize to cint32 instead of cuint32.

git-svn-id: trunk@41827 -
2019-04-04 15:55:16 +00:00
nickysn
122888741c + added some comments to the else/endif directives to make it easier to figure
out their corresponding ifdef

git-svn-id: trunk@41826 -
2019-04-04 14:52:28 +00:00
pierre
df2cefdc32 Fix OpenBSD rtl compilation when using -dFPC_USE_LIBC option
git-svn-id: trunk@41821 -
2019-04-03 06:59:26 +00:00
nickysn
46b98a6da4 * Improvements to the implementation of FpOpenDir for *BSD:
* use FpFStat instead of FpStat to avoid a race condition, where the directory
    path could change between the calls of FpOpen and FpStat
  * improved cleanup (i.e. call FpClose, free allocated memory to avoid
    memleaks) in case of errors

git-svn-id: trunk@41820 -
2019-04-02 17:44:23 +00:00
michael
e3973e9c4e * Fix bug #35305, lazy instantiation of class alias list. Patch from Ondrej Pokorny
git-svn-id: trunk@41819 -
2019-04-01 17:31:20 +00:00
michael
60606e61ef * Patch from Ondrej Pokorny to make RegisterClassAlias thread-safe
git-svn-id: trunk@41818 -
2019-04-01 17:25:29 +00:00
michael
1951aff5a4 * Fix formatfloat in case E not followed by +/- (bug id 35297)
git-svn-id: trunk@41803 -
2019-03-30 15:47:50 +00:00
michael
2669b68e6d * Added move on TCollection (bug ID 32673)
git-svn-id: trunk@41795 -
2019-03-26 07:03:24 +00:00
nickysn
28bb38cc12 - removed syscall_nr_getdirentries from the OpenBSD rtl, since this syscall is no longer
supported by OpenBSD and shouldn't be used at all

git-svn-id: trunk@41791 -
2019-03-24 16:51:05 +00:00
nickysn
aa3d13dd4a - removed the FPC_USE_GETDIRENTRIES_SYSCALL define and use_getdirentries_syscall
global variable, they are compatibility flags of a no longer supported OpenBSD version

git-svn-id: trunk@41790 -
2019-03-24 16:30:50 +00:00
nickysn
ede50a2c4f - get rid of the FPC_USE_GETDIRENTRIES_I49_SYSCALL define and the
use_openbsd_getdirentries_49 global variable - both are compatibility features
  for a no longer supported OpenBSD version

git-svn-id: trunk@41789 -
2019-03-24 16:12:30 +00:00
nickysn
9a18543324 * cleaned up most of the obsolete OpenBSD syscall numbers
git-svn-id: trunk@41783 -
2019-03-23 20:35:03 +00:00
nickysn
dab661cfc6 * switch syscall_nr_kill on OpenBSD to be using the 5.9+ syscall version
git-svn-id: trunk@41781 -
2019-03-23 04:23:15 +00:00
nickysn
41c753d7e7 * updated OpenBSD syscall numbers to version 6.4
git-svn-id: trunk@41780 -
2019-03-23 04:20:55 +00:00
nickysn
b32e54152a * updated OpenBSD syscall numbers to version 6.3
git-svn-id: trunk@41779 -
2019-03-23 04:19:07 +00:00
nickysn
89a40d5cf9 * updated OpenBSD syscall numbers for version 6.2
git-svn-id: trunk@41778 -
2019-03-23 04:17:35 +00:00
nickysn
14701521a1 * updated OpenBSD syscalls for version 6.1
git-svn-id: trunk@41777 -
2019-03-23 04:14:11 +00:00
nickysn
475ecdb2dc * updated OpenBSD syscall numbers to version 6.0
git-svn-id: trunk@41776 -
2019-03-23 04:12:51 +00:00
nickysn
72aec7c072 * updated OpenBSD syscall numbers to version 5.9
git-svn-id: trunk@41775 -
2019-03-23 04:06:14 +00:00
nickysn
259e3f9f63 * updated OpenBSD syscall numbers for OpenBSD 5.8
git-svn-id: trunk@41774 -
2019-03-23 03:55:47 +00:00
nickysn
828da99388 * updated syscall numbers for OpenBSD 5.7
git-svn-id: trunk@41773 -
2019-03-23 01:54:20 +00:00
nickysn
cee76bda5c + added comments about some retired syscall numbers, with the last supported
version. This is checked against OpenBSD versions 2.0 to 5.6, like the comment
  in the beginning of the file says (and the ones in this commit were missed).

git-svn-id: trunk@41772 -
2019-03-23 01:46:21 +00:00
nickysn
04ee584a7d - removed FPC 1.0.x bootstrapping compatibility ifdef from OpenBSD RTL Makefile
git-svn-id: trunk@41769 -
2019-03-22 17:35:35 +00:00
nickysn
6dec9ae064 + added some missing cdecl declarations to the OpenBSD startup code
git-svn-id: trunk@41766 -
2019-03-22 01:22:16 +00:00
nickysn
b6d2ef12ad - removed OpenBSD loaders that are not needed for bootstrapping with FPC 3.0.4
git-svn-id: trunk@41765 -
2019-03-22 01:08:37 +00:00
nickysn
516438fd19 * converted the i386 OpenBSD startup code to Pascal
git-svn-id: trunk@41764 -
2019-03-22 00:54:01 +00:00
nickysn
b4baba3454 * fixed the haltproc for shared libs
git-svn-id: trunk@41763 -
2019-03-21 23:37:47 +00:00
nickysn
01669ebf70 * use the actual _haltproc procedure, defined in the startup code on OpenBSD
* fixed the x86_64 syscall invocation in the OpenBSD _haltproc

git-svn-id: trunk@41762 -
2019-03-21 18:16:23 +00:00
nickysn
7638a9b7e1 - removed commented out gprof code from si_c.inc
git-svn-id: trunk@41761 -
2019-03-21 17:37:37 +00:00
nickysn
1f9b5d143e * call _monstartup instead of monstartup
git-svn-id: trunk@41758 -
2019-03-21 13:28:18 +00:00
nickysn
e4ffeb2266 + added OpenBSD startup units for gprof support
git-svn-id: trunk@41757 -
2019-03-21 12:52:25 +00:00
nickysn
bb911e2f01 - unused local variable removed
git-svn-id: trunk@41754 -
2019-03-20 16:26:38 +00:00
nickysn
f15c2db4b2 * moved some C type declarations to si_intf.inc
git-svn-id: trunk@41753 -
2019-03-20 16:23:34 +00:00
nickysn
fb3d287971 * fixed OpenBSD shared library initialization
git-svn-id: trunk@41752 -
2019-03-20 16:09:07 +00:00
nickysn
52a5669117 + enable weak externals for OpenBSD
* converted the reference to _init in si_dll to be a weak external. This way we
  can support creating shared libraries that link to the C library as well as
  libraries that do not. If libc was linked, the compiler will link in
  crtbeginS.o and crtendS.o; _init is defined in crtbeginS.o and initializes the
  C library and calls all the C static constructors.

git-svn-id: trunk@41751 -
2019-03-20 15:13:47 +00:00
nickysn
aad032f133 * converted _FPC_proc___start in OpenBSD's si_dll.inc to pascal
git-svn-id: trunk@41750 -
2019-03-20 14:55:35 +00:00
nickysn
fb793ff251 - comment out more unused gprof code
git-svn-id: trunk@41746 -
2019-03-19 18:32:54 +00:00
nickysn
2960399f9a * call c_exit directly in case PASCALMAIN finishes, to avoid inline asm entirely
in the _FPC_proc___start routine in the libc version of the OpenBSD startup
  code for x86_64

git-svn-id: trunk@41745 -
2019-03-19 18:28:20 +00:00
nickysn
4715ad605b - don't export the ___start symbol in the OpenBSD startup code
git-svn-id: trunk@41744 -
2019-03-19 17:40:46 +00:00
nickysn
144f31c94f * call the exit() routine from the C libraries in the FPC haltproc on OpenBSD
x86_64, libc startup code

git-svn-id: trunk@41743 -
2019-03-19 17:27:11 +00:00
nickysn
094ad635f7 - don't call monstartup, because that initializes the gprof profiler and should
only be called for programs, compiled with -pg (which is not yet implemented
  for the OpenBSD target and which will use a different sysinit unit for such
  programs, when implemented)

git-svn-id: trunk@41741 -
2019-03-19 16:51:04 +00:00
nickysn
34a8032e11 * link to crtbegin.o/crtend.o instead of crtbeginS.o/crtendS.o when creating
normal OpenBSD programs (not shared libraries) that link to the C library,
  even when PIC code generation has been turned on. This is what gcc and clang
  do on this platform.

git-svn-id: trunk@41740 -
2019-03-19 16:36:38 +00:00
nickysn
d1a91a380b * the OpenBSD x86_64 C library startup code converted to Pascal
git-svn-id: trunk@41739 -
2019-03-19 14:58:46 +00:00
nickysn
76623648e4 * updated the declarations to externals in the C library in the OpenBSD startup
code si_c.inc, in preparation to converting the startup procedure to Pascal

git-svn-id: trunk@41738 -
2019-03-19 14:42:31 +00:00
nickysn
cf2aa6fdb7 * slight change to the OpenBSD startup code, to allow Low(__progname_storage)<>0
(not that it's going to be changed that way, but it doesn't hurt for the code
  to be more robust; and it doesn't affect performance, since the compiler
  optimizes x-0 to x)

git-svn-id: trunk@41737 -
2019-03-19 13:34:42 +00:00
nickysn
60d21cc041 * converted _FPC_proc___start in the OpenBSD x86_64 nonlibc startup code to Pascal
git-svn-id: trunk@41736 -
2019-03-18 19:08:22 +00:00
nickysn
b56c181500 + added comments with the parameters of _FPC_proc___start in the OpenBSD x86_64 startup code
git-svn-id: trunk@41735 -
2019-03-18 18:31:32 +00:00
nickysn
7e24c07690 + added comment for the parameter, containing the environment
git-svn-id: trunk@41734 -
2019-03-18 18:14:11 +00:00
nickysn
66744f2f1e * _strrchr in the OpenBSD x86_64 startup code converted to Pascal
git-svn-id: trunk@41733 -
2019-03-18 17:28:46 +00:00
Jonas Maebe
3b254affb7 * support for the individual alignment flags for the memcpy intrinsic of
LLVM 7.0

git-svn-id: branches/debug_eh@41728 -
2019-03-17 15:28:23 +00:00
Jonas Maebe
dc2cbf8018 * synchronised with trunk till r41725
git-svn-id: branches/debug_eh@41726 -
2019-03-17 15:25:31 +00:00
pierre
74fed2a4cd Regenerate Makefile's after fpcmake change in commit #41721
git-svn-id: trunk@41723 -
2019-03-17 14:45:03 +00:00
nickysn
df11fcc9e3 * compilation fix for i386-openbsd
git-svn-id: trunk@41711 -
2019-03-15 13:46:58 +00:00
nickysn
d8f79c7363 * converted the openbsd_ident.as loader to pascal
git-svn-id: trunk@41710 -
2019-03-15 13:35:10 +00:00
nickysn
ea5168aa16 * ported dllprt0.as for OpenBSD x86_64 to inline asm in si_dll.inc
git-svn-id: trunk@41708 -
2019-03-14 22:53:22 +00:00
nickysn
19e1336043 * fixed the _eprol and _etext references in si_c.inc for OpenBSD x86_64
git-svn-id: trunk@41706 -
2019-03-14 21:44:39 +00:00
nickysn
c856879c96 * ported OpenBSD's x86_64 cprt0.as to inline asm in si_c.inc
git-svn-id: trunk@41705 -
2019-03-14 21:13:17 +00:00
nickysn
52c53f0d18 + include si_impl.inc in si_c.pp and si_dll.pp
git-svn-id: trunk@41704 -
2019-03-14 20:39:22 +00:00
nickysn
e93a3b5bf4 + link the openbsd_ident module in the SysInit units
git-svn-id: trunk@41703 -
2019-03-14 18:10:37 +00:00
nickysn
16abd6aa13 + added loader openbsd_ident.as, containing only the .note.openbsd.ident
section, required by OpenBSD to identify the ELF binary as OpenBSD-native

git-svn-id: trunk@41702 -
2019-03-14 18:06:24 +00:00
nickysn
29557b97fb * fixed error, caused by double definition of operatingsystem_result
git-svn-id: trunk@41701 -
2019-03-14 17:33:44 +00:00
nickysn
f1a7e2cdc5 * translated prt0.as from the OpenBSD x86_64 startup code to pascal inline asm; the code compiles, but is not used yet
git-svn-id: trunk@41695 -
2019-03-14 15:37:02 +00:00
nickysn
2dbd1b2780 + enabled compilation of the new (not yet finished) openbsd start code units in the makefile
git-svn-id: trunk@41693 -
2019-03-13 16:03:52 +00:00
nickysn
df21e3a3bc + initial (only a stub for now) implementation of pascal-based startup code units for OpenBSD
git-svn-id: trunk@41692 -
2019-03-13 15:59:36 +00:00
nickysn
d65d1d17e5 * yet another PIC fix in cprt0 for i386-openbsd
git-svn-id: trunk@41687 -
2019-03-12 16:00:12 +00:00
nickysn
5f47b0877a * PIC fixes in cprt0 for i386-openbsd
git-svn-id: trunk@41686 -
2019-03-12 14:56:27 +00:00
nickysn
86d8e3d5cf * more PIC fixes in i386 OpenBSD's startup code. prt0.as is now completely PIC
git-svn-id: trunk@41685 -
2019-03-12 13:55:54 +00:00
nickysn
bfe148cfef * more PIC fixes in the i386 OpenBSD startup code
git-svn-id: trunk@41683 -
2019-03-12 01:58:11 +00:00
nickysn
9c3d7df289 * partial PIC conversion of the i386 OpenBSD startup code
git-svn-id: trunk@41682 -
2019-03-12 01:33:06 +00:00
nickysn
387b966b1b * OpenBSD termios interface updates
git-svn-id: trunk@41677 -
2019-03-11 16:53:00 +00:00
nickysn
b5f7a01804 * more PIC fixes in OpenBSD's x86_64 cprt0.as
git-svn-id: trunk@41671 -
2019-03-10 16:53:47 +00:00
nickysn
cfa9410b56 * more PIC fixes in OpenBSD's x86_64 cprt0.as
git-svn-id: trunk@41670 -
2019-03-10 16:20:33 +00:00
nickysn
b05b43fe35 * some PIC fixes in OpenBSD x86_64 cprt0.as
* use the correct section type for .eh_frame

git-svn-id: trunk@41669 -
2019-03-10 16:08:46 +00:00
nickysn
9fc701c75e * changed the type of the .eh_frame section to 'unwind'
git-svn-id: trunk@41660 -
2019-03-09 18:30:31 +00:00
nickysn
6713f943c2 * use PIC in the eh_frame section as well
git-svn-id: trunk@41659 -
2019-03-09 17:48:28 +00:00
nickysn
692a3fe3e4 * fixed bug, due to a typo in the previous commit
git-svn-id: trunk@41654 -
2019-03-09 16:58:25 +00:00
nickysn
2771e8c717 * PIC fixes in OpenBSD's prt0.as for x86_64
git-svn-id: trunk@41653 -
2019-03-09 16:54:39 +00:00
nickysn
f7ee1a1da9 - removed duplicated ".note.openbsd.ident" sections, committed erroneously in r41645
git-svn-id: trunk@41649 -
2019-03-09 15:40:34 +00:00
nickysn
85981b0a32 * applied all the OpenBSD startup code patches from the OpenBSD ports tree
git-svn-id: trunk@41645 -
2019-03-09 14:33:25 +00:00
nickysn
7b00c732b8 * Adjust for OpenBSD struct changes in the 'dir' structure. Based on OpenBSD
ports patch patch-fpcsrc_rtl_bsd_ostypes_inc

git-svn-id: trunk@41643 -
2019-03-08 16:26:40 +00:00
nickysn
2564588bf7 * Adjust for OpenBSD struct changes in the 'dirent' structure. Based on OpenBSD
ports patch patch-fpcsrc_rtl_bsd_ostypes_inc

git-svn-id: trunk@41642 -
2019-03-08 16:22:53 +00:00
nickysn
c183b49125 * refactored the ifdefs around the dirent structure
git-svn-id: trunk@41641 -
2019-03-08 16:18:17 +00:00
nickysn
d9509a22ad * Adjust for OpenBSD struct changes in the 'stat' structure. Based on OpenBSD
ports patch patch-fpcsrc_rtl_bsd_ostypes_inc

git-svn-id: trunk@41640 -
2019-03-08 16:14:40 +00:00
svenbarth
a735dc28ae * fix for Mantis #35204: TThreadID is a DWord even on Windows 64-bit, so declare it accordingly
git-svn-id: trunk@41636 -
2019-03-08 14:47:25 +00:00
svenbarth
9ddf90b059 + fix for Mantis #35203: add TLS_OUT_OF_INDEXES constant to Windows unit
git-svn-id: trunk@41635 -
2019-03-08 14:47:22 +00:00
Károly Balogh
bda626d450 amicommon: add some naive RTLEventWaitFor implementation, add long standing tthread.inc patch by Sven. Synchronize/CheckSynchronize should now work on Amiga
git-svn-id: trunk@41584 -
2019-03-04 01:43:42 +00:00
svenbarth
07b1a3d211 * adjust signature of variant managers olevarfromint so that 64-bit values can be passed as well (as was probably intended originally)
git-svn-id: trunk@41570 -
2019-03-03 14:50:05 +00:00
florian
21860480ad * use trampoline on x86-64/linux to convert signals properly in exceptions for psabieh
git-svn-id: branches/debug_eh@41566 -
2019-03-02 23:05:26 +00:00
florian
b8b3a5b523 * cosmetics
git-svn-id: branches/debug_eh@41565 -
2019-03-02 23:04:23 +00:00
marco
12e98d891a * GetComputerNameEx/A/W Mantis #35115
git-svn-id: trunk@41562 -
2019-03-02 21:09:18 +00:00
marco
474ecfba3a * fix for #35119 geterrormode declaration by 440bx.
git-svn-id: trunk@41560 -
2019-03-02 18:24:42 +00:00
marco
a5ce9a9ab6 * fix for #35111 EnumTimeFormatsEx. Prepared by 440bx
git-svn-id: trunk@41559 -
2019-03-02 18:22:01 +00:00
marco
eb5aa0f8cf * add missing file_attribute constants, mantis #35120
git-svn-id: trunk@41556 -
2019-03-02 14:46:27 +00:00
marco
980d812ca4 * Fix for #35146 getfullpathname.
* asc* uni* versions become pointer variants.
 * delphi overloads move to redef. 
 * remove old comment (<2005) from redef. Possible related to constness. (LPCSTR vs LPSTR)
 * also added $ifdef unicode version. Most redefs don't. 

git-svn-id: trunk@41555 -
2019-03-02 14:35:33 +00:00
michael
905ccf9363 * Make FreeEncodings protected: they cannot be public, as it causes AVs (see bug ID #34856)
git-svn-id: trunk@41547 -
2019-03-02 10:42:19 +00:00
Jonas Maebe
50c82b6468 * synchronised with trunk till r41537
git-svn-id: branches/debug_eh@41538 -
2019-03-01 16:20:22 +00:00
florian
0657ce7c02 * get rid of fpc_Resume
git-svn-id: branches/debug_eh@41476 -
2019-02-25 21:43:56 +00:00
florian
6b34e511a0 - removed cdecl from FPC_psabi_begin_catch
git-svn-id: branches/debug_eh@41475 -
2019-02-25 21:25:22 +00:00
yury
ab92dcd162 * android: Mask SSE exceptions for i386 too.
git-svn-id: trunk@41459 -
2019-02-25 13:15:17 +00:00
florian
62f890efa3 * improved floating point signal handling on x86/linux
git-svn-id: branches/debug_eh@41451 -
2019-02-24 20:03:02 +00:00
Jonas Maebe
a079e5fa80 * synchronised with trunk till r41449
git-svn-id: branches/debug_eh@41450 -
2019-02-24 20:01:53 +00:00
florian
74275a9173 * in ISO mode, f^ is undefined after Rewrite
git-svn-id: trunk@41429 -
2019-02-24 10:32:59 +00:00
Jonas Maebe
ac883969a9 * synchronised with trunk till r41423
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
5cb5b10f8d * fixed LLVM and non-i386 compilation
git-svn-id: branches/debug_eh@41423 -
2019-02-23 17:03:42 +00:00
florian
8db9b211d5 * fixed unwinding from signal handlers, the approach used now is very simple and clean
git-svn-id: branches/debug_eh@41414 -
2019-02-22 22:01:45 +00:00
yury
ad6642edc0 * android: Fixed stdio redirection for threads.
git-svn-id: trunk@41400 -
2019-02-20 15:11:45 +00:00
florian
b1cc02e417 * reraise has to reset the ref. count to 0
git-svn-id: branches/debug_eh@41383 -
2019-02-19 22:17:27 +00:00
florian
9e67e7311a * change the exception address is only useful if a valid frame is passed
git-svn-id: branches/debug_eh@41377 -
2019-02-18 22:04:08 +00:00
florian
0e25d6f00d * better debug messages
+ initial approach to handle addr and frame

git-svn-id: branches/debug_eh@41368 -
2019-02-17 21:45:18 +00:00
michael
541bf05b94 * Add overloaded version of AssignFile with codepage. See bug ID #34889
git-svn-id: trunk@41342 -
2019-02-16 12:52:00 +00:00
michael
2b876c6079 * Actually call InitLeadBytes
git-svn-id: trunk@41337 -
2019-02-16 10:52:51 +00:00
michael
3fcc1c5f0e * Complete the implementation of IsLeadChar
git-svn-id: trunk@41336 -
2019-02-16 10:50:31 +00:00
michael
4143ecf6c0 Fix bug ID #35086: TParser should reset position (tentative)
git-svn-id: trunk@41331 -
2019-02-16 08:39:40 +00:00
michael
a750039f7c * Add overloaded version of stringreplace with replacement count (ID 23987)
git-svn-id: trunk@41330 -
2019-02-16 07:55:26 +00:00
nickysn
fe47db32be + added asm optimized version of fpc_pwidechar_length for i8086
git-svn-id: trunk@41317 -
2019-02-14 16:14:02 +00:00
nickysn
5db8d6bd5e * optimize the i8086 backwards move by using movsw instead of movsb in the Move
and MoveData procedures

git-svn-id: trunk@41316 -
2019-02-14 12:18:51 +00:00
nickysn
4f573b50ad * access the Default8087CW global variable directly from within inline asm,
instead of copying it to a local var first, since the concern about PIC code
  (this asm code started out as a copy of the i386 rtl code) doesn't exist on
  the i8086, since there's no such thing as PIC code on the i8086

git-svn-id: trunk@41311 -
2019-02-12 16:31:16 +00:00
florian
a91f009b7e * cleanup
git-svn-id: branches/debug_eh@41309 -
2019-02-11 20:33:50 +00:00
florian
3b77146e1c * adapt FPC_Unwind_Exception for native eh_frame support
git-svn-id: branches/debug_eh@41307 -
2019-02-11 20:30:21 +00:00
florian
294c7c9daf * adapt identifiert name
* updates for eh_frame support on native targets
* improved messages

git-svn-id: branches/debug_eh@41306 -
2019-02-11 20:29:02 +00:00
svenbarth
b810d8f32b * fix for Mantis #35027: ensure that the synchronize event entry is reset correctly in case of an exception
+ added test

git-svn-id: trunk@41281 -
2019-02-10 15:43:03 +00:00
svenbarth
1502a13e7c * fix for Mantis #35028: when the mainthread executes a queued ThreadMethod make sure that the queue entry is released even if an exception is raised
+ added test

git-svn-id: trunk@41280 -
2019-02-10 15:42:58 +00:00
marco
a387e0b9bb * add reg_qword. Feedback on #35050
git-svn-id: trunk@41274 -
2019-02-10 09:20:54 +00:00
marco
d6b39276bb * makerop to dword mantis #34712
git-svn-id: trunk@41269 -
2019-02-09 17:53:05 +00:00
marco
93fcce4ba1 * tohexstring calls inttohex instead of hexstr. Hexstr has fixed number of
digits, inttohex a minimum number. Mantis #35015

git-svn-id: trunk@41268 -
2019-02-09 17:12:20 +00:00
marco
46aa5f2712 * _S_ and _E_ first and last were already there, just in an unexpected winerror. Found after testing ->revert all but the last line.
git-svn-id: trunk@41266 -
2019-02-09 13:41:22 +00:00
marco
ec87ab2870 * some _E_ and _S_ constants from winerror.h used in activex patch.
git-svn-id: trunk@41265 -
2019-02-09 13:34:52 +00:00
marco
3a6d0d9d41 * flashwindowex, mantis #35048, patch by 440bx
git-svn-id: trunk@41262 -
2019-02-09 12:07:30 +00:00
marco
6ec527df23 * add IDANI_CAPTION, mantis #35042
git-svn-id: trunk@41254 -
2019-02-08 10:25:30 +00:00
marco
76bb5d1a22 * add loadlibraryex flags, mantis #35041
git-svn-id: trunk@41253 -
2019-02-08 10:18:52 +00:00
nickysn
ff90e7622a + added .Sort overloads, that specify an algorithm and use the sortbase defined
algorithms for sorting TList, TFPList and TStringList when FPC_TESTGENERICS is
  defined as well. Unfortunately, I couldn't test it, because the RTL doesn't
  compile with FPC_TESTGENERICS, due to errors, completely unrelated to the
  sortbase changes.

git-svn-id: trunk@41248 -
2019-02-07 15:45:13 +00:00
Jonas Maebe
3b87b10904 * explicitly link libobjc to prevent the symbol __objc_empty_cache from
resolving to CoreFoundation on macOS 10.14 (which will break running
    such programs on older macOS/(Mac) OS X versions)

git-svn-id: trunk@41243 -
2019-02-06 19:48:47 +00:00
nickysn
1c64f4c751 * some formatting changes to avoid very large lines in the source code
git-svn-id: trunk@41242 -
2019-02-06 18:26:05 +00:00
nickysn
00a67caa40 * select the middle element in the default quicksort implementation in a way
that doesn't generate arithmetic overflow for very large arrays

git-svn-id: trunk@41241 -
2019-02-06 18:05:48 +00:00
pierre
e467d2387d Add sortbase unit to global units list, as it can be compiled for all CPUs
git-svn-id: trunk@41240 -
2019-02-06 15:51:54 +00:00
nickysn
f4718831ca * fixed quicksort comment about memory use - our implementation uses O(log n) stack, not O(n log n)
git-svn-id: trunk@41236 -
2019-02-06 12:22:08 +00:00
nickysn
f32748a8e7 + added comment with information about QuickSort and its specific implementation in unit SortBase
git-svn-id: trunk@41232 -
2019-02-05 18:02:48 +00:00
nickysn
eca60a0a89 * partition elements equal to the pivot on both sides of the pivot, since that
leads to much better performance when sorting lots of repeating elements

git-svn-id: trunk@41231 -
2019-02-05 17:32:28 +00:00
nickysn
bea9961d2d * use SizeUInt instead of longint for the array indices in the quicksort
implementations. This:
  1) allows sorting arrays with >4G elements on 64-bit systems
  2) allows sorting arrays with up to 4G (>2G) elements on 32-bit systems
  3) uses 16-bit instead of the less efficient 32-bit indices on 16-bit and
     8-bit platforms

git-svn-id: trunk@41230 -
2019-02-05 16:20:56 +00:00
nickysn
f5f25f7ae6 * use a more robust QuickSort implementation, that is guaranteed to never loop
forever and never access index out of bounds elements from the array when
  being passed an incorrect comparison function. The resulting sort order is
  still undefined in this case, though.

git-svn-id: trunk@41229 -
2019-02-05 16:00:42 +00:00
nickysn
de80621e1e * use a try..finally block to protect against memory leaks if the comparison
callback function raises an exception in QuickSort_ItemList_Context

git-svn-id: trunk@41228 -
2019-02-05 12:14:09 +00:00