[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35721 - in libmicrohttpd: src/include src/microhttpd w32/V
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35721 - in libmicrohttpd: src/include src/microhttpd w32/VS2013 |
Date: |
Thu, 7 May 2015 19:04:22 +0200 |
Author: Karlson2k
Date: 2015-05-07 19:04:22 +0200 (Thu, 07 May 2015)
New Revision: 35721
Modified:
libmicrohttpd/src/include/platform_interface.h
libmicrohttpd/src/microhttpd/daemon.c
libmicrohttpd/w32/VS2013/MHD_config.h
Log:
Define and use system-independent wrapper macro for poll()
Modified: libmicrohttpd/src/include/platform_interface.h
===================================================================
--- libmicrohttpd/src/include/platform_interface.h 2015-05-07 17:04:10 UTC
(rev 35720)
+++ libmicrohttpd/src/include/platform_interface.h 2015-05-07 17:04:22 UTC
(rev 35721)
@@ -124,6 +124,15 @@
#define MHD_SYS_select_(n,r,w,e,t) select((int)0,(r),(w),(e),(t))
#endif
+#if defined(HAVE_POLL)
+/* MHD_sys_poll_ is wrapper macro for system poll() function */
+#if !defined(MHD_WINSOCK_SOCKETS)
+#define MHD_sys_poll_ poll
+#else /* MHD_WINSOCK_SOCKETS */
+#define MHD_sys_poll_ WSAPoll
+#endif /* MHD_WINSOCK_SOCKETS */
+#endif /* HAVE_POLL */
+
/* MHD_pipe_ create pipe (!MHD_DONT_USE_PIPES) /
* create two connected sockets (MHD_DONT_USE_PIPES) */
#ifndef MHD_DONT_USE_PIPES
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2015-05-07 17:04:10 UTC (rev
35720)
+++ libmicrohttpd/src/microhttpd/daemon.c 2015-05-07 17:04:22 UTC (rev
35721)
@@ -951,7 +951,7 @@
extra_slot = 1;
}
#endif
- if (poll (p,
+ if (MHD_sys_poll_ (p,
#if WINDOWS
1 + extra_slot,
#else
@@ -2445,7 +2445,7 @@
free(p);
return MHD_YES;
}
- if (poll (p, poll_server + num_connections, timeout) < 0)
+ if (MHD_sys_poll_(p, poll_server + num_connections, timeout) < 0)
{
if (EINTR == MHD_socket_errno_)
{
@@ -2565,7 +2565,7 @@
timeout = -1;
if (0 == poll_count)
return MHD_YES;
- if (poll (p, poll_count, timeout) < 0)
+ if (MHD_sys_poll_(p, poll_count, timeout) < 0)
{
if (EINTR == MHD_socket_errno_)
return MHD_YES;
Modified: libmicrohttpd/w32/VS2013/MHD_config.h
===================================================================
--- libmicrohttpd/w32/VS2013/MHD_config.h 2015-05-07 17:04:10 UTC (rev
35720)
+++ libmicrohttpd/w32/VS2013/MHD_config.h 2015-05-07 17:04:22 UTC (rev
35721)
@@ -9,7 +9,6 @@
/* Define if MS VC compiler is used */
#define MSVC 1
-
/* *** MHD configuration *** */
/* Undef to disable feature */
@@ -40,6 +39,16 @@
/* define to use W32 threads */
#define MHD_USE_W32_THREADS 1
+#ifndef _WIN32_WINNT
+/* MHD supports Windows XP and later W32 systems*/
+#define _WIN32_WINNT 0x0501
+#endif /* _WIN32_WINNT */
+
+/* winsock poll is available only on Vista and later */
+#if _WIN32_WINNT >= 0x0600
+#define HAVE_POLL 1
+#endif /* _WIN32_WINNT >= 0x0600 */
+
/* define to 0 to disable epoll support */
#define EPOLL_SUPPORT 0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35721 - in libmicrohttpd: src/include src/microhttpd w32/VS2013,
gnunet <=