From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8082 invoked by alias); 23 Aug 2012 18:45:31 -0000 Received: (qmail 8070 invoked by uid 22791); 23 Aug 2012 18:45:29 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtpout.karoo.kcom.com (HELO smtpout.karoo.kcom.com) (212.50.160.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Aug 2012 18:45:11 +0000 Received: from 213-152-38-55.dsl.eclipse.net.uk (HELO [192.168.1.103]) ([213.152.38.55]) by smtpout.karoo.kcom.com with ESMTP; 23 Aug 2012 19:45:09 +0100 Message-ID: <50367A46.2020500@dronecode.org.uk> Date: Thu, 23 Aug 2012 18:45:00 -0000 From: Jon TURNEY User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: cygwin-apps@cygwin.com CC: jon_y-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, "Yaakov (Cygwin Ports)" Subject: Re: [ITA] w32api-3.0b_svn5368-1 References: <20120814072938.GA13181@calimero.vinschen.de> <20120814073403.GB13181@calimero.vinschen.de> <20120814075611.GC13181@calimero.vinschen.de> <50322A61.1050806@users.sourceforge.net> <5032C6C9.4070704@users.sourceforge.net> <5032E14F.5090604@users.sourceforge.net> <5032F137.2070905@users.sourceforge.net> <5033010B.1020509@users.sourceforge.net> <20120821034635.GA17755@ednor.casa.cgf.cx> <503312FD.4030305@users.sourceforge.net> <50336CEB.6060900@dronecode.org.uk> <50337233.4030205@users.sourceforge.net> <50339789.7060304@dronecode.org.uk> <5033DA5A.2090803@users.sourceforge.net> <50340B1D.2070302@users.sourceforge.net> In-Reply-To: <50340B1D.2070302@users.sourceforge.net> Content-Type: multipart/mixed; boundary="------------030101060301070207070107" Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2012-08/txt/msg00095.txt.bz2 This is a multi-part message in MIME format. --------------030101060301070207070107 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Content-length: 1943 On 21/08/2012 23:26, JonY wrote: > On 8/22/2012 02:58, Yaakov (Cygwin/X) wrote: >> Once we get past those, there are a few more: This is what I get for only checking git master :S >> In file included from winmultiwindowwm.c:74:0: >> taskbar.h:34:16: error: redefinition of ‘struct _tagpropertykey’ >> /usr/include/w32api/wtypes.h:762:16: note: originally defined here >> taskbar.h:37:3: error: conflicting types for ‘PROPERTYKEY’ >> /usr/include/w32api/wtypes.h:765:3: note: previous declaration of >> ‘PROPERTYKEY’ was here >> taskbar.h:39:0: warning: "REFPROPVARIANT" redefined >> /usr/include/w32api/propidl.h:266:0: note: this is the location of the >> previous definition >> In file included from winmultiwindowwm.c:74:0: >> taskbar.h:67:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ >> before ‘const’ >> >> winmultiwindowwm.c: In function ‘winSetAppID’: >> winmultiwindowwm.c:2064:44: error: ‘PKEY_AppUserModel_ID’ undeclared >> (first use in this function) >> >> This would appear to be fixable by using in >> hw/xwin/taskbar.h instead of defining this stuff ourselves, but that >> header is _W64-specific. > > The header details are actually scrapped from MSDN. It's nice to have more up-to-date PSDK headers. But, I'm guessing that the issue Yaakov is alluding to here is that mingw.org's w32api doesn't have a propkey.h, so I would be reluctant to upstream a patch which unconditionally included propkey.h. Putatively, the X.org source is compilable using a MinGW toolchain to produce a native X server, and this would break that for anyone still using the mingw.org toolchain. Fortunately, this seems fixable if we can check we are using mingw-w64 or mingw.org headers . I'm told that checking for __MINGW64_VERSION_MAJOR is the defined way to do this. Yaakov, you might like to try the attached patch. With an appropriate change to prevent BOOL redefinition errors, this builds X server for me. --------------030101060301070207070107 Content-Type: text/plain; charset=windows-1252; name="0001-Fix-compilation-with-mingw-w64-w32api-headers.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Fix-compilation-with-mingw-w64-w32api-headers.patch" Content-length: 2929 >From 8db8baf111ec25370e1123b300e629c0be6490dd Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 21 Aug 2012 15:31:16 +0100 Subject: [PATCH] Fix compilation with mingw-w64 w32api headers - GUID_SECT was only ever needed for gcc pre-2.95 - Wrap 'Status' when including objbase.h - Include propkey.h, propsys.h rather than defining necessary stuff ourselves Signed-off-by: Jon TURNEY --- hw/xwin/ddraw.h | 4 ++++ hw/xwin/taskbar.h | 9 +++++++++ hw/xwin/winshaddd.c | 2 +- hw/xwin/winshadddnl.c | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/xwin/ddraw.h b/hw/xwin/ddraw.h index 9463049..fade730 100644 --- a/hw/xwin/ddraw.h +++ b/hw/xwin/ddraw.h @@ -3,7 +3,11 @@ #include #include +#pragma push_macro("Status") +#undef Status +#define Status wStatus #include +#pragma pop_macro("Status") #if defined(NONAMELESSUNION) && !defined(DUMMYUNIONNAME1) #define DUMMYUNIONNAME1 u1 diff --git a/hw/xwin/taskbar.h b/hw/xwin/taskbar.h index bfe301d..06c2f5d 100644 --- a/hw/xwin/taskbar.h +++ b/hw/xwin/taskbar.h @@ -31,6 +31,13 @@ #include +#ifdef __MINGW64_VERSION_MAJOR +/* If we are using headers from mingw-w64 project, it provides the PSDK headers this needs ... */ +#include +#include +#else /* !__MINGW64_VERSION_MAJOR */ +/* ... otherwise, we need to define all this stuff ourselves */ + typedef struct _tagpropertykey { GUID fmtid; DWORD pid; @@ -66,6 +73,8 @@ DEFINE_GUID(IID_IPropertyStore,0x886d8eeb, 0x8cf2, 0x4446, 0x8d,0x02, 0xcd,0xba, DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 5); +#endif /* !__MINGW64_VERSION_MAJOR */ + typedef HRESULT (__stdcall *SHGETPROPERTYSTOREFORWINDOWPROC)(HWND,REFIID,void**); typedef HRESULT (__stdcall *PROPVARIANTCLEARPROC)(PROPVARIANT*); diff --git a/hw/xwin/winshaddd.c b/hw/xwin/winshaddd.c index a2aaa39..cab451a 100644 --- a/hw/xwin/winshaddd.c +++ b/hw/xwin/winshaddd.c @@ -42,7 +42,7 @@ */ #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}} +#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} #endif /* DEFINE_GUID */ /* diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c index f748c4d..b4720b2 100644 --- a/hw/xwin/winshadddnl.c +++ b/hw/xwin/winshadddnl.c @@ -42,7 +42,7 @@ */ #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}} +#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} #endif /* DEFINE_GUID */ /* -- 1.7.9 --------------030101060301070207070107--