From 4e4aa5b6ec5ba34de77c837362b589003e007a00 Mon Sep 17 00:00:00 2001 From: syd Date: Thu, 23 Nov 2017 14:20:20 -0500 Subject: [PATCH] Get rid of underscore prefixes for include guards. This is because they may conflict with reserved names. Also took this opportunity to make the guards in the zcash subdir a bit more uniform by having them all conform to ZC_<...>_H_ This closes #1272 --- src/univalue/include/univalue.h | 6 +++--- src/zcash/Address.hpp | 6 +++--- src/zcash/IncrementalMerkleTree.hpp | 7 +++---- src/zcash/JoinSplit.hpp | 6 +++--- src/zcash/Note.hpp | 6 +++--- src/zcash/Proof.hpp | 6 +++--- src/zcash/Zcash.h | 6 +++--- src/zcash/prf.h | 6 +++--- src/zcash/util.h | 6 +++--- 9 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/univalue/include/univalue.h b/src/univalue/include/univalue.h index 07314bc5c..dfc84f921 100644 --- a/src/univalue/include/univalue.h +++ b/src/univalue/include/univalue.h @@ -3,8 +3,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef __UNIVALUE_H__ -#define __UNIVALUE_H__ +#ifndef UNIVALUE_H__ +#define UNIVALUE_H__ #include @@ -293,4 +293,4 @@ extern const UniValue NullUniValue; const UniValue& find_value( const UniValue& obj, const std::string& name); -#endif // __UNIVALUE_H__ +#endif // UNIVALUE_H__ diff --git a/src/zcash/Address.hpp b/src/zcash/Address.hpp index efae2af22..9bf22663d 100644 --- a/src/zcash/Address.hpp +++ b/src/zcash/Address.hpp @@ -1,5 +1,5 @@ -#ifndef _ZCADDRESS_H_ -#define _ZCADDRESS_H_ +#ifndef ZC_ADDRESS_H_ +#define ZC_ADDRESS_H_ #include "uint256.h" #include "uint252.h" @@ -58,4 +58,4 @@ public: } -#endif // _ZCADDRESS_H_ +#endif // ZC_ADDRESS_H_ diff --git a/src/zcash/IncrementalMerkleTree.hpp b/src/zcash/IncrementalMerkleTree.hpp index 67b356318..151a395c1 100644 --- a/src/zcash/IncrementalMerkleTree.hpp +++ b/src/zcash/IncrementalMerkleTree.hpp @@ -1,5 +1,5 @@ -#ifndef ZCINCREMENTALMERKLETREE_H_ -#define ZCINCREMENTALMERKLETREE_H_ +#ifndef ZC_INCREMENTALMERKLETREE_H_ +#define ZC_INCREMENTALMERKLETREE_H_ #include #include @@ -202,5 +202,4 @@ typedef libzcash::IncrementalMerkleTree ZCIncrementalWitness; typedef libzcash::IncrementalWitness ZCTestingIncrementalWitness; -#endif /* ZCINCREMENTALMERKLETREE_H_ */ - +#endif /* ZC_INCREMENTALMERKLETREE_H_ */ diff --git a/src/zcash/JoinSplit.hpp b/src/zcash/JoinSplit.hpp index b7ed454fd..6a2d4e1f2 100644 --- a/src/zcash/JoinSplit.hpp +++ b/src/zcash/JoinSplit.hpp @@ -1,5 +1,5 @@ -#ifndef _ZCJOINSPLIT_H_ -#define _ZCJOINSPLIT_H_ +#ifndef ZC_JOINSPLIT_H_ +#define ZC_JOINSPLIT_H_ #include "Zcash.h" #include "Proof.hpp" @@ -102,4 +102,4 @@ protected: typedef libzcash::JoinSplit ZCJoinSplit; -#endif // _ZCJOINSPLIT_H_ +#endif // ZC_JOINSPLIT_H_ diff --git a/src/zcash/Note.hpp b/src/zcash/Note.hpp index 460e68f9d..faacd2720 100644 --- a/src/zcash/Note.hpp +++ b/src/zcash/Note.hpp @@ -1,5 +1,5 @@ -#ifndef _ZCNOTE_H_ -#define _ZCNOTE_H_ +#ifndef ZC_NOTE_H_ +#define ZC_NOTE_H_ #include "uint256.h" #include "Zcash.h" @@ -68,4 +68,4 @@ public: } -#endif // _ZCNOTE_H_ \ No newline at end of file +#endif // ZC_NOTE_H_ diff --git a/src/zcash/Proof.hpp b/src/zcash/Proof.hpp index 3b6b5e568..5f05aa2c5 100644 --- a/src/zcash/Proof.hpp +++ b/src/zcash/Proof.hpp @@ -1,5 +1,5 @@ -#ifndef _ZCPROOF_H_ -#define _ZCPROOF_H_ +#ifndef ZC_PROOF_H_ +#define ZC_PROOF_H_ #include "serialize.h" #include "uint256.h" @@ -274,4 +274,4 @@ public: } -#endif // _ZCPROOF_H_ +#endif // ZC_PROOF_H_ diff --git a/src/zcash/Zcash.h b/src/zcash/Zcash.h index c2dfe548b..9e6684475 100644 --- a/src/zcash/Zcash.h +++ b/src/zcash/Zcash.h @@ -1,5 +1,5 @@ -#ifndef _ZCCONSTANTS_H_ -#define _ZCCONSTANTS_H_ +#ifndef ZC_ZCASH_H_ +#define ZC_ZCASH_H_ #define ZC_NUM_JS_INPUTS 2 #define ZC_NUM_JS_OUTPUTS 2 @@ -14,4 +14,4 @@ #define ZC_NOTEPLAINTEXT_SIZE (ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE) -#endif // _ZCCONSTANTS_H_ +#endif // ZC_ZCASH_H_ diff --git a/src/zcash/prf.h b/src/zcash/prf.h index c6cb45384..dec934f4a 100644 --- a/src/zcash/prf.h +++ b/src/zcash/prf.h @@ -3,8 +3,8 @@ Zcash uses SHA256Compress as a PRF for various components within the zkSNARK circuit. */ -#ifndef _PRF_H_ -#define _PRF_H_ +#ifndef ZC_PRF_H_ +#define ZC_PRF_H_ #include "uint256.h" #include "uint252.h" @@ -15,4 +15,4 @@ uint256 PRF_nf(const uint252& a_sk, const uint256& rho); uint256 PRF_pk(const uint252& a_sk, size_t i0, const uint256& h_sig); uint256 PRF_rho(const uint252& phi, size_t i0, const uint256& h_sig); -#endif // _PRF_H_ +#endif // ZC_PRF_H_ diff --git a/src/zcash/util.h b/src/zcash/util.h index bbfeac1c3..10886e3ca 100644 --- a/src/zcash/util.h +++ b/src/zcash/util.h @@ -1,5 +1,5 @@ -#ifndef __ZCASH_UTIL_H -#define __ZCASH_UTIL_H +#ifndef ZC_UTIL_H_ +#define ZC_UTIL_H_ #include #include @@ -8,4 +8,4 @@ std::vector convertIntToVectorLE(const uint64_t val_int); std::vector convertBytesVectorToVector(const std::vector& bytes); uint64_t convertVectorToInt(const std::vector& v); -#endif // __ZCASH_UTIL_H +#endif // ZC_UTIL_H_