Declare all handles with DECLARE_OLD_HANDLE to ease conversion to
STRICT.
diff --git a/include/winnt.h b/include/winnt.h
index 38e622b..2d1f14e 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -317,24 +317,44 @@
* 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 void*. If there is a size difference between UINT and
- * void* then things get ugly. */
-#ifdef STRICT
+ * void* then things get ugly.
+ *
+ * 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;
+#define DECLARE_OLD_HANDLE(a) \
+ typedef struct a##__ { int unused; } *a; \
+ typedef a *P##a, *LP##a
+
#else
typedef UINT HANDLE;
+#define DECLARE_OLD_HANDLE(a) \
+ typedef HANDLE a; \
+ typedef a *P##a, *LP##a
#endif
-typedef HANDLE *LPHANDLE;
+typedef HANDLE *PHANDLE, *LPHANDLE;
#ifdef STRICT
#define DECLARE_HANDLE(a) \
- typedef struct a##__ { int unused; } *a; \
- typedef a *P##a; \
- typedef a *LP##a
+ typedef struct a##__ { int unused; } *a; \
+ typedef a *P##a, *LP##a
#else /*STRICT*/
#define DECLARE_HANDLE(a) \
- typedef HANDLE a; \
- typedef a *P##a; \
- typedef a *LP##a
+ typedef HANDLE a; \
+ typedef a *P##a, *LP##a
#endif /*STRICT*/
@@ -971,7 +991,6 @@
#endif
typedef CONTEXT *PCONTEXT;
-typedef HANDLE *PHANDLE;
#ifdef __WINE__