qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files
Date: Thu, 27 Feb 2014 16:45:22 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Feb 23, 2014 at 06:02:15PM +0100, Stefan Weil wrote:
> These header files are used by most QEMU source files. If they
> depend on windows.h, all those source files do so, too.
> 
> All Windows specific data types which are replaced use identical
> definitions for the 32 and 64 bit Windows APIs. HANDLE and LONG
> can be directly replaced by void * and long. CRITICAL_SECTION
> is replaced by a new struct of the same size.

Can you use a typedef?  When I read code that uses HANDLE, I immediately
know this is Windows and which sorts of APIs can accept this HANDLE
value.

Now when I see void * it's just an opaque C type.  We've lost
information :(.

/* Since windows.h drags in a lot of headers, we define equivalent
 * typedefs for some core Win32 types.
 */
typedef void *QEMU_WIN32_HANDLE; /* is there a more concise name? */
...

Stefan



reply via email to

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