2000-05-27 20:44:14 +04:00
|
|
|
/* $NetBSD: bswap.h,v 1.3 2000/05/27 16:44:14 ragge Exp $ */
|
1999-01-15 16:31:15 +03:00
|
|
|
|
|
|
|
/* Written by Manuel Bouyer. Public domain */
|
|
|
|
|
1999-08-21 09:39:51 +04:00
|
|
|
#ifndef _MACHINE_BSWAP_H_
|
|
|
|
#define _MACHINE_BSWAP_H_
|
1999-01-15 16:31:15 +03:00
|
|
|
|
1999-08-21 09:39:51 +04:00
|
|
|
#define __BSWAP_RENAME
|
|
|
|
#include <sys/bswap.h>
|
1999-01-15 16:31:15 +03:00
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
2000-05-27 20:44:14 +04:00
|
|
|
#include <machine/byte_swap.h>
|
1999-01-15 16:31:15 +03:00
|
|
|
#define bswap16(x) __byte_swap_word(x)
|
|
|
|
#define bswap32(x) __byte_swap_long(x)
|
|
|
|
|
|
|
|
#endif /* __GNUC__ */
|
|
|
|
|
1999-08-21 09:39:51 +04:00
|
|
|
#endif /* !_MACHINE_BSWAP_H_ */
|