From 9d6ae5462247cf6c5ce043e4689c3e5210628e93 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 13 Sep 2017 10:14:31 +0000 Subject: Make mp_get_long and mp_set_long available to tommath-enabled Tcl extensions. Deprecate the internal TclBNInitBignumFrom* functions, in favor of the official tommath functions with the same purpose. --- generic/tclBasic.c | 4 +- generic/tclBinary.c | 2 +- generic/tclDecls.h | 9 +++++ generic/tclExecute.c | 6 +-- generic/tclInt.h | 4 ++ generic/tclObj.c | 6 +-- generic/tclStrToD.c | 32 ++++++++-------- generic/tclStubInit.c | 6 +++ generic/tclTomMath.decls | 12 ++++-- generic/tclTomMathDecls.h | 17 ++++++--- generic/tclTomMathInterface.c | 89 +++++++++++-------------------------------- unix/Makefile.in | 12 +++++- win/Makefile.in | 2 + win/makefile.vc | 2 + 14 files changed, 100 insertions(+), 103 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cceef45..d4fa833 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -7460,7 +7460,7 @@ ExprAbsFunc( } goto unChanged; } else if (l == LONG_MIN) { - TclBNInitBignumFromLong(&big, l); + TclInitBignumFromLong(&big, l); goto tooLarge; } Tcl_SetObjResult(interp, Tcl_NewLongObj(-l)); @@ -7495,7 +7495,7 @@ ExprAbsFunc( goto unChanged; } if (w == LLONG_MIN) { - TclBNInitBignumFromWideInt(&big, w); + TclInitBignumFromWideInt(&big, w); goto tooLarge; } Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-w)); diff --git a/generic/tclBinary.c b/generic/tclBinary.c index a693894..cb5a5cb 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -2284,7 +2284,7 @@ ScanNumber( Tcl_Obj *bigObj = NULL; mp_int big; - TclBNInitBignumFromWideUInt(&big, uwvalue); + TclInitBignumFromWideUInt(&big, uwvalue); bigObj = Tcl_NewBignumObj(&big); return bigObj; } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index d543238..464fc0f 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -23,6 +23,15 @@ # endif #endif +#if !defined(BUILD_tcl) +# define TCL_DEPRECATED(msg) EXTERN TCL_DEPRECATED_API(msg) +#elif defined(TCL_NO_DEPRECATED) +# define TCL_DEPRECATED(msg) MODULE_SCOPE +#else +# define TCL_DEPRECATED(msg) EXTERN +#endif + + /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0113b28..f4c71ec 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -8218,7 +8218,7 @@ ExecuteExtendedBinaryMathOp( * Arguments are opposite sign; remainder is sum. */ - TclBNInitBignumFromWideInt(&big1, w1); + TclInitBignumFromWideInt(&big1, w1); mp_add(&big2, &big1, &big2); mp_clear(&big1); BIG_RESULT(&big2); @@ -9184,7 +9184,7 @@ ExecuteExtendedUnaryMathOp( if (w != LLONG_MIN) { WIDE_RESULT(-w); } - TclBNInitBignumFromLong(&big, *(const long *) ptr); + TclInitBignumFromLong(&big, *(const long *) ptr); break; #ifndef TCL_WIDE_INT_IS_LONG case TCL_NUMBER_WIDE: @@ -9192,7 +9192,7 @@ ExecuteExtendedUnaryMathOp( if (w != LLONG_MIN) { WIDE_RESULT(-w); } - TclBNInitBignumFromWideInt(&big, w); + TclInitBignumFromWideInt(&big, w); break; #endif default: diff --git a/generic/tclInt.h b/generic/tclInt.h index 118af85..9a657de 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2757,6 +2757,10 @@ MODULE_SCOPE long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS]; MODULE_SCOPE char tclEmptyString; +MODULE_SCOPE void TclInitBignumFromLong(mp_int *, long); +MODULE_SCOPE void TclInitBignumFromWideInt(mp_int *, Tcl_WideInt); +MODULE_SCOPE void TclInitBignumFromWideUInt(mp_int *, Tcl_WideUInt); + /* *---------------------------------------------------------------- * Procedures shared among Tcl modules but not used by the outside world, diff --git a/generic/tclObj.c b/generic/tclObj.c index f4b81f2..1a00011 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3038,7 +3038,7 @@ Tcl_SetWideIntObj( #else mp_int big; - TclBNInitBignumFromWideInt(&big, wideValue); + TclInitBignumFromWideInt(&big, wideValue); Tcl_SetBignumObj(objPtr, &big); #endif } @@ -3402,12 +3402,12 @@ GetBignumFromObj( return TCL_OK; } if (objPtr->typePtr == &tclIntType) { - TclBNInitBignumFromLong(bignumValue, objPtr->internalRep.longValue); + TclInitBignumFromLong(bignumValue, objPtr->internalRep.longValue); return TCL_OK; } #ifndef TCL_WIDE_INT_IS_LONG if (objPtr->typePtr == &tclWideIntType) { - TclBNInitBignumFromWideInt(bignumValue, + TclInitBignumFromWideInt(bignumValue, objPtr->internalRep.wideValue); return TCL_OK; } diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 539a92c..630e498 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -711,7 +711,7 @@ TclParseNumber( || (octalSignificandWide > (~(Tcl_WideUInt)0 >> shift)))) { octalSignificandOverflow = 1; - TclBNInitBignumFromWideUInt(&octalSignificandBig, + TclInitBignumFromWideUInt(&octalSignificandBig, octalSignificandWide); } } @@ -828,7 +828,7 @@ TclParseNumber( ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || significandWide > (~(Tcl_WideUInt)0 >> shift))) { significandOverflow = 1; - TclBNInitBignumFromWideUInt(&significandBig, + TclInitBignumFromWideUInt(&significandBig, significandWide); } } @@ -869,7 +869,7 @@ TclParseNumber( ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || significandWide > (~(Tcl_WideUInt)0 >> shift))) { significandOverflow = 1; - TclBNInitBignumFromWideUInt(&significandBig, + TclInitBignumFromWideUInt(&significandBig, significandWide); } } @@ -1214,7 +1214,7 @@ TclParseNumber( ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || significandWide > (MOST_BITS + signum) >> shift)) { significandOverflow = 1; - TclBNInitBignumFromWideUInt(&significandBig, significandWide); + TclInitBignumFromWideUInt(&significandBig, significandWide); } if (shift) { if (!significandOverflow) { @@ -1235,7 +1235,7 @@ TclParseNumber( ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || significandWide > (MOST_BITS + signum) >> shift)) { significandOverflow = 1; - TclBNInitBignumFromWideUInt(&significandBig, significandWide); + TclInitBignumFromWideUInt(&significandBig, significandWide); } if (shift) { if (!significandOverflow) { @@ -1256,7 +1256,7 @@ TclParseNumber( ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) || octalSignificandWide > (MOST_BITS + signum) >> shift)) { octalSignificandOverflow = 1; - TclBNInitBignumFromWideUInt(&octalSignificandBig, + TclInitBignumFromWideUInt(&octalSignificandBig, octalSignificandWide); } if (shift) { @@ -1283,7 +1283,7 @@ TclParseNumber( break; } #endif - TclBNInitBignumFromWideUInt(&octalSignificandBig, + TclInitBignumFromWideUInt(&octalSignificandBig, octalSignificandWide); octalSignificandOverflow = 1; } else { @@ -1311,7 +1311,7 @@ TclParseNumber( &significandWide, &significandBig, significandOverflow); if (!significandOverflow && (significandWide > MOST_BITS+signum)){ significandOverflow = 1; - TclBNInitBignumFromWideUInt(&significandBig, significandWide); + TclInitBignumFromWideUInt(&significandBig, significandWide); } returnInteger: if (!significandOverflow) { @@ -1330,7 +1330,7 @@ TclParseNumber( break; } #endif - TclBNInitBignumFromWideUInt(&significandBig, + TclInitBignumFromWideUInt(&significandBig, significandWide); significandOverflow = 1; } else { @@ -1485,7 +1485,7 @@ AccumulateDecimalDigit( * bignum and fall through into the bignum case. */ - TclBNInitBignumFromWideUInt(bignumRepPtr, w); + TclInitBignumFromWideUInt(bignumRepPtr, w); } else { /* * Wide multiplication. @@ -1628,7 +1628,7 @@ MakeLowPrecisionDouble( * call MakeHighPrecisionDouble to do it the hard way. */ - TclBNInitBignumFromWideUInt(&significandBig, significand); + TclInitBignumFromWideUInt(&significandBig, significand); retval = MakeHighPrecisionDouble(0, &significandBig, numSigDigs, exponent); mp_clear(&significandBig); @@ -3315,7 +3315,7 @@ ShorteningBignumConversionPowD( * mminus = 5**m5 */ - TclBNInitBignumFromWideUInt(&b, bw); + TclInitBignumFromWideUInt(&b, bw); mp_init_set_int(&mminus, 1); MulPow5(&b, b5, &b); mp_mul_2d(&b, b2, &b); @@ -3502,7 +3502,7 @@ StrictBignumConversionPowD( * b = bw * 2**b2 * 5**b5 */ - TclBNInitBignumFromWideUInt(&b, bw); + TclInitBignumFromWideUInt(&b, bw); MulPow5(&b, b5, &b); mp_mul_2d(&b, b2, &b); @@ -3710,7 +3710,7 @@ ShorteningBignumConversion( * S = 2**s2 * 5*s5 */ - TclBNInitBignumFromWideUInt(&b, bw); + TclInitBignumFromWideUInt(&b, bw); mp_mul_2d(&b, b2, &b); mp_init_set_int(&S, 1); MulPow5(&S, s5, &S); mp_mul_2d(&S, s2, &S); @@ -3923,7 +3923,7 @@ StrictBignumConversion( */ mp_init_multi(&temp, &dig, NULL); - TclBNInitBignumFromWideUInt(&b, bw); + TclInitBignumFromWideUInt(&b, bw); mp_mul_2d(&b, b2, &b); mp_init_set_int(&S, 1); MulPow5(&S, s5, &S); mp_mul_2d(&S, s2, &S); @@ -4579,7 +4579,7 @@ Tcl_InitBignumFromDouble( Tcl_WideInt w = (Tcl_WideInt) ldexp(fract, mantBits); int shift = expt - mantBits; - TclBNInitBignumFromWideInt(b, w); + TclInitBignumFromWideInt(b, w); if (shift < 0) { mp_div_2d(b, -shift, b, NULL); } else if (shift > 0) { diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index a2f1ed3..2845441 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -69,6 +69,9 @@ static int TclSockMinimumBuffersOld(int sock, int size) # define TclWinGetSockOpt 0 # define TclWinSetSockOpt 0 # define TclWinNToHS 0 +# define TclBNInitBignumFromWideUInt 0 +# define TclBNInitBignumFromWideInt 0 +# define TclBNInitBignumFromLong 0 #else #define TclSetStartupScriptPath setStartupScriptPath static void TclSetStartupScriptPath(Tcl_Obj *path) @@ -103,6 +106,9 @@ static unsigned short TclWinNToHS(unsigned short ns) { return ntohs(ns); } #endif +# define TclBNInitBignumFromWideUInt TclInitBignumFromWideUInt +# define TclBNInitBignumFromWideInt TclInitBignumFromWideInt +# define TclBNInitBignumFromLong TclInitBignumFromLong #endif /* TCL_NO_DEPRECATED */ #ifdef _WIN32 diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls index 5d1c8e8..d628cfe 100644 --- a/generic/tclTomMath.decls +++ b/generic/tclTomMath.decls @@ -223,13 +223,13 @@ declare 63 { # Formerly internal API to allow initialisation of bignums without knowing the # typedefs of how a bignum works internally. -declare 64 { +declare 64 {deprecated {Use mp_init() + mp_set_long_long()}} { void TclBNInitBignumFromLong(mp_int *bignum, long initVal) } -declare 65 { +declare 65 {deprecated {Use mp_init() + mp_set_long_long()}} { void TclBNInitBignumFromWideInt(mp_int *bignum, Tcl_WideInt initVal) } -declare 66 { +declare 66 {deprecated {Use mp_init() + mp_set_long_long()}} { void TclBNInitBignumFromWideUInt(mp_int *bignum, Tcl_WideUInt initVal) } @@ -244,6 +244,12 @@ declare 68 { declare 69 { Tcl_WideUInt TclBN_mp_get_long_long(const mp_int *a) } +declare 70 { + int TclBN_mp_set_long(mp_int *a, unsigned long i) +} +declare 71 { + unsigned long TclBN_mp_get_long(const mp_int *a) +} # Local Variables: # mode: tcl diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 9d683dc..03f383f 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -75,6 +75,7 @@ #define mp_expt_d TclBN_mp_expt_d #define mp_expt_d_ex TclBN_mp_expt_d_ex #define mp_get_int TclBN_mp_get_int +#define mp_get_long TclBN_mp_get_long #define mp_get_long_long TclBN_mp_get_long_long #define mp_grow TclBN_mp_grow #define mp_init TclBN_mp_init @@ -100,6 +101,7 @@ #define mp_s_rmap TclBNMpSRmap #define mp_set TclBN_mp_set #define mp_set_int TclBN_mp_set_int +#define mp_set_long TclBN_mp_set_long #define mp_set_long_long TclBN_mp_set_long_long #define mp_shrink TclBN_mp_shrink #define mp_sqr TclBN_mp_sqr @@ -298,12 +300,15 @@ EXTERN int TclBN_mp_set_int(mp_int *a, unsigned long i); /* 63 */ EXTERN int TclBN_mp_cnt_lsb(const mp_int *a); /* 64 */ -EXTERN void TclBNInitBignumFromLong(mp_int *bignum, long initVal); +TCL_DEPRECATED("Use mp_init() + mp_set_long() or mp_set_long_long()") +void TclBNInitBignumFromLong(mp_int *bignum, long initVal); /* 65 */ -EXTERN void TclBNInitBignumFromWideInt(mp_int *bignum, +TCL_DEPRECATED("Use mp_init() + mp_set_long_long()") +void TclBNInitBignumFromWideInt(mp_int *bignum, Tcl_WideInt initVal); /* 66 */ -EXTERN void TclBNInitBignumFromWideUInt(mp_int *bignum, +TCL_DEPRECATED("Use mp_init() + mp_set_long_long()") +void TclBNInitBignumFromWideUInt(mp_int *bignum, Tcl_WideUInt initVal); /* 67 */ EXTERN int TclBN_mp_expt_d_ex(const mp_int *a, mp_digit b, @@ -381,9 +386,9 @@ typedef struct TclTomMathStubs { int (*tclBN_mp_init_set_int) (mp_int *a, unsigned long i); /* 61 */ int (*tclBN_mp_set_int) (mp_int *a, unsigned long i); /* 62 */ int (*tclBN_mp_cnt_lsb) (const mp_int *a); /* 63 */ - void (*tclBNInitBignumFromLong) (mp_int *bignum, long initVal); /* 64 */ - void (*tclBNInitBignumFromWideInt) (mp_int *bignum, Tcl_WideInt initVal); /* 65 */ - void (*tclBNInitBignumFromWideUInt) (mp_int *bignum, Tcl_WideUInt initVal); /* 66 */ + TCL_DEPRECATED_API("Use mp_init() + mp_set_long() or mp_set_long_long()") void (*tclBNInitBignumFromLong) (mp_int *bignum, long initVal); /* 64 */ + TCL_DEPRECATED_API("Use mp_init() + mp_set_long_long()") void (*tclBNInitBignumFromWideInt) (mp_int *bignum, Tcl_WideInt initVal); /* 65 */ + TCL_DEPRECATED_API("Use mp_init() + mp_set_long_long()") void (*tclBNInitBignumFromWideUInt) (mp_int *bignum, Tcl_WideUInt initVal); /* 66 */ int (*tclBN_mp_expt_d_ex) (const mp_int *a, mp_digit b, mp_int *c, int fast); /* 67 */ int (*tclBN_mp_set_long_long) (mp_int *a, Tcl_WideUInt i); /* 68 */ Tcl_WideUInt (*tclBN_mp_get_long_long) (const mp_int *a); /* 69 */ diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index 48db8c3..78888a7 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -168,7 +168,7 @@ TclBNFree( /* *---------------------------------------------------------------------- * - * TclBNInitBignumFromLong -- + * TclInitBignumFromLong -- * * Allocate and initialize a 'bignum' from a native 'long'. * @@ -181,47 +181,20 @@ TclBNFree( *---------------------------------------------------------------------- */ -extern void -TclBNInitBignumFromLong( +void +TclInitBignumFromLong( mp_int *a, - long initVal) + long v) { - int status; - unsigned long v; - mp_digit *p; - - /* - * Allocate enough memory to hold the largest possible long - */ - - status = mp_init_size(a, - (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT); - if (status != MP_OKAY) { + if (mp_init_size(a, (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT) != MP_OKAY) { Tcl_Panic("initialization failure in TclBNInitBignumFromLong"); } - - /* - * Convert arg to sign and magnitude. - */ - - if (initVal < 0) { - a->sign = MP_NEG; - v = -initVal; + if (v < (long)0) { + mp_set_long_long(a, (Tcl_WideUInt)(-(Tcl_WideInt)v)); + mp_neg(a, a); } else { - a->sign = MP_ZPOS; - v = initVal; - } - - /* - * Store the magnitude in the bignum. - */ - - p = a->dp; - while (v) { - *p++ = (mp_digit) (v & MP_MASK); - v >>= MP_DIGIT_BIT; + mp_set_long_long(a, (Tcl_WideUInt)v); } - a->used = p - a->dp; } /* @@ -240,16 +213,19 @@ TclBNInitBignumFromLong( *---------------------------------------------------------------------- */ -extern void -TclBNInitBignumFromWideInt( +void +TclInitBignumFromWideInt( mp_int *a, /* Bignum to initialize */ Tcl_WideInt v) /* Initial value */ { + if (mp_init_size(a, (CHAR_BIT * sizeof(Tcl_WideUInt) + DIGIT_BIT - 1) / DIGIT_BIT) != MP_OKAY) { + Tcl_Panic("initialization failure in TclBNInitBignumFromWideInt"); + } if (v < (Tcl_WideInt)0) { - TclBNInitBignumFromWideUInt(a, (Tcl_WideUInt)(-v)); + mp_set_long_long(a, (Tcl_WideUInt)(-v)); mp_neg(a, a); } else { - TclBNInitBignumFromWideUInt(a, (Tcl_WideUInt)v); + mp_set_long_long(a, (Tcl_WideUInt)v); } } @@ -269,36 +245,15 @@ TclBNInitBignumFromWideInt( *---------------------------------------------------------------------- */ -extern void -TclBNInitBignumFromWideUInt( +void +TclInitBignumFromWideUInt( mp_int *a, /* Bignum to initialize */ Tcl_WideUInt v) /* Initial value */ { - int status; - mp_digit *p; - - /* - * Allocate enough memory to hold the largest possible Tcl_WideUInt. - */ - - status = mp_init_size(a, - (CHAR_BIT * sizeof(Tcl_WideUInt) + DIGIT_BIT - 1) / DIGIT_BIT); - if (status != MP_OKAY) { - Tcl_Panic("initialization failure in TclBNInitBignumFromWideUInt"); - } - - a->sign = MP_ZPOS; - - /* - * Store the magnitude in the bignum. - */ - - p = a->dp; - while (v) { - *p++ = (mp_digit) (v & MP_MASK); - v >>= MP_DIGIT_BIT; - } - a->used = p - a->dp; + if (mp_init_size(a, (CHAR_BIT * sizeof(Tcl_WideUInt) + DIGIT_BIT - 1) / DIGIT_BIT) != MP_OKAY) { + Tcl_Panic("initialization failure in TclBNInitBignumFromWideUInt"); + } + mp_set_long_long(a, v); } /* diff --git a/unix/Makefile.in b/unix/Makefile.in index 2f97bf5..c31d128 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -320,7 +320,7 @@ TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \ bn_mp_cnt_lsb.o bn_mp_copy.o \ bn_mp_count_bits.o bn_mp_div.o bn_mp_div_d.o bn_mp_div_2.o \ bn_mp_div_2d.o bn_mp_div_3.o \ - bn_mp_exch.o bn_mp_expt_d.o bn_mp_expt_d_ex.o bn_mp_get_int.o bn_mp_get_long_long.o bn_mp_grow.o bn_mp_init.o \ + bn_mp_exch.o bn_mp_expt_d.o bn_mp_expt_d_ex.o bn_mp_get_int.o bn_mp_get_long.o bn_mp_get_long_long.o bn_mp_grow.o bn_mp_init.o \ bn_mp_init_copy.o bn_mp_init_multi.o bn_mp_init_set.o \ bn_mp_init_set_int.o bn_mp_init_size.o bn_mp_karatsuba_mul.o \ bn_mp_karatsuba_sqr.o \ @@ -328,7 +328,7 @@ TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \ bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_neg.o bn_mp_or.o \ bn_mp_radix_size.o bn_mp_radix_smap.o \ bn_mp_read_radix.o bn_mp_rshd.o bn_mp_set.o bn_mp_set_int.o \ - bn_mp_set_long_long.o bn_mp_shrink.o \ + bn_mp_set_long.o bn_mp_set_long_long.o bn_mp_shrink.o \ bn_mp_sqr.o bn_mp_sqrt.o bn_mp_sub.o bn_mp_sub_d.o \ bn_mp_to_unsigned_bin.o bn_mp_to_unsigned_bin_n.o \ bn_mp_toom_mul.o bn_mp_toom_sqr.o bn_mp_toradix_n.o \ @@ -505,6 +505,7 @@ TOMMATH_SRCS = \ $(TOMMATH_DIR)/bn_mp_expt_d.c \ $(TOMMATH_DIR)/bn_mp_expt_d_ex.c \ $(TOMMATH_DIR)/bn_mp_get_int.c \ + $(TOMMATH_DIR)/bn_mp_get_long.c \ $(TOMMATH_DIR)/bn_mp_get_long_long.c \ $(TOMMATH_DIR)/bn_mp_grow.c \ $(TOMMATH_DIR)/bn_mp_init.c \ @@ -530,6 +531,7 @@ TOMMATH_SRCS = \ $(TOMMATH_DIR)/bn_mp_rshd.c \ $(TOMMATH_DIR)/bn_mp_set.c \ $(TOMMATH_DIR)/bn_mp_set_int.c \ + $(TOMMATH_DIR)/bn_mp_set_long.c \ $(TOMMATH_DIR)/bn_mp_set_long_long.c \ $(TOMMATH_DIR)/bn_mp_shrink.c \ $(TOMMATH_DIR)/bn_mp_sqr.c \ @@ -1432,6 +1434,9 @@ bn_mp_expt_d_ex.o: $(TOMMATH_DIR)/bn_mp_expt_d_ex.c $(MATHHDRS) bn_mp_get_int.o: $(TOMMATH_DIR)/bn_mp_get_int.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_get_int.c +bn_mp_get_long.o: $(TOMMATH_DIR)/bn_mp_get_long.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_get_long.c + bn_mp_get_long_long.o: $(TOMMATH_DIR)/bn_mp_get_long_long.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_get_long_long.c @@ -1507,6 +1512,9 @@ bn_mp_set.o: $(TOMMATH_DIR)/bn_mp_set.c $(MATHHDRS) bn_mp_set_int.o: $(TOMMATH_DIR)/bn_mp_set_int.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_set_int.c +bn_mp_set_long.o: $(TOMMATH_DIR)/bn_mp_set_long.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_set_long.c + bn_mp_set_long_long.o: $(TOMMATH_DIR)/bn_mp_set_long_long.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_set_long_long.c diff --git a/win/Makefile.in b/win/Makefile.in index 4a0f839..a3275ba 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -330,6 +330,7 @@ TOMMATH_OBJS = \ bn_mp_expt_d.${OBJEXT} \ bn_mp_expt_d_ex.${OBJEXT} \ bn_mp_get_int.${OBJEXT} \ + bn_mp_get_long.${OBJEXT} \ bn_mp_get_long_long.${OBJEXT} \ bn_mp_grow.${OBJEXT} \ bn_mp_init.${OBJEXT} \ @@ -355,6 +356,7 @@ TOMMATH_OBJS = \ bn_mp_rshd.${OBJEXT} \ bn_mp_set.${OBJEXT} \ bn_mp_set_int.${OBJEXT} \ + bn_mp_set_long.${OBJEXT} \ bn_mp_set_long_long.${OBJEXT} \ bn_mp_shrink.${OBJEXT} \ bn_mp_sqr.${OBJEXT} \ diff --git a/win/makefile.vc b/win/makefile.vc index ca8cc08..2bff871 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -385,6 +385,7 @@ TOMMATHOBJS = \ $(TMP_DIR)\bn_mp_expt_d.obj \ $(TMP_DIR)\bn_mp_expt_d_ex.obj \ $(TMP_DIR)\bn_mp_get_int.obj \ + $(TMP_DIR)\bn_mp_get_long.obj \ $(TMP_DIR)\bn_mp_get_long_long.obj \ $(TMP_DIR)\bn_mp_grow.obj \ $(TMP_DIR)\bn_mp_init.obj \ @@ -410,6 +411,7 @@ TOMMATHOBJS = \ $(TMP_DIR)\bn_mp_rshd.obj \ $(TMP_DIR)\bn_mp_set.obj \ $(TMP_DIR)\bn_mp_set_int.obj \ + $(TMP_DIR)\bn_mp_set_long.obj \ $(TMP_DIR)\bn_mp_set_long_long.obj \ $(TMP_DIR)\bn_mp_shrink.obj \ $(TMP_DIR)\bn_mp_sqr.obj \ -- cgit v0.12