gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] branch master updated (6f6a4e22 -> d54da541


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (6f6a4e22 -> d54da541)
Date: Sun, 26 Mar 2017 21:22:55 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from 6f6a4e22 MHD_start_daemon(): obey MHD_USE_ITC in thread pool mode
     new 25d381f4 Fixed MHD_quiesce_daemon() after 
7b0d92902c92782844e84e40ab54d58a65531a65
     new d54da541 configure: improved detection and usage of 'librt'

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac            | 19 ++++++++++++++-----
 src/microhttpd/daemon.c |  4 +++-
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7a44c0d5..936550ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -918,9 +918,20 @@ AC_CHECK_DECLS([SOCK_NONBLOCK], 
[AC_DEFINE([HAVE_SOCK_NONBLOCK], [1], [SOCK_NONB
                    ])
 
 
-AC_SEARCH_LIBS([clock_gettime], [rt], [
-                               AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Have 
clock_gettime])
-])
+AC_CHECK_DECL([[clock_gettime]],
+  [
+   SAVE_LIBS="$LIBS"
+   AC_SEARCH_LIBS([clock_gettime], [rt],
+     [
+      AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])
+      AS_VAR_IF([[ac_cv_search_clock_gettime]],[["none required"]], [],
+        [
+         MHD_LIBDEPS="$ac_cv_search_clock_gettime $MHD_LIBDEPS"
+         MHD_LIBDEPS_PKGCFG="$ac_cv_search_clock_gettime $MHD_LIBDEPS_PKGCFG"
+        ])
+     ], [], [$MHD_LIBDEPS])
+   LIBS="$SAVE_LIBS"
+  ], [], [[#include <time.h>]])
 
 AC_MSG_CHECKING([[for clock_get_time]])
 AC_LINK_IFELSE(
@@ -939,8 +950,6 @@ AC_LINK_IFELSE(
   ],
   [
     AC_DEFINE([HAVE_CLOCK_GET_TIME], [1], [Define to 1 if you have 
`clock_get_time', `host_get_clock_service' and `mach_port_deallocate' 
functions.])
-# For glibc < 2.17, we need -lrt:    
-    MHD_LIBDEPS="-lrt $MHD_LIBDEPS"
     AC_MSG_RESULT([[yes]])
   ],
   [AC_MSG_RESULT([[no]])
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index bda9292f..b01539bb 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -4643,7 +4643,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon)
   ret = daemon->listen_fd;
   if (MHD_INVALID_SOCKET == ret)
     return MHD_INVALID_SOCKET;
-  if ( (MHD_ITC_IS_INVALID_(daemon->itc)) &&
+  if ( (0 == (daemon->options & (MHD_USE_ITC))) &&
        (0 != (daemon->options & (MHD_USE_INTERNAL_POLLING_THREAD))) )
     {
 #ifdef HAVE_MESSAGES
@@ -5978,6 +5978,8 @@ MHD_start_daemon_va (unsigned int flags,
                   goto thread_failed;
                 }
             }
+          else
+            MHD_itc_set_invalid_ (d->itc);
 
           /* Divide available connections evenly amongst the threads.
            * Thread indexes in [0, leftover_conns) each get one of the

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]