Browse Source

haiku: more fixes of base OS types for 64bit, the compiler itself works natively now at least somewhat

git-svn-id: trunk@40764 -
Károly Balogh 6 years ago
parent
commit
fa4502387b
2 changed files with 34 additions and 30 deletions
  1. 8 8
      rtl/haiku/ostypes.inc
  2. 26 22
      rtl/haiku/ptypes.inc

+ 8 - 8
rtl/haiku/ostypes.inc

@@ -101,7 +101,7 @@ TYPE
   pUtsName= ^utsname;
   pUtsName= ^utsname;
 
 
   { file characteristics services }
   { file characteristics services }
-   stat    = packed record { the types are real}
+   stat    = record { the types are real}
         st_dev        : dev_t;             // inode's device
         st_dev        : dev_t;             // inode's device
         st_ino        : ino_t;             // inode's number
         st_ino        : ino_t;             // inode's number
         st_mode       : mode_t;            // inode protection mode
         st_mode       : mode_t;            // inode protection mode
@@ -119,7 +119,7 @@ TYPE
         st_ctimensec  : clong;             // nsec of last file status change
         st_ctimensec  : clong;             // nsec of last file status change
         st_crtime     : time_t;            // time of creation file
         st_crtime     : time_t;            // time of creation file
         st_crtimensec : clong;             // nsec of creation file
         st_crtimensec : clong;             // nsec of creation file
-		st_type       : cint;              // attribute/index type
+        st_type       : cint;              // attribute/index type
         st_blocks     : fsblkcnt_t;        // blocks allocated for file
         st_blocks     : fsblkcnt_t;        // blocks allocated for file
    end;
    end;
    
    
@@ -127,12 +127,12 @@ TYPE
    pStat = ^stat;
    pStat = ^stat;
 
 
   { directory services }
   { directory services }
-   dirent = packed record
-        d_dev:longint;
-        d_pdev:longint;
-        d_ino:int64;
-        d_pino:int64;
-        d_reclen:word;
+   dirent = record
+        d_dev : dev_t;
+        d_pdev : dev_t;
+        d_ino : ino_t;
+        d_pino : ino_t;
+        d_reclen : cushort;
         d_name:array[0..255] of char;
         d_name:array[0..255] of char;
    end;
    end;
 (*   dirent  = record
 (*   dirent  = record

+ 26 - 22
rtl/haiku/ptypes.inc

@@ -46,16 +46,16 @@ type
   end;
   end;
   pmbstate_t = ^mbstate_t;
   pmbstate_t = ^mbstate_t;
 
 
-    dev_t    = cuint32;         { used for device numbers      }
+    dev_t    = cint32;         { used for device numbers      }
     TDev     = dev_t;
     TDev     = dev_t;
     pDev     = ^dev_t;
     pDev     = ^dev_t;
 
 
-    gid_t    = cuint32;         { used for group IDs           }
+    gid_t    = cint32;         { used for group IDs           }
     TGid     = gid_t;
     TGid     = gid_t;
     pGid     = ^gid_t;
     pGid     = ^gid_t;
     TIOCtlRequest = cuLong;
     TIOCtlRequest = cuLong;
 
 
-    ino_t    = clonglong;           { used for file serial numbers }
+    ino_t    = cint64;           { used for file serial numbers }
     TIno     = ino_t;
     TIno     = ino_t;
     pIno     = ^ino_t;
     pIno     = ^ino_t;
 
 
@@ -78,34 +78,36 @@ type
 {$ifdef cpu64}
 {$ifdef cpu64}
     size_t   = cuint64;         { as definied in the C standard}
     size_t   = cuint64;         { as definied in the C standard}
     ssize_t  = cint64;          { used by function for returning number of bytes }
     ssize_t  = cint64;          { used by function for returning number of bytes }
-    clock_t  = cuint64;
     time_t   = cint64;           { used for returning the time  }
     time_t   = cint64;           { used for returning the time  }
 {$else}
 {$else}
     size_t   = cuint32;         { as definied in the C standard}
     size_t   = cuint32;         { as definied in the C standard}
     ssize_t  = cint32;          { used by function for returning number of bytes }
     ssize_t  = cint32;          { used by function for returning number of bytes }
-    clock_t  = culong;
     time_t   = clong;           { used for returning the time  }
     time_t   = clong;           { used for returning the time  }
 {$endif}
 {$endif}
 
 
-    wint_t	 = cint32;
+    wint_t   = cint32;
     TSize    = size_t;
     TSize    = size_t;
     pSize    = ^size_t;
     pSize    = ^size_t;
-    psize_t   = pSize;		
+    psize_t  = pSize;
 
 
     TsSize   = ssize_t;
     TsSize   = ssize_t;
-    psSize   = ^ssize_t;		
+    psSize   = ^ssize_t;
 
 
     uid_t    = cuint32;         { used for user ID type        }
     uid_t    = cuint32;         { used for user ID type        }
     TUid     = Uid_t;
     TUid     = Uid_t;
     pUid     = ^Uid_t;
     pUid     = ^Uid_t;
 
 
+    clock_t  = cint32;
+    suseconds_t = cint32;
+    useconds_t = cuint32;
+
     TClock   = clock_t;
     TClock   = clock_t;
     pClock   = ^clock_t;
     pClock   = ^clock_t;
 
 
     // TTime    = time_t;    // Not allowed in system unit, -> unixtype
     // TTime    = time_t;    // Not allowed in system unit, -> unixtype
     pTime    = ^time_t;
     pTime    = ^time_t;
     ptime_t =  ^time_t;
     ptime_t =  ^time_t;
-    
+
     wchar_t   = cint32;
     wchar_t   = cint32;
     pwchar_t  = ^wchar_t;
     pwchar_t  = ^wchar_t;
 
 
@@ -113,21 +115,23 @@ type
     TSocklen = socklen_t;
     TSocklen = socklen_t;
     pSocklen = ^socklen_t;
     pSocklen = ^socklen_t;
 
 
-  timeval  = packed record
-    tv_sec,tv_usec:clong;
-  end;
-  ptimeval = ^timeval;
-  TTimeVal = timeval;
+    timeval  = record
+      tv_sec: time_t;
+      tv_usec: suseconds_t;
+    end;
+    ptimeval = ^timeval;
+    TTimeVal = timeval;
+
+    timespec = record
+      tv_sec   : time_t;
+      tv_nsec  : clong;
+    end;
+
+    ptimespec= ^timespec;
+    Ttimespec= timespec;
 
 
-  timespec = packed record
-    tv_sec   : time_t;
-    tv_nsec  : clong;
-  end;
-  ptimespec= ^timespec;
-  Ttimespec= timespec;
-  
   pthread_t = culong;
   pthread_t = culong;
-  
+
   sched_param = record
   sched_param = record
     __sched_priority: cint;
     __sched_priority: cint;
   end;
   end;