summaryrefslogtreecommitdiff
path: root/ecp.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-12-04 04:13:58 -0500
committerJeffrey Walton <noloader@gmail.com>2018-12-04 04:13:58 -0500
commit800dd99c602241e573ade914b67901b9dee59db5 (patch)
tree79c051e42cde22e4b5cf3604772e5106d8760451 /ecp.cpp
parent71ce30f75f81e18c23bcdd95e444f86f25464764 (diff)
downloadcryptopp-git-800dd99c602241e573ade914b67901b9dee59db5.tar.gz
Add init priorities for XLC compilers
Diffstat (limited to 'ecp.cpp')
-rw-r--r--ecp.cpp5
1 files changed, 4 insertions, 1 deletions
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;