Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gmp_version undeclared

10 views
Skip to first unread message

David Romano

unread,
Sep 17, 2006, 3:15:35 PM9/17/06
to perl6-i...@perl.org
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

--
"Men have become the tools of their tools."
-- Henry David Thoreau

gmp_version.patch

al...@alfarrabio.di.uminho.pt

unread,
Sep 17, 2006, 3:17:17 PM9/17/06
to David Romano, perl6-i...@perl.org
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

0 new messages