diff options
author | Yang Tse <yangsita@gmail.com> | 2011-08-07 08:45:57 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-08-07 08:45:57 +0200 |
commit | 2ccffbb37e9f453b13c8ded409eacf15d46daf48 (patch) | |
tree | 479c892a3896b7b73f7e15c0e53a35d7251c7c68 /lib | |
parent | 1db023d3cb3f075285eb81b71d78e70d24652193 (diff) |
BSD-style lwIP TCP/IP stack support - followup
lwIP library initialization.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connect.h | 9 | ||||
-rw-r--r-- | lib/easy.c | 2 | ||||
-rw-r--r-- | lib/setup.h | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/connect.h b/lib/connect.h index 3df9d970e..299233d4f 100644 --- a/lib/connect.h +++ b/lib/connect.h @@ -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 */ diff --git a/lib/easy.c b/lib/easy.c index 76ff702e3..34877ea73 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -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 diff --git a/lib/setup.h b/lib/setup.h index d89111f95..e34bf77f8 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -252,6 +252,7 @@ #endif #ifdef USE_LWIPSOCK +# include <lwip/init.h> # include <lwip/sockets.h> # include <lwip/netdb.h> #endif |