1 /* $NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */
4 * Written by Manuel Bouyer <bouyer@NetBSD.org>.
9 #if defined(LIBC_SCCS) && !defined(lint)
10 __RCSID("$NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
11 #endif /* LIBC_SCCS and not lint */
13 #include <sys/types.h>
14 #include <machine/bswap.h>
22 return ((x
<< 24) & 0xff000000 ) |
23 ((x
<< 8) & 0x00ff0000 ) |
24 ((x
>> 8) & 0x0000ff00 ) |
25 ((x
>> 24) & 0x000000ff );