]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix stat declarations, function: names, and dirent structure in ffi.freebsd
authorJack Lucas <silverbeard@protonmail.com>
Sun, 10 Feb 2019 08:24:34 +0000 (03:24 -0500)
committerJack Lucas <silverbeard@protonmail.com>
Sun, 10 Feb 2019 08:24:34 +0000 (03:24 -0500)
basis/unix/ffi/freebsd/freebsd.factor
basis/unix/stat/freebsd/freebsd.factor

index 91d9b3cf72876ab02b98b876181df82adf736a1e..06b5fab6517b7047be28f1f0963e31970e260f26 100644 (file)
@@ -17,10 +17,13 @@ STRUCT: addrinfo
     { next addrinfo* } ;
 
 STRUCT: dirent
-    { d_fileno u_int32_t }
-    { d_reclen u_int16_t }
-    { d_type u_int8_t }
-    { d_namlen u_int8_t }
+    { d_fileno ino_t }
+    { d_off off_t }
+    { d_reclen __uint16_t }
+    { d_type uint8_t }
+    { d_pad0 uint8_t }
+    { d_namlen u_int16_t }
+    { d_pad1 uint16_t }
     { d_name char[256] } ;
 
 CONSTANT: SOL_SOCKET 0xffff
index 0ba3cbb508e0afc5d0337781afbe7a627e2de13a..9a6416c22ba984ebcd8aedbb54e1d735eb977e92 100644 (file)
@@ -9,26 +9,25 @@ IN: unix.stat
 STRUCT: stat
     { st_dev dev_t }
     { st_ino ino_t }
-    { st_mode mode_t }
     { st_nlink nlink_t }
+    { st_mode mode_t }
+    { st_pading0 __int16_t }
     { st_uid uid_t }
     { st_gid gid_t }
+    { st_pading1 __int32_t }
     { st_rdev dev_t }
     { st_atimespec timespec }
     { st_mtimespec timespec }
     { st_ctimespec timespec }
+    { st_birthtimespec timespec }
     { st_size off_t }
     { st_blocks blkcnt_t }
     { st_blksize blksize_t }
     { st_flags fflags_t }
     { st_gen __uint64_t }
-    { st_spare __int64_t }
-    { st_birthtimespec timespec }
-    { pad0 __int32_t[2] } ;
-
-FUNCTION-ALIAS: stat-func int stat64  ( c-string pathname, stat* buf ) 
-FUNCTION-ALIAS: lstat int lstat64 ( c-string pathname, stat* buf )
-FUNCTION-ALIAS: fstat int fstat64 ( int fd, stat* buf )
-
-
+    { st_spare __int64_t[10] } ;
+    
+FUNCTION-ALIAS: stat-func int stat  ( c-string pathname, stat* buf ) 
+FUNCTION: int lstat ( c-string pathname, stat* buf )
+FUNCTION: int fstat ( int fd, stat* buf )