*finally!!!*
> CVSROOT: /cvs > Module name: src > Changes by: guent...@cvs.openbsd.org 2014/07/12 10:25:09 > > Modified files: > sys/sys : endian.h types.h > include : Makefile > include/arpa : inet.h > sys/netinet : in.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 > Added files: > sys/sys : _endian.h > > Log message: > 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@