mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 07:38:49 -05:00
resolvers: only include anything if needed
This avoids warnings about unused stuff. Closes https://github.com/curl/curl/pull/2023
This commit is contained in:
parent
36bbbeb7c2
commit
733190413f
@ -22,6 +22,14 @@
|
|||||||
|
|
||||||
#include "curl_setup.h"
|
#include "curl_setup.h"
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Only for ares-enabled builds
|
||||||
|
* And only for functions that fulfill the asynch resolver backend API
|
||||||
|
* as defined in asyn.h, nothing else belongs in this file!
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifdef CURLRES_ARES
|
||||||
|
|
||||||
#ifdef HAVE_LIMITS_H
|
#ifdef HAVE_LIMITS_H
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
@ -48,14 +56,6 @@
|
|||||||
#define in_addr_t unsigned long
|
#define in_addr_t unsigned long
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Only for ares-enabled builds
|
|
||||||
* And only for functions that fulfill the asynch resolver backend API
|
|
||||||
* as defined in asyn.h, nothing else belongs in this file!
|
|
||||||
**********************************************************************/
|
|
||||||
|
|
||||||
#ifdef CURLRES_ARES
|
|
||||||
|
|
||||||
#include "urldata.h"
|
#include "urldata.h"
|
||||||
#include "sendf.h"
|
#include "sendf.h"
|
||||||
#include "hostip.h"
|
#include "hostip.h"
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
#include "curl_setup.h"
|
#include "curl_setup.h"
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Only for builds using asynchronous name resolves
|
||||||
|
**********************************************************************/
|
||||||
|
#ifdef CURLRES_ASYNCH
|
||||||
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -51,11 +56,6 @@
|
|||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Only for builds using asynchronous name resolves
|
|
||||||
**********************************************************************/
|
|
||||||
#ifdef CURLRES_ASYNCH
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Curl_addrinfo_callback() gets called by ares, gethostbyname_thread()
|
* Curl_addrinfo_callback() gets called by ares, gethostbyname_thread()
|
||||||
* or getaddrinfo_thread() when we got the name resolved (or not!).
|
* or getaddrinfo_thread() when we got the name resolved (or not!).
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
#include "curl_setup.h"
|
#include "curl_setup.h"
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Only for plain IPv4 builds
|
||||||
|
**********************************************************************/
|
||||||
|
#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */
|
||||||
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -53,10 +58,6 @@
|
|||||||
#include "curl_memory.h"
|
#include "curl_memory.h"
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Only for plain IPv4 builds
|
|
||||||
**********************************************************************/
|
|
||||||
#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */
|
|
||||||
/*
|
/*
|
||||||
* Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
|
* Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
|
||||||
* been set and returns TRUE if they are OK.
|
* been set and returns TRUE if they are OK.
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
#include "curl_setup.h"
|
#include "curl_setup.h"
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Only for IPv6-enabled builds
|
||||||
|
**********************************************************************/
|
||||||
|
#ifdef CURLRES_IPV6
|
||||||
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -54,11 +59,6 @@
|
|||||||
#include "curl_memory.h"
|
#include "curl_memory.h"
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Only for IPv6-enabled builds
|
|
||||||
**********************************************************************/
|
|
||||||
#ifdef CURLRES_IPV6
|
|
||||||
|
|
||||||
#if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO)
|
#if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO)
|
||||||
/* These are strictly for memory tracing and are using the same style as the
|
/* These are strictly for memory tracing and are using the same style as the
|
||||||
* family otherwise present in memdebug.c. I put these ones here since they
|
* family otherwise present in memdebug.c. I put these ones here since they
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
#include "curl_setup.h"
|
#include "curl_setup.h"
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Only for builds using synchronous name resolves
|
||||||
|
**********************************************************************/
|
||||||
|
#ifdef CURLRES_SYNCH
|
||||||
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -51,11 +56,6 @@
|
|||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* Only for builds using synchronous name resolves
|
|
||||||
**********************************************************************/
|
|
||||||
#ifdef CURLRES_SYNCH
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function provided by the resolver backend to set DNS servers to use.
|
* Function provided by the resolver backend to set DNS servers to use.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user