Skip to content

Commit 12ae60f

Browse files
committed
Only set MSGPACK_DLLEXPORT if not already defined
Allow applications that inlcude msgpack.h to predefine MSGPACK_DLLEXPORT, e.g., to not export any symbols in case of MSVC.
1 parent 0a261fc commit 12ae60f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/msgpack/sysdep.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@
3838
# include <stdbool.h>
3939
#endif
4040

41+
#if !defined(MSGPACK_DLLEXPORT)
4142
#if defined(_MSC_VER)
4243
# define MSGPACK_DLLEXPORT __declspec(dllexport)
4344
#else /* _MSC_VER */
4445
# define MSGPACK_DLLEXPORT
4546
#endif /* _MSC_VER */
47+
#endif
4648

4749
#ifdef _WIN32
4850
# define _msgpack_atomic_counter_header <windows.h>

0 commit comments

Comments
 (0)