summaryrefslogtreecommitdiffstats
path: root/keyserver
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2005-05-04 15:34:25 +0200
committerDavid Shaw <dshaw@jabberwocky.com>2005-05-04 15:34:25 +0200
commitd9d902dffb170eebe96cd051d9989526bd160f5b (patch)
tree0326df8a5c85625755fc85828e7918c89c0177e2 /keyserver
parent* gpgkeys_http.c: Need GET defined. (diff)
downloadgnupg2-d9d902dffb170eebe96cd051d9989526bd160f5b.tar.xz
gnupg2-d9d902dffb170eebe96cd051d9989526bd160f5b.zip
* ksutil.h, ksutil.c: #ifdef so we can build without libcurl or
fake-curl.
Diffstat (limited to 'keyserver')
-rw-r--r--keyserver/ChangeLog5
-rw-r--r--keyserver/ksutil.c9
-rw-r--r--keyserver/ksutil.h9
3 files changed, 19 insertions, 4 deletions
diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog
index bba8f4875..4738f70b0 100644
--- a/keyserver/ChangeLog
+++ b/keyserver/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-04 David Shaw <dshaw@jabberwocky.com>
+
+ * ksutil.h, ksutil.c: #ifdef so we can build without libcurl or
+ fake-curl.
+
2005-05-03 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_http.c: Need GET defined.
diff --git a/keyserver/ksutil.c b/keyserver/ksutil.c
index 141d31c82..4626a847f 100644
--- a/keyserver/ksutil.c
+++ b/keyserver/ksutil.c
@@ -24,10 +24,13 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#else
#ifdef FAKE_CURL
#include "curl-shim.h"
-#else
-#include <curl/curl.h>
+#endif
#endif
#include "keyserver.h"
#include "ksutil.h"
@@ -318,6 +321,7 @@ print_nocr(FILE *stream,const char *str)
}
}
+#if defined (HAVE_LIBCURL) || defined (FAKE_CURL)
int
curl_err_to_gpg_err(CURLcode error)
{
@@ -383,3 +387,4 @@ curl_writer(const void *ptr,size_t size,size_t nmemb,void *cw_ctx)
return size*nmemb;
}
+#endif
diff --git a/keyserver/ksutil.h b/keyserver/ksutil.h
index 0001cf318..9711b798a 100644
--- a/keyserver/ksutil.h
+++ b/keyserver/ksutil.h
@@ -21,10 +21,12 @@
#ifndef _KSUTIL_H_
#define _KSUTIL_H_
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#else
#ifdef FAKE_CURL
#include "curl-shim.h"
-#else
-#include <curl/curl.h>
+#endif
#endif
/* MAX_LINE must be at least 1 larger than the largest item we expect
@@ -98,6 +100,8 @@ void free_ks_options(struct ks_options *opt);
int parse_ks_options(char *line,struct ks_options *opt);
const char *ks_action_to_string(enum ks_action action);
void print_nocr(FILE *stream,const char *str);
+
+#if defined (HAVE_LIBCURL) || defined (FAKE_CURL)
int curl_err_to_gpg_err(CURLcode error);
struct curl_writer_ctx
@@ -108,5 +112,6 @@ struct curl_writer_ctx
};
size_t curl_writer(const void *ptr,size_t size,size_t nmemb,void *cw_ctx);
+#endif
#endif /* !_KSUTIL_H_ */