remove redundant ERR_load_... declarations
[openssl.git] / crypto / bn / bn.h
index 50bc303a34990a0ae07c37fb63ba0dd2a247c996..d25b49c9d8df8676cabd60290d310275bda980ff 100644 (file)
@@ -89,8 +89,9 @@ extern "C" {
  * using "long long's", are 32bit, and are not using my assembler code. */
 #if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \
     defined(OPENSSL_SYS_WIN32) || defined(linux)
-#undef BN_DIV2W
-#define BN_DIV2W
+# ifndef BN_DIV2W
+#  define BN_DIV2W
+# endif
 #endif
 
 /* assuming long is 64bit - this is the DEC Alpha
@@ -238,18 +239,8 @@ typedef struct bignum_st
        int flags;
        } BIGNUM;
 
-/* Used for temp variables */
-#define BN_CTX_NUM     20
-#define BN_CTX_NUM_POS 12
-typedef struct bignum_ctx
-       {
-       int tos;
-       BIGNUM bn[BN_CTX_NUM];
-       int flags;
-       int depth;
-       int pos[BN_CTX_NUM_POS];
-       int too_many;
-       } BN_CTX;
+/* Used for temp variables (declaration hidden in bn_lcl.h) */
+typedef struct bignum_ctx BN_CTX;
 
 typedef struct bn_blinding_st
        {
@@ -331,6 +322,7 @@ void        BN_CTX_end(BN_CTX *ctx);
 int     BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
 int     BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
 int    BN_rand_range(BIGNUM *rnd, BIGNUM *range);
+int    BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range);
 int    BN_num_bits(const BIGNUM *a);
 int    BN_num_bits_word(BN_ULONG);
 BIGNUM *BN_new(void);
@@ -428,7 +420,6 @@ int BN_is_prime(const BIGNUM *p,int nchecks,
 int    BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
        void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg,
        int do_trial_division);
-void   ERR_load_BN_strings(void );
 
 BN_MONT_CTX *BN_MONT_CTX_new(void );
 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
@@ -503,6 +494,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom);
 /* 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.
  */
+void ERR_load_BN_strings(void);
 
 /* Error codes for the BN functions. */