You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/08/13 10:28:34 UTC
[incubator-nuttx-apps] branch master updated: zmodem: Move crc16.h and crc32.h from host to host/nuttx
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new b515a00fe zmodem: Move crc16.h and crc32.h from host to host/nuttx
b515a00fe is described below
commit b515a00feae07482e7db7c2fa175100822d1df6e
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Aug 12 14:20:07 2022 +0800
zmodem: Move crc16.h and crc32.h from host to host/nuttx
to avoid the conflict with the 3rd party library
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/configdata/configdata_main.c | 2 +-
fsutils/mkgpt/mkgpt.c | 3 ++-
system/zmodem/host/{ => nuttx}/crc16.h | 8 ++++----
system/zmodem/host/{ => nuttx}/crc32.h | 8 ++++----
system/zmodem/zm_proto.c | 5 +++--
system/zmodem/zm_send.c | 7 ++++---
system/zmodem/zm_state.c | 4 ++--
system/zmodem/zm_utils.c | 3 ++-
testing/fstest/fstest_main.c | 3 ++-
testing/nxffs/nxffs_main.c | 2 +-
testing/smart/smart_main.c | 2 +-
11 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/examples/configdata/configdata_main.c b/examples/configdata/configdata_main.c
index 6d230b201..a90118f25 100644
--- a/examples/configdata/configdata_main.c
+++ b/examples/configdata/configdata_main.c
@@ -33,9 +33,9 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#include <crc32.h>
#include <debug.h>
+#include <nuttx/crc32.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/mtd/configdata.h>
#include <nuttx/fs/ioctl.h>
diff --git a/fsutils/mkgpt/mkgpt.c b/fsutils/mkgpt/mkgpt.c
index ac2744861..5b2c3d3f5 100644
--- a/fsutils/mkgpt/mkgpt.c
+++ b/fsutils/mkgpt/mkgpt.c
@@ -22,7 +22,6 @@
* Included Files
****************************************************************************/
-#include <crc32.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -35,6 +34,8 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <nuttx/crc32.h>
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
diff --git a/system/zmodem/host/crc16.h b/system/zmodem/host/nuttx/crc16.h
similarity index 91%
rename from system/zmodem/host/crc16.h
rename to system/zmodem/host/nuttx/crc16.h
index be1f71151..6abfb7387 100644
--- a/system/zmodem/host/crc16.h
+++ b/system/zmodem/host/nuttx/crc16.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/system/zmodem/host/crc16.h
+ * apps/system/zmodem/host/nuttx/crc16.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,8 +18,8 @@
*
****************************************************************************/
-#ifndef __APPS_SYSTEM_ZMODEM_HOST_CRC16_H
-#define __APPS_SYSTEM_ZMODEM_HOST_CRC16_H
+#ifndef __APPS_SYSTEM_ZMODEM_HOST_NUTTX_CRC16_H
+#define __APPS_SYSTEM_ZMODEM_HOST_NUTTX_CRC16_H
/****************************************************************************
* Included Files
@@ -65,4 +65,4 @@ uint16_t crc16(const uint8_t *src, size_t len);
}
#endif
-#endif /* __APPS_SYSTEM_ZMODEM_HOST_CRC16_H */
+#endif /* __APPS_SYSTEM_ZMODEM_HOST_NUTTX_CRC16_H */
diff --git a/system/zmodem/host/crc32.h b/system/zmodem/host/nuttx/crc32.h
similarity index 91%
rename from system/zmodem/host/crc32.h
rename to system/zmodem/host/nuttx/crc32.h
index 55f8349b7..fd4878607 100644
--- a/system/zmodem/host/crc32.h
+++ b/system/zmodem/host/nuttx/crc32.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/system/zmodem/host/crc32.h
+ * apps/system/zmodem/host/nuttx/crc32.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,8 +18,8 @@
*
****************************************************************************/
-#ifndef __APPS_SYSTEM_ZMODEM_HOST_CRC32_H
-#define __APPS_SYSTEM_ZMODEM_HOST_CRC32_H
+#ifndef __APPS_SYSTEM_ZMODEM_HOST_NUTTX_CRC32_H
+#define __APPS_SYSTEM_ZMODEM_HOST_NUTTX_CRC32_H
/****************************************************************************
* Included Files
@@ -65,4 +65,4 @@ uint32_t crc32(const uint8_t *src, size_t len);
}
#endif
-#endif /* __APPS_SYSTEM_ZMODEM_HOST_CRC32_H */
+#endif /* __APPS_SYSTEM_ZMODEM_HOST_NUTTX_CRC32_H */
diff --git a/system/zmodem/zm_proto.c b/system/zmodem/zm_proto.c
index f94f3c464..09131da6c 100644
--- a/system/zmodem/zm_proto.c
+++ b/system/zmodem/zm_proto.c
@@ -30,8 +30,9 @@
#include <nuttx/config.h>
#include <stdio.h>
-#include <crc16.h>
-#include <crc32.h>
+
+#include <nuttx/crc16.h>
+#include <nuttx/crc32.h>
#include "zm.h"
diff --git a/system/zmodem/zm_send.c b/system/zmodem/zm_send.c
index 39fb5b44a..32555c539 100644
--- a/system/zmodem/zm_send.c
+++ b/system/zmodem/zm_send.c
@@ -45,11 +45,12 @@
#include <fcntl.h>
#include <assert.h>
#include <errno.h>
-#include <crc16.h>
-#include <crc32.h>
+#include <nuttx/crc16.h>
+#include <nuttx/crc32.h>
#include <nuttx/ascii.h>
-#include "system/zmodem.h"
+
+#include <system/zmodem.h>
#include "zm.h"
diff --git a/system/zmodem/zm_state.c b/system/zmodem/zm_state.c
index 8e094e8e3..5f8b6d92d 100644
--- a/system/zmodem/zm_state.c
+++ b/system/zmodem/zm_state.c
@@ -47,9 +47,9 @@
#include <sched.h>
#include <assert.h>
#include <errno.h>
-#include <crc16.h>
-#include <crc32.h>
+#include <nuttx/crc16.h>
+#include <nuttx/crc32.h>
#include <nuttx/ascii.h>
#include "zm.h"
diff --git a/system/zmodem/zm_utils.c b/system/zmodem/zm_utils.c
index 8ab2856e1..56489e9cb 100644
--- a/system/zmodem/zm_utils.c
+++ b/system/zmodem/zm_utils.c
@@ -30,7 +30,8 @@
#include <termios.h>
#include <assert.h>
#include <errno.h>
-#include <crc32.h>
+
+#include <nuttx/crc32.h>
#include "zm.h"
diff --git a/testing/fstest/fstest_main.c b/testing/fstest/fstest_main.c
index e4716ce6c..8474ee5d1 100644
--- a/testing/fstest/fstest_main.c
+++ b/testing/fstest/fstest_main.c
@@ -37,10 +37,11 @@
#include <dirent.h>
#include <string.h>
#include <errno.h>
-#include <crc32.h>
#include <debug.h>
#include <assert.h>
+#include <nuttx/crc32.h>
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
diff --git a/testing/nxffs/nxffs_main.c b/testing/nxffs/nxffs_main.c
index 43c877100..79389510b 100644
--- a/testing/nxffs/nxffs_main.c
+++ b/testing/nxffs/nxffs_main.c
@@ -35,9 +35,9 @@
#include <dirent.h>
#include <string.h>
#include <errno.h>
-#include <crc32.h>
#include <debug.h>
+#include <nuttx/crc32.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/nxffs.h>
diff --git a/testing/smart/smart_main.c b/testing/smart/smart_main.c
index 4b72f313b..61dd3ec72 100644
--- a/testing/smart/smart_main.c
+++ b/testing/smart/smart_main.c
@@ -35,9 +35,9 @@
#include <dirent.h>
#include <string.h>
#include <errno.h>
-#include <crc32.h>
#include <debug.h>
+#include <nuttx/crc32.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/smart.h>
#include <nuttx/fs/ioctl.h>