GNOME Bugzilla – Bug 573595
plugins-bad mingw ports
Last modified: 2009-03-26 10:39:03 UTC
A few patches that port some bad plugins to MinGW. See attachments.
Created attachment 129758 [details] [review] Required by all other patches Checks for pthread.h Disables dccp when pthread.h is not available (maybe there are more plugins that depend on pthread?) Adds -lws2_32 dependency for dccp and xdgmime when winsock2.h is available Adds -lpthread dependency for dccp when pthread.h is available Adds two variables - ACMENC_CFLAGS and ACMMP3DEC_CFLAGS
Created attachment 129759 [details] [review] DCCP plugin port to MinGW Conditionally includes winsock headers on Win32 Conditionally calls appropriate winsock functions on Win32 Common includes are grouped into separate header gstdccp_common.h (attached separately) Did not tested.
Created attachment 129760 [details] Common includes for DCCP plugin
Created attachment 129763 [details] [review] xdgmime plugin mingw port Makes use of XDG_LIBS (passes on -lws2_32 when winsock2.h is available and -liberty from commandline) Includes winsock stuff on Win32 Doesn't warn about MMAP on Win32 (Maybe FIXME is in order? I can't believe that MMAP can't be ported) Moves one (unused?) variable. Requires fnmatch.h which is attached separately. Requires libiberty.a (it has fnmatch function defined on MinGW, although there's no header for that function, hence the new fnmatch.h)
Created attachment 129764 [details] fnmatch.h for MinGW Actual function is in libiberty.a (so -liberty should be passed via XDG_LIBS) fnmatch.h should be placed in win32/common, i think.
Created attachment 129766 [details] [review] acmenc and acmmp3dec plugins mingw port Makes use of ACM_CFLAGS and ACMMP3DEC_CFALGS. These should be used to pass additional Include directory where msacm.h and mmreg.h could be found, they has to be taken from MS Platform SDK (the ones bundled with MinGW are unuseful). Including the whole SDK seems to be a bad idea (conflicts with MinGW). Corrects some calls to WinAPI functions to explicitly use widechar-versions (and this way we don't need to do -DUNICODE ! Yay!). Typecasts some arguments to avoid warnings
I'll take a look at the xdgmime patch later, there are also some other things to be changed for portability ;) If nobody is faster I'll also handle the other patches
The xdgmime parts should be done by using GLib stuff now: commit f957ee0aeb2902710e677b566c1ad36393ed0323 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sun Mar 1 20:18:30 2009 +0100 xdgmime: Use g_pattern_match_simple() instead of fnmatch() for Win32 compati commit e571138ef60bbe7a983e1d0a2cf86dabcf8c2e08 Author: LRN <lrn1986@gmail.com> Date: Sun Mar 1 20:13:31 2009 +0100 xdgmime: Fix unused variable compiler warning commit 8c4584aa565e0298c39c1603bb65dcd4bc678380 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sun Mar 1 20:12:12 2009 +0100 xdgmime: Don't warn if we have no MMAP support commit 39850d674eb12de4c181010d37c5d9df655bfd52 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sun Mar 1 20:11:07 2009 +0100 xdgmime: Use g_ntoh[ls] instead of the non-GLib functions for Win32 compatib commit b30926428d4dfc9be532d83219f544f1d49cb9dc Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sun Mar 1 20:09:24 2009 +0100 xdgmime: Use G_BYTE_ORDER instead of relying on LITTLE_ENDIAN to be defined
commit 7ff9bdb45659fdfbc434a202c0588c6a271bef0a Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Thu Mar 26 11:37:28 2009 +0100 acm: Port to MinGW Fixes bug #573595. commit f5b298e3d7687dbd349ff920eaa22d7f958a0653 Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Thu Mar 26 11:33:50 2009 +0100 xdgmime: Link with winsock library to fix build with MinGW Partially fixes bug #573595. commit dafa53077320a7a39c61a89a7cca1d74797fb92f Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Thu Mar 26 11:32:08 2009 +0100 dccp: Port DCCP plugin to MinGW Partially fixes bug #573595. commit fe9e680169e3e04ca98cebdf41f771310591d329 Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Thu Mar 26 11:23:30 2009 +0100 dccp: Disable the dccp plugin if no pthread support is available Partially fixes bug #573595.