Per spec:
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/htons.html
Also adds UInt16Type and UInt32Type to spec.td
Co-authored-by: Jeff Bailey <jbailey@google.com>
Paths
| Differential D143795
[libc] Implement htonl and htons ClosedPublic Authored by rtenneti on Feb 10 2023, 4:39 PM.
Details Summary Per spec:
Also adds UInt16Type and UInt32Type to spec.td Co-authored-by: Jeff Bailey <jbailey@google.com>
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 10 2023, 4:39 PM This revision is now accepted and ready to land.Feb 15 2023, 7:08 PM Closed by commit rGfbe210dc7a6a: [libc] Implement htonl and htons (authored by rtenneti). · Explain WhyFeb 16 2023, 10:12 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 498052 libc/config/linux/aarch64/entrypoints.txt
libc/config/linux/x86_64/entrypoints.txt
libc/config/linux/x86_64/headers.txt
libc/include/CMakeLists.txt
libc/include/arpa/inet.h.def
libc/spec/posix.td
libc/spec/spec.td
libc/src/CMakeLists.txt
libc/src/network/CMakeLists.txt
libc/src/network/htonl.h
libc/src/network/htonl.cpp
libc/src/network/htons.h
libc/src/network/htons.cpp
libc/test/src/CMakeLists.txt
libc/test/src/network/CMakeLists.txt
libc/test/src/network/htonl_test.cpp
libc/test/src/network/htons_test.cpp
|
I think you should include inttypes.h here.