qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/11] Move generic or OS function declarations


From: Jes Sorensen
Subject: Re: [Qemu-devel] [PATCH 04/11] Move generic or OS function declarations to qemu-common.h
Date: Tue, 12 Apr 2011 11:50:52 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 04/08/11 22:45, Blue Swirl wrote:
> Move generic or OS related function declarations and macro
> TFR to qemu-common.h.
> 
> While moving, also add #include <winsock2.h> to fix a
> recent mingw32 build breakage.
> 
> Signed-off-by: Blue Swirl <address@hidden>
> ---
>  qemu-common.h |   21 +++++++++++++++++++++
>  sysemu.h      |   21 ---------------------
>  2 files changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/qemu-common.h b/qemu-common.h
> index 82e27c1..8b48a09 100644
> --- a/qemu-common.h
> +++ b/qemu-common.h
> @@ -12,6 +12,7 @@
>  #endif
> 
>  #define QEMU_BUILD_BUG_ON(x) typedef char 
> __build_bug_on__##__LINE__[(x)?-1:1];
> +#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
> 
>  typedef struct QEMUTimer QEMUTimer;
>  typedef struct QEMUFile QEMUFile;
> @@ -39,6 +40,16 @@ typedef struct Monitor Monitor;
>  #include <sys/time.h>
>  #include <assert.h>
> 
> +#ifdef _WIN32
> +#include <windows.h>
> +#include <winsock2.h>
> +#include "qemu-os-win32.h"
> +#endif
> +
> +#ifdef CONFIG_POSIX
> +#include "qemu-os-posix.h"
> +#endif
> +

Nice, the more we can get out of the dreadful sysemu.h the better.
However, please put the includes of windows.h and winsock2.h into
qemu-os-win32.h instead.

Cheers,
Jes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]