public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [Patch alt] common/cmd_test: Avoid macro expansion
@ 2013-04-04 21:57 York Sun
  2013-04-04 23:06 ` sh1.park at lge.com
  0 siblings, 1 reply; 2+ messages in thread
From: York Sun @ 2013-04-04 21:57 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: York Sun <yorksun@freescale.com>
---
This is alternative patch to fix macro expansion issue for cmd_test.c

 common/cmd_test.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/common/cmd_test.c b/common/cmd_test.c
index d4ec186..26a84af 100644
--- a/common/cmd_test.c
+++ b/common/cmd_test.c
@@ -144,6 +144,14 @@ static int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return expr;
 }
 
+#ifdef true
+#undef true
+#endif
+
+#ifdef false
+#undef false
+#endif
+
 U_BOOT_CMD(
 	test,	CONFIG_SYS_MAXARGS,	1,	do_test,
 	"minimal test like /bin/sh",
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-04 23:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 21:57 [U-Boot] [Patch alt] common/cmd_test: Avoid macro expansion York Sun
2013-04-04 23:06 ` sh1.park at lge.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox