1 /* $NetBSD: endian.h,v 1.28 2000/03/16 15:09:36 mycroft Exp $ */ 2 3 #ifndef _I386_ENDIAN_H_ 4 #define _I386_ENDIAN_H_ 5 6 #define _BYTE_ORDER _LITTLE_ENDIAN 7 #include <sys/endian.h> 8 9 #ifdef __GNUC__ 10 11 #include <machine/byte_swap.h> 12 13 #define ntohl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x))) 14 #define ntohs(x) ((in_port_t)__byte_swap_word((in_port_t)(x))) 15 #define htonl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x))) 16 #define htons(x) ((in_port_t)__byte_swap_word((in_port_t)(x))) 17 18 #endif 19 20 #endif /* !_I386_ENDIAN_H_ */ 21