From ef33b97050f8157234abe6d5f2da3da1cdda6d68 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 9 Jun 2000 10:41:35 +0000 Subject: Using checks of the existence of HEADER_{foo}_H in other header files was a really bad idea. For example, the following: #include #include #include would make sure that things like ASN1_UTCTIME_print() wasn't defined unless you moved the inclusion of bio.h to above the inclusion of x509.h. The reason is that x509.h includes asn1.h, and the declaration of ASN1_UTCTIME_print() depended on the definition of HEADER_BIO_H. That's what I call an obscure bug. Instead, this change makes sure that whatever header files are needed for the correct process of one header file are included automagically, and that the definitions of, for example, BIO-related things are dependent on the absence of the NO_{foo} macros. This is also consistent with the way parts of OpenSSL can be excluded at will. --- crypto/dsa/dsa.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crypto/dsa') diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h index ca301c5336..3ebcc4ae0a 100644 --- a/crypto/dsa/dsa.h +++ b/crypto/dsa/dsa.h @@ -69,6 +69,9 @@ #error DSA is disabled. #endif +#ifndef NO_BIO +#include +#endif #include #include #ifndef NO_DH @@ -188,7 +191,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp); int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); int i2d_DSAparams(DSA *a,unsigned char **pp); -#ifdef HEADER_BIO_H +#ifndef NO_BIO int DSAparams_print(BIO *bp, DSA *x); int DSA_print(BIO *bp, DSA *x, int off); #endif -- cgit v1.2.3