Declare all handles with DECLARE_OLD_HANDLE to ease conversion to
STRICT.
This commit is contained in:
parent
b065697ad8
commit
45437038b6
|
@ -205,10 +205,10 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DECLARE_HANDLE(HCONVLIST);
|
DECLARE_OLD_HANDLE(HCONVLIST);
|
||||||
DECLARE_HANDLE(HCONV);
|
DECLARE_OLD_HANDLE(HCONV);
|
||||||
DECLARE_HANDLE(HSZ);
|
DECLARE_OLD_HANDLE(HSZ);
|
||||||
DECLARE_HANDLE(HDDEDATA);
|
DECLARE_OLD_HANDLE(HDDEDATA);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ typedef struct IGetFrame IGetFrame,*PGETFRAME;
|
||||||
|
|
||||||
/* Installable Compressor Manager */
|
/* Installable Compressor Manager */
|
||||||
|
|
||||||
DECLARE_HANDLE(HIC);
|
DECLARE_OLD_HANDLE(HIC);
|
||||||
|
|
||||||
#ifdef __WINE__
|
#ifdef __WINE__
|
||||||
/* HIC struct (same layout as Win95 one) */
|
/* HIC struct (same layout as Win95 one) */
|
||||||
|
|
|
@ -56,48 +56,48 @@ typedef HANDLE HMONITOR;
|
||||||
|
|
||||||
/* Handle types that exist both in Win16 and Win32. */
|
/* Handle types that exist both in Win16 and Win32. */
|
||||||
|
|
||||||
DECLARE_HANDLE(HACMDRIVERID);
|
DECLARE_OLD_HANDLE(HACMDRIVERID);
|
||||||
DECLARE_HANDLE(HACMDRIVER);
|
DECLARE_OLD_HANDLE(HACMDRIVER);
|
||||||
DECLARE_HANDLE(HACMOBJ);
|
DECLARE_OLD_HANDLE(HACMOBJ);
|
||||||
DECLARE_HANDLE(HACMSTREAM);
|
DECLARE_OLD_HANDLE(HACMSTREAM);
|
||||||
DECLARE_HANDLE(HMETAFILEPICT);
|
DECLARE_OLD_HANDLE(HMETAFILEPICT);
|
||||||
|
|
||||||
DECLARE_HANDLE(HACCEL);
|
DECLARE_OLD_HANDLE(HACCEL);
|
||||||
DECLARE_HANDLE(HBITMAP);
|
DECLARE_OLD_HANDLE(HBITMAP);
|
||||||
DECLARE_HANDLE(HBRUSH);
|
DECLARE_OLD_HANDLE(HBRUSH);
|
||||||
DECLARE_HANDLE(HCOLORSPACE);
|
DECLARE_OLD_HANDLE(HCOLORSPACE);
|
||||||
DECLARE_HANDLE(HDC);
|
DECLARE_OLD_HANDLE(HDC);
|
||||||
DECLARE_HANDLE(HDROP);
|
DECLARE_OLD_HANDLE(HDROP);
|
||||||
DECLARE_HANDLE(HDRVR);
|
DECLARE_OLD_HANDLE(HDRVR);
|
||||||
DECLARE_HANDLE(HDWP);
|
DECLARE_OLD_HANDLE(HDWP);
|
||||||
DECLARE_HANDLE(HENHMETAFILE);
|
DECLARE_OLD_HANDLE(HENHMETAFILE);
|
||||||
typedef int HFILE;
|
typedef int HFILE;
|
||||||
DECLARE_HANDLE(HFONT);
|
DECLARE_OLD_HANDLE(HFONT);
|
||||||
DECLARE_HANDLE(HICON);
|
DECLARE_OLD_HANDLE(HICON);
|
||||||
DECLARE_HANDLE(HINSTANCE);
|
DECLARE_OLD_HANDLE(HINSTANCE);
|
||||||
DECLARE_HANDLE(HKEY);
|
DECLARE_OLD_HANDLE(HKEY);
|
||||||
DECLARE_HANDLE(HMENU);
|
DECLARE_OLD_HANDLE(HMENU);
|
||||||
DECLARE_HANDLE(HMETAFILE);
|
DECLARE_OLD_HANDLE(HMETAFILE);
|
||||||
DECLARE_HANDLE(HMIDI);
|
DECLARE_OLD_HANDLE(HMIDI);
|
||||||
DECLARE_HANDLE(HMIDIIN);
|
DECLARE_OLD_HANDLE(HMIDIIN);
|
||||||
DECLARE_HANDLE(HMIDIOUT);
|
DECLARE_OLD_HANDLE(HMIDIOUT);
|
||||||
DECLARE_HANDLE(HMIDISTRM);
|
DECLARE_OLD_HANDLE(HMIDISTRM);
|
||||||
DECLARE_HANDLE(HMIXER);
|
DECLARE_OLD_HANDLE(HMIXER);
|
||||||
DECLARE_HANDLE(HMIXEROBJ);
|
DECLARE_OLD_HANDLE(HMIXEROBJ);
|
||||||
DECLARE_HANDLE(HMMIO);
|
DECLARE_OLD_HANDLE(HMMIO);
|
||||||
DECLARE_HANDLE(HPALETTE);
|
DECLARE_OLD_HANDLE(HPALETTE);
|
||||||
DECLARE_HANDLE(HPEN);
|
DECLARE_OLD_HANDLE(HPEN);
|
||||||
DECLARE_HANDLE(HQUEUE);
|
DECLARE_OLD_HANDLE(HQUEUE);
|
||||||
DECLARE_HANDLE(HRGN);
|
DECLARE_OLD_HANDLE(HRGN);
|
||||||
DECLARE_HANDLE(HRSRC);
|
DECLARE_OLD_HANDLE(HRSRC);
|
||||||
DECLARE_HANDLE(HTASK);
|
DECLARE_OLD_HANDLE(HTASK);
|
||||||
DECLARE_HANDLE(HWAVE);
|
DECLARE_OLD_HANDLE(HWAVE);
|
||||||
DECLARE_HANDLE(HWAVEIN);
|
DECLARE_OLD_HANDLE(HWAVEIN);
|
||||||
DECLARE_HANDLE(HWAVEOUT);
|
DECLARE_OLD_HANDLE(HWAVEOUT);
|
||||||
DECLARE_HANDLE(HWINSTA);
|
DECLARE_OLD_HANDLE(HWINSTA);
|
||||||
DECLARE_HANDLE(HDESK);
|
DECLARE_OLD_HANDLE(HDESK);
|
||||||
DECLARE_HANDLE(HWND);
|
DECLARE_OLD_HANDLE(HWND);
|
||||||
DECLARE_HANDLE(HKL);
|
DECLARE_OLD_HANDLE(HKL);
|
||||||
|
|
||||||
/* Handle types that must remain interchangeable even with strict on */
|
/* Handle types that must remain interchangeable even with strict on */
|
||||||
|
|
||||||
|
|
|
@ -317,24 +317,44 @@ typedef WORD LANGID;
|
||||||
* of WINE code operates on HANDLES as if they are UINTs. So to WINE
|
* of WINE code operates on HANDLES as if they are UINTs. So to WINE
|
||||||
* they exist as UINTs but to the Winelib user who turns on strict,
|
* they exist as UINTs but to the Winelib user who turns on strict,
|
||||||
* they exist as void*. If there is a size difference between UINT and
|
* they exist as void*. If there is a size difference between UINT and
|
||||||
* void* then things get ugly. */
|
* void* then things get ugly.
|
||||||
#ifdef STRICT
|
*
|
||||||
|
* Here is the plan to convert Wine to STRICT:
|
||||||
|
*
|
||||||
|
* Types will be converted one at a time by volunteers who will compile
|
||||||
|
* Wine with STRICT turned on. Handles that have not been converted yet
|
||||||
|
* will be declared with DECLARE_OLD_HANDLE. Converted handles are
|
||||||
|
* declared with DECLARE_HANDLE.
|
||||||
|
* See the bug report 90 for more details:
|
||||||
|
* http://wine.codeweavers.com/bugzilla/show_bug.cgi?id=90
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* when compiling Wine we always treat HANDLE as an UINT. Then when
|
||||||
|
* we're ready we'll remove the '!defined(__WINE__)' (the equivalent
|
||||||
|
* of converting it from DECLARE_OLD_HANDLE to DECLARE_HANDLE).
|
||||||
|
*/
|
||||||
|
#if defined(STRICT) && !defined(__WINE__)
|
||||||
typedef VOID* HANDLE;
|
typedef VOID* HANDLE;
|
||||||
|
#define DECLARE_OLD_HANDLE(a) \
|
||||||
|
typedef struct a##__ { int unused; } *a; \
|
||||||
|
typedef a *P##a, *LP##a
|
||||||
|
|
||||||
#else
|
#else
|
||||||
typedef UINT HANDLE;
|
typedef UINT HANDLE;
|
||||||
|
#define DECLARE_OLD_HANDLE(a) \
|
||||||
|
typedef HANDLE a; \
|
||||||
|
typedef a *P##a, *LP##a
|
||||||
#endif
|
#endif
|
||||||
typedef HANDLE *LPHANDLE;
|
typedef HANDLE *PHANDLE, *LPHANDLE;
|
||||||
|
|
||||||
#ifdef STRICT
|
#ifdef STRICT
|
||||||
#define DECLARE_HANDLE(a) \
|
#define DECLARE_HANDLE(a) \
|
||||||
typedef struct a##__ { int unused; } *a; \
|
typedef struct a##__ { int unused; } *a; \
|
||||||
typedef a *P##a; \
|
typedef a *P##a, *LP##a
|
||||||
typedef a *LP##a
|
|
||||||
#else /*STRICT*/
|
#else /*STRICT*/
|
||||||
#define DECLARE_HANDLE(a) \
|
#define DECLARE_HANDLE(a) \
|
||||||
typedef HANDLE a; \
|
typedef HANDLE a; \
|
||||||
typedef a *P##a; \
|
typedef a *P##a, *LP##a
|
||||||
typedef a *LP##a
|
|
||||||
#endif /*STRICT*/
|
#endif /*STRICT*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -971,7 +991,6 @@ typedef struct _CONTEXT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef CONTEXT *PCONTEXT;
|
typedef CONTEXT *PCONTEXT;
|
||||||
typedef HANDLE *PHANDLE;
|
|
||||||
|
|
||||||
#ifdef __WINE__
|
#ifdef __WINE__
|
||||||
|
|
||||||
|
|
|
@ -80,9 +80,8 @@ extern "C" {
|
||||||
|
|
||||||
/* Handle types */
|
/* Handle types */
|
||||||
|
|
||||||
DECLARE_HANDLE(SC_HANDLE);
|
DECLARE_OLD_HANDLE(SC_HANDLE);
|
||||||
|
DECLARE_OLD_HANDLE(SERVICE_STATUS_HANDLE);
|
||||||
DECLARE_HANDLE(SERVICE_STATUS_HANDLE);
|
|
||||||
|
|
||||||
|
|
||||||
/* Service status structure */
|
/* Service status structure */
|
||||||
|
|
Loading…
Reference in New Issue