Add init priorities for XLC compilers
parent
71ce30f75f
commit
800dd99c60
5
ec2n.cpp
5
ec2n.cpp
|
|
@ -22,6 +22,9 @@ using CryptoPP::EC2N;
|
|||
#pragma init_seg(".CRT$XCU")
|
||||
const EC2N::Point g_identity;
|
||||
#pragma warning(default: 4075)
|
||||
#elif defined(HAVE_XLC_INIT_PRIORITY)
|
||||
#pragma priority(290)
|
||||
const EC2N::Point g_identity;
|
||||
#endif
|
||||
|
||||
ANONYMOUS_NAMESPACE_END
|
||||
|
|
@ -192,7 +195,7 @@ bool EC2N::Equal(const Point &P, const Point &Q) const
|
|||
|
||||
const EC2N::Point& EC2N::Identity() const
|
||||
{
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY)
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY) || defined(HAVE_XLC_INIT_PRIORITY)
|
||||
return g_identity;
|
||||
#elif defined(CRYPTOPP_CXX11_DYNAMIC_INIT)
|
||||
static const EC2N::Point g_identity;
|
||||
|
|
|
|||
5
ecp.cpp
5
ecp.cpp
|
|
@ -24,6 +24,9 @@ using CryptoPP::ModularArithmetic;
|
|||
#pragma init_seg(".CRT$XCU")
|
||||
const ECP::Point g_identity;
|
||||
#pragma warning(default: 4075)
|
||||
#elif defined(HAVE_XLC_INIT_PRIORITY)
|
||||
#pragma priority(290)
|
||||
const ECP::Point g_identity;
|
||||
#endif
|
||||
|
||||
inline ECP::Point ToMontgomery(const ModularArithmetic &mr, const ECP::Point &P)
|
||||
|
|
@ -215,7 +218,7 @@ bool ECP::Equal(const Point &P, const Point &Q) const
|
|||
|
||||
const ECP::Point& ECP::Identity() const
|
||||
{
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY)
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY) || defined(HAVE_XLC_INIT_PRIORITY)
|
||||
return g_identity;
|
||||
#elif defined(CRYPTOPP_CXX11_DYNAMIC_INIT)
|
||||
static const ECP::Point g_identity;
|
||||
|
|
|
|||
8
gf2n.cpp
8
gf2n.cpp
|
|
@ -31,6 +31,10 @@ using CryptoPP::PolynomialMod2;
|
|||
const PolynomialMod2 g_zero;
|
||||
const PolynomialMod2 g_one(1);
|
||||
#pragma warning(default: 4075)
|
||||
#elif defined(HAVE_XLC_INIT_PRIORITY)
|
||||
#pragma priority(290)
|
||||
const PolynomialMod2 g_zero;
|
||||
const PolynomialMod2 g_one(1);
|
||||
#endif
|
||||
|
||||
ANONYMOUS_NAMESPACE_END
|
||||
|
|
@ -144,7 +148,7 @@ struct NewPolynomialMod2
|
|||
|
||||
const PolynomialMod2 &PolynomialMod2::Zero()
|
||||
{
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY)
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY) || defined(HAVE_XLC_INIT_PRIORITY)
|
||||
return g_zero;
|
||||
#elif defined(CRYPTOPP_CXX11_DYNAMIC_INIT)
|
||||
static const PolynomialMod2 g_zero;
|
||||
|
|
@ -156,7 +160,7 @@ const PolynomialMod2 &PolynomialMod2::Zero()
|
|||
|
||||
const PolynomialMod2 &PolynomialMod2::One()
|
||||
{
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY)
|
||||
#if defined(HAVE_GCC_INIT_PRIORITY) || defined(HAVE_MSC_INIT_PRIORITY) || defined(HAVE_XLC_INIT_PRIORITY)
|
||||
return g_one;
|
||||
#elif defined(CRYPTOPP_CXX11_DYNAMIC_INIT)
|
||||
static const PolynomialMod2 g_one(1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue