Skip to contentSkip to conversation

common/cmd_test: Avoid macro expansion

PATCH New York Sun 2 participants 2 messages Apr 4, 2013 – Apr 8, 2013

lore
Share & tools
lore

York Sun

author
#0 lore raw

PATCH v2 1/1 common/cmd_test: Avoid macro expansion

cmd_test.c adds "true" and "false" as new commands. We need to avoid macro expansion for U_BOOT_CMD.

---
change since v1: fix typo in comment

 common/cmd_test.c |    9 +++++++++
 1 file changed, 9 insertions(+)
common/cmd_test.c +9 -0
index d4ec186..acc0ecf 100644
@@ -21,6 +21,15 @@
  * MA 02111-1307 USA
  */
 
+/*
+ * Define _STDBOOL_H here to avoid macro expansion of true and false.
+ * If the future code requires macro true or false, remove this define
+ * and undef true and false before U_BOOT_CMD. This define and comment
+ * shall be removed if change to U_BOOT_CMD is made to take string
+ * instead of stringifying it.
+ */
+#define _STDBOOL_H
+
 #include <common.h>
 #include <command.h>
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/1 common/cmd_test: Avoid macro expansion

Quoted 4 lines · York Sun

cmd_test.c adds "true" and "false" as new commands. We need to avoid macro expansion for U_BOOT_CMD.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130408/ca96074b/attachment.pgp>