can't get_block(NO_DEV) any more
[minix.git] / common / lib / libc / gen / bswap16.c
blob54496fee1c51eed7d4766d1d3890a3d6c32f758d
1 /* $NetBSD: bswap16.c,v 1.2 2008/02/16 17:37:13 apb Exp $ */
3 /*
4 * Written by Manuel Bouyer <bouyer@NetBSD.org>.
5 * Public domain.
6 */
8 #include <sys/cdefs.h>
9 #if defined(LIBC_SCCS) && !defined(lint)
10 __RCSID("$NetBSD: bswap16.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
11 #endif /* LIBC_SCCS and not lint */
13 #include <sys/types.h>
14 #include <machine/bswap.h>
16 #undef bswap16
18 uint16_t
19 bswap16(x)
20 uint16_t x;
22 return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);