]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Merge dlh-7551.ad.hartbrothers.com:C:/ntp/ntp-dev-libevent-upstream
authorDave Hart <hart@ntp.org>
Thu, 14 Jun 2012 22:43:34 +0000 (22:43 +0000)
committerDave Hart <hart@ntp.org>
Thu, 14 Jun 2012 22:43:34 +0000 (22:43 +0000)
into  dlh-7551.ad.hartbrothers.com:C:/ntp/ntp-dev-libevent-20120614

bk: 4fda6916cO-myLzn-aRlHngdHT7z0w

1  2 
sntp/libevent/Makefile.am
sntp/libevent/configure.in
sntp/libevent/event.c
sntp/libevent/evthread_pthread.c
sntp/libevent/http.c
sntp/libevent/include/event2/event.h
sntp/libevent/sample/http-server.c

index ca0895f6cb111e98aaafe1db6e3de0ae25e854e3,17d0a85d52c7e733193a67a1e4aa0870c35e3c0e..3a74e33273c4fb21f431154ff502a69f359e1a64
@@@ -88,10 -103,9 +103,10 @@@ EXTRA_DIST = 
        autogen.sh \
        event_rpcgen.py \
        libevent.pc.in \
-       Doxyfile \
-       whatsnew-2.0.txt \
-       Makefile.nmake test/Makefile.nmake \
+       make-event-config.sed \
 +      m4/LICENSE-OPENLDAP \
+       whatsnew-2.0.txt \
+       whatsnew-2.1.txt \
        $(PLATFORM_DEPENDENT_SRC)
  
  LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
index e379fb10c4d8ecf915520a31cae8c266bbeb9fe8,f1972bf633b13f0855b732f1dc2c706ba60c9291..5ec48918f48162d1791cb67a07f0ef427e953cc1
@@@ -4,13 -9,12 +9,13 @@@ AC_PREREQ(2.59
  AC_INIT(event.c)
  
  AC_CONFIG_MACRO_DIR([m4])
 +AC_CONFIG_AUX_DIR([build-aux])
  
- AM_INIT_AUTOMAKE(libevent,2.1.0-alpha-dev)
+ AM_INIT_AUTOMAKE(libevent,2.1.1-alpha-dev)
  dnl AM_SILENT_RULES req. automake 1.11.  [no] defaults V=1
 -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  AM_CONFIG_HEADER(config.h  evconfig-private.h:evconfig-private.h.in)
- AC_DEFINE(NUMERIC_VERSION, 0x02010001, [Numeric representation of the version])
+ AC_DEFINE(NUMERIC_VERSION, 0x02010101, [Numeric representation of the version])
  
  dnl Initialize prefix.
  if test "$prefix" = "NONE"; then
index 89e05b3ee6254ef8ca4fe8c508dcbe1cb35461f5,c5c118cc1a8964579355421cc8fc28c8eadb71b3..e914dcf3cd625619760588b2b00eb553f2c2c3ba
@@@ -424,9 -405,25 +405,25 @@@ update_time_cache(struct event_base *ba
  {
        base->tv_cache.tv_sec = 0;
        if (!(base->flags & EVENT_BASE_FLAG_NO_CACHE_TIME))
 -          gettime(base, &base->tv_cache);
 +              gettime(base, &base->tv_cache);
  }
  
+ int
+ event_base_update_cache_time(struct event_base *base)
+ {
+       if (!base) {
+               base = current_base;
+               if (!current_base)
+                       return -1;
+       }
+       EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+       update_time_cache(base);
+       EVBASE_RELEASE_LOCK(base, th_base_lock);
+       return 0;
+ }
  struct event_base *
  event_init(void)
  {
Simple merge
index 95588832d8e131e9fa8af8c3bf5c32c5e40c3773,786105d37bab3c2d578361c9dca1354e9ac754af..969e41f58791d1b58324f7396bbb0d3913b23e12
  
  #include <sys/queue.h>
  
- #ifdef _EVENT_HAVE_NETINET_IN_H
+ #ifdef EVENT__HAVE_NETINET_IN_H
  #include <netinet/in.h>
 +# ifdef _XOPEN_SOURCE_EXTENDED
 +#  include <arpa/inet.h>
 +# endif
  #endif
- #ifdef _EVENT_HAVE_ARPA_INET_H
+ #ifdef EVENT__HAVE_ARPA_INET_H
  #include <arpa/inet.h>
  #endif
- #ifdef _EVENT_HAVE_NETDB_H
+ #ifdef EVENT__HAVE_NETDB_H
  #include <netdb.h>
  #endif
  
index 137bc6a0b3787b2247f19a2ec0d7ee8a0cea07b7,cf358c03f712cff7a2bc030679d799978e1a6363..7db1bfe9e0254d7885d4f3ac37c2735f4769f12f
@@@ -1206,30 -1288,25 +1288,40 @@@ void event_set_mem_functions
  #define EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
  #endif
  
+ /**
+    Writes a human-readable description of all inserted and/or active
+    events to a provided stdio stream.
+    This is intended for debugging; its format is not guaranteed to be the same
+    between libevent versions.
+    @param base An event_base on which to scan the events.
+    @param output A stdio file to write on.
+  */
  void event_base_dump_events(struct event_base *, FILE *);
  
 -/** Sets 'tv' to the current time (as returned by gettimeofday()),
 +/** Sets 'tv' to the internal time (used for timeout scheduling),
      looking at the cached value in 'base' if possible, and calling
      gettimeofday() or clock_gettime() as appropriate if there is no
 -    cached time.
 +    cached time.  If clock_gettime(CLOCK_MONOTONIC) is being used
 +    internally, the tv_sec of internal times represent system uptime
 +    rather than time since UNIX epoch.
 +
 +    Generally, this value will only be cached while actually
 +    processing event callbacks, and may be very inaccurate if your
 +    callbacks take a long time to execute.
 +
 +    Returns 0 on success, negative on failure.
 + */
 +int event_base_tv_cached(struct event_base *base,
 +    struct timeval *tv);
 +
 +/** Sets 'tv' to the current time (as returned by gettimeofday()),
 +    looking at the cached value in 'base' if possible, and calling
 +    gettimeofday() if there is no cached time.
  
      Generally, this value will only be cached while actually
 -    processing event callbacks, and may be very inaccuate if your
 +    processing event callbacks, and may be very inaccurate if your
      callbacks take a long time to execute.
  
      Returns 0 on success, negative on failure.
Simple merge