Tackle the endian.h mess. Make it so that:
authorguenther <guenther@openbsd.org>
Sat, 12 Jul 2014 16:25:08 +0000 (16:25 +0000)
committerguenther <guenther@openbsd.org>
Sat, 12 Jul 2014 16:25:08 +0000 (16:25 +0000)
commit7c5b55ffaa0f5c08dd241e875c8f84be8ee73135
tree40c3ca814ac50f203d236bb48f4ccd7bd5b9e8fc
parent29806ff0f16d54537ad2a59ca8771e7942038e3c
Tackle the endian.h mess.  Make it so that:
 * you can #include <sys/endian.h> instead of <machine/endian.h>,
   and ditto <endian.h>  (fixes code that pulls in <sys/endian.h> first)

 * those will always export the symbols that POSIX specified for
   <endian.h>, including the new {be,le}{16,32,64}toh() set.  c.f.
http://austingroupbugs.net/view.php?id=162

   if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h>
   currently exports (ntohs, NTOHS, dlg's bemtoh*, etc)

 * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and
   <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER
   and betoh*

ok deraadt@
20 files changed:
include/Makefile
include/arpa/inet.h
sys/arch/alpha/include/endian.h
sys/arch/amd64/include/endian.h
sys/arch/arm/include/endian.h
sys/arch/hppa/include/endian.h
sys/arch/hppa64/include/endian.h
sys/arch/i386/include/endian.h
sys/arch/ia64/include/endian.h
sys/arch/m88k/include/endian.h
sys/arch/mips64/include/endian.h
sys/arch/powerpc/include/endian.h
sys/arch/sh/include/endian.h
sys/arch/sparc/include/endian.h
sys/arch/sparc64/include/endian.h
sys/arch/vax/include/endian.h
sys/netinet/in.h
sys/sys/_endian.h [new file with mode: 0644]
sys/sys/endian.h
sys/sys/types.h