[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9787 - in libmicrohttpd: . src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9787 - in libmicrohttpd: . src/daemon |
Date: |
Thu, 17 Dec 2009 20:29:17 +0100 |
Author: durner
Date: 2009-12-17 20:29:17 +0100 (Thu, 17 Dec 2009)
New Revision: 9787
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/configure.ac
libmicrohttpd/src/daemon/daemon.c
Log:
Don't depend on poll.h
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2009-12-17 16:53:36 UTC (rev 9786)
+++ libmicrohttpd/ChangeLog 2009-12-17 19:29:17 UTC (rev 9787)
@@ -1,3 +1,6 @@
+Thu Dec 17 20:26:52 CET 2009
+ poll.h is not stricly required anymore. -ND
+
Fri Dec 4 13:17:50 CET 2009
Adding MHD_OPTION_ARRAY. -CG
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2009-12-17 16:53:36 UTC (rev 9786)
+++ libmicrohttpd/configure.ac 2009-12-17 19:29:17 UTC (rev 9787)
@@ -145,7 +145,7 @@
AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h
sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard
UNIX headers files]))
# Check for optional headers
-AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h
netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h])
+AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h
netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h poll.h])
AC_CHECK_FUNCS(memmem)
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2009-12-17 16:53:36 UTC (rev 9786)
+++ libmicrohttpd/src/daemon/daemon.c 2009-12-17 19:29:17 UTC (rev 9787)
@@ -36,7 +36,9 @@
#include "gnutls_global.h"
#endif
+#ifdef HAVE_POLL_H
#include <poll.h>
+#endif
/**
* Default connection limit.
@@ -490,7 +492,9 @@
unsigned int timeout;
time_t now;
struct MHD_Pollfd mp;
+#ifdef HAVE_POLL_H
struct pollfd p;
+#endif
timeout = con->daemon->connection_timeout;
while ((!con->daemon->shutdown) && (con->socket_fd != -1)) {
@@ -513,7 +517,11 @@
{
tv.tv_sec = 0;
}
+#ifdef HAVE_POLL_H
if (0 == (con->daemon->options & MHD_USE_POLL)) {
+#else
+ {
+#endif
/* use select */
FD_ZERO (&rs);
FD_ZERO (&ws);
@@ -537,7 +545,10 @@
con->write_handler (con);
if (con->socket_fd != -1)
con->idle_handler (con);
- } else {
+ }
+#ifdef HAVE_POLL_H
+ else
+ {
/* use poll */
memset(&mp, 0, sizeof (struct MHD_Pollfd));
MHD_connection_get_pollfd(con, &mp);
@@ -570,6 +581,7 @@
(0 != (p.revents & (POLLERR | POLLHUP))) )
MHD_connection_close (con, MHD_REQUEST_TERMINATED_WITH_ERROR);
}
+#endif
}
if (con->socket_fd != -1)
{
@@ -1044,6 +1056,7 @@
static int
MHD_poll (struct MHD_Daemon *daemon)
{
+#ifdef HAVE_POLL_H
struct pollfd p;
if (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
@@ -1068,6 +1081,9 @@
if (0 != (p.revents & POLLIN))
MHD_accept_connection (daemon);
return MHD_YES;
+#else
+ return MHD_NO;
+#endif
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9787 - in libmicrohttpd: . src/daemon,
gnunet <=