summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ec2n.cpp5
-rw-r--r--ecp.cpp5
-rw-r--r--gf2n.cpp8
3 files changed, 14 insertions, 4 deletions
diff --git a/ec2n.cpp b/ec2n.cpp
index e3a0b285..97763232 100644
--- a/ec2n.cpp
+++ b/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;
diff --git a/ecp.cpp b/ecp.cpp
index ff259ba0..f5aa08e3 100644
--- a/ecp.cpp
+++ b/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;
diff --git a/gf2n.cpp b/gf2n.cpp
index 4cd06301..c907e081 100644
--- a/gf2n.cpp
+++ b/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);