[PATCH] Rename _B to _XBYTE in libfdt_env.h.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The _B macro is also defined by cygwin in ctype.h.
Rename _B to _XBYTE to better avoid name collisions.

Signed-off-by: Andrej Krutak <andree@xxxxxxxxx>
---
 scripts/dtc/libfdt/libfdt_env.h |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/scripts/dtc/libfdt/libfdt_env.h b/scripts/dtc/libfdt/libfdt_env.h
index 449bf60..4ec8565 100644
--- a/scripts/dtc/libfdt/libfdt_env.h
+++ b/scripts/dtc/libfdt/libfdt_env.h
@@ -5,19 +5,20 @@
 #include <stdint.h>
 #include <string.h>
 
-#define _B(n)	((unsigned long long)((uint8_t *)&x)[n])
+#define _XBYTE(n)	((unsigned long long)((uint8_t *)&x)[n])
 static inline uint32_t fdt32_to_cpu(uint32_t x)
 {
-	return (_B(0) << 24) | (_B(1) << 16) | (_B(2) << 8) | _B(3);
+	return (_XBYTE(0) << 24) | (_XBYTE(1) << 16) | (_XBYTE(2) << 8) | _XBYTE(3);
 }
 #define cpu_to_fdt32(x) fdt32_to_cpu(x)
 
 static inline uint64_t fdt64_to_cpu(uint64_t x)
 {
-	return (_B(0) << 56) | (_B(1) << 48) | (_B(2) << 40) | (_B(3) << 32)
-		| (_B(4) << 24) | (_B(5) << 16) | (_B(6) << 8) | _B(7);
+	return (_XBYTE(0) << 56) | (_XBYTE(1) << 48) | (_XBYTE(2) << 40)
+		| (_XBYTE(3) << 32) | (_XBYTE(4) << 24) | (_XBYTE(5) << 16)
+		| (_XBYTE(6) << 8) | _XBYTE(7);
 }
 #define cpu_to_fdt64(x) fdt64_to_cpu(x)
-#undef _B
+#undef _XBYTE
 
 #endif /* _LIBFDT_ENV_H */
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux