NetBSD/sys/arch/i386/include/endian.h

21 lines
515 B
C
Raw Normal View History

/* $NetBSD: endian.h,v 1.28 2000/03/16 15:09:36 mycroft Exp $ */
1998-08-15 08:57:50 +04:00
#ifndef _I386_ENDIAN_H_
#define _I386_ENDIAN_H_
#define _BYTE_ORDER _LITTLE_ENDIAN
#include <sys/endian.h>
#ifdef __GNUC__
1993-09-16 09:59:43 +04:00
#include <machine/byte_swap.h>
#define ntohl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
#define ntohs(x) ((in_port_t)__byte_swap_word((in_port_t)(x)))
#define htonl(x) ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
#define htons(x) ((in_port_t)__byte_swap_word((in_port_t)(x)))
1993-09-16 09:59:43 +04:00
#endif
#endif /* !_I386_ENDIAN_H_ */