From 89918b5c174bb80777aaac52262447dbd388ac49 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 2 Aug 2002 11:14:36 +0000 Subject: [PATCH] Certain flag macros were tested with #if instead if #ifdef... --- crypto/bio/b_print.c | 2 +- crypto/cryptlib.h | 1 - crypto/crypto.h | 3 +++ crypto/engine/hw_ubsec.c | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index 90011db544..fa4e350a7f 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -109,7 +109,7 @@ * o ... (for OpenSSL) */ -#if HAVE_LONG_DOUBLE +#ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else #define LDOUBLE double diff --git a/crypto/cryptlib.h b/crypto/cryptlib.h index 576cbd6e35..815c115bfa 100644 --- a/crypto/cryptlib.h +++ b/crypto/cryptlib.h @@ -94,7 +94,6 @@ extern "C" { #define HEX_SIZE(type) ((sizeof(type)*2) /* die if we have to */ -void OpenSSLDie(const char *file,int line,const char *assertion); #define die(e) ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e)) #ifdef __cplusplus diff --git a/crypto/crypto.h b/crypto/crypto.h index d8258fcc79..dadd0e6430 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -382,6 +382,9 @@ void CRYPTO_mem_leaks(struct bio_st *bio); /* unsigned long order, char *file, int line, int num_bytes, char *addr */ void CRYPTO_mem_leaks_cb(void (*cb)(unsigned long, const char *, int, int, void *)); +/* A helper routine to use when something went really bad. */ +void OpenSSLDie(const char *file,int line,const char *assertion); + /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. diff --git a/crypto/engine/hw_ubsec.c b/crypto/engine/hw_ubsec.c index 0f7e08c5cb..40bdd7de5e 100644 --- a/crypto/engine/hw_ubsec.c +++ b/crypto/engine/hw_ubsec.c @@ -92,7 +92,7 @@ static int ubsec_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa); static int ubsec_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); #ifndef OPENSSL_NO_DSA -#if NOT_USED +#ifdef NOT_USED static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); @@ -112,7 +112,7 @@ static int ubsec_dh_compute_key(unsigned char *key,BIGNUM *pub_key,DH *dh); static int ubsec_dh_generate_key(DH *dh); #endif -#if NOT_USED +#ifdef NOT_USED static int ubsec_rand_bytes(unsigned char *buf, int num); static int ubsec_rand_status(void); #endif @@ -657,7 +657,7 @@ err: #endif #ifndef OPENSSL_NO_DSA -#if NOT_USED +#ifdef NOT_USED static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) -- 2.25.1