Bladeren bron

* cleaned up TTimespecArr declarations

florian 1 jaar geleden
bovenliggende
commit
54dba5738c
7 gewijzigde bestanden met toevoegingen van 30 en 27 verwijderingen
  1. 2 1
      rtl/aix/ostypes.inc
  2. 2 0
      rtl/beos/ostypes.inc
  3. 2 1
      rtl/bsd/ostypes.inc
  4. 2 0
      rtl/haiku/ostypes.inc
  5. 19 0
      rtl/linux/ostypes.inc
  6. 2 1
      rtl/solaris/ostypes.inc
  7. 1 24
      rtl/unix/bunxh.inc

+ 2 - 1
rtl/aix/ostypes.inc

@@ -284,4 +284,5 @@ type
   tpollfd = pollfd;
   ppollfd = ^pollfd;
 
-
+type
+  TTimespecArr  = array[0..1] of ttimespec;

+ 2 - 0
rtl/beos/ostypes.inc

@@ -388,3 +388,5 @@ type
   tpollfd = pollfd;
   ppollfd = ^pollfd;
 
+type
+  TTimespecArr  = array[0..1] of ttimespec;

+ 2 - 1
rtl/bsd/ostypes.inc

@@ -600,4 +600,5 @@ type
 
 {$i signal.inc}
 
-
+type
+  TTimespecArr  = array[0..1] of ttimespec;

+ 2 - 0
rtl/haiku/ostypes.inc

@@ -330,3 +330,5 @@ type
   tpollfd = pollfd;
   ppollfd = ^pollfd;
 
+type
+  TTimespecArr  = array[0..1] of ttimespec;

+ 19 - 0
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}

+ 2 - 1
rtl/solaris/ostypes.inc

@@ -283,4 +283,5 @@ type
   tpollfd = pollfd;
   ppollfd = ^pollfd;
 
-
+type
+  TTimespecArr  = array[0..1] of ttimespec;

+ 1 - 24
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