Skip to content

Commit f2db0d0

Browse files
Include modinv32/64 like other internal modules
And also sort the _impl.h includes.
1 parent 79f5098 commit f2db0d0

File tree

6 files changed

+26
-15
lines changed

6 files changed

+26
-15
lines changed

src/field_10x26_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "checkmem.h"
1111
#include "util.h"
1212
#include "field.h"
13-
#include "modinv32_impl.h"
13+
#include "modinv32.h"
1414

1515
#ifdef VERIFY
1616
static void secp256k1_fe_impl_verify(const secp256k1_fe *a) {

src/field_5x52_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "checkmem.h"
1111
#include "util.h"
1212
#include "field.h"
13-
#include "modinv64_impl.h"
13+
#include "modinv64.h"
1414

1515
#include "field_5x52_int128_impl.h"
1616

src/precompute_ecmult.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
#include "field_impl.h"
1717
#include "group_impl.h"
1818
#include "int128_impl.h"
19+
#include "modinv32_impl.h"
20+
#ifdef SECP256K1_WIDEMUL_INT128
21+
/* modinv64 is only available if we have an int128 implementation. */
22+
#include "modinv64_impl.h"
23+
#endif
24+
1925
#include "ecmult.h"
2026
#include "ecmult_compute_table_impl.h"
2127

src/precompute_ecmult_gen.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
#include "group.h"
1717
#include "int128_impl.h"
18+
#include "modinv32_impl.h"
19+
#ifdef SECP256K1_WIDEMUL_INT128
20+
/* modinv64 is only available if we have an int128 implementation. */
21+
#include "modinv64_impl.h"
22+
#endif
23+
1824
#include "ecmult_gen.h"
1925
#include "ecmult_gen_compute_table_impl.h"
2026

src/secp256k1.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,24 @@
2626
#include "checkmem.h"
2727
#include "util.h"
2828

29-
#include "field_impl.h"
30-
#include "scalar_impl.h"
31-
#include "group_impl.h"
32-
#include "ecmult_impl.h"
33-
#include "ecmult_const_impl.h"
34-
#include "ecmult_gen_impl.h"
3529
#include "ecdsa_impl.h"
3630
#include "eckey_impl.h"
31+
#include "ecmult_const_impl.h"
32+
#include "ecmult_gen_impl.h"
33+
#include "ecmult_impl.h"
34+
#include "field_impl.h"
35+
#include "group_impl.h"
3736
#include "hash_impl.h"
37+
#include "hsort_impl.h"
3838
#include "int128_impl.h"
39+
#include "modinv32_impl.h"
40+
#ifdef SECP256K1_WIDEMUL_INT128
41+
/* modinv64 is only available if we have an int128 implementation. */
42+
#include "modinv64_impl.h"
43+
#endif
44+
#include "scalar_impl.h"
3945
#include "scratch_impl.h"
4046
#include "selftest.h"
41-
#include "hsort_impl.h"
4247

4348
#ifdef SECP256K1_NO_BUILD
4449
# error "secp256k1.h processed without SECP256K1_BUILD defined while building secp256k1.c"

src/tests.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
#include "../contrib/lax_der_parsing.c"
2828
#include "../contrib/lax_der_privatekey_parsing.c"
2929

30-
#include "modinv32_impl.h"
31-
#ifdef SECP256K1_WIDEMUL_INT128
32-
#include "modinv64_impl.h"
33-
#include "int128_impl.h"
34-
#endif
35-
3630
#define CONDITIONAL_TEST(cnt, nam) if (COUNT < (cnt)) { printf("Skipping %s (iteration count too low)\n", nam); } else
3731

3832
static int COUNT = 16;

0 commit comments

Comments
 (0)