log: Fix warning with __USE_MINGW_ANSI_STDIO

I haven't seen this warning in any AOSP code, but some of our code is
using this header differently than the rest of the build system, and
hits this warning-turned-error:

error: "__USE_MINGW_ANSI_STDIO" is not defined [-Werror=undef]

Change-Id: I3c5a91f107af8bf6078e06f2ce326c5466349b79
This commit is contained in:
Dan Willemsen 2014-06-11 15:36:58 -07:00
parent a9aa0f2c42
commit 0cddcc67cc
1 changed files with 8 additions and 0 deletions

View File

@ -98,11 +98,15 @@ int __android_log_write(int prio, const char *tag, const char *text);
*/
int __android_log_print(int prio, const char *tag, const char *fmt, ...)
#if defined(__GNUC__)
#ifdef __USE_MINGW_ANSI_STDIO
#if __USE_MINGW_ANSI_STDIO
__attribute__ ((format(gnu_printf, 3, 4)))
#else
__attribute__ ((format(printf, 3, 4)))
#endif
#else
__attribute__ ((format(printf, 3, 4)))
#endif
#endif
;
@ -121,11 +125,15 @@ void __android_log_assert(const char *cond, const char *tag,
const char *fmt, ...)
#if defined(__GNUC__)
__attribute__ ((noreturn))
#ifdef __USE_MINGW_ANSI_STDIO
#if __USE_MINGW_ANSI_STDIO
__attribute__ ((format(gnu_printf, 3, 4)))
#else
__attribute__ ((format(printf, 3, 4)))
#endif
#else
__attribute__ ((format(printf, 3, 4)))
#endif
#endif
;