* 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:
David Shaw 2002-08-27 12:44:18 +00:00
parent b37812c2cd
commit 6cb18a86f5
2 changed files with 39 additions and 0 deletions

View File

@ -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>
* Makefile.am: May as well include gpgkeys_hkp.c in the

View File

@ -32,6 +32,10 @@
#include <stdlib.h>
#include "keyserver.h"
#ifdef __riscos__
#include "util.h"
#endif
#define GET 0
#define SEND 1
#define SEARCH 2
@ -49,6 +53,35 @@ struct keylist
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 sock=-1;