1999-08-21 09:39:51 +04:00
|
|
|
/* $NetBSD: bswap.h,v 1.2 1999/08/21 05:39:54 simonb 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__
|
|
|
|
|
|
|
|
#include <machine/byte_swap.h>
|
|
|
|
#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_ */
|