diff options
Diffstat (limited to 'development/maude/32-bit-fixes.patch')
-rw-r--r-- | development/maude/32-bit-fixes.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/development/maude/32-bit-fixes.patch b/development/maude/32-bit-fixes.patch new file mode 100644 index 0000000000..ae03dafe12 --- /dev/null +++ b/development/maude/32-bit-fixes.patch @@ -0,0 +1,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); + } |