From patchwork Wed Jul 22 16:44:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 51362 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id 08BDE228EF for ; Wed, 22 Jul 2015 16:44:15 +0000 (UTC) Received: by wixh2 with SMTP id h2sf28788935wix.0 for ; Wed, 22 Jul 2015 09:44:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=OxlNCX+LH9Suql/ept2LtHogsuHJAyBnzfHg9S1W2W8=; b=WVn+VygCagOnXMeobnT+1Sz8pphZ6O2FN2fD6mWfbFReCqAjEORdsELJzhX16b73Lt mFi7PSXk3OxBfGk10tDktJt9MmvdvJfosXkjrhYySBvSZVu+GqspnARa07FhqF5G1UrZ gqnkyDdS48N0DODPvZWg5RtwOljwPLSOmOD7LQ3F3AVkVwNoSkPNWROevdwlQXU/nnlH OqV6XKTwfmw0p+agAcT3KuIsiuUgCj8Vr9pfgstyTYQrBXhBiiGDxbwNeSPcoWz4uPZN 9AvGDJkTm2F1DH1ll5qee5aGKVPxqsZGyMfb/x9wLYYd311Et+Z94bLYo7WFmuBItBII x4Xg== X-Gm-Message-State: ALoCoQldRPCJyCMJCCi8Y1HnOJKPD+SI2erDalmEbQUm8DrjPPTFFx6IY6IHJ5K6hffTp2CC0adR X-Received: by 10.180.90.106 with SMTP id bv10mr2068913wib.6.1437583454346; Wed, 22 Jul 2015 09:44:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.36 with SMTP id g4ls123698lah.33.gmail; Wed, 22 Jul 2015 09:44:14 -0700 (PDT) X-Received: by 10.152.5.130 with SMTP id s2mr3141994las.31.1437583454103; Wed, 22 Jul 2015 09:44:14 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id k9si1636627lah.119.2015.07.22.09.44.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 09:44:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by laah7 with SMTP id h7so10211980laa.0 for ; Wed, 22 Jul 2015 09:44:14 -0700 (PDT) X-Received: by 10.112.220.7 with SMTP id ps7mr3228067lbc.72.1437583453979; Wed, 22 Jul 2015 09:44:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.7.198 with SMTP id l6csp46169lba; Wed, 22 Jul 2015 09:44:13 -0700 (PDT) X-Received: by 10.194.221.71 with SMTP id qc7mr6827324wjc.9.1437583453338; Wed, 22 Jul 2015 09:44:13 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id u7si4501103wia.91.2015.07.22.09.44.13 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 22 Jul 2015 09:44:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZHx7r-0002Wr-LK; Wed, 22 Jul 2015 17:44:11 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH 05/12] qemu-common.h: Move Win32 fixups into os-win32.h Date: Wed, 22 Jul 2015 17:44:04 +0100 Message-Id: <1437583451-9677-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1437583451-9677-1-git-send-email-peter.maydell@linaro.org> References: <1437583451-9677-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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