Added some libc bindings for NetBSD

This commit is contained in:
Andreas T Jonsson
2024-04-18 16:22:07 +02:00
parent 41d4dfbcd5
commit 07fc07822d
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ when ODIN_OS == .FreeBSD {
ERANGE :: 34 ERANGE :: 34
} }
when ODIN_OS == .OpenBSD { when ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD {
@(private="file") @(private="file")
@(default_calling_convention="c") @(default_calling_convention="c")
foreign libc { foreign libc {
+1 -1
View File
@@ -45,7 +45,7 @@ when ODIN_OS == .Windows {
} }
} }
when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .Darwin || ODIN_OS == .OpenBSD || ODIN_OS == .Haiku { when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .Darwin || ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD || ODIN_OS == .Haiku {
@(default_calling_convention="c") @(default_calling_convention="c")
foreign libc { foreign libc {
// 7.27.2 Time manipulation functions // 7.27.2 Time manipulation functions
+1 -1
View File
@@ -22,7 +22,7 @@ when ODIN_OS == .Windows {
wctrans_t :: distinct int wctrans_t :: distinct int
wctype_t :: distinct u32 wctype_t :: distinct u32
} else when ODIN_OS == .OpenBSD { } else when ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD {
wctrans_t :: distinct rawptr wctrans_t :: distinct rawptr
wctype_t :: distinct rawptr wctype_t :: distinct rawptr
+1 -1
View File
@@ -60,7 +60,7 @@ _file_stream_proc :: proc(stream_data: rawptr, mode: io.Stream_Mode, p: []byte,
case .Destroy: case .Destroy:
err = .Empty err = .Empty
case .Query: case .Query:
when ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Haiku { when ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD || ODIN_OS == .NetBSD || ODIN_OS == .Haiku {
return io.query_utility({.Close, .Flush, .Read, .Write, .Seek, .Size, .Query}) return io.query_utility({.Close, .Flush, .Read, .Write, .Seek, .Size, .Query})
} else { } else {
return io.query_utility({.Close, .Flush, .Read, .Read_At, .Write, .Write_At, .Seek, .Size, .Query}) return io.query_utility({.Close, .Flush, .Read, .Read_At, .Write, .Write_At, .Seek, .Size, .Query})