]> granicus.if.org Git - libevent/commitdiff
Introduce EVENT_VISIBILITY_WANT_DLLIMPORT
authorAzat Khuzhin <a3at.mail@gmail.com>
Sun, 28 Oct 2018 16:30:34 +0000 (19:30 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sun, 28 Oct 2018 16:45:57 +0000 (19:45 +0300)
And use it in places where event_debug() should be called (since it
requires access to "event_debug_logging_mask_" and in win32 it is
tricky).

One of this places that is covered by this patch is the test for
event_debug().

include/event2/visibility.h
test/regress_util.c

index 779eb68d3d3ee9c61b3a29892e495bc261bdcd46..006bbf06d80f6d4c807c06ce531df33384b78bf1 100644 (file)
@@ -55,7 +55,8 @@
 #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 */
+# elif defined(event_extra_shared_EXPORTS) || /** from extra import */ \
+       defined(EVENT_VISIBILITY_WANT_DLLIMPORT)
 #  define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllimport)
 # endif
 #endif /* _MSC_VER */
index 320047fa8c18f19ea5f7c7d34008921cb02ea7f5..721537cc721b06574007929fc34d443ecc9f1fad 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
+/** For event_debug() usage/coverage */
+#define EVENT_VISIBILITY_WANT_DLLIMPORT
+
 #include "../util-internal.h"
 
 #ifdef _WIN32