Skip to content

Commit

Permalink
change local lib headers to be relative for those pointing at "includ…
Browse files Browse the repository at this point in the history
…e" dir

added the top_srcdir prefix to the AM_CPPFLAGS

revert changes back to original from master branch

set include paths to be relative when referring to 'include/' dir

added newline for end of file

removed generated test/coverage files *.gcda

removed extra blank new line

added relative path for contrib/ include
  • Loading branch information
whb07 committed Apr 30, 2021
1 parent efad350 commit 188637c
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions src/bench_ecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <string.h>

#include "include/secp256k1.h"
#include "include/secp256k1_ecdh.h"
#include "../include/secp256k1.h"
#include "../include/secp256k1_ecdh.h"
#include "util.h"
#include "bench.h"

Expand Down
2 changes: 1 addition & 1 deletion src/bench_ecmult.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
***********************************************************************/
#include <stdio.h>

#include "include/secp256k1.h"
#include "../include/secp256k1.h"

#include "util.h"
#include "hash_impl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/bench_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
***********************************************************************/
#include <stdio.h>

#include "include/secp256k1.h"
#include "../include/secp256k1.h"

#include "assumptions.h"
#include "util.h"
Expand Down
4 changes: 2 additions & 2 deletions src/bench_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* file COPYING or https://www.opensource.org/licenses/mit-license.php.*
***********************************************************************/

#include "include/secp256k1.h"
#include "include/secp256k1_recovery.h"
#include "../include/secp256k1.h"
#include "../include/secp256k1_recovery.h"
#include "util.h"
#include "bench.h"

Expand Down
4 changes: 2 additions & 2 deletions src/bench_schnorrsig.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <stdlib.h>


#include "include/secp256k1.h"
#include "include/secp256k1_schnorrsig.h"
#include "../include/secp256k1.h"
#include "../include/secp256k1_schnorrsig.h"
#include "util.h"
#include "bench.h"

Expand Down
2 changes: 1 addition & 1 deletion src/bench_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* file COPYING or https://www.opensource.org/licenses/mit-license.php.*
***********************************************************************/

#include "include/secp256k1.h"
#include "../include/secp256k1.h"
#include "util.h"
#include "bench.h"

Expand Down
2 changes: 1 addition & 1 deletion src/bench_verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <stdio.h>
#include <string.h>

#include "include/secp256k1.h"
#include "../include/secp256k1.h"
#include "util.h"
#include "bench.h"

Expand Down
2 changes: 1 addition & 1 deletion src/gen_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/* We can't require the precomputed tables when creating them. */
#undef USE_ECMULT_STATIC_PRECOMPUTATION

#include "include/secp256k1.h"
#include "../include/secp256k1.h"
#include "assumptions.h"
#include "util.h"
#include "field_impl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ecdh/main_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef SECP256K1_MODULE_ECDH_MAIN_H
#define SECP256K1_MODULE_ECDH_MAIN_H

#include "include/secp256k1_ecdh.h"
#include "../include/secp256k1_ecdh.h"
#include "ecmult_const_impl.h"

static int ecdh_hash_function_sha256(unsigned char *output, const unsigned char *x32, const unsigned char *y32, void *data) {
Expand Down
4 changes: 2 additions & 2 deletions src/modules/extrakeys/main_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#ifndef SECP256K1_MODULE_EXTRAKEYS_MAIN_H
#define SECP256K1_MODULE_EXTRAKEYS_MAIN_H

#include "include/secp256k1.h"
#include "include/secp256k1_extrakeys.h"
#include "../include/secp256k1.h"
#include "../include/secp256k1_extrakeys.h"

static SECP256K1_INLINE int secp256k1_xonly_pubkey_load(const secp256k1_context* ctx, secp256k1_ge *ge, const secp256k1_xonly_pubkey *pubkey) {
return secp256k1_pubkey_load(ctx, ge, (const secp256k1_pubkey *) pubkey);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/extrakeys/tests_exhaustive_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define SECP256K1_MODULE_EXTRAKEYS_TESTS_EXHAUSTIVE_H

#include "src/modules/extrakeys/main_impl.h"
#include "include/secp256k1_extrakeys.h"
#include "../include/secp256k1_extrakeys.h"

static void test_exhaustive_extrakeys(const secp256k1_context *ctx, const secp256k1_ge* group) {
secp256k1_keypair keypair[EXHAUSTIVE_TEST_ORDER - 1];
Expand Down
2 changes: 1 addition & 1 deletion src/modules/extrakeys/tests_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef SECP256K1_MODULE_EXTRAKEYS_TESTS_H
#define SECP256K1_MODULE_EXTRAKEYS_TESTS_H

#include "secp256k1_extrakeys.h"
#include "../include/secp256k1_extrakeys.h"

static secp256k1_context* api_test_context(int flags, int *ecount) {
secp256k1_context *ctx0 = secp256k1_context_create(flags);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/recovery/main_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef SECP256K1_MODULE_RECOVERY_MAIN_H
#define SECP256K1_MODULE_RECOVERY_MAIN_H

#include "include/secp256k1_recovery.h"
#include "../include/secp256k1_recovery.h"

static void secp256k1_ecdsa_recoverable_signature_load(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, int* recid, const secp256k1_ecdsa_recoverable_signature* sig) {
(void)ctx;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/recovery/tests_exhaustive_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define SECP256K1_MODULE_RECOVERY_EXHAUSTIVE_TESTS_H

#include "src/modules/recovery/main_impl.h"
#include "include/secp256k1_recovery.h"
#include "../include/secp256k1_recovery.h"

void test_exhaustive_recovery_sign(const secp256k1_context *ctx, const secp256k1_ge *group) {
int i, j, k;
Expand Down
4 changes: 2 additions & 2 deletions src/modules/schnorrsig/main_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#ifndef SECP256K1_MODULE_SCHNORRSIG_MAIN_H
#define SECP256K1_MODULE_SCHNORRSIG_MAIN_H

#include "include/secp256k1.h"
#include "include/secp256k1_schnorrsig.h"
#include "../include/secp256k1.h"
#include "../include/secp256k1_schnorrsig.h"
#include "hash.h"

/* Initializes SHA256 with fixed midstate. This midstate was computed by applying
Expand Down
2 changes: 1 addition & 1 deletion src/modules/schnorrsig/tests_exhaustive_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef SECP256K1_MODULE_SCHNORRSIG_TESTS_EXHAUSTIVE_H
#define SECP256K1_MODULE_SCHNORRSIG_TESTS_EXHAUSTIVE_H

#include "include/secp256k1_schnorrsig.h"
#include "../include/secp256k1_schnorrsig.h"
#include "src/modules/schnorrsig/main_impl.h"

static const unsigned char invalid_pubkey_bytes[][32] = {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/schnorrsig/tests_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef SECP256K1_MODULE_SCHNORRSIG_TESTS_H
#define SECP256K1_MODULE_SCHNORRSIG_TESTS_H

#include "secp256k1_schnorrsig.h"
#include "../include/secp256k1_schnorrsig.h"

/* Checks that a bit flip in the n_flip-th argument (that has n_bytes many
* bytes) changes the hash function
Expand Down
4 changes: 2 additions & 2 deletions src/secp256k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* file COPYING or https://www.opensource.org/licenses/mit-license.php.*
***********************************************************************/

#include "include/secp256k1.h"
#include "include/secp256k1_preallocated.h"
#include "../include/secp256k1.h"
#include "../include/secp256k1_preallocated.h"

#include "assumptions.h"
#include "util.h"
Expand Down
8 changes: 4 additions & 4 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <time.h>

#include "secp256k1.c"
#include "include/secp256k1.h"
#include "include/secp256k1_preallocated.h"
#include "../include/secp256k1.h"
#include "../include/secp256k1_preallocated.h"
#include "testrand_impl.h"
#include "util.h"

Expand All @@ -30,8 +30,8 @@ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
# endif
#endif

#include "contrib/lax_der_parsing.c"
#include "contrib/lax_der_privatekey_parsing.c"
#include "../contrib/lax_der_parsing.c"
#include "../contrib/lax_der_privatekey_parsing.c"

#include "modinv32_impl.h"
#ifdef SECP256K1_WIDEMUL_INT128
Expand Down
2 changes: 1 addition & 1 deletion src/tests_exhaustive.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define EXHAUSTIVE_TEST_ORDER 13
#endif

#include "include/secp256k1.h"
#include "../include/secp256k1.h"
#include "assumptions.h"
#include "group.h"
#include "secp256k1.c"
Expand Down
10 changes: 5 additions & 5 deletions src/valgrind_ctime_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
#include <valgrind/memcheck.h>
#include <stdio.h>

#include "include/secp256k1.h"
#include "../include/secp256k1.h"
#include "assumptions.h"
#include "util.h"

#ifdef ENABLE_MODULE_ECDH
# include "include/secp256k1_ecdh.h"
# include "../include/secp256k1_ecdh.h"
#endif

#ifdef ENABLE_MODULE_RECOVERY
# include "include/secp256k1_recovery.h"
# include "../include/secp256k1_recovery.h"
#endif

#ifdef ENABLE_MODULE_EXTRAKEYS
# include "include/secp256k1_extrakeys.h"
# include "../include/secp256k1_extrakeys.h"
#endif

#ifdef ENABLE_MODULE_SCHNORRSIG
#include "include/secp256k1_schnorrsig.h"
#include "../include/secp256k1_schnorrsig.h"
#endif

void run_tests(secp256k1_context *ctx, unsigned char *key);
Expand Down

0 comments on commit 188637c

Please sign in to comment.