1 /* $NetBSD: endian_machdep.h,v 1.1.2.3 2004/09/21 13:12:14 skrll Exp $ */ 2 3 #define _BYTE_ORDER _LITTLE_ENDIAN 4 5 #ifdef __GNUC__ 6 7 #include <machine/byte_swap.h> 8 9 #define ntohl(x) ((uint32_t)__byte_swap_long((uint32_t)(x))) 10 #define ntohs(x) ((uint16_t)__byte_swap_word((uint16_t)(x))) 11 #define htonl(x) ((uint32_t)__byte_swap_long((uint32_t)(x))) 12 #define htons(x) ((uint16_t)__byte_swap_word((uint16_t)(x))) 13 14 #endif 15