Skip to content

Commit

Permalink
config: Set preprocessor defaults for ECMULT_* config values
Browse files Browse the repository at this point in the history
This simplifies manual builds and solves one item in bitcoin#929.
  • Loading branch information
real-or-random committed Jul 6, 2022
1 parent af65d30 commit d0cf55e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ecmult.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#include "scalar.h"
#include "scratch.h"

#ifndef ECMULT_WINDOW_SIZE
# define ECMULT_WINDOW_SIZE 15
#endif
/* Noone will ever need more than a window size of 24. The code might
* be correct for larger values of ECMULT_WINDOW_SIZE but this is not
* tested.
Expand Down
3 changes: 3 additions & 0 deletions src/ecmult_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include "scalar.h"
#include "group.h"

#ifndef ECMULT_GEN_PREC_BITS
# define ECMULT_GEN_PREC_BITS 4
#endif
#if ECMULT_GEN_PREC_BITS != 2 && ECMULT_GEN_PREC_BITS != 4 && ECMULT_GEN_PREC_BITS != 8
# error "Set ECMULT_GEN_PREC_BITS to 2, 4 or 8."
#endif
Expand Down

0 comments on commit d0cf55e

Please sign in to comment.