1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

Gisle Vanem's IPv6-on-Windows patch applied!

This commit is contained in:
Daniel Stenberg 2003-10-14 12:00:45 +00:00
parent 7553341bad
commit 749f5387c1
20 changed files with 41 additions and 46 deletions

View 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
@ -98,6 +100,9 @@
/* 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*/
@ -105,7 +110,7 @@
#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 */
@ -123,7 +128,7 @@
/* #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*/
@ -144,19 +149,22 @@
/*#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"
@ -170,6 +178,12 @@
/* 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
@ -191,7 +205,7 @@
/*************************************************
* 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

View File

@ -66,11 +66,11 @@
#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"

View 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

View 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

View 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>

View File

@ -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>

View 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>

View 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

View File

@ -20,11 +20,6 @@
#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>
@ -52,6 +46,10 @@
#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.

View File

@ -26,13 +26,9 @@
#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>

View 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

View File

@ -24,13 +24,7 @@
#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

View 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"

View 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)

View 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"

View 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

View File

@ -21,14 +21,13 @@
* $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)
{

View File

@ -27,7 +27,6 @@
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#include <time.h>
#include <winsock.h>
#else
#include <sys/time.h>
#endif

View 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

View 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