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