[libc-commits] [PATCH] D144506: [libc] Implement ntohl and ntohs

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Feb 21 12:37:49 PST 2023


sivachandra added inline comments.


================
Comment at: libc/src/network/ntohl.cpp:16
+LLVM_LIBC_FUNCTION(uint32_t, ntohl, (uint32_t netlong)) {
+  return Endian::to_big_endian(netlong);
+}
----------------
Should this always convert to big-endian, or should it convert to the host's endianness?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144506/new/

https://reviews.llvm.org/D144506



More information about the libc-commits mailing list