net: rework errors to be cross-platform

This commit is contained in:
Laytan Laats
2025-04-05 17:35:19 +02:00
parent f796b67a67
commit ff7d55a8e1
19 changed files with 1457 additions and 913 deletions
+20
View File
@@ -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
}