From 84ba8445cffe866c2d8621868276194a9940bcff Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 10 Nov 2009 17:14:53 +0000 Subject: [PATCH] changed includes for tommath to point into the libtorrent directory --- ChangeLog | 1 + include/libtorrent/tommath.h | 2 +- include/libtorrent/tommath_class.h | 4 +- include/libtorrent/tommath_superclass.h | 2 + src/mpi.c | 238 ++++++++++++------------ src/pe_crypto.cpp | 2 +- 6 files changed, 126 insertions(+), 123 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a5224b44..f91f69344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * added support for i2p torrents * cleaned up usage of MAX_PATH and related macros * made it possible to build libtorrent without RTTI support + * added support to build with libgcrypt and a shipped version of libtommath 0.15 release diff --git a/include/libtorrent/tommath.h b/include/libtorrent/tommath.h index 3c00b9e13..1accb0011 100644 --- a/include/libtorrent/tommath.h +++ b/include/libtorrent/tommath.h @@ -21,7 +21,7 @@ #include #include -#include +#include "libtorrent/tommath_class.h" #ifndef MIN #define MIN(x,y) ((x)<(y)?(x):(y)) diff --git a/include/libtorrent/tommath_class.h b/include/libtorrent/tommath_class.h index 7969ef38f..af50ecf06 100644 --- a/include/libtorrent/tommath_class.h +++ b/include/libtorrent/tommath_class.h @@ -989,8 +989,8 @@ #ifdef LTM3 #define LTM_LAST #endif -#include -#include +#include "libtorrent/tommath_superclass.h" +#include "libtorrent/tommath_class.h" #else #define LTM_LAST #endif diff --git a/include/libtorrent/tommath_superclass.h b/include/libtorrent/tommath_superclass.h index 8d3740380..641d5b183 100644 --- a/include/libtorrent/tommath_superclass.h +++ b/include/libtorrent/tommath_superclass.h @@ -2,6 +2,8 @@ /* default ... include all MPI */ //#define LTM_ALL + +// these are the only functions used by libtorrent #define BN_MP_EXPTMOD_C #define BN_MP_UNSIGNED_BIN_SIZE_C #define BN_MP_TO_UNSIGNED_BIN_C diff --git a/src/mpi.c b/src/mpi.c index e2cd4ce76..e6d8b386c 100644 --- a/src/mpi.c +++ b/src/mpi.c @@ -1,5 +1,5 @@ /* Start: bn_error.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_ERROR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -50,7 +50,7 @@ char *mp_error_to_string(int code) /* End: bn_error.c */ /* Start: bn_fast_mp_invmod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_FAST_MP_INVMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -202,7 +202,7 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &B, &D, NULL); /* End: bn_fast_mp_invmod.c */ /* Start: bn_fast_mp_montgomery_reduce.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_FAST_MP_MONTGOMERY_REDUCE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -378,7 +378,7 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) /* End: bn_fast_mp_montgomery_reduce.c */ /* Start: bn_fast_s_mp_mul_digs.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_FAST_S_MP_MUL_DIGS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -489,7 +489,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) /* End: bn_fast_s_mp_mul_digs.c */ /* Start: bn_fast_s_mp_mul_high_digs.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_FAST_S_MP_MUL_HIGH_DIGS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -591,7 +591,7 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) /* End: bn_fast_s_mp_mul_high_digs.c */ /* Start: bn_fast_s_mp_sqr.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_FAST_S_MP_SQR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -709,7 +709,7 @@ int fast_s_mp_sqr (mp_int * a, mp_int * b) /* End: bn_fast_s_mp_sqr.c */ /* Start: bn_mp_2expt.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_2EXPT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -761,7 +761,7 @@ mp_2expt (mp_int * a, int b) /* End: bn_mp_2expt.c */ /* Start: bn_mp_abs.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_ABS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -808,7 +808,7 @@ mp_abs (mp_int * a, mp_int * b) /* End: bn_mp_abs.c */ /* Start: bn_mp_add.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_ADD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -865,7 +865,7 @@ int mp_add (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_add.c */ /* Start: bn_mp_add_d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_ADD_D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -981,7 +981,7 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c) /* End: bn_mp_add_d.c */ /* Start: bn_mp_addmod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_ADDMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1026,7 +1026,7 @@ mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) /* End: bn_mp_addmod.c */ /* Start: bn_mp_and.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_AND_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1087,7 +1087,7 @@ mp_and (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_and.c */ /* Start: bn_mp_clamp.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_CLAMP_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1135,7 +1135,7 @@ mp_clamp (mp_int * a) /* End: bn_mp_clamp.c */ /* Start: bn_mp_clear.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_CLEAR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1183,7 +1183,7 @@ mp_clear (mp_int * a) /* End: bn_mp_clear.c */ /* Start: bn_mp_clear_multi.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_CLEAR_MULTI_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1221,7 +1221,7 @@ void mp_clear_multi(mp_int *mp, ...) /* End: bn_mp_clear_multi.c */ /* Start: bn_mp_cmp.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_CMP_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1268,7 +1268,7 @@ mp_cmp (mp_int * a, mp_int * b) /* End: bn_mp_cmp.c */ /* Start: bn_mp_cmp_d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_CMP_D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1316,7 +1316,7 @@ int mp_cmp_d(mp_int * a, mp_digit b) /* End: bn_mp_cmp_d.c */ /* Start: bn_mp_cmp_mag.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_CMP_MAG_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1375,7 +1375,7 @@ int mp_cmp_mag (mp_int * a, mp_int * b) /* End: bn_mp_cmp_mag.c */ /* Start: bn_mp_cnt_lsb.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_CNT_LSB_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1432,7 +1432,7 @@ int mp_cnt_lsb(mp_int *a) /* End: bn_mp_cnt_lsb.c */ /* Start: bn_mp_copy.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_COPY_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1504,7 +1504,7 @@ mp_copy (mp_int * a, mp_int * b) /* End: bn_mp_copy.c */ /* Start: bn_mp_count_bits.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_COUNT_BITS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1553,7 +1553,7 @@ mp_count_bits (mp_int * a) /* End: bn_mp_count_bits.c */ /* Start: bn_mp_div.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DIV_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1849,7 +1849,7 @@ LBL_Q:mp_clear (&q); /* End: bn_mp_div.c */ /* Start: bn_mp_div_2.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DIV_2_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -1921,7 +1921,7 @@ int mp_div_2(mp_int * a, mp_int * b) /* End: bn_mp_div_2.c */ /* Start: bn_mp_div_2d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DIV_2D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2022,7 +2022,7 @@ int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) /* End: bn_mp_div_2d.c */ /* Start: bn_mp_div_3.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DIV_3_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2105,7 +2105,7 @@ mp_div_3 (mp_int * a, mp_int *c, mp_digit * d) /* End: bn_mp_div_3.c */ /* Start: bn_mp_div_d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DIV_D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2219,7 +2219,7 @@ int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d) /* End: bn_mp_div_d.c */ /* Start: bn_mp_dr_is_modulus.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DR_IS_MODULUS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2266,7 +2266,7 @@ int mp_dr_is_modulus(mp_int *a) /* End: bn_mp_dr_is_modulus.c */ /* Start: bn_mp_dr_reduce.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DR_REDUCE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2364,7 +2364,7 @@ top: /* End: bn_mp_dr_reduce.c */ /* Start: bn_mp_dr_setup.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_DR_SETUP_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2400,7 +2400,7 @@ void mp_dr_setup(mp_int *a, mp_digit *d) /* End: bn_mp_dr_setup.c */ /* Start: bn_mp_exch.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_EXCH_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2438,7 +2438,7 @@ mp_exch (mp_int * a, mp_int * b) /* End: bn_mp_exch.c */ /* Start: bn_mp_expt_d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_EXPT_D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2499,7 +2499,7 @@ int mp_expt_d (mp_int * a, mp_digit b, mp_int * c) /* End: bn_mp_expt_d.c */ /* Start: bn_mp_exptmod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_EXPTMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2615,7 +2615,7 @@ int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) /* End: bn_mp_exptmod.c */ /* Start: bn_mp_exptmod_fast.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_EXPTMOD_FAST_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -2940,7 +2940,7 @@ LBL_M: /* End: bn_mp_exptmod_fast.c */ /* Start: bn_mp_exteuclid.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_EXTEUCLID_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3026,7 +3026,7 @@ _ERR: mp_clear_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL /* End: bn_mp_exteuclid.c */ /* Start: bn_mp_fread.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_FREAD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3097,7 +3097,7 @@ int mp_fread(mp_int *a, int radix, FILE *stream) /* End: bn_mp_fread.c */ /* Start: bn_mp_fwrite.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_FWRITE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3153,7 +3153,7 @@ int mp_fwrite(mp_int *a, int radix, FILE *stream) /* End: bn_mp_fwrite.c */ /* Start: bn_mp_gcd.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_GCD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3262,7 +3262,7 @@ LBL_U:mp_clear (&v); /* End: bn_mp_gcd.c */ /* Start: bn_mp_get_int.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_GET_INT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3311,7 +3311,7 @@ unsigned long mp_get_int(mp_int * a) /* End: bn_mp_get_int.c */ /* Start: bn_mp_grow.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_GROW_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3372,7 +3372,7 @@ int mp_grow (mp_int * a, int size) /* End: bn_mp_grow.c */ /* Start: bn_mp_init.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INIT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3422,7 +3422,7 @@ int mp_init (mp_int * a) /* End: bn_mp_init.c */ /* Start: bn_mp_init_copy.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INIT_COPY_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3458,7 +3458,7 @@ int mp_init_copy (mp_int * a, mp_int * b) /* End: bn_mp_init_copy.c */ /* Start: bn_mp_init_multi.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INIT_MULTI_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3521,7 +3521,7 @@ int mp_init_multi(mp_int *mp, ...) /* End: bn_mp_init_multi.c */ /* Start: bn_mp_init_set.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INIT_SET_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3557,7 +3557,7 @@ int mp_init_set (mp_int * a, mp_digit b) /* End: bn_mp_init_set.c */ /* Start: bn_mp_init_set_int.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INIT_SET_INT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3592,7 +3592,7 @@ int mp_init_set_int (mp_int * a, unsigned long b) /* End: bn_mp_init_set_int.c */ /* Start: bn_mp_init_size.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INIT_SIZE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3644,7 +3644,7 @@ int mp_init_size (mp_int * a, int size) /* End: bn_mp_init_size.c */ /* Start: bn_mp_invmod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INVMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3691,7 +3691,7 @@ int mp_invmod (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_invmod.c */ /* Start: bn_mp_invmod_slow.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_INVMOD_SLOW_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3870,7 +3870,7 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &A, &B, &C, &D, NULL); /* End: bn_mp_invmod_slow.c */ /* Start: bn_mp_is_square.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_IS_SQUARE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -3983,7 +3983,7 @@ ERR:mp_clear(&t); /* End: bn_mp_is_square.c */ /* Start: bn_mp_jacobi.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_JACOBI_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4092,7 +4092,7 @@ LBL_A1:mp_clear (&a1); /* End: bn_mp_jacobi.c */ /* Start: bn_mp_karatsuba_mul.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_KARATSUBA_MUL_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4263,7 +4263,7 @@ ERR: /* End: bn_mp_karatsuba_mul.c */ /* Start: bn_mp_karatsuba_sqr.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_KARATSUBA_SQR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4388,7 +4388,7 @@ ERR: /* End: bn_mp_karatsuba_sqr.c */ /* Start: bn_mp_lcm.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_LCM_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4452,7 +4452,7 @@ LBL_T: /* End: bn_mp_lcm.c */ /* Start: bn_mp_lshd.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_LSHD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4523,7 +4523,7 @@ int mp_lshd (mp_int * a, int b) /* End: bn_mp_lshd.c */ /* Start: bn_mp_mod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4575,7 +4575,7 @@ mp_mod (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_mod.c */ /* Start: bn_mp_mod_2d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MOD_2D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4634,7 +4634,7 @@ mp_mod_2d (mp_int * a, int b, mp_int * c) /* End: bn_mp_mod_2d.c */ /* Start: bn_mp_mod_d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MOD_D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4665,7 +4665,7 @@ mp_mod_d (mp_int * a, mp_digit b, mp_digit * c) /* End: bn_mp_mod_d.c */ /* Start: bn_mp_montgomery_calc_normalization.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MONTGOMERY_CALC_NORMALIZATION_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4728,7 +4728,7 @@ int mp_montgomery_calc_normalization (mp_int * a, mp_int * b) /* End: bn_mp_montgomery_calc_normalization.c */ /* Start: bn_mp_montgomery_reduce.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MONTGOMERY_REDUCE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4850,7 +4850,7 @@ mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) /* End: bn_mp_montgomery_reduce.c */ /* Start: bn_mp_montgomery_setup.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MONTGOMERY_SETUP_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4913,7 +4913,7 @@ mp_montgomery_setup (mp_int * n, mp_digit * rho) /* End: bn_mp_montgomery_setup.c */ /* Start: bn_mp_mul.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MUL_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -4983,7 +4983,7 @@ int mp_mul (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_mul.c */ /* Start: bn_mp_mul_2.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MUL_2_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5069,7 +5069,7 @@ int mp_mul_2(mp_int * a, mp_int * b) /* End: bn_mp_mul_2.c */ /* Start: bn_mp_mul_2d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MUL_2D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5158,7 +5158,7 @@ int mp_mul_2d (mp_int * a, int b, mp_int * c) /* End: bn_mp_mul_2d.c */ /* Start: bn_mp_mul_d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MUL_D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5241,7 +5241,7 @@ mp_mul_d (mp_int * a, mp_digit b, mp_int * c) /* End: bn_mp_mul_d.c */ /* Start: bn_mp_mulmod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_MULMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5285,7 +5285,7 @@ int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) /* End: bn_mp_mulmod.c */ /* Start: bn_mp_n_root.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_N_ROOT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5421,7 +5421,7 @@ LBL_T1:mp_clear (&t1); /* End: bn_mp_n_root.c */ /* Start: bn_mp_neg.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_NEG_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5465,7 +5465,7 @@ int mp_neg (mp_int * a, mp_int * b) /* End: bn_mp_neg.c */ /* Start: bn_mp_or.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_OR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5519,7 +5519,7 @@ int mp_or (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_or.c */ /* Start: bn_mp_prime_fermat.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_PRIME_FERMAT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5585,7 +5585,7 @@ LBL_T:mp_clear (&t); /* End: bn_mp_prime_fermat.c */ /* Start: bn_mp_prime_is_divisible.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_PRIME_IS_DIVISIBLE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5639,7 +5639,7 @@ int mp_prime_is_divisible (mp_int * a, int *result) /* End: bn_mp_prime_is_divisible.c */ /* Start: bn_mp_prime_is_prime.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_PRIME_IS_PRIME_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5726,7 +5726,7 @@ LBL_B:mp_clear (&b); /* End: bn_mp_prime_is_prime.c */ /* Start: bn_mp_prime_miller_rabin.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_PRIME_MILLER_RABIN_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -5833,7 +5833,7 @@ LBL_N1:mp_clear (&n1); /* End: bn_mp_prime_miller_rabin.c */ /* Start: bn_mp_prime_next_prime.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_PRIME_NEXT_PRIME_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6007,7 +6007,7 @@ LBL_ERR: /* End: bn_mp_prime_next_prime.c */ /* Start: bn_mp_prime_rabin_miller_trials.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_PRIME_RABIN_MILLER_TRIALS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6063,7 +6063,7 @@ int mp_prime_rabin_miller_trials(int size) /* End: bn_mp_prime_rabin_miller_trials.c */ /* Start: bn_mp_prime_random_ex.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_PRIME_RANDOM_EX_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6192,7 +6192,7 @@ error: /* End: bn_mp_prime_random_ex.c */ /* Start: bn_mp_radix_size.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_RADIX_SIZE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6274,7 +6274,7 @@ int mp_radix_size (mp_int * a, int radix, int *size) /* End: bn_mp_radix_size.c */ /* Start: bn_mp_radix_smap.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_RADIX_SMAP_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6302,7 +6302,7 @@ const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs /* End: bn_mp_radix_smap.c */ /* Start: bn_mp_rand.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_RAND_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6361,7 +6361,7 @@ mp_rand (mp_int * a, int digits) /* End: bn_mp_rand.c */ /* Start: bn_mp_read_radix.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_READ_RADIX_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6450,7 +6450,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix) /* End: bn_mp_read_radix.c */ /* Start: bn_mp_read_signed_bin.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_READ_SIGNED_BIN_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6495,7 +6495,7 @@ int mp_read_signed_bin (mp_int * a, const unsigned char *b, int c) /* End: bn_mp_read_signed_bin.c */ /* Start: bn_mp_read_unsigned_bin.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_READ_UNSIGNED_BIN_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6554,7 +6554,7 @@ int mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c) /* End: bn_mp_read_unsigned_bin.c */ /* Start: bn_mp_reduce.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6658,7 +6658,7 @@ CLEANUP: /* End: bn_mp_reduce.c */ /* Start: bn_mp_reduce_2k.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_2K_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6723,7 +6723,7 @@ ERR: /* End: bn_mp_reduce_2k.c */ /* Start: bn_mp_reduce_2k_l.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_2K_L_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6789,7 +6789,7 @@ ERR: /* End: bn_mp_reduce_2k_l.c */ /* Start: bn_mp_reduce_2k_setup.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_2K_SETUP_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6840,7 +6840,7 @@ int mp_reduce_2k_setup(mp_int *a, mp_digit *d) /* End: bn_mp_reduce_2k_setup.c */ /* Start: bn_mp_reduce_2k_setup_l.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_2K_SETUP_L_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6888,7 +6888,7 @@ ERR: /* End: bn_mp_reduce_2k_setup_l.c */ /* Start: bn_mp_reduce_is_2k.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_IS_2K_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6944,7 +6944,7 @@ int mp_reduce_is_2k(mp_int *a) /* End: bn_mp_reduce_is_2k.c */ /* Start: bn_mp_reduce_is_2k_l.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_IS_2K_L_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -6992,7 +6992,7 @@ int mp_reduce_is_2k_l(mp_int *a) /* End: bn_mp_reduce_is_2k_l.c */ /* Start: bn_mp_reduce_setup.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_REDUCE_SETUP_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7030,7 +7030,7 @@ int mp_reduce_setup (mp_int * a, mp_int * b) /* End: bn_mp_reduce_setup.c */ /* Start: bn_mp_rshd.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_RSHD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7106,7 +7106,7 @@ void mp_rshd (mp_int * a, int b) /* End: bn_mp_rshd.c */ /* Start: bn_mp_set.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SET_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7139,7 +7139,7 @@ void mp_set (mp_int * a, mp_digit b) /* End: bn_mp_set.c */ /* Start: bn_mp_set_int.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SET_INT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7191,7 +7191,7 @@ int mp_set_int (mp_int * a, unsigned long b) /* End: bn_mp_set_int.c */ /* Start: bn_mp_shrink.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SHRINK_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7230,7 +7230,7 @@ int mp_shrink (mp_int * a) /* End: bn_mp_shrink.c */ /* Start: bn_mp_signed_bin_size.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SIGNED_BIN_SIZE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7261,7 +7261,7 @@ int mp_signed_bin_size (mp_int * a) /* End: bn_mp_signed_bin_size.c */ /* Start: bn_mp_sqr.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SQR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7323,7 +7323,7 @@ if (a->used >= KARATSUBA_SQR_CUTOFF) { /* End: bn_mp_sqr.c */ /* Start: bn_mp_sqrmod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SQRMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7368,7 +7368,7 @@ mp_sqrmod (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_sqrmod.c */ /* Start: bn_mp_sqrt.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SQRT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7453,7 +7453,7 @@ E2: mp_clear(&t1); /* End: bn_mp_sqrt.c */ /* Start: bn_mp_sub.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SUB_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7516,7 +7516,7 @@ mp_sub (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_sub.c */ /* Start: bn_mp_sub_d.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SUB_D_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7613,7 +7613,7 @@ mp_sub_d (mp_int * a, mp_digit b, mp_int * c) /* End: bn_mp_sub_d.c */ /* Start: bn_mp_submod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_SUBMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7659,7 +7659,7 @@ mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) /* End: bn_mp_submod.c */ /* Start: bn_mp_to_signed_bin.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TO_SIGNED_BIN_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7696,7 +7696,7 @@ int mp_to_signed_bin (mp_int * a, unsigned char *b) /* End: bn_mp_to_signed_bin.c */ /* Start: bn_mp_to_signed_bin_n.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TO_SIGNED_BIN_N_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7731,7 +7731,7 @@ int mp_to_signed_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen) /* End: bn_mp_to_signed_bin_n.c */ /* Start: bn_mp_to_unsigned_bin.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TO_UNSIGNED_BIN_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7783,7 +7783,7 @@ int mp_to_unsigned_bin (mp_int * a, unsigned char *b) /* End: bn_mp_to_unsigned_bin.c */ /* Start: bn_mp_to_unsigned_bin_n.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TO_UNSIGNED_BIN_N_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -7818,7 +7818,7 @@ int mp_to_unsigned_bin_n (mp_int * a, unsigned char *b, unsigned long *outlen) /* End: bn_mp_to_unsigned_bin_n.c */ /* Start: bn_mp_toom_mul.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TOOM_MUL_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8106,7 +8106,7 @@ ERR: /* End: bn_mp_toom_mul.c */ /* Start: bn_mp_toom_sqr.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TOOM_SQR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8336,7 +8336,7 @@ ERR: /* End: bn_mp_toom_sqr.c */ /* Start: bn_mp_toradix.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TORADIX_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8415,7 +8415,7 @@ int mp_toradix (mp_int * a, char *str, int radix) /* End: bn_mp_toradix.c */ /* Start: bn_mp_toradix_n.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_TORADIX_N_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8507,7 +8507,7 @@ int mp_toradix_n(mp_int * a, char *str, int radix, int maxlen) /* End: bn_mp_toradix_n.c */ /* Start: bn_mp_unsigned_bin_size.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_UNSIGNED_BIN_SIZE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8539,7 +8539,7 @@ int mp_unsigned_bin_size (mp_int * a) /* End: bn_mp_unsigned_bin_size.c */ /* Start: bn_mp_xor.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_XOR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8594,7 +8594,7 @@ mp_xor (mp_int * a, mp_int * b, mp_int * c) /* End: bn_mp_xor.c */ /* Start: bn_mp_zero.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_MP_ZERO_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8634,7 +8634,7 @@ void mp_zero (mp_int * a) /* End: bn_mp_zero.c */ /* Start: bn_prime_tab.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_PRIME_TAB_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8699,7 +8699,7 @@ const mp_digit ltm_prime_tab[] = { /* End: bn_prime_tab.c */ /* Start: bn_reverse.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_REVERSE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8742,7 +8742,7 @@ bn_reverse (unsigned char *s, int len) /* End: bn_reverse.c */ /* Start: bn_s_mp_add.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_S_MP_ADD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -8855,7 +8855,7 @@ s_mp_add (mp_int * a, mp_int * b, mp_int * c) /* End: bn_s_mp_add.c */ /* Start: bn_s_mp_exptmod.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_S_MP_EXPTMOD_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -9111,7 +9111,7 @@ LBL_M: /* End: bn_s_mp_exptmod.c */ /* Start: bn_s_mp_mul_digs.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_S_MP_MUL_DIGS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -9205,7 +9205,7 @@ int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) /* End: bn_s_mp_mul_digs.c */ /* Start: bn_s_mp_mul_high_digs.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_S_MP_MUL_HIGH_DIGS_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -9290,7 +9290,7 @@ s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) /* End: bn_s_mp_mul_high_digs.c */ /* Start: bn_s_mp_sqr.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_S_MP_SQR_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -9378,7 +9378,7 @@ int s_mp_sqr (mp_int * a, mp_int * b) /* End: bn_s_mp_sqr.c */ /* Start: bn_s_mp_sub.c */ -#include +#include "libtorrent/tommath.h" #ifdef BN_S_MP_SUB_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * @@ -9471,7 +9471,7 @@ s_mp_sub (mp_int * a, mp_int * b, mp_int * c) /* End: bn_s_mp_sub.c */ /* Start: bncore.c */ -#include +#include "libtorrent/tommath.h" #ifdef BNCORE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * diff --git a/src/pe_crypto.cpp b/src/pe_crypto.cpp index 2f83dc51b..30d550f6b 100644 --- a/src/pe_crypto.cpp +++ b/src/pe_crypto.cpp @@ -42,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #elif defined TORRENT_USE_TOMMATH extern "C" { -#include +#include "libtorrent/tommath.h" } #endif