am 559f3cb5
: Merge "Use __builtin_*_chk for bcopy/bzero."
* commit '559f3cb532f2740f1c86d16663ad23dad6aa96e8': Use __builtin_*_chk for bcopy/bzero.
This commit is contained in:
commit
203ec23c4b
1 changed files with 10 additions and 2 deletions
|
@ -43,8 +43,16 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
#define bcopy(b1, b2, len) (void)(memmove((b2), (b1), (len)))
|
||||
#define bzero(b, len) (void)(memset((b), '\0', (len)))
|
||||
#if defined(__BIONIC_FORTIFY)
|
||||
#define bcopy(b1, b2, len) \
|
||||
(void)(__builtin___memmove_chk((b2), (b1), (len), __bos0(b2)))
|
||||
#define bzero(b, len) \
|
||||
(void)(__builtin___memset_chk((b), '\0', (len), __bos0(b)))
|
||||
#else
|
||||
#define bcopy(b1, b2, len) (void)(__builtin_memmove((b2), (b1), (len)))
|
||||
#define bzero(b, len) (void)(__builtin_memset((b), '\0', (len)))
|
||||
#endif
|
||||
|
||||
|
||||
int ffs(int);
|
||||
int strcasecmp(const char *, const char *);
|
||||
|
|
Loading…
Reference in a new issue