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.
This commit is contained in:
tbeu
2015-10-18 22:55:32 +02:00
parent 0a261fca42
commit 12ae60fd77

View File

@@ -38,11 +38,13 @@
# include <stdbool.h>
#endif
#if !defined(MSGPACK_DLLEXPORT)
#if defined(_MSC_VER)
# define MSGPACK_DLLEXPORT __declspec(dllexport)
#else /* _MSC_VER */
# define MSGPACK_DLLEXPORT
#endif /* _MSC_VER */
#endif
#ifdef _WIN32
# define _msgpack_atomic_counter_header <windows.h>