aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-04-30 20:46:17 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-04-30 20:48:23 +0200
commit8719f4fcc1685a320e648166cf6720c3e33f0434 (patch)
tree28bc3e764d86ea249b4fd040b4ab7a9cb92b354d /src
parent3cf07732fca4fd293874837833698fe0bfa279b2 (diff)
downloadgnunet-8719f4fcc1685a320e648166cf6720c3e33f0434.tar.gz
gnunet-8719f4fcc1685a320e648166cf6720c3e33f0434.zip
Make gnurl and curl mutually exclusive.
This prevents issues when both curl and gnurl are available, but one of them is outdated. To get curl.h, we also now just include gnunet_curl_lib.h instead of writing the preprocessor conditionals manually. Fixes #5707
Diffstat (limited to 'src')
-rw-r--r--src/curl/curl.c5
-rw-r--r--src/gns/gnunet-gns-proxy.c7
-rw-r--r--src/gns/test_gns_proxy.c7
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_client.c7
-rw-r--r--src/include/gnunet_curl_lib.h4
-rw-r--r--src/pt/test_gns_vpn.c7
-rw-r--r--src/pt/test_gnunet_vpn.c7
-rw-r--r--src/transport/plugin_transport_http.h7
-rw-r--r--src/transport/plugin_transport_http_client.c7
9 files changed, 16 insertions, 42 deletions
diff --git a/src/curl/curl.c b/src/curl/curl.c
index 10475fe2e..5e1c216ab 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -24,11 +24,6 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#if HAVE_CURL_CURL_H
28#include <curl/curl.h>
29#elif HAVE_GNURL_CURL_H
30#include <gnurl/curl.h>
31#endif
32#include <jansson.h> 27#include <jansson.h>
33#include "gnunet_curl_lib.h" 28#include "gnunet_curl_lib.h"
34 29
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index bae222499..eb8115026 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -29,11 +29,8 @@
29 */ 29 */
30#include "platform.h" 30#include "platform.h"
31#include <microhttpd.h> 31#include <microhttpd.h>
32#if HAVE_CURL_CURL_H 32/* Just included for the right curl.h */
33#include <curl/curl.h> 33#include "gnunet_curl_lib.h"
34#elif HAVE_GNURL_CURL_H
35#include <gnurl/curl.h>
36#endif
37#include <gnutls/gnutls.h> 34#include <gnutls/gnutls.h>
38#include <gnutls/x509.h> 35#include <gnutls/x509.h>
39#include <gnutls/abstract.h> 36#include <gnutls/abstract.h>
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c
index 2a7f8104b..053f5f898 100644
--- a/src/gns/test_gns_proxy.c
+++ b/src/gns/test_gns_proxy.c
@@ -24,11 +24,8 @@
24 * @author Martin Schanzenbach 24 * @author Martin Schanzenbach
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#if HAVE_CURL_CURL_H 27/* Just included for the right curl.h */
28#include <curl/curl.h> 28#include "gnunet_curl_lib.h"
29#elif HAVE_GNURL_CURL_H
30#include <gnurl/curl.h>
31#endif
32#include <microhttpd.h> 29#include <microhttpd.h>
33#include "gnunet_util_lib.h" 30#include "gnunet_util_lib.h"
34#include "gnutls/x509.h" 31#include "gnutls/x509.h"
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c
index f15cda2f3..539760966 100644
--- a/src/hostlist/gnunet-daemon-hostlist_client.c
+++ b/src/hostlist/gnunet-daemon-hostlist_client.c
@@ -30,11 +30,8 @@
30#include "gnunet_transport_service.h" 30#include "gnunet_transport_service.h"
31#include "gnunet_peerinfo_service.h" 31#include "gnunet_peerinfo_service.h"
32#include "gnunet-daemon-hostlist.h" 32#include "gnunet-daemon-hostlist.h"
33#if HAVE_CURL_CURL_H 33/* Just included for the right curl.h */
34#include <curl/curl.h> 34#include "gnunet_curl_lib.h"
35#elif HAVE_GNURL_CURL_H
36#include <gnurl/curl.h>
37#endif
38 35
39 36
40 37
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h
index 0cbef9c73..86cb54f6b 100644
--- a/src/include/gnunet_curl_lib.h
+++ b/src/include/gnunet_curl_lib.h
@@ -29,9 +29,9 @@
29 */ 29 */
30#ifndef GNUNET_CURL_LIB_H 30#ifndef GNUNET_CURL_LIB_H
31#define GNUNET_CURL_LIB_H 31#define GNUNET_CURL_LIB_H
32#if HAVE_CURL_CURL_H 32#if HAVE_LIBCURL
33#include <curl/curl.h> 33#include <curl/curl.h>
34#elif HAVE_GNURL_CURL_H 34#elif HAVE_LIBGNURL
35#include <gnurl/curl.h> 35#include <gnurl/curl.h>
36#else 36#else
37#error "needs curl or gnurl" 37#error "needs curl or gnurl"
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c
index 069277a00..90405fe37 100644
--- a/src/pt/test_gns_vpn.c
+++ b/src/pt/test_gns_vpn.c
@@ -37,11 +37,8 @@
37 * you should get a warning that gnunet-dns2gns failed to 'bind'. 37 * you should get a warning that gnunet-dns2gns failed to 'bind'.
38 */ 38 */
39#include "platform.h" 39#include "platform.h"
40#if HAVE_CURL_CURL_H 40/* Just included for the right curl.h */
41#include <curl/curl.h> 41#include "gnunet_curl_lib.h"
42#elif HAVE_GNURL_CURL_H
43#include <gnurl/curl.h>
44#endif
45#include <microhttpd.h> 42#include <microhttpd.h>
46#include "gnunet_identity_service.h" 43#include "gnunet_identity_service.h"
47#include "gnunet_namestore_service.h" 44#include "gnunet_namestore_service.h"
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c
index 0afd0f94b..7cc77fe24 100644
--- a/src/pt/test_gnunet_vpn.c
+++ b/src/pt/test_gnunet_vpn.c
@@ -24,11 +24,8 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#if HAVE_CURL_CURL_H 27/* Just included for the right curl.h */
28#include <curl/curl.h> 28#include "gnunet_curl_lib.h"
29#elif HAVE_GNURL_CURL_H
30#include <gnurl/curl.h>
31#endif
32#include <microhttpd.h> 29#include <microhttpd.h>
33#include "gnunet_vpn_service.h" 30#include "gnunet_vpn_service.h"
34#include "gnunet_testing_lib.h" 31#include "gnunet_testing_lib.h"
diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h
index 6867d3b9d..b6ada8f86 100644
--- a/src/transport/plugin_transport_http.h
+++ b/src/transport/plugin_transport_http.h
@@ -41,11 +41,8 @@
41#include "gnunet_os_lib.h" 41#include "gnunet_os_lib.h"
42#include "gnunet_nat_lib.h" 42#include "gnunet_nat_lib.h"
43#include "microhttpd.h" 43#include "microhttpd.h"
44#if HAVE_CURL_CURL_H 44/* Just included for the right curl.h */
45#include <curl/curl.h> 45#include "gnunet_curl_lib.h"
46#elif HAVE_GNURL_CURL_H
47#include <gnurl/curl.h>
48#endif
49 46
50 47
51#define DEBUG_HTTP GNUNET_EXTRA_LOGGING 48#define DEBUG_HTTP GNUNET_EXTRA_LOGGING
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 3c8dc21e5..c4d70d4c3 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -49,11 +49,8 @@
49#include "gnunet_protocols.h" 49#include "gnunet_protocols.h"
50#include "gnunet_transport_plugin.h" 50#include "gnunet_transport_plugin.h"
51#include "plugin_transport_http_common.h" 51#include "plugin_transport_http_common.h"
52#if HAVE_CURL_CURL_H 52/* Just included for the right curl.h */
53#include <curl/curl.h> 53#include "gnunet_curl_lib.h"
54#elif HAVE_GNURL_CURL_H
55#include <gnurl/curl.h>
56#endif
57 54
58 55
59#define LOG(kind,...) GNUNET_log_from(kind, PLUGIN_NAME, __VA_ARGS__) 56#define LOG(kind,...) GNUNET_log_from(kind, PLUGIN_NAME, __VA_ARGS__)