]> granicus.if.org Git - libevent/commitdiff
Fix event_debug_logging_mask_ exporting on win32
authorAzat Khuzhin <a3at.mail@gmail.com>
Mon, 29 May 2017 19:11:48 +0000 (22:11 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:13:52 +0000 (15:13 +0300)
(cherry picked from commit cd285e425a906276efafab901d1b9da0e388be48)

include/event2/visibility.h
log-internal.h

index 412a061c1c86c9d8b3bce658b333b9240a623084..779eb68d3d3ee9c61b3a29892e495bc261bdcd46 100644 (file)
 
 #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_ */
index fb53df416abe691dfa0738b52086c974f49eb1ae..2c31608b25be59efe96fe2ed95c0f00adc17b93a 100644 (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)