mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Added some libc bindings for NetBSD
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
@@ -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})
|
||||||
|
|||||||
Reference in New Issue
Block a user