libc: add arm64 libc function

Porting memory and string optimize functions from newlib and bionic

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21
2023-01-05 14:36:21 +08:00
committed by Xiang Xiao
parent f8f29c8147
commit fae5aef4fe
22 changed files with 3325 additions and 2 deletions
+2
View File
@@ -44,6 +44,7 @@
*
****************************************************************************/
#ifndef CONFIG_LIBC_ARCH_STRCHRNUL
FAR char *strchrnul(FAR const char *s, int c)
{
if (s)
@@ -56,3 +57,4 @@ FAR char *strchrnul(FAR const char *s, int c)
return (FAR char *)s;
}
#endif
+1 -1
View File
@@ -30,7 +30,7 @@
* Public Functions
****************************************************************************/
#ifndef CONFIG_ARCH_STRNCMP
#ifndef CONFIG_LIBC_ARCH_STRNCMP
#undef strncmp /* See mm/README.txt */
int strncmp(FAR const char *cs, FAR const char *ct, size_t nb)
{
+2
View File
@@ -34,6 +34,7 @@
* occurrence of the character c in the string s.
*/
#ifndef CONFIG_LIBC_ARCH_STRRCHR
#undef strrchr /* See mm/README.txt */
FAR char *strrchr(FAR const char *s, int c)
{
@@ -50,3 +51,4 @@ FAR char *strrchr(FAR const char *s, int c)
return (FAR char *)r;
}
#endif