mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-09 21:11:36 -07:00
rename dynamic to shared
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import "core:intrinsics"
|
||||
|
||||
SUS_exit :: uintptr(60)
|
||||
SUS_write ::uintptr(1)
|
||||
STDOUT_FILENO :: int(1)
|
||||
|
||||
sus_write :: proc "contextless" (fd: int, buf: cstring, size: uint) -> int {
|
||||
return int(intrinsics.syscall(
|
||||
SUS_write,
|
||||
cast(uintptr) fd,
|
||||
cast(uintptr) cast(rawptr) buf,
|
||||
cast(uintptr) size
|
||||
))
|
||||
}
|
||||
|
||||
@(link_name = "sussy_baka")
|
||||
sus_exit :: proc "contextless" (code: $T)->! {
|
||||
intrinsics.syscall(SUS_exit, uintptr(code))
|
||||
unreachable()
|
||||
}
|
||||
|
||||
sus :: proc {sus_write, sus_exit}
|
||||
|
||||
@(link_name="_start", export) _start :: proc "c" ()->! {
|
||||
str :: cstring("Hello, world!\n")
|
||||
sus_write(STDOUT_FILENO, str, uint(14));
|
||||
sus_exit(0)
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Vendored
+2
-2
@@ -3,10 +3,10 @@ package glfw_bindings
|
||||
import "core:c"
|
||||
import vk "vendor:vulkan"
|
||||
|
||||
GLFW_DYNAMIC :: #config(GLFW_DYNAMIC, false)
|
||||
GLFW_SHARED :: #config(GLFW_SHARED, false)
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
when GLFW_DYNAMIC {
|
||||
when GLFW_SHARED {
|
||||
foreign import glfw {
|
||||
"../lib/glfw3dll.lib",
|
||||
"system:user32.lib",
|
||||
|
||||
Reference in New Issue
Block a user