]> granicus.if.org Git - gc/commit
Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
authorIvan Maidanski <ivmai@mail.ru>
Wed, 12 Dec 2012 14:52:14 +0000 (18:52 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 12 Dec 2012 14:52:14 +0000 (18:52 +0400)
commit54a91f5254a1c5b2081e753cde47e6fa3a612e23
tree305cbf20b778d7ad8ab4cebc00580b4470f70878
parent7e5ae85a3359360a5081cf43f14fce31d21f0f12
Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
(code refactoring)

* misc.c (GC_stdout, GC_stderr, GC_log): Do not define as static
variable if GC_ANDROID_LOG.
* misc.c (GC_init): Do not allow to set GC_log and GC_stdout/err if
GC_ANDROID_LOG.
* misc.c (GC_ANDROID_LOG_TAG): Move definition (and include
android/log.h) upper to precede GC_write definition for Unix.
* misc.c (GC_stdout, GC_stderr, GC_long): Define specially
for GC_ANDROID_LOG (define to ANDROID_LOG_DEBUG/ERROR logging level).
* misc.c (WRITE): Define specially for GC_ANDROID_LOG (first argument
is used as logging level) redirecting to __android_log_write.
* misc.c (GC_printf, GC_stats_log_printf, GC_verbose_log_printf,
GC_warn_printf, GC_err_puts): Remove __android_log_write call
(unconditionally invoke WRITE instead).
* misc.c (GC_log_printf): Remove Android-specific implementation (use
general instead).
* misc.c (GC_stats_log_printf, GC_verbose_log_printf): Expand
GC_LOG_PRINTF_IMPL macro.
* misc.c (GC_LOG_PRINTF_IMPL): Remove macro.
misc.c