mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
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:
+4
-10
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user