Haiku: more posix

This commit is contained in:
avanspector
2025-01-10 06:40:29 +01:00
parent a6dccf5e98
commit 5d3a069e7a
36 changed files with 773 additions and 136 deletions
+19 -2
View File
@@ -1,4 +1,4 @@
#+build linux, darwin, netbsd, openbsd, freebsd
#+build linux, darwin, netbsd, openbsd, freebsd, haiku
package posix
import "core:c"
@@ -319,7 +319,7 @@ Info_Errno :: enum c.int {
OVERFLOW = EAI_OVERFLOW,
}
when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux {
when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS == .OpenBSD || ODIN_OS == .OpenBSD || ODIN_OS == .Linux || ODIN_OS == .Haiku {
hostent :: struct {
h_name: cstring, /* [PSX] official name of host */
@@ -431,6 +431,23 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
NI_NUMERICSCOPE :: 0x100
NI_DGRAM :: 16
} else when ODIN_OS == .Haiku {
AI_PASSIVE :: 0x001
AI_CANONNAME :: 0x002
AI_NUMERICHOST :: 0x004
AI_NUMERICSERV :: 0x008
AI_V4MAPPED :: 0x800
AI_ALL :: 0x100
AI_ADDRCONFIG :: 0x400
NI_NOFQDN :: 0x01
NI_NUMERICHOST :: 0x02
NI_NAMEREQD :: 0x04
NI_NUMERICSERV :: 0x08
NI_DGRAM :: 0x10
NI_NUMERICSCOPE :: 0x40
}
when ODIN_OS == .OpenBSD {