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:
Gregory Maxwell
2021-05-01 17:08:52 +00:00
parent efad3506a8
commit ae9e648526
6 changed files with 28 additions and 11 deletions

View File

@@ -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