summaryrefslogtreecommitdiffstats
path: root/qemu-os-win32.h
Commit message (Collapse)AuthorAgeFilesLines
* event_notifier: add Win32 implementationPaolo Bonzini2012-10-301-1/+0
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-09-251-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: w32: Always use standard instead of native format strings net/socket: Fix compiler warning (regression for MinGW) linux-user: Remove redundant null check and replace free by g_free qemu-timer: simplify qemu_run_timers TextConsole: saturate escape parameter in TTY_STATE_CSI curses: don't initialize curses when qemu is daemonized dtrace backend: add function to reserved words pflash_cfi01: Fix warning caused by unreachable code ioh3420: Remove unreachable code lm4549: Fix buffer overflow cadence_uart: Fix buffer overflow qemu-sockets: Fix potential memory leak qemu-ga: Remove unreachable code after g_error target-i386: Allow tsc-frequency to be larger then 2.147G
| * curses: don't initialize curses when qemu is daemonizedHitoshi Mitake2012-09-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current qemu initializes curses even if -daemonize option is passed. This cause problem because shell prompt appears without calling endwin(). This patch adds new function, is_daemonized(), to OS dependent code. With this function, curses_display_init() can check that qemu is daemonized or not. If daemonized, curses_display_init() isn't called and the problem is avoided. Of course, -daemonize && -curses doesn't make sense. Users shouldn't pass the arguments at the same time. But the problem is very painful because Ctrl-C cannot be delivered to the terminal. Cc: Andrzej Zaborowski <balrog@zabor.org> Cc: Stefan Hajnoczi <stefanha@gmail.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Cc: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* | w32: Add implementation of gmtime_r, localtime_rStefan Weil2012-09-231-0/+6
|/ | | | | | | | | | | | | | | | Those functions are missing in MinGW. Some versions of MinGW-w64 include defines for gmtime_r and localtime_r. Older versions of these macros are buggy (they return a pointer to a static variable), therefore we don't want them. Newer versions are similar to the code used here, but without the memset. The implementation which is used here is not strictly reentrant, but sufficiently good for QEMU on w32 or w64. Signed-off-by: Stefan Weil <sw@weilnetz.de> [blauwirbel@gmail.com: added comment about locking] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* w64: Fix definition of setjmpStefan Weil2012-04-151-0/+9
| | | | | | | | | | | | | | The default definition of setjmp which is implemented in MinGW-w64 cannot be used with programs like QEMU which call longjmp from code without structured exception handling (SEH). This code therefore disables stack unwinding. We could also implement SEH for QEMU's generated JIT code, but that is much more difficult. Stack unwinding would also cost execution time. Signed-off-by: Stefan Weil <sw@weilnetz.de>
* w32: Move defines for socket specific errors to qemu-os-win32.hStefan Weil2012-04-151-0/+26
| | | | | | | | | | As those defines are only used for w32, they should be in the header file for w32. All files which include slirp.h or qemu_socket.h also include qemu-os-win32.h. Signed-off-by: Stefan Weil <sw@weilnetz.de>
* main-loop: create main-loop.cPaolo Bonzini2011-10-211-2/+0
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* main-loop: create main-loop.hPaolo Bonzini2011-10-211-14/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* w32: Fix missing declaration of ffs()Stefan Weil2011-05-151-0/+3
| | | | | | | | | | | | | target-ppc/cpu.h now needs ffs(), too, so ffs() must be declared before this file is included. Moving the declaration from qemu-common.h to qemu-os-win32.h (which is included in qemu-common.h early) fixes the compiler warning for w32. Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Move generic or OS function declarations to qemu-common.hBlue Swirl2011-04-151-0/+3
| | | | | | | | | | | Move generic or OS related function declarations and macro TFR to qemu-common.h. Move win32 include directives to qemu-os-win32.h. While moving, also add #include <winsock2.h> to fix a recent mingw32 build breakage. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move qemu_gettimeofday() to OS specific filesJes Sorensen2010-10-301-0/+8
| | | | | Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* win32: Set unbuffered stdoutStefan Weil2010-10-091-2/+1
| | | | | | | | | | | | | | | Win32 does not support line-buffering, but it allows unbuffered output. Unbuffered output is a good approximation. For typical output statements which usually end with '\n', it's even identical. Buffered output is unusable for program traces because of its large delay. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* win32: Add define for missing EPROTONOSUPPORTStefan Weil2010-06-271-0/+4
| | | | | | | | | mingw32 does not define EPROTONOSUPPORT (which is used by migration.c and maybe future patches), so add a definition which uses a supported errno value. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move set_proc_name() to OS specific files.Jes Sorensen2010-06-121-0/+1
| | | | | | | | | | | Move handling to change process name to POSIX specific files plus add a better error message to cover the case where the feature isn't supported. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move line-buffering setup to OS specific files.Jes Sorensen2010-06-121-0/+2
| | | | | | | | | Move line-buffering setup to OS specific files. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Make os_change_process_uid and os_change_root os-posix.c localJes Sorensen2010-06-121-2/+0
| | | | | | | | | | os_change_process_uid() and os_change_root() are now only called from os-posix.c, so no need to keep win32 stubs for them. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move daemonize handling to OS specific filesJes Sorensen2010-06-121-0/+2
| | | | | | | | | | Move daemonize handling from vl.c to OS specific files. Provide dummy stubs for Win32. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move chroot handling to OS specific files.Jes Sorensen2010-06-121-0/+1
| | | | | | | | | Move chroot handling to OS specific files. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move runas handling from vl.c to OS specific files.Jes Sorensen2010-06-121-0/+1
| | | | | | | | | | Move code to handle runas, ie. change of user id of QEMU process to OS specific files and provide dummy stub for Win32. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move main signal handler setup to os specificfiles.Jes Sorensen2010-06-121-0/+3
| | | | | | | | | Move main signal handler setup to os specific files. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vl.c: Move host_main_loop_wait() to OS specific files.Jes Sorensen2010-06-121-0/+1
| | | | | | | | | | Move host_main_loop_wait() to OS specific files. Create qemu-os-posix.h and provide empty inline for the POSIX case. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Create qemu-os-win32.h and move WIN32 specific declarations thereJes Sorensen2010-06-121-0/+43
Create qemu-os-win32.h for WIN32 specific declarations. Move polling handling declaration into this file from sysemu.h Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OpenPOWER on IntegriCloud