Home | History | Annotate | Line # | Download | only in include
endian_machdep.h revision 1.1
      1 /*	$NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:20 mycroft Exp $	*/
      2 
      3 #define _BYTE_ORDER _LITTLE_ENDIAN
      4 
      5 #ifdef __GNUC__
      6 
      7 #include <machine/byte_swap.h>
      8 
      9 #define	ntohl(x)	((in_addr_t)__byte_swap_long((in_addr_t)(x)))
     10 #define	ntohs(x)	((in_port_t)__byte_swap_word((in_port_t)(x)))
     11 #define	htonl(x)	((in_addr_t)__byte_swap_long((in_addr_t)(x)))
     12 #define	htons(x)	((in_port_t)__byte_swap_word((in_port_t)(x)))
     13 
     14 #endif
     15