Haiku: add posix tests

This commit is contained in:
avanspector
2025-01-10 06:42:19 +01:00
parent 5d3a069e7a
commit a704000c34
4 changed files with 54 additions and 18 deletions
+13
View File
@@ -10,7 +10,11 @@
#include <netdb.h>
#include <poll.h>
#include <pwd.h>
#ifndef __HAIKU__
#include <sys/shm.h>
#endif
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/un.h>
@@ -25,7 +29,11 @@
#include <sys/statvfs.h>
#include <sys/time.h>
#include <utime.h>
#ifndef __HAIKU__
#include <wordexp.h>
#endif
#include <sys/socket.h>
int main(int argc, char *argv[])
@@ -67,7 +75,10 @@ int main(int argc, char *argv[])
printf("passwd %zu %zu\n", sizeof(struct passwd), _Alignof(struct passwd));
#ifndef __HAIKU__
printf("shmid_ds %zu %zu\n", sizeof(struct shmid_ds), _Alignof(struct shmid_ds));
#endif
printf("ipc_perm %zu %zu\n", sizeof(struct ipc_perm), _Alignof(struct ipc_perm));
printf("msqid_ds %zu %zu\n", sizeof(struct msqid_ds), _Alignof(struct msqid_ds));
@@ -95,7 +106,9 @@ int main(int argc, char *argv[])
printf("utimbuf %zu %zu\n", sizeof(struct utimbuf), _Alignof(struct utimbuf));
#ifndef __HAIKU__
printf("wordexp_t %zu %zu\n", sizeof(wordexp_t), _Alignof(wordexp_t));
#endif
printf("time_t %zu %zu\n", sizeof(time_t), _Alignof(time_t));
printf("timespec %zu %zu\n", sizeof(struct timespec), _Alignof(struct timespec));
+8 -3
View File
@@ -42,7 +42,10 @@ main :: proc() {
fmt.println("pollfd", size_of(posix.pollfd), align_of(posix.pollfd))
fmt.println("passwd", size_of(posix.passwd), align_of(posix.passwd))
fmt.println("shmid_ds", size_of(posix.shmid_ds), align_of(posix.shmid_ds))
when ODIN_OS != .Haiku {
fmt.println("shmid_ds", size_of(posix.shmid_ds), align_of(posix.shmid_ds))
}
fmt.println("ipc_perm", size_of(posix.ipc_perm), align_of(posix.ipc_perm))
fmt.println("msqid_ds", size_of(posix.msqid_ds), align_of(posix.msqid_ds))
@@ -70,8 +73,10 @@ main :: proc() {
fmt.println("utimbuf", size_of(posix.utimbuf), align_of(posix.utimbuf))
fmt.println("wordexp_t", size_of(posix.wordexp_t), align_of(posix.wordexp_t))
when ODIN_OS != .Haiku {
fmt.println("wordexp_t", size_of(posix.wordexp_t), align_of(posix.wordexp_t))
}
fmt.println("time_t", size_of(posix.time_t), align_of(posix.time_t))
fmt.println("timespec", size_of(posix.timespec), align_of(posix.timespec))
fmt.println("clock_t", size_of(posix.clock_t), align_of(posix.clock_t))