Date: Thu, 6 Jul 2006 00:07:20 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100677 for review Message-ID: <200607060007.k6607KrT086023@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100677 Change 100677 by cognet@cognet on 2006/07/06 00:07:03 Protect macro variables. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/endian.h#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/endian.h#2 (text+ko) ==== @@ -71,14 +71,14 @@ #define __is_constant(x) 0 #endif -#define __bswap16_const(x) ((x >> 8) | ((x << 8) & 0xff00)) -#define __bswap32_const(x) ((x >> 24) | ((x >> 8) & 0xff00) | \ - ((x << 8) & 0xff0000) | ((x << 24) & 0xff000000)) -#define __bswap64_const(x) ((x >> 56) | ((x >> 40) & 0xff00) | \ - ((x >> 24) & 0xff0000) | ((x >> 8) & 0xff000000) | \ - ((x << 8) & ((__uint64_t)0xff << 32)) | \ - ((x << 24) & ((__uint64_t)0xff << 40)) | \ - ((x << 40) & ((__uint64_t)0xff << 48)) | ((x << 56))) +#define __bswap16_const(x) (((x) >> 8) | (((x) << 8) & 0xff00)) +#define __bswap32_const(x) (((x) >> 24) | (((x) >> 8) & 0xff00) | \ + (((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000)) +#define __bswap64_const(x) (((x) >> 56) | (((x) >> 40) & 0xff00) | \ + (((x) >> 24) & 0xff0000) | (((x) >> 8) & 0xff000000) | \ + (((x) << 8) & ((__uint64_t)0xff << 32)) | \ + (((x) << 24) & ((__uint64_t)0xff << 40)) | \ + (((x) << 40) & ((__uint64_t)0xff << 48)) | (((x) << 56))) static __inline __uint16_t __bswap16_var(__uint16_t _x)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607060007.k6607KrT086023>