Home | History | Annotate | Line # | Download | only in include
endian_machdep.h revision 1.1.32.2
      1  1.1.32.1    skrll /*	$NetBSD: endian_machdep.h,v 1.1.32.2 2004/09/18 14:35:40 skrll Exp $	*/
      2       1.1  mycroft 
      3       1.1  mycroft #define _BYTE_ORDER _LITTLE_ENDIAN
      4       1.1  mycroft 
      5       1.1  mycroft #ifdef __GNUC__
      6       1.1  mycroft 
      7       1.1  mycroft #include <machine/byte_swap.h>
      8       1.1  mycroft 
      9  1.1.32.1    skrll #define	ntohl(x)	((uint32_t)__byte_swap_long((uint32_t)(x)))
     10  1.1.32.1    skrll #define	ntohs(x)	((uint16_t)__byte_swap_word((uint16_t)(x)))
     11  1.1.32.1    skrll #define	htonl(x)	((uint32_t)__byte_swap_long((uint32_t)(x)))
     12  1.1.32.1    skrll #define	htons(x)	((uint16_t)__byte_swap_word((uint16_t)(x)))
     13       1.1  mycroft 
     14       1.1  mycroft #endif
     15