1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Made buliding w/o curl work

This commit is contained in:
Werner Koch 2006-09-26 14:35:24 +00:00
parent 1f380299e5
commit 13e4f5c95c
5 changed files with 29 additions and 40 deletions

View file

@ -1,3 +1,14 @@
2006-09-26 Werner Koch <wk@g10code.com>
* curl-shim.c: Adjusted for changes in http.c.
(curl_easy_perform): Changed LINE from unsigned char* to char*.
* Makefile.am (gpg2keys_curl_LDADD, gpg2keys_hkp_LDADD)
[FAKE_CURL]: Need to link against common_libs and pth.
* curl-shim.h, curl-shim.c: Removed license exception as not
needed here.
2006-09-22 Werner Koch <wk@g10code.com>
* gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c, curl-shim.c:

View file

@ -54,11 +54,13 @@ gpg2keys_finger_LDADD = $(common_libs) $(LIBGCRYPT_LIBS) \
if FAKE_CURL
gpg2keys_curl_SOURCES += curl-shim.c curl-shim.h
gpg2keys_curl_LDADD = $(NETLIBS) $(DNSLIBS) \
$(other_libs) $(W32LIBS)
gpg2keys_curl_CPPFLAGS = $(AM_CPPFLAGS)
gpg2keys_curl_LDADD = $(common_libs) $(GPG_ERROR_LIBS) $(NETLIBS) $(DNSLIBS) \
$(other_libs) $(PTH_LIBS) $(W32LIBS)
gpg2keys_hkp_SOURCES += curl-shim.c curl-shim.h
gpg2keys_hkp_LDADD = $(NETLIBS) $(DNSLIBS) \
$(other_libs) $(W32LIBS)
gpg2keys_hkp_CPPFLAGS = $(AM_CPPFLAGS)
gpg2keys_hkp_LDADD = $(common_libs) $(GPG_ERROR_LIBS) $(NETLIBS) $(DNSLIBS) \
$(other_libs) $(PTH_LIBS) $(W32LIBS)
else
gpg2keys_curl_CPPFLAGS = $(LIBCURL_CPPFLAGS) $(AM_CPPFLAGS)
gpg2keys_curl_LDADD = $(LIBCURL) $(GETOPT)

View file

@ -19,17 +19,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* In addition, as a special exception, the Free Software Foundation
* gives permission to link the code of the keyserver helper tools:
* gpgkeys_ldap, gpgkeys_curl and gpgkeys_hkp with the OpenSSL
* project's "OpenSSL" library (or with modified versions of it that
* use the same license as the "OpenSSL" library), and distribute the
* linked executables. You must obey the GNU General Public License
* in all respects for all of the code used other than "OpenSSL". If
* you modify this file, you may extend this exception to your version
* of the file, but you are not obligated to do so. If you do not
* wish to do so, delete this exception statement from your version.
*/
#include <config.h>
@ -114,7 +103,7 @@ curl_easy_cleanup(CURL *curl)
{
if (curl)
{
http_close (curl->hd);
http_close (curl->hd, 0);
free(curl);
}
}
@ -210,7 +199,7 @@ curl_easy_perform(CURL *curl)
curl->status = http_get_status_code (curl->hd);
if (!rc && curl->flags.failonerror && curl->status>=300)
err = CURLE_HTTP_RETURNED_ERROR;
http_close(curl->hd);
http_close (curl->hd, 0);
curl->hd = NULL;
}
}
@ -229,7 +218,7 @@ curl_easy_perform(CURL *curl)
else
{
unsigned int maxlen = 1024, buflen, len;
unsigned char *line = NULL;
char *line = NULL;
while ((len = es_read_line (http_get_read_ptr (curl->hd),
&line, &buflen, &maxlen)))
@ -247,34 +236,29 @@ curl_easy_perform(CURL *curl)
}
es_free (line);
http_close(curl->hd);
http_close(curl->hd, 0);
curl->hd = NULL;
}
}
else
{
http_close (curl->hd);
http_close (curl->hd, 0);
curl->hd = NULL;
}
}
}
switch(rc)
switch(gpg_err_code (rc))
{
case 0:
break;
case G10ERR_INVALID_URI:
case GPG_ERR_INV_URI:
err=CURLE_UNSUPPORTED_PROTOCOL;
break;
case G10ERR_NETWORK:
errstr=strerror(errno);
err=CURLE_COULDNT_CONNECT;
break;
default:
errstr=g10_errstr(rc);
errstr=gpg_strerror (rc);
err=CURLE_COULDNT_CONNECT;
break;
}

View file

@ -17,17 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* In addition, as a special exception, the Free Software Foundation
* gives permission to link the code of the keyserver helper tools:
* gpgkeys_ldap, gpgkeys_curl and gpgkeys_hkp with the OpenSSL
* project's "OpenSSL" library (or with modified versions of it that
* use the same license as the "OpenSSL" library), and distribute the
* linked executables. You must obey the GNU General Public License
* in all respects for all of the code used other than "OpenSSL". If
* you modify this file, you may extend this exception to your version
* of the file, but you are not obligated to do so. If you do not
* wish to do so, delete this exception statement from your version.
*/
#ifndef _CURL_SHIM_H_