[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 18/116: resolvers: only include anything if needed
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 18/116: resolvers: only include anything if needed |
Date: |
Tue, 05 Dec 2017 14:50:48 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 733190413f6aeffdedf48b85bf43bcfd1038d54b
Author: Marcel Raad <address@hidden>
AuthorDate: Thu Oct 26 20:52:22 2017 +0200
resolvers: only include anything if needed
This avoids warnings about unused stuff.
Closes https://github.com/curl/curl/pull/2023
---
lib/asyn-ares.c | 16 ++++++++--------
lib/hostasyn.c | 10 +++++-----
lib/hostip4.c | 9 +++++----
lib/hostip6.c | 10 +++++-----
lib/hostsyn.c | 10 +++++-----
5 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index 27523041e..dd7dc4028 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -22,6 +22,14 @@
#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
#include <limits.h>
#endif
@@ -48,14 +56,6 @@
#define in_addr_t unsigned long
#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 "sendf.h"
#include "hostip.h"
diff --git a/lib/hostasyn.c b/lib/hostasyn.c
index 28bdf7a48..7b6e8568a 100644
--- a/lib/hostasyn.c
+++ b/lib/hostasyn.c
@@ -22,6 +22,11 @@
#include "curl_setup.h"
+/***********************************************************************
+ * Only for builds using asynchronous name resolves
+ **********************************************************************/
+#ifdef CURLRES_ASYNCH
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -51,11 +56,6 @@
/* The last #include file should be: */
#include "memdebug.h"
-/***********************************************************************
- * Only for builds using asynchronous name resolves
- **********************************************************************/
-#ifdef CURLRES_ASYNCH
-
/*
* Curl_addrinfo_callback() gets called by ares, gethostbyname_thread()
* or getaddrinfo_thread() when we got the name resolved (or not!).
diff --git a/lib/hostip4.c b/lib/hostip4.c
index 6a7c6e576..9d6f115ae 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -22,6 +22,11 @@
#include "curl_setup.h"
+/***********************************************************************
+ * Only for plain IPv4 builds
+ **********************************************************************/
+#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -53,10 +58,6 @@
#include "curl_memory.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
* been set and returns TRUE if they are OK.
diff --git a/lib/hostip6.c b/lib/hostip6.c
index edeebec9e..7c9988f41 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -22,6 +22,11 @@
#include "curl_setup.h"
+/***********************************************************************
+ * Only for IPv6-enabled builds
+ **********************************************************************/
+#ifdef CURLRES_IPV6
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -54,11 +59,6 @@
#include "curl_memory.h"
#include "memdebug.h"
-/***********************************************************************
- * Only for IPv6-enabled builds
- **********************************************************************/
-#ifdef CURLRES_IPV6
-
#if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO)
/* 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
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
index 1a95263c6..3de6746f5 100644
--- a/lib/hostsyn.c
+++ b/lib/hostsyn.c
@@ -22,6 +22,11 @@
#include "curl_setup.h"
+/***********************************************************************
+ * Only for builds using synchronous name resolves
+ **********************************************************************/
+#ifdef CURLRES_SYNCH
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -51,11 +56,6 @@
/* The last #include file should be: */
#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.
*/
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 02/116: RELEASE-NOTES: clean slate towards 7.57.0, (continued)
- [GNUnet-SVN] [gnurl] 02/116: RELEASE-NOTES: clean slate towards 7.57.0, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 01/116: travis: exit if any steps fail, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 12/116: curl_fnmatch: return error on illegal wildcard pattern, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 10/116: multi: allow table handle sizes to be overridden, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 22/116: ROADMAP.md: spelling fixes, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 13/116: timeval: make timediff_t also work on 32bit windows, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 08/116: ftplistparser: follow-up cleanup to remove PL_ERROR(), gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 21/116: Curl_timeleft: change return type to timediff_t, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 06/116: timediff: return timediff_t from the time diff functions, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 16/116: curl_setup.h: oops, shorten the too long line, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 18/116: resolvers: only include anything if needed,
gnunet <=
- [GNUnet-SVN] [gnurl] 35/116: curlx: the timeval functions are no longer provided as curlx_*, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 17/116: HELP-US: rename the subtitle too since the label is changed, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 30/116: cli tool: in -F option arg, comma is a delimiter for files only, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 45/116: url: fix CURLOPT_DNS_CACHE_TIMEOUT arg value check to allow -1, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 15/116: curl_setup: Improve detection of CURL_WINDOWS_APP, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 42/116: CURLOPT_MAXREDIRS: allow -1 as a value, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 19/116: setopt: fix CURLOPT_SSH_AUTH_TYPES option read, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 38/116: memdebug: use send/recv signature for curl_dosend/curl_dorecv, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 11/116: wildcards: don't use with non-supported protocols, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 24/116: TODO: support multiple Content-Encodings, gnunet, 2017/12/05