From 6d01aa90690cc8f4270669a6411f6cd15a90947b Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 16 Jun 2025 23:30:22 +0200 Subject: [PATCH] Appease -vet for haiku --- core/dynlib/lb_haiku.odin | 23 +++++++++++++++++ core/net/errors_others.odin | 7 ++++++ vendor/directx/dxc/dxcdef_haiku.odin | 37 ++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 core/dynlib/lb_haiku.odin create mode 100644 vendor/directx/dxc/dxcdef_haiku.odin diff --git a/core/dynlib/lb_haiku.odin b/core/dynlib/lb_haiku.odin new file mode 100644 index 000000000..79e05505a --- /dev/null +++ b/core/dynlib/lb_haiku.odin @@ -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 "" +} diff --git a/core/net/errors_others.odin b/core/net/errors_others.odin index bda0fd28f..b80ead79c 100644 --- a/core/net/errors_others.odin +++ b/core/net/errors_others.odin @@ -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, +} \ No newline at end of file diff --git a/vendor/directx/dxc/dxcdef_haiku.odin b/vendor/directx/dxc/dxcdef_haiku.odin new file mode 100644 index 000000000..44df94177 --- /dev/null +++ b/vendor/directx/dxc/dxcdef_haiku.odin @@ -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, +}