13
13
#include <rtthread.h>
14
14
#include <stdlib.h>
15
15
16
+ #ifndef RT_USING_PICOLIBC
16
17
/**
17
18
* @brief erases the data in the n bytes of the memory starting at the
18
19
* location pointed to by s, by writing zeros (bytes containing '\0') to that area.
19
20
*
20
21
* @note The bzero() function is deprecated (marked as LEGACY in POSIX. 1-2001).
21
22
*/
22
- #ifndef RT_USING_PICOLIBC
23
23
void bzero (void * s , size_t n )
24
24
{
25
25
rt_memset (s , 0 , n );
@@ -46,12 +46,12 @@ void explicit_bzero(void* s, size_t n)
46
46
}
47
47
}
48
48
49
- char * index (const char * s , int c )
49
+ char * index (const char * s , int c )
50
50
{
51
51
return strchr (s , c );
52
52
}
53
53
54
- char * rindex (const char * s , int c )
54
+ char * rindex (const char * s , int c )
55
55
{
56
56
return strrchr (s , c );
57
57
}
@@ -99,7 +99,7 @@ int ffsll(long long i)
99
99
*
100
100
* @note This function is GNU extension, available since glibc 2.1.91.
101
101
*/
102
- void * memrchr (const void * ptr , int ch , size_t pos )
102
+ void * memrchr (const void * ptr , int ch , size_t pos )
103
103
{
104
104
char * end = (char * )ptr + pos - 1 ;
105
105
while (end != ptr )
@@ -118,7 +118,7 @@ size_t strnlen(const char *s, size_t maxlen)
118
118
return sc - s ;
119
119
}
120
120
121
- char * strchrnul (const char * s , int c )
121
+ char * strchrnul (const char * s , int c )
122
122
{
123
123
while (* s != '\0' && * s != c )
124
124
s ++ ;
0 commit comments