GIOModule: Use unique names for load/unload symbols

GIO modules should include their name into their exported symbols to
make them unique. This avoids symbol clash when building modules
statically.

extract_name() function is copied from GStreamer which recently
switched to the same symbol naming scheme.

https://bugzilla.gnome.org/show_bug.cgi?id=684282
This commit is contained in:
Xavier Claessens
2017-11-30 15:36:21 -05:00
parent e91c118418
commit 7f69b828fc
7 changed files with 153 additions and 9 deletions

View File

@@ -441,6 +441,7 @@ gio_sources = files(
'ginputstream.c',
'gioerror.c',
'giomodule.c',
'giomodule-priv.c',
'gioscheduler.c',
'giostream.c',
'gloadableicon.c',
@@ -803,7 +804,7 @@ executable('gresource', 'gresource-tool.c',
link_args : noseh_link_args,
dependencies : [libelf, libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
executable('gio-querymodules', 'gio-querymodules.c',
executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
install : true,
c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,
# intl.lib is not compatible with SAFESEH