summaryrefslogtreecommitdiffstats
path: root/contrib/libev
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-20 16:11:07 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commit390620fc357bfdb9e7f20835e3c61e857e3a5da2 (patch)
treec76cc7c463595da8053501c78d7f1db61e0985a1 /contrib/libev
parenteafdd221037b41ddcba0add79fd8efccecaf0775 (diff)
downloadrspamd-390620fc357bfdb9e7f20835e3c61e857e3a5da2.tar.gz
rspamd-390620fc357bfdb9e7f20835e3c61e857e3a5da2.zip
[Rework] Rework children operations
Diffstat (limited to 'contrib/libev')
-rw-r--r--contrib/libev/CMakeLists.txt6
-rw-r--r--contrib/libev/ev.c16
-rw-r--r--contrib/libev/ev.h17
3 files changed, 17 insertions, 22 deletions
diff --git a/contrib/libev/CMakeLists.txt b/contrib/libev/CMakeLists.txt
index d363c3dbc..f0350050d 100644
--- a/contrib/libev/CMakeLists.txt
+++ b/contrib/libev/CMakeLists.txt
@@ -55,7 +55,7 @@ ENDIF()
CONFIGURE_FILE(config.h.in libev-config.h)
-ADD_LIBRARY(rspamd-ev STATIC ${LIBEVSRC})
+ADD_LIBRARY(rspamd-ev SHARED ${LIBEVSRC})
ADD_DEFINITIONS("-DEV_CONFIG_H=\"${CMAKE_CURRENT_BINARY_DIR}/libev-config.h\""
-DEV_MULTIPLICITY=1
-DEV_USE_FLOOR=1
@@ -68,4 +68,6 @@ ENDIF()
IF(ENABLE_FULL_DEBUG MATCHES "ON")
ADD_DEFINITIONS(-DEV_VERIFY=3)
-ENDIF() \ No newline at end of file
+ENDIF()
+
+INSTALL(TARGETS rspamd-ev LIBRARY DESTINATION ${RSPAMD_LIBDIR}) \ No newline at end of file
diff --git a/contrib/libev/ev.c b/contrib/libev/ev.c
index 4f3f0b3ce..cb8127fc5 100644
--- a/contrib/libev/ev.c
+++ b/contrib/libev/ev.c
@@ -1840,9 +1840,7 @@ typedef struct
#include "ev_wrap.h"
static struct ev_loop default_loop_struct;
- EV_API_DECL struct ev_loop *ev_default_loop_ptr; /* needs to be initialised to make it a definition despite extern */
- struct ev_loop *ev_default_loop_ptr = 0;
-
+ static struct ev_loop *ev_default_loop_ptr = 0;
#else
EV_API_DECL ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a definition despite extern */
@@ -2855,6 +2853,18 @@ ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_NOEXCEPT, void (*acquire)
}
#endif
+EV_INLINE struct ev_loop *
+ev_default_loop_uc_ (void) EV_NOEXCEPT
+{
+ return ev_default_loop_ptr;
+}
+
+EV_INLINE int
+ev_is_default_loop (EV_P) EV_NOEXCEPT
+{
+ return EV_A == EV_DEFAULT_UC;
+}
+
/* initialise a loop structure, must be zero-initialised */
noinline ecb_cold
static void
diff --git a/contrib/libev/ev.h b/contrib/libev/ev.h
index f76c892e4..cb7b2e479 100644
--- a/contrib/libev/ev.h
+++ b/contrib/libev/ev.h
@@ -557,23 +557,6 @@ EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_NOEXCEPT) EV_N
/* you can call this as often as you like */
EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_NOEXCEPT;
-#ifdef EV_API_STATIC
-EV_API_DECL struct ev_loop *ev_default_loop_ptr;
-#endif
-
-EV_INLINE struct ev_loop *
-ev_default_loop_uc_ (void) EV_NOEXCEPT
-{
- extern struct ev_loop *ev_default_loop_ptr;
-
- return ev_default_loop_ptr;
-}
-
-EV_INLINE int
-ev_is_default_loop (EV_P) EV_NOEXCEPT
-{
- return EV_A == EV_DEFAULT_UC;
-}
/* create and destroy alternative loops that don't handle signals */
EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_NOEXCEPT;