summaryrefslogtreecommitdiffstats
path: root/include/sysemu/os-win32.h
diff options
context:
space:
mode:
authorPeter Maydell2015-08-19 17:20:19 +0200
committerPeter Maydell2015-08-19 17:29:53 +0200
commit1aad8104f3b69206da1f868639e1f69c26f6d482 (patch)
treeb60507b4430d825a284fe8d9cae633c790809d15 /include/sysemu/os-win32.h
parentcompiler.h: Use glue() in QEMU_BUILD_BUG_ON define (diff)
downloadqemu-1aad8104f3b69206da1f868639e1f69c26f6d482.tar.gz
qemu-1aad8104f3b69206da1f868639e1f69c26f6d482.tar.xz
qemu-1aad8104f3b69206da1f868639e1f69c26f6d482.zip
qemu-common.h: Move Win32 fixups into os-win32.h
qemu-common.h includes some fixups for things the Win32 headers don't define or define weirdly. These really belong in os-win32.h, so move them there. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include/sysemu/os-win32.h')
-rw-r--r--include/sysemu/os-win32.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index 4035c4fe54..706d85a98e 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -109,4 +109,22 @@ static inline int os_mlock(void)
return -ENOSYS;
}
+#define fsync _commit
+
+#if !defined(lseek)
+# define lseek _lseeki64
+#endif
+
+int qemu_ftruncate64(int, int64_t);
+
+#if !defined(ftruncate)
+# define ftruncate qemu_ftruncate64
+#endif
+
+static inline char *realpath(const char *path, char *resolved_path)
+{
+ _fullpath(resolved_path, path, _MAX_PATH);
+ return resolved_path;
+}
+
#endif