aboutsummaryrefslogtreecommitdiff
path: root/core/sys
diff options
context:
space:
mode:
authorIsaac Andrade <andradei@proton.me>2024-09-21 21:28:18 -0600
committerIsaac Andrade <andradei@proton.me>2024-09-21 21:28:18 -0600
commitcc60725eda4d3a9d63bf64a8d92a19526bde75f0 (patch)
tree974e3af7cdcbdc3259a086f617ee39d29e50ef9a /core/sys
parent04c08c2e2dbbacddae2a596a62fca5f904e3fa2c (diff)
Move bit set creation to compiler guard. Fix indentation on posix/sys_sem.
Diffstat (limited to 'core/sys')
-rw-r--r--core/sys/posix/fcntl.odin5
-rw-r--r--core/sys/posix/sys_sem.odin8
2 files changed, 8 insertions, 5 deletions
diff --git a/core/sys/posix/fcntl.odin b/core/sys/posix/fcntl.odin
index 499fe757b..32c124168 100644
--- a/core/sys/posix/fcntl.odin
+++ b/core/sys/posix/fcntl.odin
@@ -143,6 +143,8 @@ when ODIN_OS == .Linux {
// RDONLY = 0, // Default
}
+ O_Flags :: bit_set[O_Flag_Bits; c.int]
+
} else {
O_Flag_Bits :: enum c.int {
@@ -190,8 +192,9 @@ when ODIN_OS == .Linux {
// Reading only.
// RDONLY = 0, // Default
}
+
+ O_Flags :: bit_set[O_Flag_Bits; c.int]
}
-O_Flags :: bit_set[O_Flag_Bits; c.int]
// A mask of all the access mode bits.
when ODIN_OS == .Linux {
diff --git a/core/sys/posix/sys_sem.odin b/core/sys/posix/sys_sem.odin
index 9f45ab1fe..a496ecb4a 100644
--- a/core/sys/posix/sys_sem.odin
+++ b/core/sys/posix/sys_sem.odin
@@ -143,12 +143,12 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
semid_ds :: struct {
sem_perm: ipc_perm, // [PSX] operation permission structure
sem_otime: time_t, // [PSX] last semop()
- __sem_otime_high: c.ulong,
+ __sem_otime_high: c.ulong,
sem_ctime: time_t, // [PSX] last time changed by semctl()
- __sem_ctime_high: c.ulong,
+ __sem_ctime_high: c.ulong,
sem_nsems: c.ulong, // [PSX] number of semaphores in set
- __glibc_reserved3: c.ulong,
- __glibc_reserved4: c.ulong,
+ __glibc_reserved3: c.ulong,
+ __glibc_reserved4: c.ulong,
}
sembuf :: struct {