Skip to content

Commit 6c3f3ec

Browse files
pdimovstefanseefeld
authored andcommitted
Normalize static/dynamic link macros and avoid redefinition warnings
1 parent 47d5bc7 commit 6c3f3ec

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

include/boost/python/detail/config.hpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,15 @@
5757
****************************************************************************/
5858

5959
// backwards compatibility:
60-
#ifdef BOOST_PYTHON_STATIC_LIB
61-
# define BOOST_PYTHON_STATIC_LINK
62-
# elif !defined(BOOST_PYTHON_DYNAMIC_LIB)
60+
#if defined(BOOST_PYTHON_STATIC_LINK) && !defined(BOOST_PYTHON_STATIC_LIB)
61+
# define BOOST_PYTHON_STATIC_LIB
62+
#endif
63+
64+
#if defined(BOOST_PYTHON_DYNAMIC_LINK) && !defined(BOOST_PYTHON_DYNAMIC_LIB)
65+
# define BOOST_PYTHON_DYNAMIC_LIB
66+
#endif
67+
68+
#if !defined(BOOST_PYTHON_STATIC_LIB) && !defined(BOOST_PYTHON_DYNAMIC_LIB)
6369
# define BOOST_PYTHON_DYNAMIC_LIB
6470
#endif
6571

0 commit comments

Comments
 (0)