HP-UX doesn't have hstrerror(), so make our own for that platform
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2092)
This commit is contained in:
parent
3c55aec6e9
commit
46766d0036
1 changed files with 24 additions and 0 deletions
|
@ -18,6 +18,30 @@
|
||||||
#include <internal/thread_once.h>
|
#include <internal/thread_once.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#ifdef _HPUX_SOURCE
|
||||||
|
static const char *ossl_hstrerror(int herr)
|
||||||
|
{
|
||||||
|
switch (herr) {
|
||||||
|
case -1:
|
||||||
|
return strerror(errno);
|
||||||
|
case 0:
|
||||||
|
return "No error";
|
||||||
|
case HOST_NOT_FOUND:
|
||||||
|
return "Host not found";
|
||||||
|
case NO_DATA: /* NO_ADDRESS is a synonym */
|
||||||
|
return "No data";
|
||||||
|
case NO_RECOVERY:
|
||||||
|
return "Non recoverable error";
|
||||||
|
case TRY_AGAIN:
|
||||||
|
return "Try again";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return "unknown error";
|
||||||
|
}
|
||||||
|
# define hstrerror(e) ossl_hstrerror(e)
|
||||||
|
#endif
|
||||||
|
|
||||||
CRYPTO_RWLOCK *bio_lookup_lock;
|
CRYPTO_RWLOCK *bio_lookup_lock;
|
||||||
static CRYPTO_ONCE bio_lookup_init = CRYPTO_ONCE_STATIC_INIT;
|
static CRYPTO_ONCE bio_lookup_init = CRYPTO_ONCE_STATIC_INIT;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue