aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-07-21 20:04:45 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-07-21 20:04:45 +0100
commit5e54d2b7e75af8edce0b2947e76ef1cb98c9aca8 (patch)
tree2d75c75a903e4f959ece2925622e4713a121d317
parent4328608bc7f543bd89506396a4187a7c251fc7a6 (diff)
downloadqemu-arm-5e54d2b7e75af8edce0b2947e76ef1cb98c9aca8.tar.gz
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>
-rw-r--r--include/qemu-common.h17
-rw-r--r--include/sysemu/os-win32.h18
2 files changed, 18 insertions, 17 deletions
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 237d6547b3..9e622a53f2 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -86,23 +86,6 @@
# error Unknown pointer size
#endif
-#ifdef _WIN32
-#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
-
void cpu_ticks_init(void);
/* icount */
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