Alexandre Julliard : libwine: Handle WINEDEBUGLOG variable on Android to specify a log file.

Alexandre Julliard julliard at winehq.org
Tue May 30 16:05:13 CDT 2017


Module: wine
Branch: master
Commit: 98860707bcab25600da3ed54c23abb957ac226d7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=98860707bcab25600da3ed54c23abb957ac226d7

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May 30 19:12:35 2017 +0200

libwine: Handle WINEDEBUGLOG variable on Android to specify a log file.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/wine/loader.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index 89ae935..172bfa0 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -877,6 +877,15 @@ static jstring wine_init_jni( JNIEnv *env, jobject obj, jobjectArray cmdline, jo
                                                                  "android_update_LD_LIBRARY_PATH" );
                     if (update_func) update_func( val );
                 }
+                else if (!strcmp( var, "WINEDEBUGLOG" ))
+                {
+                    int fd = open( val, O_WRONLY | O_CREAT | O_APPEND, 0666 );
+                    if (fd != -1)
+                    {
+                        dup2( fd, 2 );
+                        close( fd );
+                    }
+                }
                 (*env)->ReleaseStringUTFChars( env, val_obj, val );
             }
             else unsetenv( var );




More information about the wine-cvs mailing list