Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/eglib
diff options
context:
space:
mode:
authorJonathan Pryor <jonpryor@vt.edu>2014-08-26 06:43:48 +0400
committerJonathan Pryor <jonpryor@vt.edu>2014-08-26 06:58:30 +0400
commit9e7713121b36cf961c4ccd596c57734eaac6e911 (patch)
tree30f6cff2789dbcb90b58b83bf2b095e215bf1910 /eglib
parent28d400df31089f41cc74c75fecb266baec16e275 (diff)
[eglib] Fix compilation on PLATFORM_ANDROID.
Compilation of eglib/src/goutput.c was broken in commit 989165e1: mono/eglib/src/goutput.c: In function 'monoeg_log_default_handler': mono/eglib/src/goutput.c:159:75: error: 'args' undeclared (first use in this function) __android_log_vprint (to_android_priority (log_level), log_domain, "%s", args); ^ mono/eglib/src/goutput.c:159:75: note: each undeclared identifier is reported only once for each function it appears in mono/eglib/src/goutput.c: In function 'default_stdout_handler': mono/eglib/src/goutput.c:168:2: error: incompatible type for argument 4 of '__android_log_vprint' __android_log_vprint (ANDROID_LOG_ERROR, "mono", "%s", message); ^ mono/eglib/src/goutput.c:139:0: $ANDROID_NDK_PATH/platforms/android-4/arch-arm/usr/include/android/log.h:109:5: note: expected 'va_list' but argument is of type 'const gchar *' int __android_log_vprint(int prio, const char *tag, ^ mono/eglib/src/goutput.c: In function 'default_stderr_handler': mono/eglib/src/goutput.c:175:2: error: incompatible type for argument 4 of '__android_log_vprint' __android_log_vprint (ANDROID_LOG_ERROR, "mono", "%s", message); ^ (The cause of the breakage is that __android_log_vprint() takes a va_args parameter, which is no longer present in 989165e1.) Use __android_log_write() instead of __android_log_vprint(). Note: __android_log_write() writes a "simple string" to `adb logcat`, meaning there is no printf(3)-style formatting applied.
Diffstat (limited to 'eglib')
-rw-r--r--eglib/src/goutput.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/eglib/src/goutput.c b/eglib/src/goutput.c
index d59c4cc8f83..a3cf1f64db4 100644
--- a/eglib/src/goutput.c
+++ b/eglib/src/goutput.c
@@ -156,7 +156,7 @@ to_android_priority (GLogLevelFlags log_level)
void
g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
{
- __android_log_vprint (to_android_priority (log_level), log_domain, "%s", args);
+ __android_log_write (to_android_priority (log_level), log_domain, message);
if (log_level & fatal)
abort ();
}
@@ -165,14 +165,14 @@ static void
default_stdout_handler (const gchar *message)
{
/* TODO: provide a proper app name */
- __android_log_vprint (ANDROID_LOG_ERROR, "mono", "%s", message);
+ __android_log_write (ANDROID_LOG_ERROR, "mono", message);
}
static void
default_stderr_handler (const gchar *message)
{
/* TODO: provide a proper app name */
- __android_log_vprint (ANDROID_LOG_ERROR, "mono", "%s", message);
+ __android_log_write (ANDROID_LOG_ERROR, "mono", message);
}