[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win3
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win32.h |
Date: |
Wed, 22 Jul 2015 17:44:04 +0100 |
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 <address@hidden>
---
include/qemu-common.h | 17 -----------------
include/sysemu/os-win32.h | 18 ++++++++++++++++++
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 237d654..9e622a5 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 4035c4f..706d85a 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
--
1.9.1
- Re: [Qemu-devel] [PATCH 04/12] compiler.h: Use glue() in QEMU_BUILD_BUG_ON define, (continued)
- [Qemu-devel] [PATCH 09/12] apic_internal.h: Include cpu.h directly, Peter Maydell, 2015/07/22
- [Qemu-devel] [PATCH 03/12] osdep.h: Move some compiler-specific things to compiler.h, Peter Maydell, 2015/07/22
- [Qemu-devel] [PATCH 07/12] osdep.h: Add header comment, Peter Maydell, 2015/07/22
- [Qemu-devel] [PATCH 08/12] qemu-common.h: Move muldiv64() to host-utils.h, Peter Maydell, 2015/07/22
- [Qemu-devel] [PATCH 02/12] osdep.h: Remove qemu_printf, Peter Maydell, 2015/07/22
- [Qemu-devel] [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win32.h,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring, Paolo Bonzini, 2015/07/22
- Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring, Markus Armbruster, 2015/07/23
- Re: [Qemu-devel] [PATCH 00/12] qemu-common.h/osdep.h refactoring, Daniel P. Berrange, 2015/07/31