Commit Graph

136 Commits

Author SHA1 Message Date
Pierre Muller
3b45e9c5bb Change libc statx function to weakexternal
Test if statx is nil before call

(cherry picked from commit be1cc68a99)
2023-12-23 15:05:51 +01:00
pierre
61059435dd Fix compilation of linux unit with -dFPC_USE_LIBC option
git-svn-id: trunk@48504 -
(cherry picked from commit 64bd8336f1)
2023-12-22 17:55:58 +01:00
florian
2e750c3f1c + add missing semicolon, resolves #36868
git-svn-id: trunk@44578 -
(cherry picked from commit e32027c8d3)
2023-12-22 17:54:59 +01:00
florian
b1f6be15e9 * disable new syscalls on android
git-svn-id: trunk@48495 -
(cherry picked from commit 3922926d17)
2023-12-21 10:54:45 +01:00
florian
dcde27b8c6 * renamed new syscall wrapper in linux to be consist with the others
git-svn-id: trunk@48479 -
(cherry picked from commit b4a1c27c58)
2023-12-16 12:15:48 +01:00
florian
5ea32418d8 + futimens syscall
* make use of futimens syscall in sysutils unit
  + tests

git-svn-id: trunk@48472 -
(cherry picked from commit b8ab06aae7)
2023-12-16 12:14:02 +01:00
florian
8be1d885e8 + linux.fputimensat which properly uses the _tim64 version if needed and available
+ test

git-svn-id: trunk@48470 -
(cherry picked from commit 0c77536f11)
2023-12-16 12:13:17 +01:00
florian
d4a7e0c8c7 + Linux.fpstatx, resolves #36501
git-svn-id: trunk@43837 -
(cherry picked from commit d425a85f8d)
2023-12-16 11:11:18 +01:00
michael
23a9a30bb7 * Undo 46567, missing dependencies
git-svn-id: branches/fixes_3_2@46579 -
2020-08-23 09:14:27 +00:00
michael
61ae4eea1f * Merging revisions r44666 from trunk:
------------------------------------------------------------------------
    r44666 | michael | 2020-04-09 23:27:22 +0200 (Thu, 09 Apr 2020) | 1 line
    
    * Fix bug #35914: add epoll_pwait, epoll_create1
    ------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@46567 -
2020-08-23 09:07:28 +00:00
marco
7201fbe85e # revisions: 43880,44093
git-svn-id: branches/fixes_3_2@45533 -
2020-05-30 16:02:35 +00:00
yury
0654857ce1 Merged aarch64-android, x86_64-android targets and fixes for the Android target.
Revision(s) 39739, 39749, 39860, 39862, 39865, 39869, 39871, 39903, 39905, 39917, 39956, 39959-39960, 39969, 39971, 39980, 39987, 40198-40201, 40472, 40532, 40535-40536 from trunk:
* Android: The list of supported syscalls has been auto-generated directly from android sources for each CPU.
* Minor adjustments to make all compilable with the proper list of Android syscalls.
........
* Re-generated lists of android syscalls by a new script. The lists are more correct now. The script's location: https://svn.freepascal.org/svn/fpcbuild/scripts/android
........
* Fixed UnhookSignal when RTL_SIGDEFAULT is passed. The bug have caused crash on aarch64-android due to out of bounds read of the rtlsig2ossig[] array.
........
+ Added support for the aarch64-android target.
........
* Set ICU data dir if it is not set by the system. It fixes issues on newer Android versions.
* Added more predefined ICU versions.
........
* android: Use the current dir as temp.
........
* Corrected TUContext record for aarch64-linux and aarch64-android. It fixes obtaining of an address of the instruction where a signal has thrown.
........
* Enabled safecall support for aarch64 to be on par with other cpus.
........
* Android: Reworked the startup code to use no assembly instructions. Generic assembler startup files contains only section data and are compiled for each CPU.
* Android: argc and argv are correct for shared libraries.
........
* Use syscall_nr_renameat for android.
........
+ added support for x86_64-android target.
........
+ Added the auto-generated list syscalls for mips64-android. It will be needed when mips64 is supported.
........
* x86_64-android requires sigreturn for proper signal handling.
........
* Register external gas assembler for aarch64-android and x86_64-android.
........
* Enabled compilation of the cpu unit for arm-android and x86_64-android.
........
* ucnv_open() must be called with some SSE exception masked on x86_64-android.
* Call u_init() during initialization.
........
* Create the ".note.gnu.build-id" section for android. It fixes debugging of shared libs in Android Studio.
........
* android: Removed cwstring from the uses clause of the unix unit. Use cwstring indirectly. It allows to avoid using cwstring if needed.
........
* ICU v3.8 on Android 1.5-2.1 is buggy and can't be unloaded properly.
........
* Fixed locale detection on new Android versions.
........
* Fixed obtaining a time zone information for 64-bit android.
........
* Since Android 8 the net.dnsX properties can't be read. Use Google Public DNS servers.

........
* android: Use libc for sockets since the "accept" syscall is blocked by SECCOMP, but the "accept4" alternative is not available on old Android versions (2.3 and older). 
........
* android: Regenerated syscalls.
........
* android: Disabled usage of the "pselect6" and "ppoll" syscalls for arm-android. These syscalls are not available on old Android versions (2.3 or older).
........

git-svn-id: branches/fixes_3_2@40540 -
2018-12-13 18:08:42 +00:00
michael
94b6fe6ad3 * added O_CLOEXEC
git-svn-id: trunk@38100 -
2018-02-02 10:33:13 +00:00
yury
af0fdea815 * Android: Include list of supported syscalls for each CPU.
Adjust Linux RTL to work with supported Android syscalls. 
  It should fix issues with Android 8.

git-svn-id: trunk@37480 -
2017-10-17 18:15:02 +00:00
Jonas Maebe
4fa2edc638 + Linux/AArch64 RTL support (patch by Edmund Grimley Evans)
o uses new generic Linux syscall numbers, used for recent architectures

git-svn-id: trunk@30895 -
2015-05-23 21:04:08 +00:00
michael
dd6f45d1d0 * Added setregid and setreuid functions to linux unit (they are not POSIX), bug ID #25403
git-svn-id: trunk@30621 -
2015-04-17 16:48:32 +00:00
marco
a8671e550e * fix FPC_USE_LIBC for inotify and clock* functions, and always link librt when this unit is used under FPC_USE_LIBC.
make all building failed otherwise because fppkg seems to import unit linux somewhere. 

git-svn-id: trunk@26199 -
2013-12-08 20:23:09 +00:00
pierre
651589c9a4 * Adapt to mipsel compiler defining cpumipsel and cpumipsel32 but not cpumips anymore
git-svn-id: trunk@21542 -
2012-06-08 09:34:36 +00:00
pierre
160037eb9d * Patch from Fuxin Zhang: Mips specific MAP_XXX constants
git-svn-id: trunk@21531 -
2012-06-07 23:05:27 +00:00
michael
0bdccfa2b0 * Added clock_getres, clock_gettime, clock_settime calls
git-svn-id: trunk@19789 -
2011-12-09 16:30:23 +00:00
michael
2d7dbacee0 * Added inotify calls
git-svn-id: trunk@19788 -
2011-12-09 16:05:35 +00:00
Jonas Maebe
715c819ff7 - removed "packed" from record types that should/need not be packed
git-svn-id: trunk@19613 -
2011-11-08 23:13:16 +00:00
marco
2c00a2a0b3 * fixed FPC_USE_LIBC building for Linux and exception handling (mantis #13450)
- fixed a platform modifier in ipc.pp
   - fixed different layout sigaction record in libc. (field order)
   - fixed many bad use_libc fixes in linux. Most of these were only checked
      for compilation, not linking. (e.g. futex doesn't link)

git-svn-id: trunk@18042 -
2011-07-31 23:36:17 +00:00
Jonas Maebe
d8032f6366 - disabled modify_ldt for non-x86 platforms, since it does not exist there
(mantis #17100)
  * also use a syscall to call modify_ldt when FPC_USE_LIBC is defined,
    because it's not exported as a function from libc

git-svn-id: trunk@15838 -
2010-08-17 21:34:09 +00:00
daniel
da77c0c190 + Add libc version of futex
git-svn-id: trunk@15811 -
2010-08-14 19:34:05 +00:00
daniel
6f2b097d63 + Add futex
git-svn-id: trunk@15747 -
2010-08-08 14:24:46 +00:00
daniel
1009a84e25 + Add modify_ldt to linux unit
+ Add sched_yield to linux unit
  - Remove clone for m68k from linux unit (unimplemented assembler section)
  + Add fpsigtimedwait to baseunix unit

git-svn-id: trunk@15602 -
2010-07-18 21:53:26 +00:00
marco
30207d73ea * epoll_oneshot constant, mantis 15732
git-svn-id: trunk@14931 -
2010-02-20 22:24:01 +00:00
micha
aa38b10011 * attempt to fix powerpc64-linux sync_file_range compilation
git-svn-id: trunk@12274 -
2008-11-29 15:43:09 +00:00
micha
1b418875b3 * fix typo
git-svn-id: trunk@12110 -
2008-11-15 20:49:18 +00:00
micha
28e614c237 * move fdatasync to linux unit
git-svn-id: trunk@12109 -
2008-11-15 20:44:44 +00:00
micha
d7e90f9e48 + add splice and sync_file_range linux-only syscalls
git-svn-id: trunk@12107 -
2008-11-15 15:43:52 +00:00
Almindor
b8c3dc960d * fix x86 -> cpu86 define
* add tee() function

git-svn-id: trunk@8365 -
2007-09-03 10:54:44 +00:00
Almindor
6fd901181a * update sysnr.inc for x86 and x86_64 to latest kernel
* add splice syscall to linux unit for x86 and x86_64

git-svn-id: trunk@8364 -
2007-09-02 22:06:04 +00:00
Jonas Maebe
cce61fa602 * fixed compilation on 64 bit cpus
git-svn-id: trunk@8333 -
2007-08-29 14:31:17 +00:00
Almindor
6a327799f8 * fix typo with [T]SysInfo record
git-svn-id: trunk@8331 -
2007-08-29 11:59:47 +00:00
Almindor
89eeb8aa63 * fix linux sysinfo struct and function (bug 9523)
git-svn-id: trunk@8330 -
2007-08-29 10:08:02 +00:00
daniel
9a8aa52cc5 + Add setcap/getcap
+ Restore clone

git-svn-id: trunk@8033 -
2007-07-12 22:02:11 +00:00
Almindor
f71c886752 * move the FUTEX down so uses doesn't get in the way
git-svn-id: trunk@7974 -
2007-07-07 09:23:18 +00:00
Almindor
1fa4e17c87 * make FUTEX_OP implemented also with FPC_USE_LIBC since it's a macro
git-svn-id: trunk@7972 -
2007-07-07 08:41:42 +00:00
marco
fd6f6cf7e9 * fix for 8801. mmap constants inconsistancy. Old constants are aliased for compat. non portable moved to OS specific units (merge)
git-svn-id: trunk@7265 -
2007-05-04 21:23:02 +00:00
ivost
de36c38282 * fixed bug in linux.pp / user_desc record
git-svn-id: trunk@6949 -
2007-03-21 20:56:57 +00:00
ivost
faf3b065f8 * updated TLS segmentdescriptor definiton (record user_desc)
git-svn-id: trunk@6767 -
2007-03-09 22:23:42 +00:00
ivost
fc0f2f3de6 * disabled Clone syscall in linux.pp, it was completly wrong (I will replace it)
* added ldt record and constants to linux.pp

git-svn-id: trunk@6750 -
2007-03-08 21:40:59 +00:00
ivost
025b57815f * removed inline flag from FUTEX_OP in linux.pp
* added msync constants

git-svn-id: trunk@6691 -
2007-03-01 14:20:34 +00:00
ivost
9161a2967a * added futex constants to linux.pp (from futex.h)
git-svn-id: trunk@6687 -
2007-02-28 22:34:32 +00:00
ivost
1a7f06aa7d * added the new CLONE_* constants from syscall clone
git-svn-id: trunk@6686 -
2007-02-28 22:26:42 +00:00
Almindor
2c8c5800bc * fixed EPOLLOUT vs EPOLLPRI mixup in constants
git-svn-id: trunk@4526 -
2006-09-01 07:54:48 +00:00
Almindor
b8975e8fd4 * EPOLL_CTL_DEL was flipped with EPOLL_CTL_MOD
git-svn-id: trunk@4524 -
2006-08-31 20:48:51 +00:00
Almindor
3d1370bf8b * fix 64bit epoll "special" packing
git-svn-id: trunk@4292 -
2006-07-25 11:44:24 +00:00