diff options
Diffstat (limited to 'crypto/openssl/apps/errstr.c')
-rw-r--r-- | crypto/openssl/apps/errstr.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/crypto/openssl/apps/errstr.c b/crypto/openssl/apps/errstr.c index 4650379..e392328 100644 --- a/crypto/openssl/apps/errstr.c +++ b/crypto/openssl/apps/errstr.c @@ -91,12 +91,18 @@ int MAIN(int argc, char **argv) out=BIO_new(BIO_s_file()); if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE)) { +#ifdef VMS + { + BIO *tmpbio = BIO_new(BIO_f_linebuffer()); + out = BIO_push(tmpbio, out); + } +#endif lh_node_stats_bio((LHASH *)ERR_get_string_table(),out); lh_stats_bio((LHASH *)ERR_get_string_table(),out); lh_node_usage_stats_bio((LHASH *) ERR_get_string_table(),out); } - if (out != NULL) BIO_free(out); + if (out != NULL) BIO_free_all(out); argc--; argv++; } @@ -104,7 +110,10 @@ int MAIN(int argc, char **argv) for (i=1; i<argc; i++) { if (sscanf(argv[i],"%lx",&l)) - printf("%s\n",ERR_error_string(l,buf)); + { + ERR_error_string_n(l, buf, sizeof buf); + printf("%s\n",buf); + } else { printf("%s: bad error code\n",argv[i]); |