GNOME Bugzilla – Bug 756866
windows: Drop Windows XP/Server 2003 support and fix GLib compilation
Last modified: 2018-11-03 10:19:51 UTC
See commit message. Should clean up the GLib patch a bit and get it upstream, but should we do this or not?
Created attachment 313744 [details] [review] windows: Drop Windows XP/Server 2003 support and fix GLib compilation
We're still as _MSC_VER=1200 (VS6 from 1998) because that's what every Windows version ships with and other software is compiling with. GLib has conditional code for 1400 (VS2005), 1500 (VS2008), 1900 (VS2015).
I think it's a bit silly to keep supporting a Windows version even Microsoft doesn't support any longer. In my experience Windows 7 is pretty much the baseline these days. So +1 to dropping XP support.
We should get this in. MinGW doesn't even define POLL* symbols for poll() in winsock2.h without _WIN32_WINNT >= 0x0600. GLib falls back to manually defining them in the configure file, but that's terrible and won't work with libraries that don't use g_poll().
Review of attachment 313744 [details] [review]: ::: recipes/glib/0030-Fix-compilation-with-WINVER-0x600-and-_WINNT_WIN32-0.patch @@ +47,3 @@ ++old_LIBS=$LIBS ++LIBS="$LIBS $G_LIBS_EXTRA" ++AC_CHECK_FUNCS(getprotobyname_r endservent if_nametoindex if_indextoname sendmmsg) This change does not seem needed, at least it does not fail here, any reason ? @@ +70,3 @@ ++ const gpointer addr, ++ gchar *addr_str, ++ socklen_t size); Not totally correct, at least no in current code tree. How Chun-wei patch works, is that on windows you should wall ws2funcs.pInetPton, ws2funcs.pInetNtop and ws2funcs.pIfNameToIndex. I would add defines in the win32networking.h adapter.
(In reply to Nicolas Dufresne (stormer) from comment #5) > Review of attachment 313744 [details] [review] [review]: > > ::: > recipes/glib/0030-Fix-compilation-with-WINVER-0x600-and-_WINNT_WIN32-0.patch > @@ +47,3 @@ > ++old_LIBS=$LIBS > ++LIBS="$LIBS $G_LIBS_EXTRA" > ++AC_CHECK_FUNCS(getprotobyname_r endservent if_nametoindex if_indextoname > sendmmsg) Nevermind, I got this one.
Created attachment 330920 [details] [review] windows: Drop Windows XP/Server 2003 support and fix GLib compilation This is a rebased version. Note that instead of linking iphlpapi a second time (we do that dynamically already) I simply fix the name clash.
Created attachment 330921 [details] [review] windows: Drop Windows XP/Server 2003 support and fix GLib compilation The patch inside was duplicated, fixed.
Ok, now gst-ffmpeg fails to build: In file included from ./libavutil/thread.h:132:0, from libavfilter/pthread.c:29: ./compat/w32pthreads.h: In function 'pthread_mutex_init': ./compat/w32pthreads.h:117:5: error: implicit declaration of function 'InitializeCriticalSectionEx' [-Werror=implicit-function-declaration] There is no trace of InitializeCriticalSectionEx in our bundled MingW, in fact synchapi.h is missing. It's not clear when it was introduced in MingW, but sounds like to go forward with this, we need some update to MingW no matter what.
I think prior to this, we really need to update mingw.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/cerbero/issues/21.