am 559f3cb5: Merge "Use __builtin_*_chk for bcopy/bzero."

* commit '559f3cb532f2740f1c86d16663ad23dad6aa96e8':
  Use __builtin_*_chk for bcopy/bzero.
This commit is contained in:
Dan Albert 2014-06-23 17:08:26 +00:00 committed by Android Git Automerger
commit 203ec23c4b

View file

@ -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 *);