commit 2160c665890c35077ed7322a330337434f22d2ed
parent 7a4bb2a0f72f61c35395018b21106ef89b529b9b
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 7 Oct 2011 17:51:10 +0000
LRN: w32 test case fixes
Diffstat:
5 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -34,6 +34,7 @@ Thomas Stalder <gnunet@netsolux.ch>
Zhimin Huang <zhimin.huang@bqvision.com>
Jan Seeger <jan.seeger@thenybble.de>
Will Bryant <will.bryant@gmail.com>
+LRN
Documentation contributions also came from:
Marco Maggi <marco.maggi-ipsu@poste.it>
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,6 @@
+Fri Oct 7 19:50:07 CEST 2011
+ Fixed problems with testcases on W32. -LRN
+
Fri Sep 30 17:56:36 CEST 2011
Fixed MHD_CONNECTION_OPTION_TIMEOUT for HTTPS (#1811). -CG
diff --git a/configure.ac b/configure.ac
@@ -171,7 +171,7 @@ AC_SUBST(PTHREAD_CPPFLAGS)
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 poll.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 winsock2.h ws2tcpip.h])
# Check for plibc.h from system, if not found, use our own
AC_CHECK_HEADERS([plibc.h],our_private_plibc_h=0,our_private_plibc_h=1)
@@ -189,6 +189,12 @@ AC_TRY_COMPILE([
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#if HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#if HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
],[
int af=AF_INET6;
int pf=PF_INET6;
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
@@ -41,7 +41,8 @@ minimal_example_LDADD = \
post_example_SOURCES = \
post_example.c
post_example_LDADD = \
- $(top_builddir)/src/daemon/libmicrohttpd.la
+ $(top_builddir)/src/daemon/libmicrohttpd.la \
+ -liberty
minimal_example_comet_SOURCES = \
minimal_example_comet.c
diff --git a/src/testcurl/daemontest_get.c b/src/testcurl/daemontest_get.c
@@ -452,7 +452,7 @@ testStopRace (int poll_flag)
if (d == NULL)
return 16;
- fd = socket(PF_INET, SOCK_STREAM, 0);
+ fd = SOCKET (PF_INET, SOCK_STREAM, 0);
if (fd < 0)
{
fprintf(stderr, "socket: %m\n");
@@ -464,7 +464,7 @@ testStopRace (int poll_flag)
sin.sin_port = htons(1081);
sin.sin_addr.s_addr = htonl(0x7f000001);
- if (connect(fd, (struct sockaddr *)(&sin), sizeof(sin)) < 0)
+ if (CONNECT (fd, (struct sockaddr *)(&sin), sizeof(sin)) < 0)
{
fprintf(stderr, "connect: %m\n");
return 512;
@@ -477,7 +477,7 @@ testStopRace (int poll_flag)
/* printf("Stopping daemon\n"); */
MHD_stop_daemon (d);
- close(fd);
+ CLOSE (fd);
/* printf("good\n"); */
return 0;