symbol visibility support in platform.hh

master
Daniel Kolesa 2015-09-30 18:49:30 +01:00
parent c9c4ca4f77
commit 561b6d01fa
1 changed files with 24 additions and 0 deletions

View File

@ -78,6 +78,30 @@
#include <windows.h>
#endif
#ifdef OSTD_PLATFORM_WIN32
# ifdef OSTD_LIBRARY_DLL
# ifdef OSTD_TOOLCHAIN_GNU
# define OSTD_EXPORT __attribute__((dllexport))
# else
# define OSTD_EXPORT __declspec(dllexport)
# endif
# else
# ifdef OSTD_TOOLCHAIN_GNU
# define OSTD_EXPORT __attribute__((dllimport))
# else
# define OSTD_EXPORT __declspec(dllimport)
# endif
# endif
# define OSTD_LOCAL
#else
# if __GNUC__ >= 4
# define OSTD_EXPORT __attribute__((visibility("default")))
# define OSTD_LOCAL __attribute__((visibility("hidden")))
# else
# define OSTD_EXPORT
# define OSTD_LOCAL
#endif
namespace ostd {
#if defined(OSTD_TOOLCHAIN_GNU)