[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
Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files, Andreas Färber, 2014/02/24
Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files,
Stefan Hajnoczi <=
[Qemu-devel] [PATCH 6/9] w32: Add and use intermediate include file for windows.h, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 5/9] vl: Remove unneeded include file, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 2/9] exec: Remove unneeded include files, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 8/9] w32: Reduce dependencies in sysemu/os-win32.h, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 7/9] w32: Move inline function from header file to C source, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 1/9] util/iov: Use qemu/sockets.h instead of conditional code, Stefan Weil, 2014/02/23