diff --git a/rtl/aix/ostypes.inc b/rtl/aix/ostypes.inc index 06e8644e5b..bb1a17a5a4 100644 --- a/rtl/aix/ostypes.inc +++ b/rtl/aix/ostypes.inc @@ -284,4 +284,5 @@ type tpollfd = pollfd; ppollfd = ^pollfd; - +type + TTimespecArr = array[0..1] of ttimespec; diff --git a/rtl/beos/ostypes.inc b/rtl/beos/ostypes.inc index aaafa8c886..4c61663059 100644 --- a/rtl/beos/ostypes.inc +++ b/rtl/beos/ostypes.inc @@ -388,3 +388,5 @@ type tpollfd = pollfd; ppollfd = ^pollfd; +type + TTimespecArr = array[0..1] of ttimespec; diff --git a/rtl/bsd/ostypes.inc b/rtl/bsd/ostypes.inc index 1dbec8867d..dcdd092885 100644 --- a/rtl/bsd/ostypes.inc +++ b/rtl/bsd/ostypes.inc @@ -600,4 +600,5 @@ type {$i signal.inc} - +type + TTimespecArr = array[0..1] of ttimespec; diff --git a/rtl/haiku/ostypes.inc b/rtl/haiku/ostypes.inc index 5056ed5475..b290efeb55 100644 --- a/rtl/haiku/ostypes.inc +++ b/rtl/haiku/ostypes.inc @@ -330,3 +330,5 @@ type tpollfd = pollfd; ppollfd = ^pollfd; +type + TTimespecArr = array[0..1] of ttimespec; diff --git a/rtl/linux/ostypes.inc b/rtl/linux/ostypes.inc index b3ab1bd5c4..2323c5ea96 100644 --- a/rtl/linux/ostypes.inc +++ b/rtl/linux/ostypes.inc @@ -511,3 +511,22 @@ const {$i signal.inc} + { For 32 bit 2038 safe support, we have to use the kernel_timespec on linux which + makes all fields 64 bit regardless of the bit size of the CPU. + + I have no idea though how to work around this when libc is used + } +{$ifndef FPC_USE_LIBC} + kernel_time64_t = clonglong; + + kernel_timespec = record + tv_sec : kernel_time64_t; + tv_nsec : clonglong; + end; + tkernel_timespec = kernel_timespec; + pkernel_timespec = ^kernel_timespec; + + tkernel_timespecs = array[0..1] of kernel_timespec; + + TTimespecArr = tkernel_timespecs; +{$endif FPC_USE_LIBC} diff --git a/rtl/solaris/ostypes.inc b/rtl/solaris/ostypes.inc index 36ff28790e..1bab9b7002 100644 --- a/rtl/solaris/ostypes.inc +++ b/rtl/solaris/ostypes.inc @@ -283,4 +283,5 @@ type tpollfd = pollfd; ppollfd = ^pollfd; - +type + TTimespecArr = array[0..1] of ttimespec; diff --git a/rtl/unix/bunxh.inc b/rtl/unix/bunxh.inc index 79d31fdc81..8f30246e54 100644 --- a/rtl/unix/bunxh.inc +++ b/rtl/unix/bunxh.inc @@ -16,30 +16,7 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds} pGrpArr = ^TGrpArr; TFilDes = Array [0..1] of cInt; - pFilDes = ^TFilDes; - - - { For 32 bit 2038 safe support, we have to use the kernel_timespec on linux which - makes all fields 64 bit regardless of the bit size of the CPU. - - I have no idea though how to work around this when libc is used - } -{$if defined(linux) and not(defined(FPC_USE_LIBC))} - kernel_time64_t = clonglong; - - kernel_timespec = record - tv_sec : kernel_time64_t; - tv_nsec : clonglong; - end; - tkernel_timespec = kernel_timespec; - pkernel_timespec = ^kernel_timespec; - - tkernel_timespecs = array[0..1] of kernel_timespec; - - TTimespecArr = tkernel_timespecs; -{$else linux} - TTimespecArr = array[0..1] of ttimespec; -{$endif linux} + pFilDes = ^TFilDes; // if you are looking for macro definitions or non C template overloaded versions, they are moved to bunxovlh.inc