Improve the endian support for DragonFly by providing functions to convert
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Mon, 23 Aug 2004 16:03:44 +0000 (16:03 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Mon, 23 Aug 2004 16:03:44 +0000 (16:03 +0000)
commit465a99ae0edecae7ac491dee33a3357d145c6405
tree3a31a534d2d65623c7789013564d59056eb10d95
parent2a615bda97c4c0df44c74d456f5a2e0ade01d257
Improve the endian support for DragonFly by providing functions to convert
16/32/64 bit variables and parts of byte streams between host order and
big / little endian.

Reduce the namespace pollution for normal usage, e.g. of sys/types.h.
The duplication of ntohl and friends in arpa/inet.h and sys/param.h comes
from byteorder(3) showing sys/param.h as header file and SUS requiring
arpa/inet.h to provide this functions.

Remove local hacks in acpidump and usb_port.h.

The prototype of ntohl and friends is in sync with SUS, warnings e.g. for
implicit sign casts or use of int/long will be handled separately.

Written-by: Hitten Pandya and Joerg Sonnenberger
Inspired-by: FreeBSD
include/arpa/inet.h
sys/bus/usb/usb_port.h
sys/cpu/i386/include/endian.h
sys/i386/include/endian.h
sys/sys/endian.h
sys/sys/param.h
usr.sbin/acpi/acpidump/acpi.c