Hello,
i'm not 100% sure what -DWINE_NO_STRICT should do, but i suspect it should negate the effect of -DSTRICT. The attached patch enables that and lets wine compile with -DSTRICT where WINE_NO_STRICT isn't defined.
Comments? bye michael
P.S.: is this -DSTRICT a m$ windows thing or a wine only thing?
Michael Stefaniuc mstefani@redhat.de writes:
i'm not 100% sure what -DWINE_NO_STRICT should do, but i suspect it should negate the effect of -DSTRICT. The attached patch enables that and lets wine compile with -DSTRICT where WINE_NO_STRICT isn't defined.
WINE_NO_STRICT not only undoes the effect of -DSTRICT, but it also makes handles UINTs, which -DSTRICT is not supposed to do. And the idea was that -D__WINE__ would implicitly force -DSTRICT so that you don't have to specify it. But I agree the #ifdefs could be improved so that it still works even if you add -DSTRICT. Something like the patch below should work I think.
P.S.: is this -DSTRICT a m$ windows thing or a wine only thing?
It's a Windows thing.
Index: include/winnt.h =================================================================== RCS file: /opt/cvs-commit/wine/include/winnt.h,v retrieving revision 1.134 diff -u -r1.134 winnt.h --- include/winnt.h 19 Oct 2002 17:20:02 -0000 1.134 +++ include/winnt.h 21 Oct 2002 20:04:02 -0000 @@ -561,14 +561,14 @@ * we're ready we'll remove the '!defined(__WINE__)' (the equivalent * of converting it from DECLARE_OLD_HANDLE to DECLARE_HANDLE). */ -#if defined(__WINE__) && defined(WINE_NO_STRICT) +#ifdef WINE_NO_STRICT typedef UINT HANDLE; #else typedef void *HANDLE; #endif typedef HANDLE *PHANDLE, *LPHANDLE;
-#if defined(STRICT) || (defined(__WINE__) && !defined(WINE_NO_STRICT)) +#if (defined(STRICT) || defined(__WINE__)) && !defined(WINE_NO_STRICT) #define DECLARE_HANDLE(a) \ typedef struct a##__ { int unused; } *a; \ typedef a *P##a Index: include/wine/server_protocol.h =================================================================== RCS file: /opt/cvs-commit/wine/include/wine/server_protocol.h,v retrieving revision 1.46 diff -u -r1.46 server_protocol.h --- include/wine/server_protocol.h 18 Oct 2002 23:46:28 -0000 1.46 +++ include/wine/server_protocol.h 21 Oct 2002 20:04:05 -0000 @@ -32,12 +32,12 @@ int pad[16]; };
-#if defined(STRICT) || (defined(__WINE__) && !defined(WINE_NO_STRICT)) -typedef void *obj_handle_t; -typedef void *user_handle_t; -#else +#ifdef WINE_NO_STRICT typedef int obj_handle_t; typedef unsigned int user_handle_t; +#else +typedef void *obj_handle_t; +typedef void *user_handle_t; #endif
typedef unsigned short atom_t; Index: server/protocol.def =================================================================== RCS file: /opt/cvs-commit/wine/server/protocol.def,v retrieving revision 1.47 diff -u -r1.47 protocol.def --- server/protocol.def 18 Oct 2002 23:46:28 -0000 1.47 +++ server/protocol.def 21 Oct 2002 20:04:08 -0000 @@ -48,12 +48,12 @@ int pad[16]; /* the max request size is 16 ints */ };
-#if defined(STRICT) || (defined(__WINE__) && !defined(WINE_NO_STRICT)) -typedef void *obj_handle_t; -typedef void *user_handle_t; -#else +#ifdef WINE_NO_STRICT typedef int obj_handle_t; typedef unsigned int user_handle_t; +#else +typedef void *obj_handle_t; +typedef void *user_handle_t; #endif
typedef unsigned short atom_t;
On Mon, Oct 21, 2002 at 01:17:43PM -0700, Alexandre Julliard wrote:
Michael Stefaniuc mstefani@redhat.de writes:
i'm not 100% sure what -DWINE_NO_STRICT should do, but i suspect it should negate the effect of -DSTRICT. The attached patch enables that and lets wine compile with -DSTRICT where WINE_NO_STRICT isn't defined.
WINE_NO_STRICT not only undoes the effect of -DSTRICT, but it also makes handles UINTs, which -DSTRICT is not supposed to do. And the idea was that -D__WINE__ would implicitly force -DSTRICT so that you
Ok, that makes sense.
don't have to specify it. But I agree the #ifdefs could be improved so that it still works even if you add -DSTRICT. Something like the patch below should work I think.
Yes, it works, could you please commit it?
thanks bye michael