From: Dr. Stephen Henson Date: Tue, 25 Jan 2011 17:10:42 +0000 (+0000) Subject: Move BN_options function to bn_print.c to remove dependency for BIO printf X-Git-Tag: OpenSSL_1_0_1-beta1~381 X-Git-Url: https://git.openssl.org/gitweb/?a=commitdiff_plain;h=d5654d2b208245f0d45bd150774fdb5efd3fc05e;p=openssl.git Move BN_options function to bn_print.c to remove dependency for BIO printf routines from bn_lib.c --- diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 5470fbe6ef..7a5676de69 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -139,25 +139,6 @@ const BIGNUM *BN_value_one(void) return(&const_one); } -char *BN_options(void) - { - static int init=0; - static char data[16]; - - if (!init) - { - init++; -#ifdef BN_LLONG - BIO_snprintf(data,sizeof data,"bn(%d,%d)", - (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); -#else - BIO_snprintf(data,sizeof data,"bn(%d,%d)", - (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); -#endif - } - return(data); - } - int BN_num_bits_word(BN_ULONG l) { static const unsigned char bits[256]={ diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index bebb466d08..1743b6a7e2 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -357,3 +357,22 @@ end: return(ret); } #endif + +char *BN_options(void) + { + static int init=0; + static char data[16]; + + if (!init) + { + init++; +#ifdef BN_LLONG + BIO_snprintf(data,sizeof data,"bn(%d,%d)", + (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); +#else + BIO_snprintf(data,sizeof data,"bn(%d,%d)", + (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); +#endif + } + return(data); + }