Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards

22a9ea154a contrib: Explain explicit header guards (Tim Ruffing)

Pull request description:

  They were added in #925 and deserve a comment.

ACKs for top commit:
  gmaxwell:
    ACK 22a9ea154a
  sipa:
    ACK 22a9ea154a

Tree-SHA512: 832e28d71857d52912dae7e6c0e08a3183bb788996bb2470616c6fbbac6ba601cc74bb51a4c908aec7df9ae4f4cbf2cbb1b451cefde1b5a7359dc93299840278
This commit is contained in:
Pieter Wuille 2021-05-11 20:10:00 -07:00
commit 1e78c18d5b
No known key found for this signature in database
GPG Key ID: BF2978B068054311
2 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,10 @@
#ifndef SECP256K1_CONTRIB_LAX_DER_PARSING_H
#define SECP256K1_CONTRIB_LAX_DER_PARSING_H
/* #include secp256k1.h only when it hasn't been included yet.
This enables this file to be #included directly in other project
files (such as tests.c) without the need to set an explicit -I flag,
which would be necessary to locate secp256k1.h. */
#ifndef SECP256K1_H
#include <secp256k1.h>
#endif

View File

@ -28,6 +28,10 @@
#ifndef SECP256K1_CONTRIB_BER_PRIVATEKEY_H
#define SECP256K1_CONTRIB_BER_PRIVATEKEY_H
/* #include secp256k1.h only when it hasn't been included yet.
This enables this file to be #included directly in other project
files (such as tests.c) without the need to set an explicit -I flag,
which would be necessary to locate secp256k1.h. */
#ifndef SECP256K1_H
#include <secp256k1.h>
#endif