mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Re-add htonl and htons for those porting from C.
This commit is contained in:
@@ -242,4 +242,10 @@ foreign ws2_32 {
|
|||||||
ntohl :: proc(netlong: c_ulong) -> c_ulong ---
|
ntohl :: proc(netlong: c_ulong) -> c_ulong ---
|
||||||
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ntohs)
|
// [MS-Docs](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ntohs)
|
||||||
ntohs :: proc(netshort: c_ushort) -> c_ushort ---
|
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 ---
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user