1313#include <rtthread.h>
1414#include <stdlib.h>
1515
16+ #ifndef RT_USING_PICOLIBC
1617/**
1718 * @brief erases the data in the n bytes of the memory starting at the
1819 * location pointed to by s, by writing zeros (bytes containing '\0') to that area.
1920 *
2021 * @note The bzero() function is deprecated (marked as LEGACY in POSIX. 1-2001).
2122 */
22- #ifndef RT_USING_PICOLIBC
2323void bzero (void * s , size_t n )
2424{
2525 rt_memset (s , 0 , n );
@@ -46,12 +46,12 @@ void explicit_bzero(void* s, size_t n)
4646 }
4747}
4848
49- char * index (const char * s , int c )
49+ char * index (const char * s , int c )
5050{
5151 return strchr (s , c );
5252}
5353
54- char * rindex (const char * s , int c )
54+ char * rindex (const char * s , int c )
5555{
5656 return strrchr (s , c );
5757}
@@ -99,7 +99,7 @@ int ffsll(long long i)
9999 *
100100 * @note This function is GNU extension, available since glibc 2.1.91.
101101 */
102- void * memrchr (const void * ptr , int ch , size_t pos )
102+ void * memrchr (const void * ptr , int ch , size_t pos )
103103{
104104 char * end = (char * )ptr + pos - 1 ;
105105 while (end != ptr )
@@ -118,7 +118,7 @@ size_t strnlen(const char *s, size_t maxlen)
118118 return sc - s ;
119119}
120120
121- char * strchrnul (const char * s , int c )
121+ char * strchrnul (const char * s , int c )
122122{
123123 while (* s != '\0' && * s != c )
124124 s ++ ;
0 commit comments