gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35720 - in libmicrohttpd: . src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r35720 - in libmicrohttpd: . src/microhttpd
Date: Thu, 7 May 2015 19:04:10 +0200

Author: Karlson2k
Date: 2015-05-07 19:04:10 +0200 (Thu, 07 May 2015)
New Revision: 35720

Modified:
   libmicrohttpd/configure.ac
   libmicrohttpd/src/microhttpd/daemon.c
Log:
Check for poll() function, use HAVE_POLL macro

Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac  2015-05-07 17:04:02 UTC (rev 35719)
+++ libmicrohttpd/configure.ac  2015-05-07 17:04:10 UTC (rev 35720)
@@ -347,6 +347,8 @@
     #endif
    ])
 
+AC_CHECK_FUNCS([poll])
+
 # Check for pipe/socketpair signaling
 AC_MSG_CHECKING([[whether to enable signaling by socketpair]])
 

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2015-05-07 17:04:02 UTC (rev 
35719)
+++ libmicrohttpd/src/microhttpd/daemon.c       2015-05-07 17:04:10 UTC (rev 
35720)
@@ -50,7 +50,7 @@
 #include <gcrypt.h>
 #endif
 
-#ifdef HAVE_POLL_H
+#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
 #include <poll.h>
 #endif
 
@@ -795,14 +795,14 @@
 #if WINDOWS
   MHD_pipe spipe = con->daemon->wpipe[0];
   char tmp;
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
   int extra_slot;
-#endif /* HAVE_POLL_H */
+#endif /* HAVE_POLL */
 #define EXTRA_SLOTS 1
 #else  /* !WINDOWS */
 #define EXTRA_SLOTS 0
 #endif /* !WINDOWS */
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
   struct pollfd p[1 + EXTRA_SLOTS];
 #endif
 
@@ -914,7 +914,7 @@
          if (MHD_NO == con->idle_handler (con))
            goto exit;
        }
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
       else
        {
          /* use poll */
@@ -2341,7 +2341,7 @@
 }
 
 
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
 /**
  * Process all of our connections and possibly the server
  * socket using poll().
@@ -2598,7 +2598,7 @@
 MHD_poll (struct MHD_Daemon *daemon,
          int may_block)
 {
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
   if (MHD_YES == daemon->shutdown)
     return MHD_NO;
   if (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
@@ -3579,7 +3579,7 @@
   if (0 != (flags & MHD_USE_IPv6))
     return NULL;
 #endif
-#ifndef HAVE_POLL_H
+#ifndef HAVE_POLL
   if (0 != (flags & MHD_USE_POLL))
     return NULL;
 #endif
@@ -4697,7 +4697,7 @@
       return MHD_NO;
 #endif
     case MHD_FEATURE_POLL:
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
       return MHD_YES;
 #else
       return MHD_NO;




reply via email to

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