summaryrefslogtreecommitdiffstats
path: root/crypto/err
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-05-17 00:01:48 +0000
committerAndy Polyakov <appro@openssl.org>2005-05-17 00:01:48 +0000
commit25a66ee3cbb7b3f76b95cd4e4b6d4ce6f114ecf8 (patch)
tree48c94f2b982a9e3c1854825937c4d65e3a9d4de7 /crypto/err
parent0978dec13110c2ebc18b9e476a859389745c7596 (diff)
Move cryptlib.h prior bio.h. Actually it makes sense to include cryptlib.h
first everywhere in crypto and skip stdio.h and string.h [because it includes them].
Diffstat (limited to 'crypto/err')
-rw-r--r--crypto/err/err.c2
-rw-r--r--crypto/err/err_prn.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 549229bcfb..e084714383 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -112,9 +112,9 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
+#include "cryptlib.h"
#include <openssl/lhash.h>
#include <openssl/crypto.h>
-#include "cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/bio.h>
#include <openssl/err.h>
diff --git a/crypto/err/err_prn.c b/crypto/err/err_prn.c
index 81e34bd6ce..2224a901e5 100644
--- a/crypto/err/err_prn.c
+++ b/crypto/err/err_prn.c
@@ -57,9 +57,9 @@
*/
#include <stdio.h>
+#include "cryptlib.h"
#include <openssl/lhash.h>
#include <openssl/crypto.h>
-#include "cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/err.h>
@@ -86,7 +86,12 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
#ifndef OPENSSL_NO_FP_API
static int print_fp(const char *str, size_t len, void *fp)
{
- return fprintf((FILE *)fp, "%s", str);
+ BIO bio;
+
+ BIO_set(&bio,BIO_s_file());
+ BIO_set_fp(&bio,fp,BIO_NOCLOSE);
+
+ return BIO_printf(&bio, "%s", str);
}
void ERR_print_errors_fp(FILE *fp)
{