summaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-03-27 09:04:57 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-04-15 18:25:46 +0000
commit082b5557996764fb21ba8cff17aabec7242ed342 (patch)
tree4d708ddf7194737aac68e4af1a110639bc4c7cbf /qemu-common.h
parentd8dfad9c41c3431dbb97ad722a93e6ad1e9e9279 (diff)
downloadqemu-082b5557996764fb21ba8cff17aabec7242ed342.tar.gz
qemu-082b5557996764fb21ba8cff17aabec7242ed342.tar.bz2
qemu-082b5557996764fb21ba8cff17aabec7242ed342.zip
Move generic or OS function declarations to qemu-common.h
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>
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h
index 4f6037bab9..f9f705da85 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -12,6 +12,7 @@
#endif
#define QEMU_BUILD_BUG_ON(x) typedef char __build_bug_on__##__LINE__[(x)?-1:1];
+#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
typedef struct QEMUTimer QEMUTimer;
typedef struct QEMUFile QEMUFile;
@@ -39,6 +40,14 @@ typedef struct Monitor Monitor;
#include <sys/time.h>
#include <assert.h>
+#ifdef _WIN32
+#include "qemu-os-win32.h"
+#endif
+
+#ifdef CONFIG_POSIX
+#include "qemu-os-posix.h"
+#endif
+
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
@@ -339,6 +348,16 @@ void qemu_progress_init(int enabled, float min_skip);
void qemu_progress_end(void);
void qemu_progress_print(float percent, int max);
+#define QEMU_FILE_TYPE_BIOS 0
+#define QEMU_FILE_TYPE_KEYMAP 1
+char *qemu_find_file(int type, const char *name);
+
+/* OS specific functions */
+void os_setup_early_signal_handling(void);
+char *os_find_datadir(const char *argv0);
+void os_parse_cmd_args(int index, const char *optarg);
+void os_pidfile_error(void);
+
/* Convert a byte between binary and BCD. */
static inline uint8_t to_bcd(uint8_t val)
{