This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITA] w32api-3.0b_svn5368-1


On 21/08/2012 13:10, NightStrike wrote:
> On Tue, Aug 21, 2012 at 7:34 AM, JonY <jon_y-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> wrote:
>>
>> Note the pragma push and undef, the Xwindows.h macro tricks no longer
>> works. Perhaps guarding against _XFree86Server instead of XFree86Server
>> will work?
> 
> Or just fix Xwindows....

I am afraid it is a little too late to remove the conflicting definition of
BOOL from X11/X.h

I was able to get X server to compile with the following alteration to
winddef.h, and turning on _PROTECT_BOOL_MACRO in X11/Xwindows.h

#ifndef _DEF_WINBOOL_
#define _DEF_WINBOOL_
typedef int WINBOOL;
#ifndef _PROTECT_BOOL_MACRO
#pragma push_macro("BOOL")
#undef BOOL
#endif /* _PROTECT_BOOL_MACRO */
#if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU)
typedef int BOOL;
#endif
#define BOOL WINBOOL
typedef BOOL *PBOOL;
typedef BOOL *LPBOOL;
#ifndef _PROTECT_BOOL_MACRO
#pragma pop_macro("BOOL")
#endif /* _PROTECT_BOOL_MACRO */
#endif /* _DEF_WINBOOL_ */

I would be very interested in suggestions as to how to fix this without
messing with windef.h

There are a also couple of other issues which prevent X server from compiling
successfully with these headers, which should probably be fixed in the X server:

DEFINE_GUID is defined in terms of GUID_SECT, which no longer exists.  I'm not
sure what the broken-ness referred to here is, or if it still exists...

/*
 * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
 * so we have to redefine it here.
 */
#ifdef DEFINE_GUID
#undef DEFINE_GUID
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT
= {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif                          /* DEFINE_GUID */

'Status' is used as formal parameter name in some w32api headers, but as a
typename in xkbsrv.h.  We wrap this in Xwindows.h to avoid conflict, but
objbase.h is included outside of that wrapper when we are defining directdraw
interface GUIDs, leading to a conflict in rpcdce.h


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]