Appease -vet for haiku

This commit is contained in:
Jeroen van Rijn
2025-06-16 23:30:22 +02:00
parent 246deda2c5
commit 6d01aa9069
3 changed files with 67 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#+build haiku
#+private
package dynlib
import "base:runtime"
_LIBRARY_FILE_EXTENSION :: ""
_load_library :: proc(path: string, global_symbols: bool, allocator: runtime.Allocator) -> (Library, bool) {
return nil, false
}
_unload_library :: proc(library: Library) -> bool {
return false
}
_symbol_address :: proc(library: Library, symbol: string, allocator: runtime.Allocator) -> (ptr: rawptr, found: bool) {
return nil, false
}
_last_error :: proc() -> string {
return ""
}
+7
View File
@@ -18,3 +18,10 @@ _last_platform_error_string :: proc() -> string {
_set_last_platform_error :: proc(err: i32) {
_last_error = err
}
Parse_Endpoint_Error :: enum u32 {
None = 0,
Bad_Port = 1,
Bad_Address,
Bad_Hostname,
}
+37
View File
@@ -0,0 +1,37 @@
#+build haiku
package directx_dxc
import "core:c"
FILETIME :: struct {
dwLowDateTime: DWORD,
dwHighDateTime: DWORD,
}
GUID :: struct {
Data1: DWORD,
Data2: WORD,
Data3: WORD,
Data4: [8]BYTE,
}
BYTE :: distinct u8
WORD :: u16
DWORD :: u32
BOOL :: distinct b32
SIZE_T :: uint
ULONG :: c.ulong
CLSID :: GUID
IID :: GUID
LONG :: distinct c.long
HRESULT :: distinct LONG
wstring :: [^]c.wchar_t
BSTR :: wstring
IUnknown :: struct {
using _iunknown_vtable: ^IUnknown_VTable,
}
IUnknown_VTable :: struct {
QueryInterface: proc "c" (this: ^IUnknown, riid: ^IID, ppvObject: ^rawptr) -> HRESULT,
AddRef: proc "c" (this: ^IUnknown) -> ULONG,
Release: proc "c" (this: ^IUnknown) -> ULONG,
}