symbol visibility support in platform.hh
This commit is contained in:
parent
c9c4ca4f77
commit
561b6d01fa
|
@ -78,6 +78,30 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#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 {
|
namespace ostd {
|
||||||
|
|
||||||
#if defined(OSTD_TOOLCHAIN_GNU)
|
#if defined(OSTD_TOOLCHAIN_GNU)
|
||||||
|
|
Loading…
Reference in a new issue