Fix builds where _FORTIFY_SOURCE is off.

Also add a more intention-revealing guard so we don't have loads of
places checking whether our inlining macro is defined.

Change-Id: I168860cedcfc798b07a5145bc48a125700265e47
This commit is contained in:
Elliott Hughes
2013-03-22 10:58:55 -07:00
parent 34895c1bdf
commit 890c8ed6ef
6 changed files with 12 additions and 11 deletions

View File

@@ -516,13 +516,14 @@
#include <android/api-level.h>
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(__clang__)
#define __BIONIC_FORTIFY 1
#define __BIONIC_FORTIFY_INLINE \
extern inline \
__attribute__ ((always_inline)) \
__attribute__ ((gnu_inline)) \
__attribute__ ((artificial))
#define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
#endif
#define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
/* Android-added: for FreeBSD's libm. */
#define __weak_reference(sym,alias) \