Define SECP256K1_BUILD in secp256k1.c directly.
This avoids building without it and makes it safer to use a custom building environment. Test harnesses need to #include secp256k1.c first now.
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
***********************************************************************/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "include/secp256k1.h"
|
||||
#include "secp256k1.c"
|
||||
|
||||
#include "include/secp256k1.h"
|
||||
#include "util.h"
|
||||
#include "hash_impl.h"
|
||||
#include "field_impl.h"
|
||||
@@ -14,7 +15,6 @@
|
||||
#include "scalar_impl.h"
|
||||
#include "ecmult_impl.h"
|
||||
#include "bench.h"
|
||||
#include "secp256k1.c"
|
||||
|
||||
#define POINTS 32768
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
***********************************************************************/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "include/secp256k1.h"
|
||||
#include "secp256k1.c"
|
||||
|
||||
#include "include/secp256k1.h"
|
||||
#include "assumptions.h"
|
||||
#include "util.h"
|
||||
#include "hash_impl.h"
|
||||
@@ -16,7 +17,6 @@
|
||||
#include "ecmult_const_impl.h"
|
||||
#include "ecmult_impl.h"
|
||||
#include "bench.h"
|
||||
#include "secp256k1.c"
|
||||
|
||||
typedef struct {
|
||||
secp256k1_scalar scalar[2];
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
* file COPYING or https://www.opensource.org/licenses/mit-license.php.*
|
||||
***********************************************************************/
|
||||
|
||||
#define SECP256K1_BUILD
|
||||
|
||||
#include "include/secp256k1.h"
|
||||
#include "include/secp256k1_preallocated.h"
|
||||
|
||||
@@ -21,6 +23,10 @@
|
||||
#include "scratch_impl.h"
|
||||
#include "selftest.h"
|
||||
|
||||
#ifdef SECP256K1_NO_BUILD
|
||||
# error "secp256k1.h processed without SECP256K1_BUILD defined while building secp256k1.c"
|
||||
#endif
|
||||
|
||||
#if defined(VALGRIND)
|
||||
# include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
#define EXHAUSTIVE_TEST_ORDER 13
|
||||
#endif
|
||||
|
||||
#include "secp256k1.c"
|
||||
#include "include/secp256k1.h"
|
||||
#include "assumptions.h"
|
||||
#include "group.h"
|
||||
#include "secp256k1.c"
|
||||
#include "testrand_impl.h"
|
||||
|
||||
static int count = 2;
|
||||
|
||||
Reference in New Issue
Block a user