MemoryBarrier patch for dbus windows port built with mingw
bwanamarko at yahoo.com
Mon Jun 25 11:00:24 PDT 2012
In order to compile dbus-1.6.0 using mingw32/msys on Windows XP SP3 (x86) you will need the following patch, courtesy of Brad Pitcher , because there is no MemoryBarrier macro in mingw, which is a known issue reported OPEN on the mingw32 sf.netsite  and WONTFIX in dbus Bugzilla . It is fairly clear that this issue will not be addressed by dbus, and dbus developers appear to recommend mingw-w64 instead of ming32.
@@ -54,6 +54,13 @@
+__CRT_INLINE VOID MemoryBarrier(VOID)
+ LONG Barrier = 0;
+ __asm__ __volatile__("xchgl %%eax,%0 "
+ :"=r" (Barrier));
/* Declarations missing in mingw's headers */
extern BOOL WINAPI ConvertStringSidToSidA (LPCSTR StringSid, PSID *Sid);
Some other patches, message threads, issues and links are posted below.
 https://bitbucket.org/bradpitcher/mingw-cross-env/src/5f91fb4e0199/src/dbus-1-fixes.patch - patch by Brad Pitcher (2012-09-23)
 https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3420424&group_id=2435 - mingw bug 3420424 on sf.net by Ernie Boyd (2011-10-07)
 https://bugs.freedesktop.org/show_bug.cgi?id=41423 - dbus Bugzilla Bug 41423 - MemoryBarrier only available on Vista+
 http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/8bfc6d601bb1 - patch supplied by Mark Brand (2012-09-23)
 http://lists.gnu.org/archive/html/mingw-cross-env-list/2011-09/msg00033.html - thread started by Mark Brand (2012-09-23)
 http://lists-archives.com/mingw-users/15935-missing-definition-of-memorybarrier.html - link to original patch (broken in Mark Brand's thread)
 https://bitbucket.org/vog/mingw-cross-env/src/906c0415cdb8/src/dbus-1-fixes.patch - original fork of mingw-cross-env by Volker Grabsch
 https://github.com/mxe/mxe - currently mingw-cross-env has been renamed mxe (M cross environment)
 http://mingw-w64.sourceforge.net/ - mingw-w64 project page
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dbus