Commit Graph

1107 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
marcoonthegit
4f31b7138c * comment schedgetaffitity for now at the request of closes 2023-12-22 17:52:29 +01:00
Michaël Van Canneyt
81b2bc87f4 * Fix compile error for i386-linux
(cherry picked from commit 770c21c0dd)
2023-12-16 19:46:18 +01:00
Michaël Van Canneyt
ab31f82ec2 * Raise exception for fileseek positions that do not fit in longing. Issue
(cherry picked from commit e97e27b8d5)
2023-12-16 19:45:05 +01:00
Nikolay Nikolov
819658f61e + also fill DayOfWeek in the Unix implementation of SysUtils.GetLocalTime
(cherry picked from commit f21273612a)
2023-12-16 19:44:56 +01:00
florian
43f3819feb * make statx based Sysutils.FileAge working with relative pathes
+ test

git-svn-id: trunk@48519 -
(cherry picked from commit b08717fef6)
2023-12-16 17:16:57 +01:00
ondrej
0018e3a51f * revert r47532, r47527 (use timezone information from fpgettimeofday) because they are not available on all Linux distributions
git-svn-id: trunk@47541 -
(cherry picked from commit 63beb1e83a)
2023-12-16 17:16:36 +01:00
ondrej
17ded150fa * GetLocalTimeOffset: use timezone information from fpgettimeofday
git-svn-id: trunk@47532 -
(cherry picked from commit 28d88b9999)
2023-12-16 17:16:09 +01:00
ondrej
073d47e77f * use timezone information from fpgettimeofday for getting local datetime
git-svn-id: trunk@47527 -
(cherry picked from commit f5a95782a9)
2023-12-16 17:15:58 +01:00
michael
01ccad773b * Optimized DiskAdd/DiskFree/AddDisk, bug ID
git-svn-id: trunk@47365 -
(cherry picked from commit 664283af9e)
2023-12-16 17:15:50 +01:00
ondrej
5055b3cb99 * forgotten int64 parameter type
git-svn-id: trunk@47339 -
(cherry picked from commit 4fa3362355)
2023-12-16 15:43:35 +01:00
Michael Van Canneyt
7a9d858aa6 * Date/Time info for files (Delphi compatibility)
(cherry picked from commit d1b2fe1659)
2023-12-16 12:31:45 +01:00
florian
117dce6e78 + initial implementation of path dependent IsFileNameCaseSensitive/IsFileNameCasePreserving functions for darwin
git-svn-id: trunk@49164 -
(cherry picked from commit c1f85ac3a1)
2023-12-16 12:30:20 +01:00
florian
1202d9d492 * statx based Sysutils.FileGetDate with handle fixed
+ test

git-svn-id: trunk@48520 -
(cherry picked from commit 3e453f92fc)
2023-12-16 12:20:47 +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
934765fc0b * linux: FileGetDate makes use of statx if needed
git-svn-id: trunk@48476 -
(cherry picked from commit 90ba89a128)
2023-12-16 12:14:32 +01:00
florian
3ab27ec1c8 * sysutils on linux uses only the new syscalls if the system has no suitable clong type
git-svn-id: trunk@48475 -
(cherry picked from commit ef04e3983f)
2023-12-16 12:14:24 +01:00
florian
b2da1dbfba * fallback to fputime if fputimensat fails as not being available
git-svn-id: trunk@48474 -
(cherry picked from commit c3656c6b1c)
2023-12-16 12:14:14 +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
b536bc87e8 + make use of the fputimensat syscall on linux to enable always times beyond 32 bit
git-svn-id: trunk@48471 -
(cherry picked from commit e6f575d43c)
2023-12-16 12:13:33 +01:00
florian
d0765540c5 * linux: make use of statx in Sysutils.FileAge if available
git-svn-id: trunk@48457 -
(cherry picked from commit f39f8d0f1a)
2023-12-16 12:12:11 +01:00
florian
fff5e306ae * Y2K38 problem for linux in sysutils.findfirst/findnext should be solved
git-svn-id: trunk@48473 -
(cherry picked from commit d402e0b940)
2023-12-14 18:25:06 +01:00
ondrej
f6fdbf7041 * introduce NowUTC() and GetUniversalTime()
git-svn-id: trunk@47306 -
(cherry picked from commit 934f2dc55d)
2023-12-13 21:26:08 +01:00
michael
b529a49ed6 * Check buffer overflow when reading
git-svn-id: trunk@49012 -
(cherry picked from commit 2a96ad2715)
2023-12-13 18:52:32 +01:00
michael
cd5dc1585f * Fix leap second reading
git-svn-id: trunk@49006 -
(cherry picked from commit 3575369989)
2023-12-13 18:52:17 +01:00
ondrej
ab9be15686 unix: fix timezone info for timers after the last transition
git-svn-id: trunk@49005 -
(cherry picked from commit 2a61397d37)
2023-12-13 18:51:59 +01:00
ondrej
3ce5aa0daa unix: fix RefreshTZInfo UTC parameter
git-svn-id: trunk@49001 -
(cherry picked from commit 881235b489)
2023-12-13 17:51:25 +01:00
ondrej
569c36cfa4 * timezones android compilation
git-svn-id: trunk@47326 -
(cherry picked from commit 7ded8307c9)
2023-12-13 16:01:01 +01:00
ondrej
cb4d59156e * forgotten int64 parameter type
git-svn-id: trunk@47325 -
(cherry picked from commit d2a517389f)
2023-12-13 16:00:46 +01:00
ondrej
3ef8931e5c * read int64 transition table from linux timezone files if available
git-svn-id: trunk@47324 -
(cherry picked from commit be4c907117)
2023-12-13 16:00:20 +01:00
ondrej
871f1030dd * unix timezone optimizations
git-svn-id: trunk@47321 -
(cherry picked from commit 3ee2097f1a)
2023-12-13 15:54:07 +01:00
ondrej
eec56c20c8 * thread-safe time zone info read/write
git-svn-id: trunk@47309 -
(cherry picked from commit 7fbceaac21)
2023-12-13 15:53:18 +01:00
ondrej
16010570bb * lazy thread initialization support
git-svn-id: trunk@47308 -
(cherry picked from commit c64429cdd0)
2023-12-13 13:51:16 +01:00
ondrej
4b91815315 Unix timezone: fix search around TZ change back to be the same as on Windows
git-svn-id: trunk@47296 -
(cherry picked from commit f296bf3f2d)
2023-12-12 22:44:03 +01:00
ondrej
57d32cd6fe GetLocalTimeOffset: add InputIsUTC parameter to DateTime-aware overloads
git-svn-id: trunk@47293 -
(cherry picked from commit a02d676b06)
2023-12-12 22:43:50 +01:00
ondrej
11308a8957 LocalToEpoch, EpochToLocal: fix for arbitrary datetime
git-svn-id: trunk@47291 -
(cherry picked from commit f4cff81881)
2023-12-12 22:21:27 +01:00
ondrej
84b6cee4f7 File datetime UTC support
git-svn-id: trunk@47210 -
(cherry picked from commit b51729dac5)
2023-12-12 22:21:06 +01:00
florian
3aadfc0802 * subroutines working with an OS dependend time stamp use an int64 now, so the 2038 problem
on unixes can be tackled

git-svn-id: trunk@44010 -
(cherry picked from commit 01302bc47d)
2023-12-12 22:19:17 +01:00
ondrej
0a2e59c243 GetLocalTimeOffset: DateTime-aware overloads for Unix. Issue
git-svn-id: trunk@47290 -
(cherry picked from commit 282aa0daa7)
2023-11-29 15:34:47 +01:00
ondrej
ac08f01ec0 GetLocalTimeOffset: DateTime-aware overloads (Windows supported, Unix is a ToDo). Issue
git-svn-id: trunk@47206 -
(cherry picked from commit 0d08b98d47)
2023-11-29 14:58:42 +01:00
Pierre Muller
0c53c25dbf Set iconv_is_in_libc macro for DragonFly OS
(cherry picked from commit a342b74f66)
2023-06-09 12:54:51 +02:00
Pierre Muller
2c884b8e49 Set macro iconv_is_in_libc for FreeBSD OS
(cherry picked from commit 01ad5f2c28)
2023-06-09 12:54:36 +02:00
Károly Balogh
ad0f8099d5 netbsd: updated to link against the right setlocale function. the renaming from __setlocale_mb_len_max_32 to __setlocale50 occured in NetBSD include/locale.h in rev 1.17, which was in 2010, and shipped in NetBSD 6 in 2012.
git-svn-id: trunk@43118 -
(cherry picked from commit 7f0675d937)
2023-06-09 12:54:17 +02:00
Jonas Maebe
cd83438cb0 Darwin: fix make cycle
unix.fpexecv takes a rawbytestring as first parameter, so inside the child
it was converting the pchar back to an ansistring and also converting it
to the OS file system code page. Since Darwin uses vfork/execv in
SysUtils.Executeprocess, this could result in (exception)stack corruption
and for some reason only since d1b2fe16 it actually caused issues.

Use execve instead, which takes a pchar as first argument and doesn't
do any further conversions

(cherry picked from commit 305d34a8f6)
2023-01-22 23:08:28 +01:00
marcoonthegit
3a399845e4 * fixed ambiguity between pipe(2) with two params and pipe(3) with one that broke -dFPC_USE_LIBC
(cherry picked from commit f341baeaa7)
2022-08-22 17:45:40 +02:00
marcoonthegit
69eb400d54 * commit ACM's fpc.diff, resolves mantis and FreeBSD 12/13 syscall port
(cherry picked from commit 99e3789fa3)
2022-06-18 14:08:07 +02:00
Jonas Maebe
9433467ec8 * Darwin support for printing line info for backtraces when using Dwarf,
based on patches by Colin Western, mantis )
   o requires that the program/library is compiled with -Xg (or that
     dsymutil is run on it after compiling), and that the .dSYM bundle
     is in the same directory as the program/library
   o always use the "dl" unit in exeinfo for Darwin, as that's needed for
     dynamic library support, and this does not cause an extra dependency
     since on Darwin we always use libc
   o cleaned up the exeinfo unit for Darwin, and sped it up by using mmap
     instead of small reads
   o fixed unit dependencies for exeinfo, lineinfo and lnfodwarf in Darwin
     RTL Makefile
  * use the process address info from the original exe even when reading
    the debug information from an external file
  - removed outdated ifdef'd darwin code from dl.pp (no longer needed now
    that processaddress gets set correctly in exeinfo for that platform)

git-svn-id: trunk@49140 -
(cherry picked from commit 0eb9dd3879)
2021-09-04 15:09:22 +02:00
svenbarth
74a1b6406e --- Merging r45159 into '.':
U    rtl/nativent/systhrd.inc
U    rtl/os2/systhrd.inc
U    rtl/win/systhrd.inc
--- Recording mergeinfo for merge of r45159 into '.':
 U   .
--- Merging r45160 into '.':
U    rtl/amicommon/athreads.pp
U    rtl/beos/bethreads.pp
U    rtl/inc/thread.inc
U    rtl/inc/threadh.inc
G    rtl/nativent/systhrd.inc
U    rtl/netware/systhrd.inc
U    rtl/netwlibc/systhrd.inc
U    rtl/objpas/classes/classes.inc
U    rtl/objpas/classes/classesh.inc
G    rtl/os2/systhrd.inc
U    rtl/unix/cthreads.pp
G    rtl/win/systhrd.inc
--- Recording mergeinfo for merge of r45160 into '.':
 G   .
--- Merging r45206 into '.':
U    rtl/win/sysos.inc
G    rtl/win/systhrd.inc
U    rtl/win/syswin.inc
--- Recording mergeinfo for merge of r45206 into '.':
 G   .
--- Merging r45207 into '.':
U    rtl/linux/pthread.inc
--- Recording mergeinfo for merge of r45207 into '.':
 G   .
--- Merging r45233 into '.':
G    rtl/linux/pthread.inc
G    rtl/unix/cthreads.pp
--- Recording mergeinfo for merge of r45233 into '.':
 G   .
--- Merging r45237 into '.':
G    rtl/unix/cthreads.pp
G    rtl/win/systhrd.inc
--- Recording mergeinfo for merge of r45237 into '.':
 G   .

git-svn-id: branches/fixes_3_2@47806 -
2020-12-17 22:44:26 +00:00
marco
8d5e43c07e # revisions: 47064
git-svn-id: branches/fixes_3_2@47092 -
2020-10-11 15:18:17 +00:00
michael
a14117e0bb * Merging revisions r45805 from trunk:
------------------------------------------------------------------------
    r45805 | michael | 2020-07-19 00:35:36 +0200 (Sun, 19 Jul 2020) | 1 line
    
    * Add TerminatedSet (delphi compatibility, bug ID )
    ------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@46598 -
2020-08-23 09:24:13 +00:00