Revert "libc/lib_bzero:Add bzero prototype."

This reverts commit 908814a575.

In macos, memset will be automatic optmize to bzero, caused dead loop, as we not using bzero, macro re-define should ablt to cover the requirements.

Signed-off-by: buxiasen <buxiasen@gmail.com>
This commit is contained in:
buxiasen
2024-10-23 01:14:23 +08:00
committed by Xiang Xiao
parent 105d47b9a6
commit cb720024b6
4 changed files with 5 additions and 55 deletions
+4 -10
View File
@@ -52,6 +52,10 @@
#define bcopy(b1,b2,len) memmove(b2,b1,len)
#endif
#ifndef bzero /* See mm/README.txt */
#define bzero(s,n) memset(s,0,n)
#endif
#define strcasecmp_l(s1, s2, l) strcasecmp(s1, s2)
#define strncasecmp_l(s1, s2, n, l) strncasecmp(s1, s2, n)
@@ -155,16 +159,6 @@ FAR char *rindex(FAR const char *s, int c);
int strcasecmp(FAR const char *, FAR const char *);
int strncasecmp(FAR const char *, FAR const char *, size_t);
void bzero(FAR void *s, size_t n);
#if CONFIG_FORTIFY_SOURCE > 0
fortify_function(bzero) void bzero(FAR void *s, size_t n)
{
fortify_assert(n <= fortify_size(s, 0));
return __real_bzero(s, n);
}
#endif
#undef EXTERN
#if defined(__cplusplus)
}