PERFORCE change 100770 for review

Wojciech A. Koszek wkoszek at FreeBSD.org
Thu Jul 6 16:17:15 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=100770

Change 100770 by wkoszek at wkoszek_laptop on 2006/07/06 16:17:09

	Additional parentheses around bswap* macros to make gcc happy.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/include/endian.h#3 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/include/endian.h#3 (text+ko) ====

@@ -120,15 +120,18 @@
 /*
  * Define the order of 32-bit words in 64-bit words.
  */
+/*
+ * XXXMIPS: Additional parentheses to make gcc more happy.
+ */
 #define _QUAD_HIGHWORD 0
 #define _QUAD_LOWWORD 1
 #else
 #define _QUAD_HIGHWORD  1
 #define _QUAD_LOWWORD 0
-#define __ntohl(x)	(__bswap32(x))
-#define __ntohs(x)	(__bswap16(x))
-#define __htonl(x)	(__bswap32(x))
-#define __htons(x)	(__bswap16(x))
+#define __ntohl(x)	(__bswap32((x)))
+#define __ntohs(x)	(__bswap16((x)))
+#define __htonl(x)	(__bswap32((x)))
+#define __htons(x)	(__bswap16((x)))
 #endif /* _MIPSEB */
 
 #ifdef __cplusplus


More information about the p4-projects mailing list