From ca9c1fa2a878c5ca5684b77ce7f21e57c4748972 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Fri, 4 Sep 2009 13:29:11 +0000 Subject: [PATCH] libevent-2.0 compatibility. git-svn-id: file:///svn/unbound/trunk@1817 be551aaa-1e26-0410-a405-d3ace91eadb9 --- Makefile.in | 2 ++ configure | 6 +++--- configure.ac | 6 +++--- doc/Changelog | 7 +++++++ util/netevent.c | 4 ++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index 86d373f1e..42cc851d2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -349,10 +349,12 @@ tags: $(srcdir)/*.[ch] $(srcdir)/*/*.[ch] doc: if test -n "$(doxygen)"; then \ $(doxygen) $(srcdir)/doc/unbound.doxygen; fi +ifeq "$(findstring yes,$(WITH_PYUNBOUND)$(WITH_PYTHONMODULE))" "yes" if test -x "`which sphinx-build 2>&1`"; then \ sphinx-build -b html pythonmod/doc doc/html/pythonmod; \ sphinx-build -b html libunbound/python/doc doc/html/pyunbound;\ fi +endif strip: $(STRIP) unbound$(EXEEXT) diff --git a/configure b/configure index b9c721c00..7379f54a2 100755 --- a/configure +++ b/configure @@ -18224,9 +18224,9 @@ $as_echo "found in $thedir" >&6; } mkdir build >/dev/null 2>&1 mkdir build/libevent >/dev/null 2>&1 mkdir build/libevent/.libs >/dev/null 2>&1 - ev_files_o=`ls $thedir/*.o | grep -v evdns\.o` - ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo` - ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o` + ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o` + ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo` + ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o` cp $ev_files_o build/libevent cp $ev_files_lo build/libevent cp $ev_files_libso build/libevent/.libs diff --git a/configure.ac b/configure.ac index 8f65c792f..f751ab439 100644 --- a/configure.ac +++ b/configure.ac @@ -440,9 +440,9 @@ if test x_$withval = x_yes -o x_$withval != x_no; then mkdir build >/dev/null 2>&1 mkdir build/libevent >/dev/null 2>&1 mkdir build/libevent/.libs >/dev/null 2>&1 - ev_files_o=`ls $thedir/*.o | grep -v evdns\.o` - ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo` - ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o` + ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o` + ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo` + ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o` cp $ev_files_o build/libevent cp $ev_files_lo build/libevent cp $ev_files_libso build/libevent/.libs diff --git a/doc/Changelog b/doc/Changelog index dd7049fe9..be0e01b23 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,10 @@ +4 September 2009: Wouter + - Changes to make unbound work with libevent-2.0.3 alpha. (in + configure detection due to new ssl dependency in libevent) + - do not call sphinx for documentation when python is disabled. + - remove EV_PERSIST from libevent timeout code to make the code + compatible with the libevent-2.0. Works with older libevent too. + 3 September 2009: Wouter - Got a patch from Luca Bruno for libunbound support on windows to pick up the system resolvconf nameservers and hosts there. diff --git a/util/netevent.c b/util/netevent.c index 93b1a04be..2891dfe95 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -1582,7 +1582,7 @@ comm_timer_create(struct comm_base* base, void (*cb)(void*), void* cb_arg) tm->ev_timer->base = base; tm->callback = cb; tm->cb_arg = cb_arg; - event_set(&tm->ev_timer->ev, -1, EV_PERSIST|EV_TIMEOUT, + event_set(&tm->ev_timer->ev, -1, EV_TIMEOUT, comm_timer_callback, tm); if(event_base_set(base->eb->base, &tm->ev_timer->ev) != 0) { log_err("timer_create: event_base_set failed."); @@ -1608,7 +1608,7 @@ comm_timer_set(struct comm_timer* timer, struct timeval* tv) log_assert(tv); if(timer->ev_timer->enabled) comm_timer_disable(timer); - event_set(&timer->ev_timer->ev, -1, EV_PERSIST|EV_TIMEOUT, + event_set(&timer->ev_timer->ev, -1, EV_TIMEOUT, comm_timer_callback, timer); if(event_base_set(timer->ev_timer->base->eb->base, &timer->ev_timer->ev) != 0) -- 2.47.3