summaryrefslogtreecommitdiff
path: root/tests/libmoduletestplugin_a.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-01-14 23:24:53 -0500
committerRyan Lortie <desrt@desrt.ca>2013-01-14 23:31:59 -0500
commit5d42fdd068bddaaf7e42b7aaca2c15e931ebf3c5 (patch)
treec0d7a9e960a1ad6dbb522818ee9b04e54c8cf18c /tests/libmoduletestplugin_a.c
parent7e00f381916cab6ba13f1d430310802cf6b9c726 (diff)
downloadglib-5d42fdd068bddaaf7e42b7aaca2c15e931ebf3c5.tar.gz
visibility: Use a separate CFLAGS variable
We only want to control the default visibility for our five main installable libraries: libglib, libgthread, libgmodule, libgobject, libgio. We should therefore only set -fvisibility=hidden when building those. Use a separate substitution variable for this purpose. Using CFLAGS directly leads to some modules built in testcases not exporting their symbols (and then the tests fail). It also affects the fam file monitoring module. Colin had originally done it this way in his visibility patch series but I failed to understand why so I didn't copy it. Now I do. Also: revert changes made to two testcases in an attempt to work around this issue. https://bugzilla.gnome.org/show_bug.cgi?id=691756
Diffstat (limited to 'tests/libmoduletestplugin_a.c')
-rw-r--r--tests/libmoduletestplugin_a.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/libmoduletestplugin_a.c b/tests/libmoduletestplugin_a.c
index 3ce43dad0..69fdd0f70 100644
--- a/tests/libmoduletestplugin_a.c
+++ b/tests/libmoduletestplugin_a.c
@@ -27,11 +27,8 @@
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
-#include "config.h"
-
-#include <glib.h>
-#include <gmodule.h>
-#include <stdlib.h>
+#include <gmodule.h>
+#include <stdlib.h>
void gplugin_a_func (void);
void gplugin_clash_func (void);
@@ -39,34 +36,33 @@ void g_clash_func (void);
void gplugin_say_boo_func (void);
void gplugin_a_module_func (GModule *module);
-_GLIB_EXTERN gchar* gplugin_a_state;
-gchar* gplugin_a_state;
+G_MODULE_EXPORT gchar* gplugin_a_state;
-_GLIB_EXTERN void
+G_MODULE_EXPORT void
gplugin_a_func (void)
{
gplugin_a_state = "Hello world";
}
-_GLIB_EXTERN void
+G_MODULE_EXPORT void
gplugin_clash_func (void)
{
gplugin_a_state = "plugin clash";
}
-_GLIB_EXTERN void
+G_MODULE_EXPORT void
g_clash_func (void)
{
gplugin_a_state = "global clash";
}
-_GLIB_EXTERN void
+G_MODULE_EXPORT void
gplugin_say_boo_func (void)
{
gplugin_a_state = "BOOH";
}
-_GLIB_EXTERN void
+G_MODULE_EXPORT void
gplugin_a_module_func (GModule *module)
{
void *f = NULL;