diff options
-rw-r--r-- | include/curl/curl.h | 6 | ||||
-rw-r--r-- | lib/config-win32.h | 25 | ||||
-rw-r--r-- | lib/setup.h | 5 | ||||
-rw-r--r-- | src/config-win32.h | 25 | ||||
-rw-r--r-- | src/setup.h | 5 |
5 files changed, 65 insertions, 1 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index ab64fe25a..b4330a8be 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -56,7 +56,7 @@ #include <time.h> #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__)) /* The check above prevents the winsock2 inclusion if winsock.h already was included, since they can't co-exist without problems */ #include <winsock2.h> @@ -78,6 +78,10 @@ #include <sys/socket.h> #endif +#if defined(__LWIP_OPT_H__) +#include <lwip/sockets.h> +#endif + #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) #include <sys/time.h> #endif diff --git a/lib/config-win32.h b/lib/config-win32.h index c4fe1b391..e9219de19 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -389,6 +389,31 @@ #define HAVE_STRUCT_TIMEVAL 1 /* ---------------------------------------------------------------- */ +/* BSD-style lwIP TCP/IP stack SPECIFIC */ +/* ---------------------------------------------------------------- */ + +/* Define this to use BSD-style lwIP TCP/IP stack */ +/* #define USE_LWIPSOCK 1 */ + +#ifdef USE_LWIPSOCK +# undef USE_WINSOCK +# undef HAVE_WINSOCK_H +# undef HAVE_WINSOCK2_H +# undef HAVE_WS2TCPIP_H +# undef HAVE_ERRNO_H +# undef HAVE_GETHOSTNAME +# undef HAVE_GETNAMEINFO +# undef LWIP_POSIX_SOCKETS_IO_NAMES +# define HAVE_FREEADDRINFO +# define HAVE_GETADDRINFO +# define HAVE_GETHOSTBYNAME +# define HAVE_GETHOSTBYNAME_R +# define HAVE_GETHOSTBYNAME_R_6 +# define LWIP_POSIX_SOCKETS_IO_NAMES 0 +# define SOCKET int +#endif + +/* ---------------------------------------------------------------- */ /* Watt-32 tcp/ip SPECIFIC */ /* ---------------------------------------------------------------- */ diff --git a/lib/setup.h b/lib/setup.h index eb19bafab..d89111f95 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -251,6 +251,11 @@ # endif #endif +#ifdef USE_LWIPSOCK +# include <lwip/sockets.h> +# include <lwip/netdb.h> +#endif + #ifdef HAVE_EXTRA_STRICMP_H # include <extra/stricmp.h> #endif diff --git a/src/config-win32.h b/src/config-win32.h index e5cbcf0df..4b92a2b66 100644 --- a/src/config-win32.h +++ b/src/config-win32.h @@ -263,6 +263,31 @@ #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 /* ---------------------------------------------------------------- */ +/* BSD-style lwIP TCP/IP stack SPECIFIC */ +/* ---------------------------------------------------------------- */ + +/* Define this to use BSD-style lwIP TCP/IP stack */ +/* #define USE_LWIPSOCK 1 */ + +#ifdef USE_LWIPSOCK +# undef USE_WINSOCK +# undef HAVE_WINSOCK_H +# undef HAVE_WINSOCK2_H +# undef HAVE_WS2TCPIP_H +# undef HAVE_ERRNO_H +# undef HAVE_GETHOSTNAME +# undef HAVE_GETNAMEINFO +# undef LWIP_POSIX_SOCKETS_IO_NAMES +# define HAVE_FREEADDRINFO +# define HAVE_GETADDRINFO +# define HAVE_GETHOSTBYNAME +# define HAVE_GETHOSTBYNAME_R +# define HAVE_GETHOSTBYNAME_R_6 +# define LWIP_POSIX_SOCKETS_IO_NAMES 0 +# define SOCKET int +#endif + +/* ---------------------------------------------------------------- */ /* Watt-32 tcp/ip SPECIFIC */ /* ---------------------------------------------------------------- */ diff --git a/src/setup.h b/src/setup.h index b510fd9b5..d2562a244 100644 --- a/src/setup.h +++ b/src/setup.h @@ -135,6 +135,11 @@ # endif #endif +#ifdef USE_LWIPSOCK +# include <lwip/sockets.h> +# include <lwip/netdb.h> +#endif + #ifdef TPF # include <sys/socket.h> /* change which select is used for the curl command line tool */ |