drop htonl(), htons(), ntohl(), ntohs() MD functions from libc
authornaddy <naddy@openbsd.org>
Mon, 15 Apr 2024 14:30:48 +0000 (14:30 +0000)
committernaddy <naddy@openbsd.org>
Mon, 15 Apr 2024 14:30:48 +0000 (14:30 +0000)
commited759541c5fc4ccbc1a0be552fc63c7b344b66df
treebbfcece4c41a7f675b0f37ecb38c758886f94a59
parent549040881b0ea7678bc112fb70c95ced6d414c6c
drop htonl(), htons(), ntohl(), ntohs() MD functions from libc

Userland code compiled in a normal fashion picks up the htonl(),
htons(), ntohl(), ntohs() macros implemented by endian.h.  The
functions in libc are effectively unused.  Keep the MI functions
in case something looks for the symbols in libc or plays games
with #undef, but change them to wrap the implementation from
endian.h.

tweaks suggested by claudio@, ok miod@
50 files changed:
lib/libc/arch/aarch64/gen/byte_swap_2.S
lib/libc/arch/aarch64/gen/byte_swap_4.S
lib/libc/arch/aarch64/net/Makefile.inc [deleted file]
lib/libc/arch/alpha/net/Makefile.inc [deleted file]
lib/libc/arch/alpha/net/byte_swap_2.S [deleted file]
lib/libc/arch/alpha/net/byte_swap_4.S [deleted file]
lib/libc/arch/alpha/net/htonl.S [deleted file]
lib/libc/arch/alpha/net/htons.S [deleted file]
lib/libc/arch/alpha/net/ntohl.S [deleted file]
lib/libc/arch/alpha/net/ntohs.S [deleted file]
lib/libc/arch/amd64/net/Makefile.inc [deleted file]
lib/libc/arch/amd64/net/htonl.S [deleted file]
lib/libc/arch/amd64/net/htons.S [deleted file]
lib/libc/arch/amd64/net/ntohl.S [deleted file]
lib/libc/arch/amd64/net/ntohs.S [deleted file]
lib/libc/arch/arm/gen/byte_swap_2.S
lib/libc/arch/arm/gen/byte_swap_4.S
lib/libc/arch/arm/net/Makefile.inc [deleted file]
lib/libc/arch/hppa/net/Makefile.inc [deleted file]
lib/libc/arch/i386/net/Makefile.inc [deleted file]
lib/libc/arch/i386/net/htonl.S [deleted file]
lib/libc/arch/i386/net/htons.S [deleted file]
lib/libc/arch/i386/net/ntohl.S [deleted file]
lib/libc/arch/i386/net/ntohs.S [deleted file]
lib/libc/arch/m88k/net/Makefile.inc [deleted file]
lib/libc/arch/m88k/net/htonl.S [deleted file]
lib/libc/arch/m88k/net/htons.S [deleted file]
lib/libc/arch/m88k/net/ntohl.S [deleted file]
lib/libc/arch/m88k/net/ntohs.S [deleted file]
lib/libc/arch/mips64/net/Makefile.inc [deleted file]
lib/libc/arch/mips64/net/htonl.S [deleted file]
lib/libc/arch/mips64/net/htons.S [deleted file]
lib/libc/arch/powerpc/net/Makefile.inc [deleted file]
lib/libc/arch/powerpc64/net/Makefile.inc [deleted file]
lib/libc/arch/riscv64/net/Makefile.inc [deleted file]
lib/libc/arch/sh/net/Makefile.inc [deleted file]
lib/libc/arch/sh/net/htonl.c [deleted file]
lib/libc/arch/sh/net/htons.c [deleted file]
lib/libc/arch/sh/net/ntohl.c [deleted file]
lib/libc/arch/sh/net/ntohs.c [deleted file]
lib/libc/arch/sparc64/net/Makefile.inc [deleted file]
lib/libc/arch/sparc64/net/htonl.S [deleted file]
lib/libc/arch/sparc64/net/htons.S [deleted file]
lib/libc/arch/sparc64/net/ntohl.S [deleted file]
lib/libc/arch/sparc64/net/ntohs.S [deleted file]
lib/libc/net/Makefile.inc
lib/libc/net/htonl.c
lib/libc/net/htons.c
lib/libc/net/ntohl.c
lib/libc/net/ntohs.c