NetBSD/sys/arch/amd64/include/endian_machdep.h
fvdl 81918bf8b4 Rename the x86_64 port to amd64, as this is the actual name used for
the processor family now. x86_64 is kept as the MACHINE_ARCH value,
since it's already widely used (by e.g. the toolchain, etc), and
by other operating systems.
2003-04-26 18:39:25 +00:00

15 lines
415 B
C

/* $NetBSD: endian_machdep.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
#define _BYTE_ORDER _LITTLE_ENDIAN
#ifdef __GNUC__
#include <machine/byte_swap.h>
#define ntohl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
#define ntohs(x) ((in_port_t)__byte_swap_word((in_port_t)(x)))
#define htonl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
#define htons(x) ((in_port_t)__byte_swap_word((in_port_t)(x)))
#endif