Skip to content

Commit 755349d

Browse files
Tidy includes to make many headers self-contained
1 parent cbe4a55 commit 755349d

File tree

11 files changed

+20
-4
lines changed

11 files changed

+20
-4
lines changed

src/ecdsa.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "scalar.h"
1313
#include "group.h"
1414
#include "ecmult.h"
15+
#include "ecmult_gen.h"
1516

1617
static int secp256k1_ecdsa_sig_parse(secp256k1_scalar *r, secp256k1_scalar *s, const unsigned char *sig, size_t size);
1718
static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, size_t *size, const secp256k1_scalar *r, const secp256k1_scalar *s);

src/ecmult_compute_table.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#ifndef SECP256K1_ECMULT_COMPUTE_TABLE_H
88
#define SECP256K1_ECMULT_COMPUTE_TABLE_H
99

10+
#include "group.h"
11+
1012
/* Construct table of all odd multiples of gen in range 1..(2**(window_g-1)-1). */
1113
static void secp256k1_ecmult_compute_table(secp256k1_ge_storage* table, int window_g, const secp256k1_gej* gen);
1214

src/hsort_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define SECP256K1_HSORT_IMPL_H
99

1010
#include "hsort.h"
11+
#include "util.h"
1112

1213
/* An array is a heap when, for all non-zero indexes i, the element at index i
1314
* compares as less than or equal to the element at index parent(i) = (i-1)/2.

src/modinv64.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#include "util.h"
1111

12+
#include <stdint.h>
13+
1214
#ifndef SECP256K1_WIDEMUL_INT128
1315
#error "modinv64 requires 128-bit wide multiplication support"
1416
#endif

src/scalar_4x64_impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
#include "checkmem.h"
1111
#include "int128.h"
12-
#include "modinv64_impl.h"
12+
#include "modinv64.h"
13+
#include "scalar.h"
14+
#include "scalar_4x64.h"
1315
#include "util.h"
1416

1517
/* Limbs of the secp256k1 order. */

src/scalar_8x32_impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#define SECP256K1_SCALAR_REPR_IMPL_H
99

1010
#include "checkmem.h"
11-
#include "modinv32_impl.h"
11+
#include "modinv32.h"
12+
#include "scalar.h"
13+
#include "scalar_8x32.h"
1214
#include "util.h"
1315

1416
/* Limbs of the secp256k1 order. */

src/scratch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
#ifndef SECP256K1_SCRATCH_H
88
#define SECP256K1_SCRATCH_H
99

10+
#include "secp256k1_internal.h"
11+
12+
#include <stdlib.h>
13+
1014
/* The typedef is used internally; the struct name is used in the public API
1115
* (where it is exposed as a different typedef) */
1216
typedef struct secp256k1_scratch_space_struct {

src/selftest.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define SECP256K1_SELFTEST_H
99

1010
#include "hash.h"
11+
#include "util.h"
1112

1213
#include <string.h>
1314

src/testrand_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <stdint.h>
1111
#include <stdio.h>
1212
#include <string.h>
13+
#include <time.h>
1314

1415
#include "testrand.h"
1516
#include "hash.h"

src/tests.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include <stdlib.h>
99
#include <string.h>
1010

11-
#include <time.h>
12-
1311
#ifdef USE_EXTERNAL_DEFAULT_CALLBACKS
1412
#pragma message("Ignoring USE_EXTERNAL_CALLBACKS in tests.")
1513
#undef USE_EXTERNAL_DEFAULT_CALLBACKS

0 commit comments

Comments
 (0)