[libxml2] 598785 Fix nanohttp on Windows
- From: Daniel Veillard <veillard src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libxml2] 598785 Fix nanohttp on Windows
- Date: Mon, 19 Oct 2009 12:05:41 +0000 (UTC)
commit d29a5c8a5c42753653762763955510577c2c955d
Author: spadix <spadix users sourceforge net>
Date: Mon Oct 19 14:03:25 2009 +0200
598785 Fix nanohttp on Windows
* nanohttp.c: the check for socket comparing to FD_SETSIZE introduced in
bug fix for 559501 breaks on WinSockAPI
nanohttp.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/nanohttp.c b/nanohttp.c
index 80e79ed..542c4ea 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -478,8 +478,10 @@ xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char *xmt_ptr, int outlen)
* to retrying.
*/
#ifndef HAVE_POLL_H
+#ifndef _WINSOCKAPI_
if (ctxt->fd > FD_SETSIZE)
return -1;
+#endif
tv.tv_sec = timeout;
tv.tv_usec = 0;
@@ -600,8 +602,10 @@ xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt)
)
return (0);
#else /* !HAVE_POLL_H */
+#ifndef _WINSOCKAPI_
if (ctxt->fd > FD_SETSIZE)
return 0;
+#endif
tv.tv_sec = timeout;
tv.tv_usec = 0;
@@ -938,8 +942,10 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
#pragma warning(push)
#pragma warning(disable: 4018)
#endif
+#ifndef _WINSOCKAPI_
if (s > FD_SETSIZE)
return -1;
+#endif
FD_ZERO(&wfd);
FD_SET(s, &wfd);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]