Bug 71366 - MinGW build support broken
Summary: MinGW build support broken
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All Windows (All)
: medium normal
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard: more or less r+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-11-08 00:11 UTC by Matt Fischer
Modified: 2013-11-27 14:32 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix for MinGW build (1.20 KB, text/plain)
2013-11-08 00:11 UTC, Matt Fischer
Details

Description Matt Fischer 2013-11-08 00:11:17 UTC
Created attachment 88864 [details]
Fix for MinGW build

The fix for https://bugs.freedesktop.org/show_bug.cgi?id=66060 added use of the constant PROCESS_QUERY_LIMITED_INFORMATION, which comes from a Windows header.  However, MinGW's headers are so old that they do not contain this constant, so the build breaks.

I've attached a patch which fixes the issue, by defining the constant if it's not already present.  It's ugly, but it does get the job done.  Any thoughts on whether there's a better way to deal with this?
Comment 1 Simon McVittie 2013-11-08 12:14:13 UTC
Which flavour of mingw is this: the original (mingw.sourceforge.net/mingw.org), or the mingw-w64 fork (mingw-w64.sourceforge.net)?

I occasionally use mingw-w64 for smoke-testing: it's what's packaged in Debian, and seems to be rather better than the original.

Having said that, the patch seems fine, unless Ralf has any objection.
Comment 2 Ralf Habacker 2013-11-08 19:07:46 UTC
(In reply to comment #1)
> Which flavour of mingw is this: the original
> (mingw.sourceforge.net/mingw.org), 
i guess this one 
> or the mingw-w64 fork (mingw-w64.sourceforge.net)?
mingw-w64 contains the define
>
> I occasionally use mingw-w64 for smoke-testing: it's what's packaged in Debian, 
also in suse 
> and seems to be rather better than the original.
yes
>
> Having said that, the patch seems fine, unless Ralf has any objection.
looks good, no objections from my side.
Comment 3 Matt Fischer 2013-11-08 20:29:33 UTC
It's MinGW32.  Although now that I look closer, I see that version 4.0 and up have added this flag to their headers.  So for my part, I may just upgrade to a newer version and be done with this.  I guess I'll leave it in your hands to decide whether to move forward with this patch or not--it'll make things work properly on MinGW 3.x, but isn't necessary for 4.0 or later.
Comment 4 Simon McVittie 2013-11-27 14:32:41 UTC
I was tempted to say "no, get a better runtime" since mingw-w64 and mingw32 >= 4 don't need this; but it's not as if this patch is going to be a maintenance burden, so we might as well apply it.

Fixed in git for 1.7.10, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.