1 1.1 fvdl /* $NetBSD: endian_machdep.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */ 2 1.1 fvdl 3 1.1 fvdl #define _BYTE_ORDER _LITTLE_ENDIAN 4 1.1 fvdl 5 1.1 fvdl #ifdef __GNUC__ 6 1.1 fvdl 7 1.1 fvdl #include <machine/byte_swap.h> 8 1.1 fvdl 9 1.1 fvdl #define ntohl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x))) 10 1.1 fvdl #define ntohs(x) ((in_port_t)__byte_swap_word((in_port_t)(x))) 11 1.1 fvdl #define htonl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x))) 12 1.1 fvdl #define htons(x) ((in_port_t)__byte_swap_word((in_port_t)(x))) 13 1.1 fvdl 14 1.1 fvdl #endif 15