Fix event_debug_logging_mask_ exporting on win32

This commit is contained in:
Azat Khuzhin 2017-05-29 22:11:48 +03:00
parent 1771ec0f4a
commit cd285e425a
2 changed files with 13 additions and 1 deletions

View File

@ -51,4 +51,16 @@
#endif /* event_*_EXPORTS */
/** We need to dllimport event_debug_logging_mask_ into event_extra */
#if defined(_MSC_VER)
# if defined(event_core_shared_EXPORTS) /** from core export */
# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllexport)
# elif defined(event_extra_shared_EXPORTS) /** from extra import */
# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllimport)
# endif
#endif /* _MSC_VER */
#if !defined(EVENT2_CORE_EXPORT_SYMBOL)
# define EVENT2_CORE_EXPORT_SYMBOL EVENT2_EXPORT_SYMBOL
#endif
#endif /* EVENT2_VISIBILITY_H_INCLUDED_ */

View File

@ -48,7 +48,7 @@ extern "C" {
#endif
#ifdef EVENT_DEBUG_LOGGING_ENABLED
EVENT2_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_;
EVENT2_CORE_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_;
#define event_debug_get_logging_mask_() (event_debug_logging_mask_)
#else
#define event_debug_get_logging_mask_() (0)