Module Name: src
Committed By: matt
Date: Wed Jan 2 17:02:13 UTC 2013
Modified Files:
src/sys/sys: cdefs.h
Log Message:
Don't define __BIT/__BITS if __ASSEMBLER__ is defined.
(since they use C syntax they won't work anyways).
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/sys/cdefs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.103 src/sys/sys/cdefs.h:1.104
--- src/sys/sys/cdefs.h:1.103 Sun Oct 28 17:06:40 2012
+++ src/sys/sys/cdefs.h Wed Jan 2 17:02:13 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs.h,v 1.103 2012/10/28 17:06:40 joerg Exp $ */
+/* $NetBSD: cdefs.h,v 1.104 2013/01/02 17:02:13 matt Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -512,6 +512,7 @@
*/
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
+#ifndef __ASSEMBLER__
/* __BIT(n): nth bit, where __BIT(0) == 0x1. */
#define __BIT(__n) \
(((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1 << (uintmax_t)(__n)))
@@ -519,6 +520,7 @@
/* __BITS(m, n): bits m through n, m < n. */
#define __BITS(__m, __n) \
((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1))
+#endif /* !__ASSEMBLER__ */
/* find least significant bit that is set */
#define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))