Hi, fixed

        svnbotl r14636 | leo++ | trunk:
        svnbotl : fix BigInt.version if gmp isnt installed

David Romano wrote:
Hi everyone,

I just tried to build parrot (something I hadn't done in about a month
and a half) and it failed to build due to gmp_version being undeclared
in src/pmc/bigint.pmc (not suprising since I don't have GMP installed).
Attached is a patch that fixes the problem for me. Using the
preprocessor was the only way I knew how to fix it.

- David



------------------------------------------------------------------------

Index: src/pmc/bigint.pmc
===================================================================
--- src/pmc/bigint.pmc  (revision 14630)
+++ src/pmc/bigint.pmc  (working copy)
@@ -492,14 +492,18 @@
=item C<METHOD STRING* version()> -Return GMP version string "x.y.z".
+Return GMP version string "x.y.z", or "0.0.0" if GMP is unavailable.
=cut */ METHOD STRING* version() {
+#ifdef PARROT_HAS_GMP
         return string_from_cstring(INTERP, gmp_version, 0);
+#else
+        return string_from_cstring(INTERP, "0.0.0", 0);
+#endif
     }
/*

--
Alberto Simões - Departamento de Informática - Universidade do Minho
                 Campus de Gualtar - 4710-057 Braga - Portugal

"Beware of bugs in the above code;
 I have only proved it correct, not tried it."
                                   --- Donald Knuth

Reply via email to