summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2018-12-05 17:50:59 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-06-24 10:58:51 +0800
commitedc5eb98c210f01a7ed398a821c689e157e3311b (patch)
tree86b018d67f375b236923ad6ecc5a948d3e79f555
parent84d0af42269d962f52252324c639514858ffa840 (diff)
downloadglib-edc5eb98c210f01a7ed398a821c689e157e3311b.tar.gz
gio/tests/resourceplugin.c: Ensure entry points are exported
Ensure that the entry points/symbols are exported on Visual Studio builds as well.
-rw-r--r--gio/tests/resourceplugin.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gio/tests/resourceplugin.c b/gio/tests/resourceplugin.c
index b66d54142..fc8d8d2f1 100644
--- a/gio/tests/resourceplugin.c
+++ b/gio/tests/resourceplugin.c
@@ -1,3 +1,14 @@
+/*
+ * Ensure the g_io_module_*() symbols are exported
+ * on all supported compilers without using config.h.
+ * This must be done before including any GLib headers,
+ * since GLIB_AVAILABLE_IN_ALL, which is used to mark the
+ * g_io_module*() symbols, is defined to be _GLIB_EXTERN,
+ * which must be overriden to export the symbols.
+ */
+#include "modules/symbol-visibility.h"
+#define _GLIB_EXTERN GLIB_TEST_EXPORT_SYMBOL
+
#include <gio/gio.h>
void