mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-27 13:33:29 +01:00
Linux: use "-std=c++11" for gcc 4.8 and adapt code to old compilers
This commit is contained in:
parent
da49ebb927
commit
19fa1f8684
@ -43,9 +43,9 @@ namespace VeraCrypt
|
||||
map<EMVCardType, vector<byte>> InitializeSupportedAIDs()
|
||||
{
|
||||
map<EMVCardType, vector<byte>> supportedAIDs;
|
||||
supportedAIDs.insert(std::make_pair(EMVCardType::AMEX, vector<byte>(EMVCard::AMEX_AID, EMVCard::AMEX_AID + (std::end(EMVCard::AMEX_AID) - std::begin(EMVCard::AMEX_AID)))));
|
||||
supportedAIDs.insert(std::make_pair(EMVCardType::MASTERCARD, vector<byte>(EMVCard::MASTERCARD_AID, EMVCard::MASTERCARD_AID + (std::end(EMVCard::MASTERCARD_AID) - std::begin(EMVCard::MASTERCARD_AID)))));
|
||||
supportedAIDs.insert(std::make_pair(EMVCardType::VISA, vector<byte>(EMVCard::VISA_AID, EMVCard::VISA_AID + (std::end(EMVCard::VISA_AID) - std::begin(EMVCard::VISA_AID)))));
|
||||
supportedAIDs.insert(std::make_pair(EMVCardType::AMEX, vector<byte>(EMVCard::AMEX_AID, EMVCard::AMEX_AID + sizeof(EMVCard::AMEX_AID))));
|
||||
supportedAIDs.insert(std::make_pair(EMVCardType::MASTERCARD, vector<byte>(EMVCard::MASTERCARD_AID, EMVCard::MASTERCARD_AID + sizeof(EMVCard::MASTERCARD_AID))));
|
||||
supportedAIDs.insert(std::make_pair(EMVCardType::VISA, vector<byte>(EMVCard::VISA_AID, EMVCard::VISA_AID + sizeof(EMVCard::VISA_AID))));
|
||||
return supportedAIDs;
|
||||
}
|
||||
|
||||
|
@ -50,9 +50,9 @@ namespace VeraCrypt
|
||||
class Token
|
||||
{
|
||||
public:
|
||||
static vector<shared_ptr<TokenKeyfile>> GetAvailableKeyfiles(bool isEMVSupportEnabled);
|
||||
static vector< shared_ptr<TokenKeyfile> > GetAvailableKeyfiles(bool isEMVSupportEnabled);
|
||||
static bool IsKeyfilePathValid(const wstring& tokenKeyfilePath, bool isEMVSupportEnabled);
|
||||
static list <shared_ptr<TokenInfo>> GetAvailableTokens();
|
||||
static list < shared_ptr<TokenInfo> > GetAvailableTokens();
|
||||
static shared_ptr<TokenKeyfile> getTokenKeyfile(const TokenKeyfilePath& path);
|
||||
};
|
||||
};
|
||||
|
@ -203,8 +203,8 @@ ifeq "$(shell uname -s)" "Linux"
|
||||
# GCC version below 4.8 support minimal C++11 features through the switch -std=c++0x
|
||||
CXXFLAGS += -std=c++0x
|
||||
else ifeq ($(GCC_VERSION), 408)
|
||||
# GCC version 4.8 supports C++11 features through the switch -std=gnu++11
|
||||
CXXFLAGS += -std=gnu++11
|
||||
# GCC version 4.8 supports C++11 features through the switch -std=c++11
|
||||
CXXFLAGS += -std=c++11
|
||||
else ifeq ($(shell expr $(GCC_VERSION) \>= 1100), 1)
|
||||
# GNU GCC version 11 and higher compile with -std=gnu++17 by default
|
||||
# which breaks "byte" definitions in Crypto++ library. So set -std=gnu++14 instead.
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
namespace VeraCrypt
|
||||
{
|
||||
#if (__cplusplus >= 201103L)
|
||||
#if (__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#define VC_USE_NATIVE_PTR 1
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user