mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
c96ceb1745
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
34 lines
950 B
Diff
34 lines
950 B
Diff
--- a/src/BuiltIn/succSymbol.hh
|
|
+++ b/src/BuiltIn/succSymbol.hh
|
|
@@ -46,6 +46,15 @@
|
|
Vector<Term*>& terms);
|
|
void postInterSymbolPass();
|
|
void reset();
|
|
+
|
|
+#if SIZEOF_LONG < 8
|
|
+ DagNode* makeNatDag(Int64 nat)
|
|
+ {
|
|
+ mpz_class bigNat;
|
|
+ mpz_import(bigNat.get_mpz_t(), 1, 1, sizeof(nat), 0, 0, &nat);
|
|
+ return makeNatDag(bigNat);
|
|
+ }
|
|
+#endif
|
|
//
|
|
// Functions special to SuccSymbol.
|
|
//
|
|
--- a/src/Meta/interpreterManagerSymbol.cc
|
|
+++ b/src/Meta/interpreterManagerSymbol.cc
|
|
@@ -599,6 +599,12 @@
|
|
DagNode*
|
|
InterpreterManagerSymbol::upRewriteCount(const RewritingContext* context)
|
|
{
|
|
- mpz_class totalCount(context->getTotalCount());
|
|
+#if SIZEOF_LONG == 8
|
|
+ mpz_class totalCount(context->getTotalCount());
|
|
+#else
|
|
+ Int64 totalCount64 = context->getTotalCount();
|
|
+ mpz_class totalCount;
|
|
+ mpz_import(totalCount.get_mpz_t(), 1, 1, sizeof(totalCount64), 0, 0, &totalCount64);
|
|
+#endif
|
|
return metaLevel->upNat(totalCount);
|
|
}
|