mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user