NetBSD/sys/arch/mips/include/bswap.h
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00

22 lines
524 B
C

/* $NetBSD: bswap.h,v 1.1 1999/01/15 13:31:25 bouyer Exp $ */
/* Written by Manuel Bouyer. Public domain */
#ifndef _MIPS_BSWAP_H_
#define _MIPS_BSWAP_H_
#include <sys/cdefs.h>
__BEGIN_DECLS
#ifdef _KERNEL
u_int16_t bswap16 __P((u_int16_t));
u_int32_t bswap32 __P((u_int32_t));
#else
u_int16_t bswap16 __P((u_int16_t)) __RENAME(__bswap16);
u_int32_t bswap32 __P((u_int32_t)) __RENAME(__bswap32);
#endif
u_int64_t bswap64 __P((u_int64_t));
__END_DECLS
#endif /* _MIPS_BSWAP_H_ */