mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
* gpgkeys_hkp.c: Include util.h on RISC OS as per Stefan. Include a
replacement for hstrerror() for those platforms (such as RISC OS) that don't have it.
This commit is contained in:
parent
b37812c2cd
commit
6cb18a86f5
@ -1,3 +1,9 @@
|
|||||||
|
2002-08-27 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* gpgkeys_hkp.c: Include util.h on RISC OS as per Stefan. Include
|
||||||
|
a replacement for hstrerror() for those platforms (such as RISC
|
||||||
|
OS) that don't have it.
|
||||||
|
|
||||||
2002-08-26 David Shaw <dshaw@jabberwocky.com>
|
2002-08-26 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* Makefile.am: May as well include gpgkeys_hkp.c in the
|
* Makefile.am: May as well include gpgkeys_hkp.c in the
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "keyserver.h"
|
#include "keyserver.h"
|
||||||
|
|
||||||
|
#ifdef __riscos__
|
||||||
|
#include "util.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GET 0
|
#define GET 0
|
||||||
#define SEND 1
|
#define SEND 1
|
||||||
#define SEARCH 2
|
#define SEARCH 2
|
||||||
@ -49,6 +53,35 @@ struct keylist
|
|||||||
struct keylist *next;
|
struct keylist *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef HAVE_HSTRERROR
|
||||||
|
const char *hstrerror(int err)
|
||||||
|
{
|
||||||
|
if(err<0)
|
||||||
|
return "Resolver internal error";
|
||||||
|
|
||||||
|
switch(err)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
return "Resolver Error 0 (no error)";
|
||||||
|
|
||||||
|
case HOST_NOT_FOUND:
|
||||||
|
return "Unknown host"; /* 1 HOST_NOT_FOUND */
|
||||||
|
|
||||||
|
case TRY_AGAIN:
|
||||||
|
return "Host name lookup failure"; /* 2 TRY_AGAIN */
|
||||||
|
|
||||||
|
case NO_RECOVERY:
|
||||||
|
return "Unknown server error"; /* 3 NO_RECOVERY */
|
||||||
|
|
||||||
|
case NO_ADDRESS:
|
||||||
|
return "No address associated with name"; /* 4 NO_ADDRESS */
|
||||||
|
|
||||||
|
default:
|
||||||
|
return "Unknown resolver error";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* !HAVE_HSTRERROR */
|
||||||
|
|
||||||
int http_connect(const char *http_host,unsigned short port)
|
int http_connect(const char *http_host,unsigned short port)
|
||||||
{
|
{
|
||||||
int sock=-1;
|
int sock=-1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user