am 95c1abec: Merge "FORTIFY_SOURCE: don\'t define s?printf macros if already defined"

* commit '95c1abecc02b2a2f40b507e669b5bc17d4412bf9':
  FORTIFY_SOURCE: don't define s?printf macros if already defined
This commit is contained in:
Nick Kralevich 2014-03-22 18:06:03 +00:00 committed by Android Git Automerger
commit aefe43b182

View File

@ -393,8 +393,10 @@ int vsprintf(char *dest, const char *format, __va_list ap)
}
#if defined(__clang__)
#define __wrap_snprintf(dest, size, ...) __builtin___snprintf_chk(dest, size, 0, __bos(dest), __VA_ARGS__)
#define snprintf(...) __wrap_snprintf(__VA_ARGS__)
#if !defined(snprintf)
#define __wrap_snprintf(dest, size, ...) __builtin___snprintf_chk(dest, size, 0, __bos(dest), __VA_ARGS__)
#define snprintf(...) __wrap_snprintf(__VA_ARGS__)
#endif
#else
__BIONIC_FORTIFY_INLINE
__printflike(3, 4)
@ -406,8 +408,10 @@ int snprintf(char *dest, size_t size, const char *format, ...)
#endif
#if defined(__clang__)
#define __wrap_sprintf(dest, ...) __builtin___sprintf_chk(dest, 0, __bos(dest), __VA_ARGS__)
#define sprintf(...) __wrap_sprintf(__VA_ARGS__)
#if !defined(sprintf)
#define __wrap_sprintf(dest, ...) __builtin___sprintf_chk(dest, 0, __bos(dest), __VA_ARGS__)
#define sprintf(...) __wrap_sprintf(__VA_ARGS__)
#endif
#else
__BIONIC_FORTIFY_INLINE
__printflike(2, 3)