Fix WIN32 build by disabling bn* calls.
[openssl.git] / crypto / bn / bn_add.c
index 9405163706aae5dc8064780a2ce879fece80ccdf..caf35759152f0fbea4a540ea3f3c128a2da92a6e 100644 (file)
@@ -56,7 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
+#define OPENSSL_FIPSAPI
+
 #include "cryptlib.h"
 #include "bn_lcl.h"
 
@@ -105,7 +106,8 @@ int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
        {
        int max,min,dif;
-       BN_ULONG *ap,*bp,*rp,carry,t1,t2;
+       const BN_ULONG *ap,*bp;
+       BN_ULONG *rp,carry,t1,t2;
        const BIGNUM *tmp;
 
        bn_check_top(a);
@@ -166,11 +168,9 @@ int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
        {
        int max,min,dif;
-       register BN_ULONG t1,t2,*ap,*bp,*rp;
+       register BN_ULONG t1,t2,*rp;
+       register const BN_ULONG *ap,*bp;
        int i,carry;
-#if defined(IRIX_CC_BUG) && !defined(LINT)
-       int dummy;
-#endif
 
        bn_check_top(a);
        bn_check_top(b);
@@ -207,9 +207,6 @@ int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
                        carry=(t1 < t2);
                        t1=(t1-t2)&BN_MASK2;
                        }
-#if defined(IRIX_CC_BUG) && !defined(LINT)
-               dummy=t1;
-#endif
                *(rp++)=t1&BN_MASK2;
                }
 #else