net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.
All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
Signed-off-by: Jon Loeliger <jdl@freescale.com>
diff --git a/net/sntp.c b/net/sntp.c
index db8c2c2..4e38d41 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -12,7 +12,8 @@
#include "sntp.h"
-#if ((CONFIG_COMMANDS & CFG_CMD_NET) && (CONFIG_COMMANDS & CFG_CMD_SNTP))
+#if (((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) \
+ && ((CONFIG_COMMANDS & CFG_CMD_SNTP)) || defined(CONFIG_CMD_SNTP))
#define SNTP_TIMEOUT 10
@@ -67,7 +68,7 @@
memcpy (&seconds, &rpktp->transmit_timestamp, sizeof(ulong));
to_tm(ntohl(seconds) - 2208988800UL + NetTimeOffset, &tm);
-#if (CONFIG_COMMANDS & CFG_CMD_DATE)
+#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)
rtc_set (&tm);
#endif
printf ("Date: %4d-%02d-%02d Time: %2d:%02d:%02d\n",