glib/gio/tests/modules/symbol-visibility.h
Nirbheek Chauhan 122f4c051d meson: Add tls-interaction test, and fix giomodule test
giomodule test needed symbol visibility pragmas added. This is needed on
Windows anyway, so it's better to do it this way rather than disabling
-fvisibility=hidden for the test modules.
2017-07-13 19:03:39 -04:00

17 lines
556 B
C

#ifndef GLIB_TEST_SYMBOL_VISIBILITY
#define GLIB_TEST_SYMBOL_VISIBILITY
/* This is the same check that's done in configure to create config.h */
#ifdef _WIN32
# ifdef _MSC_VER
# define GLIB_TEST_EXPORT_SYMBOL __declspec(dllexport) extern
# else
# define GLIB_TEST_EXPORT_SYMBOL __attribute__((visibility("default"))) __declspec(dllexport) extern
# endif
/* Matches GCC and Clang */
#elif defined(__GNUC__) && (__GNUC__ >= 4)
# define GLIB_TEST_EXPORT_SYMBOL __attribute__((visibility("default"))) extern
#endif
#endif /* GLIB_TEST_SYMBOL_VISIBILITY */