aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authoravanspector <avanspector@gmail.com>2024-02-25 02:59:45 +0100
committeravanspector <avanspector@gmail.com>2024-02-25 02:59:45 +0100
commitb03f17dd8d5510b852d69918f7fdcc07b0d649e1 (patch)
tree50fed8e658daae472bb36e193e71bd3fd5d43217 /core
parent24c8b1540920bd181dc399bf86f2ec3a8ea72762 (diff)
add haiku to base:runtime and core:c/libc
Diffstat (limited to 'core')
-rw-r--r--core/c/libc/stdio.odin30
-rw-r--r--core/c/libc/wctype.odin6
2 files changed, 35 insertions, 1 deletions
diff --git a/core/c/libc/stdio.odin b/core/c/libc/stdio.odin
index 39969e4a8..b83ddecc8 100644
--- a/core/c/libc/stdio.odin
+++ b/core/c/libc/stdio.odin
@@ -163,6 +163,36 @@ when ODIN_OS == .Darwin {
}
}
+when ODIN_OS == .Haiku {
+ fpos_t :: distinct i64
+
+ _IOFBF :: 0
+ _IOLBF :: 1
+ _IONBF :: 2
+
+ BUFSIZ :: 8192
+
+ EOF :: int(-1)
+
+ FOPEN_MAX :: 128
+
+ FILENAME_MAX :: 256
+
+ L_tmpnam :: 512
+
+ SEEK_SET :: 0
+ SEEK_CUR :: 1
+ SEEK_END :: 2
+
+ TMP_MAX :: 32768
+
+ foreign libc {
+ stderr: ^FILE
+ stdin: ^FILE
+ stdout: ^FILE
+ }
+}
+
@(default_calling_convention="c")
foreign libc {
// 7.21.4 Operations on files
diff --git a/core/c/libc/wctype.odin b/core/c/libc/wctype.odin
index 43aee9dc6..cbce220d4 100644
--- a/core/c/libc/wctype.odin
+++ b/core/c/libc/wctype.odin
@@ -29,7 +29,11 @@ when ODIN_OS == .Windows {
} else when ODIN_OS == .FreeBSD {
wctrans_t :: distinct int
wctype_t :: distinct ulong
-
+
+} else when ODIN_OS == .Haiku {
+ wctrans_t :: distinct i32
+ wctype_t :: distinct i32
+
}
@(default_calling_convention="c")