summaryrefslogtreecommitdiff
path: root/boost/python/detail/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/python/detail/config.hpp')
-rw-r--r--boost/python/detail/config.hpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/boost/python/detail/config.hpp b/boost/python/detail/config.hpp
index 11c16308fb..c92ecb32b0 100644
--- a/boost/python/detail/config.hpp
+++ b/boost/python/detail/config.hpp
@@ -64,31 +64,18 @@
#endif
#if defined(BOOST_PYTHON_DYNAMIC_LIB)
-
-# if !defined(_WIN32) && !defined(__CYGWIN__) \
- && !defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) \
- && BOOST_WORKAROUND(__GNUC__, >= 3) && (__GNUC_MINOR__ >=5 || __GNUC__ > 3)
-# define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
-# endif
-
-# if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
+# if defined(BOOST_SYMBOL_EXPORT)
# if defined(BOOST_PYTHON_SOURCE)
-# define BOOST_PYTHON_DECL __attribute__ ((__visibility__("default")))
+# define BOOST_PYTHON_DECL BOOST_SYMBOL_EXPORT
+# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_EXPORT
+# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_EXPORT
# define BOOST_PYTHON_BUILD_DLL
# else
-# define BOOST_PYTHON_DECL
-# endif
-# define BOOST_PYTHON_DECL_FORWARD
-# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
-# elif (defined(_WIN32) || defined(__CYGWIN__))
-# if defined(BOOST_PYTHON_SOURCE)
-# define BOOST_PYTHON_DECL __declspec(dllexport)
-# define BOOST_PYTHON_BUILD_DLL
-# else
-# define BOOST_PYTHON_DECL __declspec(dllimport)
+# define BOOST_PYTHON_DECL BOOST_SYMBOL_IMPORT
+# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_IMPORT
+# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_IMPORT
# endif
# endif
-
#endif
#ifndef BOOST_PYTHON_DECL
@@ -96,11 +83,11 @@
#endif
#ifndef BOOST_PYTHON_DECL_FORWARD
-# define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL
+# define BOOST_PYTHON_DECL_FORWARD
#endif
#ifndef BOOST_PYTHON_DECL_EXCEPTION
-# define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL
+# define BOOST_PYTHON_DECL_EXCEPTION
#endif
#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))