mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
net: rework errors to be cross-platform
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#+build !darwin
|
||||
#+build !linux
|
||||
#+build !freebsd
|
||||
#+build !windows
|
||||
package net
|
||||
|
||||
@(private="file", thread_local)
|
||||
_last_error: i32
|
||||
|
||||
_last_platform_error :: proc() -> i32 {
|
||||
return _last_error
|
||||
}
|
||||
|
||||
_last_platform_error_string :: proc() -> string {
|
||||
return ""
|
||||
}
|
||||
|
||||
_set_last_platform_error :: proc(err: i32) {
|
||||
_last_error = err
|
||||
}
|
||||
Reference in New Issue
Block a user