diff options
| author | Bertrand SIMONNET <bsimonnet@google.com> | 2015-07-01 15:39:44 -0700 |
|---|---|---|
| committer | Bertrand SIMONNET <bsimonnet@google.com> | 2015-07-08 10:51:12 -0700 |
| commit | e6cd738ed3716c02557fb3a47515244e949ade39 (patch) | |
| tree | 8d093306c27b850f828317ed67d6efea3ec7e084 /lib/hostsyn.c | |
| parent | d43abe883892fe84137052fd27ecd956a2c7cacf (diff) | |
| download | android_external_curl-e6cd738ed3716c02557fb3a47515244e949ade39.tar.gz android_external_curl-e6cd738ed3716c02557fb3a47515244e949ade39.tar.bz2 android_external_curl-e6cd738ed3716c02557fb3a47515244e949ade39.zip | |
Import curl 7.43
This is a simple import of curl 7.43.
The only change from the official release is the fact that the
Android.mk was removed to avoid build error trying to parse it.
BUG: 22347561
Change-Id: I52ef6798d30b25d22d1f62770d571adec8bcf4d5
Diffstat (limited to 'lib/hostsyn.c')
| -rw-r--r-- | lib/hostsyn.c | 84 |
1 files changed, 34 insertions, 50 deletions
diff --git a/lib/hostsyn.c b/lib/hostsyn.c index b68e470..fb1de35 100644 --- a/lib/hostsyn.c +++ b/lib/hostsyn.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,13 +20,8 @@ * ***************************************************************************/ -#include "setup.h" +#include "curl_setup.h" -#include <string.h> - -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif @@ -36,16 +31,9 @@ #ifdef HAVE_ARPA_INET_H #include <arpa/inet.h> #endif -#ifdef HAVE_STDLIB_H -#include <stdlib.h> /* required for free() prototypes */ -#endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> /* for the close() proto */ -#endif #ifdef __VMS #include <in.h> #include <inet.h> -#include <stdlib.h> #endif #ifdef HAVE_PROCESS_H @@ -59,10 +47,6 @@ #include "share.h" #include "strerror.h" #include "url.h" - -#define _MPRINTF_REPLACE /* use our functions only */ -#include <curl/mprintf.h> - #include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" @@ -73,51 +57,51 @@ #ifdef CURLRES_SYNCH /* - * Curl_wait_for_resolv() for synch-builds. Curl_resolv() can never return - * wait==TRUE, so this function will never be called. If it still gets called, - * we return failure at once. - * - * We provide this function only to allow multi.c to remain unaware if we are - * doing asynch resolves or not. + * Function provided by the resolver backend to set DNS servers to use. */ -CURLcode Curl_wait_for_resolv(struct connectdata *conn, - struct Curl_dns_entry **entry) +CURLcode Curl_set_dns_servers(struct SessionHandle *data, + char *servers) { - (void)conn; - *entry=NULL; - return CURLE_COULDNT_RESOLVE_HOST; + (void)data; + (void)servers; + return CURLE_NOT_BUILT_IN; + } /* - * This function will never be called when synch-built. If it still gets - * called, we return failure at once. - * - * We provide this function only to allow multi.c to remain unaware if we are - * doing asynch resolves or not. + * Function provided by the resolver backend to set + * outgoing interface to use for DNS requests */ -CURLcode Curl_is_resolved(struct connectdata *conn, - struct Curl_dns_entry **dns) +CURLcode Curl_set_dns_interface(struct SessionHandle *data, + const char *interf) { - (void)conn; - *dns = NULL; - - return CURLE_COULDNT_RESOLVE_HOST; + (void)data; + (void)interf; + return CURLE_NOT_BUILT_IN; } /* - * We just return OK, this function is never actually used for synch builds. - * It is present here to keep #ifdefs out from multi.c + * Function provided by the resolver backend to set + * local IPv4 address to use as source address for DNS requests */ - -int Curl_resolv_getsock(struct connectdata *conn, - curl_socket_t *sock, - int numsocks) +CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data, + const char *local_ip4) { - (void)conn; - (void)sock; - (void)numsocks; + (void)data; + (void)local_ip4; + return CURLE_NOT_BUILT_IN; +} - return 0; /* no bits since we don't use any socks */ +/* + * Function provided by the resolver backend to set + * local IPv6 address to use as source address for DNS requests + */ +CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data, + const char *local_ip6) +{ + (void)data; + (void)local_ip6; + return CURLE_NOT_BUILT_IN; } #endif /* truly sync */ |
