Fix Mingw build.

This reverts the two previous commits since they broke the
Mingw build. The problem is that the Mingw <time.h> header
includes an inline declaration of gmtime_r() that is outside
an extern "C" {} block when the header is included from C++.

This creates a compiler error when the header is included
directly from a C++ source multiple times (but where one of
the includes is within an extern "C" block, while the other
one is not).

Change-Id: I248ec6421324faba7b8d7b4d9627bc97e9d729c5
diff --git a/android-qemu2-glue/emulation/charpipe.h b/android-qemu2-glue/emulation/charpipe.h
index 0237105..2ab24e9 100644
--- a/android-qemu2-glue/emulation/charpipe.h
+++ b/android-qemu2-glue/emulation/charpipe.h
@@ -11,13 +11,12 @@
 */
 #pragma once
 
+#include "qemu/osdep.h"
+#include "qemu-common.h"
 #include "android/utils/compiler.h"
 
 ANDROID_BEGIN_HEADER
 
-#include "qemu/osdep.h"
-#include "qemu-common.h"
-
 /* open two connected character drivers that can be used to communicate by internal
  * QEMU components. For Android, this is used to connect an emulated serial port
  * with the android modem
diff --git a/android-qemu2-glue/qemu-setup.cpp b/android-qemu2-glue/qemu-setup.cpp
index f0b2268..34ac0ca 100644
--- a/android-qemu2-glue/qemu-setup.cpp
+++ b/android-qemu2-glue/qemu-setup.cpp
@@ -17,7 +17,6 @@
 #include "android/android.h"
 #include "android/base/Log.h"
 #include "android/console.h"
-#include "android/skin/winsys.h"
 #include "android-qemu2-glue/emulation/android_pipe_device.h"
 #include "android-qemu2-glue/emulation/charpipe.h"
 #include "android-qemu2-glue/emulation/goldfish_sync.h"
@@ -47,9 +46,6 @@
     qemu_looper_setForThread();
     qemu_thread_register_setup_callback(qemu_looper_setForThread);
 
-    // Make sure we override the ctrl-C handler as soon as possible.
-    qemu_set_ctrlc_handler(&skin_winsys_quit_request);
-
     // Ensure charpipes i/o are handled properly.
     main_loop_register_poll_callback(qemu_charpipe_poll);