qemu-common.h: Move Win32 fixups into os-win32.h
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 19 Aug 2015 15:20:19 +0000 (16:20 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 19 Aug 2015 15:29:53 +0000 (16:29 +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 <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
include/qemu-common.h
include/sysemu/os-win32.h

index fb3da6ca22f38719205c818975ff4e81744faf44..d1650003ec9810807025e2a6c76e22e69db471a4 100644 (file)
 # 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 */
index 4035c4fe5408e7b19ccb98c651c8e17ee356a134..706d85a98e24f48aa763e9c448ac128ec9f1ee76 100644 (file)
@@ -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