Browse Source

add haiku to unix

avanspector 1 year ago
parent
commit
dc5cf23066
3 changed files with 10 additions and 2 deletions
  1. 8 0
      core/os/os_haiku.odin
  2. 1 1
      core/sys/unix/pthread_unix.odin
  3. 1 1
      core/sys/unix/time_unix.odin

+ 8 - 0
core/os/os_haiku.odin

@@ -101,3 +101,11 @@ close :: proc(fd: Handle) -> Errno {
 	}
 	}
 	return ERROR_NONE
 	return ERROR_NONE
 }
 }
+
+_alloc_command_line_arguments :: proc() -> []string {
+	res := make([]string, len(runtime.args__))
+	for arg, i in runtime.args__ {
+		res[i] = string(arg)
+	}
+	return res
+}

+ 1 - 1
core/sys/unix/pthread_unix.odin

@@ -1,4 +1,4 @@
-//+build linux, darwin, freebsd, openbsd
+//+build linux, darwin, freebsd, openbsd, haiku
 package unix
 package unix
 
 
 foreign import "system:pthread"
 foreign import "system:pthread"

+ 1 - 1
core/sys/unix/time_unix.odin

@@ -1,4 +1,4 @@
-//+build linux, darwin, freebsd, openbsd
+//+build linux, darwin, freebsd, openbsd, haiku
 package unix
 package unix
 
 
 when ODIN_OS == .Darwin {
 when ODIN_OS == .Darwin {