aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-06-06 13:13:34 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-06-06 13:13:34 +0200
commitf1ce9f98d8e5c838b353ac54b527bd9016dce8e6 (patch)
tree87e244e00f1759e3191243c70aa237c1d7fcb4f0 /core
parent8389dfd050e9571cc71c96d44f6ad8e36d082383 (diff)
Re-add htonl and htons for those porting from C.
Diffstat (limited to 'core')
-rw-r--r--core/sys/windows/ws2_32.odin8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/sys/windows/ws2_32.odin b/core/sys/windows/ws2_32.odin
index 6c68e43f3..cb1071d9e 100644
--- a/core/sys/windows/ws2_32.odin
+++ b/core/sys/windows/ws2_32.odin
@@ -242,4 +242,10 @@ foreign ws2_32 {
ntohl :: proc(netlong: c_ulong) -> c_ulong ---
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ntohs)
ntohs :: proc(netshort: c_ushort) -> c_ushort ---
-}
+ // [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htonl)
+ // Prefer using endian-specific integers instead, https://odin-lang.org/docs/overview/#basic-types
+ htonl :: proc(hostlong: c_ulong) -> c_ulong ---
+ // [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htons)
+ // Prefer using endian-specific integers instead, https://odin-lang.org/docs/overview/#basic-types
+ htons :: proc(hostshort: c_ushort) -> c_ushort ---
+} \ No newline at end of file