gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17294 - in libmicrohttpd: . src/examples src/testcurl


From: gnunet
Subject: [GNUnet-SVN] r17294 - in libmicrohttpd: . src/examples src/testcurl
Date: Fri, 7 Oct 2011 19:51:10 +0200

Author: grothoff
Date: 2011-10-07 19:51:10 +0200 (Fri, 07 Oct 2011)
New Revision: 17294

Modified:
   libmicrohttpd/AUTHORS
   libmicrohttpd/ChangeLog
   libmicrohttpd/configure.ac
   libmicrohttpd/src/examples/Makefile.am
   libmicrohttpd/src/testcurl/daemontest_get.c
Log:
LRN: w32 test case fixes

Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS       2011-10-07 17:49:10 UTC (rev 17293)
+++ libmicrohttpd/AUTHORS       2011-10-07 17:51:10 UTC (rev 17294)
@@ -34,6 +34,7 @@
 Zhimin Huang <address@hidden>
 Jan Seeger <address@hidden>
 Will Bryant <address@hidden>
+LRN
 
 Documentation contributions also came from:
 Marco Maggi <address@hidden>

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2011-10-07 17:49:10 UTC (rev 17293)
+++ libmicrohttpd/ChangeLog     2011-10-07 17:51:10 UTC (rev 17294)
@@ -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
 

Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac  2011-10-07 17:49:10 UTC (rev 17293)
+++ libmicrohttpd/configure.ac  2011-10-07 17:51:10 UTC (rev 17294)
@@ -171,7 +171,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 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 @@
 #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;

Modified: libmicrohttpd/src/examples/Makefile.am
===================================================================
--- libmicrohttpd/src/examples/Makefile.am      2011-10-07 17:49:10 UTC (rev 
17293)
+++ libmicrohttpd/src/examples/Makefile.am      2011-10-07 17:51:10 UTC (rev 
17294)
@@ -41,7 +41,8 @@
 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 

Modified: libmicrohttpd/src/testcurl/daemontest_get.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_get.c 2011-10-07 17:49:10 UTC (rev 
17293)
+++ libmicrohttpd/src/testcurl/daemontest_get.c 2011-10-07 17:51:10 UTC (rev 
17294)
@@ -452,7 +452,7 @@
     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 @@
     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 @@
     /* printf("Stopping daemon\n"); */
     MHD_stop_daemon (d);
  
-    close(fd);
+    CLOSE (fd);
     
     /* printf("good\n"); */
     return 0;




reply via email to

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