BSD-style lwIP TCP/IP stack support - followup
authorYang Tse <yangsita@gmail.com>
Sun, 7 Aug 2011 06:45:57 +0000 (08:45 +0200)
committerYang Tse <yangsita@gmail.com>
Sun, 7 Aug 2011 06:45:57 +0000 (08:45 +0200)
lwIP library initialization.

lib/connect.h
lib/easy.c
lib/setup.h

index 3df9d970e801abb760c1ecdb5afcc06faa2253c6..299233d4fd65fc0f8cb1944274ce8fde5b4e0b11 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CONNECT_H
-#define __CONNECT_H
+#ifndef HEADER_CURL_CONNECT_H
+#define HEADER_CURL_CONNECT_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -52,7 +52,7 @@ long Curl_timeleft(struct SessionHandle *data,
 curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
                                   struct connectdata **connp);
 
-#ifdef WIN32
+#ifdef USE_WINSOCK
 /* When you run a program that uses the Windows Sockets API, you may
    experience slow performance when you copy data to a TCP server.
 
@@ -70,4 +70,5 @@ void Curl_sndbufset(curl_socket_t sockfd);
 void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd);
 void Curl_persistconninfo(struct connectdata *conn);
 int Curl_closesocket(struct connectdata *conn, curl_socket_t sock);
-#endif
+
+#endif /* HEADER_CURL_CONNECT_H */
index 76ff702e3e81127143a50af861c20b377d0c3fac..34877ea73834c0a3b493b058312429d30e8f1231 100644 (file)
@@ -125,6 +125,8 @@ static CURLcode win32_init(void)
     return CURLE_FAILED_INIT;
   }
   /* The Windows Sockets DLL is acceptable. Proceed. */
+#elif defined(USE_LWIPSOCK)
+  lwip_init();
 #endif
 
 #ifdef USE_WINDOWS_SSPI
index d89111f959ab9cf9707c2e0c8c4cc2e6adaa080c..e34bf77f8002f039f9304438cd08d4d696317227 100644 (file)
 #endif
 
 #ifdef USE_LWIPSOCK
+#  include <lwip/init.h>
 #  include <lwip/sockets.h>
 #  include <lwip/netdb.h>
 #endif