From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHx89-0007vo-8W for qemu-devel@nongnu.org; Wed, 22 Jul 2015 12:44:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHx84-0004g7-BI for qemu-devel@nongnu.org; Wed, 22 Jul 2015 12:44:29 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHx84-0004ZT-0u for qemu-devel@nongnu.org; Wed, 22 Jul 2015 12:44:24 -0400 From: Peter Maydell Date: Wed, 22 Jul 2015 17:44:04 +0100 Message-Id: <1437583451-9677-6-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1437583451-9677-1-git-send-email-peter.maydell@linaro.org> References: <1437583451-9677-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win32.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org 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 --- 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