You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2023/04/04 12:37:54 UTC
[nuttx] branch master updated: libs/libc: correct config define of arch functions
This is an automated email from the ASF dual-hosted git repository.
gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 4fbf5f7a4b libs/libc: correct config define of arch functions
4fbf5f7a4b is described below
commit 4fbf5f7a4b0dca5cfba45eddf6b791cd434e0b27
Author: chao an <an...@xiaomi.com>
AuthorDate: Tue Apr 4 15:19:11 2023 +0800
libs/libc: correct config define of arch functions
Signed-off-by: chao an <an...@xiaomi.com>
---
libs/libc/machine/Kconfig | 16 ++++++++++++++++
libs/libc/string/lib_strcasecmp.c | 2 +-
libs/libc/string/lib_strcat.c | 2 +-
libs/libc/string/lib_strncasecmp.c | 2 +-
libs/libc/string/lib_strncat.c | 2 +-
5 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/libs/libc/machine/Kconfig b/libs/libc/machine/Kconfig
index 5b0021836f..8628534ff7 100644
--- a/libs/libc/machine/Kconfig
+++ b/libs/libc/machine/Kconfig
@@ -112,6 +112,22 @@ config LIBC_ARCH_STRRCHR
bool
default n
+config LIBC_ARCH_STRCAT
+ bool
+ default n
+
+config LIBC_ARCH_STRNCAT
+ bool
+ default n
+
+config LIBC_ARCH_STRCASECMP
+ bool
+ default n
+
+config LIBC_ARCH_STRNCASECMP
+ bool
+ default n
+
config LIBC_ARCH_ELF
bool
default n
diff --git a/libs/libc/string/lib_strcasecmp.c b/libs/libc/string/lib_strcasecmp.c
index b1be6b07ab..1717682c03 100644
--- a/libs/libc/string/lib_strcasecmp.c
+++ b/libs/libc/string/lib_strcasecmp.c
@@ -31,7 +31,7 @@
* Public Functions
****************************************************************************/
-#ifndef CONFIG_ARCH_STRCASECMP
+#ifndef CONFIG_LIBC_ARCH_STRCASECMP
#undef strcasecmp /* See mm/README.txt */
int strcasecmp(FAR const char *cs, FAR const char *ct)
{
diff --git a/libs/libc/string/lib_strcat.c b/libs/libc/string/lib_strcat.c
index 33f5a97b73..e6c3495549 100644
--- a/libs/libc/string/lib_strcat.c
+++ b/libs/libc/string/lib_strcat.c
@@ -30,7 +30,7 @@
* Public Functions
****************************************************************************/
-#ifndef CONFIG_ARCH_STRCAT
+#ifndef CONFIG_LIBC_ARCH_STRCAT
#undef strcat /* See mm/README.txt */
FAR char *strcat(FAR char *dest, FAR const char *src)
{
diff --git a/libs/libc/string/lib_strncasecmp.c b/libs/libc/string/lib_strncasecmp.c
index 6aeb57273c..b2e8261e43 100644
--- a/libs/libc/string/lib_strncasecmp.c
+++ b/libs/libc/string/lib_strncasecmp.c
@@ -32,7 +32,7 @@
* Public Functions
****************************************************************************/
-#ifndef CONFIG_ARCH_STRNCASECMP
+#ifndef CONFIG_LIBC_ARCH_STRNCASECMP
#undef strncasecmp /* See mm/README.txt */
int strncasecmp(FAR const char *cs, FAR const char *ct, size_t nb)
{
diff --git a/libs/libc/string/lib_strncat.c b/libs/libc/string/lib_strncat.c
index 23ae796054..aa05d4c871 100644
--- a/libs/libc/string/lib_strncat.c
+++ b/libs/libc/string/lib_strncat.c
@@ -30,7 +30,7 @@
* Public Functions
****************************************************************************/
-#ifndef CONFIG_ARCH_STRNCAT
+#ifndef CONFIG_LIBC_ARCH_STRNCAT
#undef strncat /* See mm/README.txt */
FAR char *strncat(FAR char *dest, FAR const char *src, size_t n)
{