xref: /netbsd/sys/sys/bswap.h (revision bf9ec67e)
1 /*      $NetBSD: bswap.h,v 1.2 2000/02/03 02:03:12 cgd Exp $      */
2 
3 /* Written by Manuel Bouyer. Public domain */
4 
5 #ifndef _MACHINE_BSWAP_H_	/* _BEFORE_ #ifndef _SYS_BSWAP_H_ */
6 #include <machine/bswap.h>
7 #endif
8 
9 #ifndef _SYS_BSWAP_H_
10 #define _SYS_BSWAP_H_
11 
12 #ifndef _LOCORE
13 #include <sys/cdefs.h>
14 #include <sys/types.h>
15 
16 __BEGIN_DECLS
17 #if defined(_KERNEL) || defined(_STANDALONE) || !defined(__BSWAP_RENAME)
18 u_int16_t       bswap16 __P((u_int16_t));
19 u_int32_t       bswap32 __P((u_int32_t));
20 #else
21 u_int16_t       bswap16 __P((u_int16_t)) __RENAME(__bswap16);
22 u_int32_t       bswap32 __P((u_int32_t)) __RENAME(__bswap32);
23 #endif
24 u_int64_t       bswap64 __P((u_int64_t));
25 __END_DECLS
26 #endif /* !_LOCORE */
27 
28 #endif /* !_SYS_BSWAP_H_ */
29