Visual Studio: Remove workarounds for <= glib-2.74.x
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 21 Jun 2023 04:24:40 +0000 (12:24 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 21 Jun 2023 04:29:38 +0000 (12:29 +0800)
We now need glib-2.76.0 or later, which removes our needs for the workarounds
that we need to build the media backends against GLib-2.74.x or earlier, so
clean up things a bit.

meson.build
modules/media/gtkffmediafile.c
modules/media/gtkgstmediafile.c

index 69db95198f99fbcbf424acb9f0a3ef768b24f5c4..2959a8dbfe84b55c128065f04d1ab6d1ca2d0130 100644 (file)
@@ -365,13 +365,6 @@ glib_dep       = dependency('glib-2.0', version: glib_req)
 gobject_dep    = dependency('gobject-2.0', version: glib_req)
 if os_win32
   giowin32_dep = dependency('gio-windows-2.0', version: glib_req, required: win32_enabled)
-  if giowin32_dep.version().version_compare('<2.75.0')
-    if cc.get_id() == 'msvc' and get_option('default_library') != 'static'
-      # Override _GLIB_EXTERN on Visual Studio for media modules for glib <= 2.74.x, so that we
-      # avoid error C2375 (redefinition; different linkage) when building the g_io_module_*() bits
-      cdata.set('MODULES_OVERRIDE_GLIB_EXTERN', true)
-    endif
-  endif
 endif
 if os_unix
   giounix_dep  = dependency('gio-unix-2.0', version: glib_req, required: false)
index 0103e5bd1614894328b71f16d1ef3f52f6133de6..2839cb8174da649088f23f77d9682693622c43c4 100644 (file)
 
 #include "config.h"
 
-/*
- * Sadly, we need this to build on Visual Studio against glib-2.74.x or earlier,
- * otherwise the build will fail when building the g_io_module_*() bits with error C2375
- * (redefinition; different linkage).  This must be before including the Gio headers.
- */
-#if defined (_MSC_VER) && defined (MODULES_OVERRIDE_GLIB_EXTERN)
-# define _GLIB_EXTERN __declspec(dllexport) extern
-#endif
-
 #include "gtkffmediafileprivate.h"
 
 #include <glib/gi18n-lib.h>
index 7353539ef6621bb3d7b48aec167c8797e958b13e..5487bb0571d20df4fc5c181ad4cdce57d1693592 100644 (file)
 
 #include "config.h"
 
-/*
- * Sadly, we need this to build on Visual Studio against glib-2.74.x or earlier,
- * otherwise the build will fail when building the g_io_module_*() bits with error C2375
- * (redefinition; different linkage).  This must be before including the Gio headers.
- */
-#if defined (_MSC_VER) && defined (MODULES_OVERRIDE_GLIB_EXTERN)
-# define _GLIB_EXTERN __declspec(dllexport) extern
-#endif
-
 #include "gtkgstmediafileprivate.h"
 #include "gtkgstpaintableprivate.h"