1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
--- 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);
}
|