]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Gisle Vanem's IPv6-on-Windows patch applied!
authorDaniel Stenberg <daniel@haxx.se>
Tue, 14 Oct 2003 12:00:45 +0000 (12:00 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 14 Oct 2003 12:00:45 +0000 (12:00 +0000)
20 files changed:
lib/config-win32.h
lib/connect.c
lib/dict.c
lib/easy.c
lib/file.c
lib/ftp.c
lib/hostip.c
lib/http.c
lib/inet_pton.c
lib/memdebug.c
lib/memdebug.h
lib/progress.c
lib/sendf.c
lib/setup.h
lib/speedcheck.c
lib/telnet.c
lib/timeval.c
lib/timeval.h
lib/transfer.c
lib/url.c

index 1e06229417883bff257251816671ede857b9777c..c24e8b7b6affd45262cd8f6b25fa11430d32dabd 100644 (file)
@@ -27,7 +27,9 @@
 #define ssize_t int
 
 /* Define this to 'int' if socklen_t is not an available typedefed type */
+#if !defined(ENABLE_IPV6) && !defined(USE_SSLEAY)
 #define socklen_t int
+#endif
 
 /* Define if you have the ANSI C header files.  */
 #define STDC_HEADERS 1
 /* Define if you have the uname function.  */
 /*#define HAVE_UNAME 1*/
 
+/* Define if you have utime() */
+#define HAVE_UTIME 1
+
 /* Define if you have the <alloca.h> header file.  */
 /*#define HAVE_ALLOCA_H 1*/
 
 #define HAVE_MALLOC_H 1
 
 /* Define if you have the <arpa/inet.h> header file.  */
-#define HAVE_ARPA_INET_H 1
+/* #define HAVE_ARPA_INET_H 1 */
 
 /* Define if you have the <crypto.h> header file.  */
 /* #undef HAVE_CRYPTO_H */
 /* #undef HAVE_GETOPT_H */
 
 /* Define if you have the <netdb.h> header file.  */
-#define HAVE_NETDB_H 1
+/* #define HAVE_NETDB_H 1 */
 
 /* Define if you have the <netinet/in.h> header file.  */
 /*#define HAVE_NETINET_IN_H 1*/
 /*#define HAVE_SYS_SOCKET_H 1*/
 
 /* Define if you have the <sys/sockio.h> header file.  */
-#define HAVE_SYS_SOCKIO_H 1
+/* #define HAVE_SYS_SOCKIO_H 1 */
 
 /* Define if you have the <sys/stat.h> header file.  */
 #define HAVE_SYS_STAT_H 1
 
+/* Define if you have the <sys/utime.h> header file */
+#define HAVE_SYS_UTIME_H 1
+
 /* Define if you have the <sys/types.h> header file.  */
 #define HAVE_SYS_TYPES_H 1
 
 /* Define if you have the <termio.h> header file.  */
-#define HAVE_TERMIO_H 1
+/* #define HAVE_TERMIO_H 1 */
 
 /* Define if you have the <termios.h> header file.  */
-#define HAVE_TERMIOS_H 1
+/* #define HAVE_TERMIOS_H 1 */
 
 /* Name of package */
 #define PACKAGE "curl"
 /* Define if you have the <winsock.h> header file.  */
 #define HAVE_WINSOCK_H 1
 
+/* Define if you have the <winsock2.h> header file.  */
+#define HAVE_WINSOCK2_H 1
+
+/* Define if you have the <ws2tcpip.h> header file.  */
+#define HAVE_WS2TCPIP_H 1
+
 /* Define if you have the <stdlib.h> header file.  */
 #define HAVE_STDLIB_H 1
 
 /*************************************************
  * This section is for compiler specific defines.*
  *************************************************/
-#ifdef MINGW32 /* Borland and MS don't have this */
+#if defined(MINGW32) || defined(__WATCOMC__) /* Borland and MS don't have this */
 
 /* Define if you have the <unistd.h> header file.  */
 #define HAVE_UNISTD_H 1
index 2330e64187d8d35402cef47f6e379f13030184ef..69d0dd308bf2dc3a71a7416c97f93487c3162cf0 100644 (file)
 #ifdef WIN32
 #define HAVE_IOCTLSOCKET
 #include <windows.h>
-#include <winsock.h>
 #define EINPROGRESS WSAEINPROGRESS
 #define EWOULDBLOCK WSAEWOULDBLOCK
 #define EISCONN     WSAEISCONN
 #define ENOTSOCK    WSAENOTSOCK
+#define ECONNREFUSED WSAECONNREFUSED
 #endif
 
 #include "urldata.h"
index 540d872c0be16997d191eca9870b56dcb7769d31..1c85a1081b31c0a6c4a81cd62d5aa8c173ebc9e7 100644 (file)
@@ -35,7 +35,6 @@
 #include <errno.h>
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
 #include <time.h>
 #include <io.h>
 #else
index 9ad2be40cf641a8022a5e5cca9113178f5d39ce8..f76df632b8a74e8788bba6c228255c8b54bd4ec0 100644 (file)
@@ -37,7 +37,6 @@
 #include "strequal.h"
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
 #include <time.h>
 #include <io.h>
 #else
index 4e08c03bcda90934e15b67503d89ab2e8eaf48a5..1baa46d51401f3fae145dcdc57591d3c4fbe26f0 100644 (file)
@@ -36,7 +36,6 @@
 #include <errno.h>
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
 #include <time.h>
 #include <io.h>
 #include <fcntl.h>
index 0da33fbbc1c760200e5f31322a86ef5212f3905c..41ef3089f13d4c0fc737d9f31d525a136ad2d6d8 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -39,7 +39,7 @@
 #endif
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
+
 #else /* some kind of unix */
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
index e5363fa8099d1875528500ba30a7651d40a57548..93a732d90f71f46c0785877f212ec52d286b2dd0 100644 (file)
@@ -29,7 +29,7 @@
 #define _REENTRANT
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
+#include <malloc.h>
 #else
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
index ff6e432aa0faab9784aad3f0cf3ef945ef730ff1..041d6f9442946bea5b4dbc5f2f10ad1e9ddc36b5 100644 (file)
@@ -36,7 +36,6 @@
 #include <errno.h>
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
 #include <time.h>
 #include <io.h>
 #else
index 82eba95bb34a6df49618aeb5322b8127db65ab83..601042e1dbc81f2584a8ced47ae950af3ee9cc1a 100644 (file)
 
 #ifndef HAVE_INET_PTON
 
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#define EAFNOSUPPORT WSAEAFNOSUPPORT
-#include <winsock.h>
-#else
-
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
@@ -40,7 +35,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#endif
 #include <string.h>
 #include <errno.h>
 
 #define        AF_INET6        AF_MAX+1        /* just to let this compile */
 #endif
 
+#ifdef WIN32
+#define EAFNOSUPPORT    WSAEAFNOSUPPORT
+#endif
+
 /*
  * WARNING: Don't even consider trying to compile this on a system where
  * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
index 088c5cc5086d81eaaebf585604d9205cf183e4f0..83cc5d30716df086e6aba1850945b6704f47c801 100644 (file)
 
 #include <curl/curl.h>
 
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
-#else /* some kind of unix */
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-#endif
 
 #define _MPRINTF_REPLACE
 #include <curl/mprintf.h>
index dae8ce1515af6334aa05c33dd28aa6183854d605..b28154a8123329567e707d1b2a01134708ce758a 100644 (file)
@@ -28,9 +28,6 @@
 #include <sys/types.h>
 #endif
 
-#ifdef WIN32
-#include <winsock.h>
-#endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
index 5036efaeb3a5a0e1acca39678b0e138976ae3c15..cb64e0b0651cc8cab610a0d35ede79d6678d5fae 100644 (file)
 #include "setup.h"
 
 #include <string.h>
-
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#if defined(__MINGW32__)
-#include <winsock.h>
-#endif
 #include <time.h>
-#endif
 
 /* 20000318 mgs
  * later we use _scrsize to determine the screen width, this emx library
index b964bdd56065cf2c3e18108f717cf1134d4e6e7e..76e01393ef9a0c5fd43df2deab64a3b4aa13350a 100644 (file)
@@ -39,9 +39,6 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
-#endif
 
 #include <curl/curl.h>
 #include "urldata.h"
index 92decad04a05de5af88d4e7cd0be6bdc11df37d1..60b9c9766f679709ffcb03614f7e44e6d074a7f2 100644 (file)
@@ -119,6 +119,17 @@ defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO)
    */
 
 #ifdef WIN32
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN  /* Prevent including <winsock*.h> in <windows.h> */
+#endif
+
+#include <winsock2.h>        /* required by telnet.c */
+
+#if defined(ENABLE_IPV6) || defined(USE_SSLEAY)
+#include <ws2tcpip.h>
+#endif
+
 #if !defined(__GNUC__) || defined(__MINGW32__)
 #define sclose(x) closesocket(x)
 #define sread(x,y,z) recv(x,y,z,0)
index f614438488ecc6b6110593381bb9f1f8c1192035..c7a6ae4055f6d1ce9887c864eb698a93c8f3c96b 100644 (file)
@@ -25,9 +25,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#if defined(__MINGW32__)
-#include <winsock.h>
-#endif
 
 #include <curl/curl.h>
 #include "urldata.h"
index 70683f48ffa4de747ef2762d86241fb3a71897d6..d01ae25bbfefd6d02cdfd068f1e6851e9e7adc49 100644 (file)
@@ -35,8 +35,7 @@
 
 #include <errno.h>
 
-#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock2.h>
+#if defined(WIN32)
 #include <time.h>
 #include <io.h>
 #else
index 7ab711631f43220606bb3d8d187e4de6e8bde361..cb0ae1249a76071f7e3e7ef48bb57418633bc61f 100644 (file)
  * $Id$
  ***************************************************************************/
 
-#ifdef WIN32
-#include <windows.h>
-#endif
 #include "timeval.h"
 
 #ifndef HAVE_GETTIMEOFDAY
 
 #ifdef WIN32
+#include <mmsystem.h>
+
 int
 gettimeofday (struct timeval *tp, void *nothing)
 {
index 7be60657f947cb1c1c70f9d3c538b6c32b000278..02d08fa6027f51d7e0f205647cf79d284e16c7e0 100644 (file)
@@ -27,7 +27,6 @@
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
 #include <time.h>
-#include <winsock.h>
 #else
 #include <sys/time.h>
 #endif
index 2412f12b283c0e4aff5ca8e82ba3186219694bb1..c7e9bac44e43012208c99614142e27bfe0b155ac 100644 (file)
@@ -37,7 +37,6 @@
 #include "strequal.h"
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
 #include <time.h>
 #include <io.h>
 #else
index 435e6b3d1e6b29d979477d50471392176540dd27..c76ad9e7fbce122716d9c5b49c09889b6db08842 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -36,7 +36,6 @@
 #include <errno.h>
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
-#include <winsock.h>
 #include <time.h>
 #include <io.h>
 #else