|
65 | 65 | # define BOOST_PYTHON_DYNAMIC_LIB |
66 | 66 | #endif |
67 | 67 |
|
68 | | -#if defined(__MWERKS__) \ |
69 | | - || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590002) \ |
70 | | - || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730) |
71 | | -# define BOOST_PYTHON_NO_TEMPLATE_EXPORT |
72 | | -#endif |
73 | | - |
74 | 68 | #if defined(BOOST_PYTHON_DYNAMIC_LIB) |
75 | | -# if (defined(_WIN32) || defined(__CYGWIN__)) |
| 69 | + |
| 70 | +# if !defined(_WIN32) && !defined(__CYGWIN__) \ |
| 71 | + && defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >=5 \ |
| 72 | + && !defined(BOOST_PYTHON_GCC_SYMBOL_VISIBILITY) |
| 73 | +# define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY |
| 74 | +# endif |
| 75 | + |
| 76 | +# if defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) |
76 | 77 | # if defined(BOOST_PYTHON_SOURCE) |
77 | | -# define BOOST_PYTHON_DECL __declspec(dllexport) |
| 78 | +# define BOOST_PYTHON_DECL __attribute__ ((visibility("default"))) |
78 | 79 | # define BOOST_PYTHON_BUILD_DLL |
79 | 80 | # else |
80 | | -# define BOOST_PYTHON_DECL __declspec(dllimport) |
| 81 | +# define BOOST_PYTHON_DECL |
81 | 82 | # endif |
82 | | -# elif (defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >=5) |
| 83 | +# define BOOST_PYTHON_DECL_FORWARD |
| 84 | +# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((visibility("default"))) |
| 85 | +# elif (defined(_WIN32) || defined(__CYGWIN__)) |
83 | 86 | # if defined(BOOST_PYTHON_SOURCE) |
84 | | -# define BOOST_PYTHON_DECL __attribute__ ((visibility("default"))) |
| 87 | +# define BOOST_PYTHON_DECL __declspec(dllexport) |
85 | 88 | # define BOOST_PYTHON_BUILD_DLL |
86 | | -# define BOOST_PYTHON_NODECL_DECLARATIONS |
87 | 89 | # else |
88 | | -# define BOOST_PYTHON_DECL |
| 90 | +# define BOOST_PYTHON_DECL __declspec(dllimport) |
89 | 91 | # endif |
90 | 92 | # endif |
91 | 93 |
|
92 | | -// MinGW, at least, has some problems exporting template instantiations |
93 | | -# if defined(__GNUC__) && __GNUC__ < 3 && !defined(__CYGWIN__) |
94 | | -# define BOOST_PYTHON_NO_TEMPLATE_EXPORT |
95 | | -# endif |
96 | | - |
97 | 94 | #endif |
98 | 95 |
|
99 | 96 | #ifndef BOOST_PYTHON_DECL |
100 | 97 | # define BOOST_PYTHON_DECL |
101 | 98 | #endif |
102 | 99 |
|
103 | | -#ifndef BOOST_PYTHON_EXPORT |
104 | | -# define BOOST_PYTHON_EXPORT extern |
105 | | -#endif |
| 100 | +#ifndef BOOST_PYTHON_DECL_FORWARD |
| 101 | +# define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL |
| 102 | +#endif |
106 | 103 |
|
107 | | -#if !defined(BOOST_PYTHON_NO_TEMPLATE_EXPORT) |
108 | | -# define BOOST_PYTHON_EXPORT_CLASS_TEMPLATE(instantiation) BOOST_PYTHON_EXPORT template class BOOST_PYTHON_DECL instantiation |
109 | | -#else |
110 | | -# define BOOST_PYTHON_EXPORT_CLASS_TEMPLATE(instantiation) struct ThIsTyPeNeVeRuSeD |
| 104 | +#ifndef BOOST_PYTHON_DECL_EXCEPTION |
| 105 | +# define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL |
111 | 106 | #endif |
112 | 107 |
|
113 | 108 | #if (defined(__DECCXX_VER) && __DECCXX_VER <= 60590041) |
|
0 commit comments