diff options
Diffstat (limited to 'libs/libcurl/src/setup-win32.h')
-rw-r--r-- | libs/libcurl/src/setup-win32.h | 62 |
1 files changed, 41 insertions, 21 deletions
diff --git a/libs/libcurl/src/setup-win32.h b/libs/libcurl/src/setup-win32.h index 2203c46a55..19f5cf154b 100644 --- a/libs/libcurl/src/setup-win32.h +++ b/libs/libcurl/src/setup-win32.h @@ -24,18 +24,53 @@ *
***************************************************************************/
+#undef USE_WINSOCK
+/* ---------------------------------------------------------------- */
+/* Watt-32 TCP/IP SPECIFIC */
+/* ---------------------------------------------------------------- */
+#ifdef USE_WATT32
+# include <tcp.h>
+# undef byte
+# undef word
+# define HAVE_SYS_IOCTL_H
+# define HAVE_SYS_SOCKET_H
+# define HAVE_NETINET_IN_H
+# define HAVE_NETDB_H
+# define HAVE_ARPA_INET_H
+# define SOCKET int
+/* ---------------------------------------------------------------- */
+/* BSD-style lwIP TCP/IP stack SPECIFIC */
+/* ---------------------------------------------------------------- */
+#elif defined(USE_LWIPSOCK)
+ /* Define to use BSD-style lwIP TCP/IP stack. */
+ /* #define USE_LWIPSOCK 1 */
+# undef HAVE_GETHOSTNAME
+# undef LWIP_POSIX_SOCKETS_IO_NAMES
+# undef RECV_TYPE_ARG1
+# undef RECV_TYPE_ARG3
+# undef SEND_TYPE_ARG1
+# undef SEND_TYPE_ARG3
+# define HAVE_GETHOSTBYNAME_R
+# define HAVE_GETHOSTBYNAME_R_6
+# define LWIP_POSIX_SOCKETS_IO_NAMES 0
+# define RECV_TYPE_ARG1 int
+# define RECV_TYPE_ARG3 size_t
+# define SEND_TYPE_ARG1 int
+# define SEND_TYPE_ARG3 size_t
+#elif defined(_WIN32)
+# define USE_WINSOCK 2
+#endif
+
/*
* Include header files for windows builds before redefining anything.
* Use this preprocessor block only to include or exclude windows.h,
* winsock2.h or ws2tcpip.h. Any other windows thing belongs
* to any other further and independent block. Under Cygwin things work
* just as under linux (e.g. <sys/socket.h>) and the winsock headers should
- * never be included when __CYGWIN__ is defined. configure script takes
- * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK2_H,
- * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
+ * never be included when __CYGWIN__ is defined.
*/
-#ifdef HAVE_WINDOWS_H
+#ifdef _WIN32
# if defined(UNICODE) && !defined(_UNICODE)
# error "UNICODE is defined but _UNICODE is not defined"
# endif
@@ -53,12 +88,8 @@ # ifndef NOGDI
# define NOGDI
# endif
-# ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-# ifdef HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
-# endif
-# endif
+# include <winsock2.h>
+# include <ws2tcpip.h>
# include <windows.h>
# include <winerror.h>
# include <tchar.h>
@@ -68,17 +99,6 @@ #endif
/*
- * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
- * undefine USE_WINSOCK.
- */
-
-#undef USE_WINSOCK
-
-#ifdef HAVE_WINSOCK2_H
-# define USE_WINSOCK 2
-#endif
-
-/*
* Define _WIN32_WINNT_[OS] symbols because not all Windows build systems have
* those symbols to compare against, and even those that do may be missing
* newer symbols.
|