On Sunday 20 April 2008 12:17:58 Senaka Fernando wrote:

> The provided patch resolves the C++ build break caused by gmp.h.

> Index: src/pmc/bigint.pmc
> ===================================================================
> --- src/pmc/bigint.pmc  (revision 27059)
> +++ src/pmc/bigint.pmc  (working copy)
> @@ -26,9 +26,13 @@
>
>  /* TODO split that out into a separate file */
>
> -#ifdef S_SPLINT_S
> -#  undef PARROT_HAS_GMP /* splint barfs on the gmp.h header */
> -#endif /* S_SPLINT_S */
> +#ifdef PARROT_HAS_GMP
> +#  ifdef S_SPLINT_S
> +#    undef PARROT_HAS_GMP /* splint barfs on the gmp.h header */
> +#  elif __cplusplus
> +#    undef PARROT_HAS_GMP /* gmp.h header is C++ incompatible */
> +#  endif
> +#endif

Is this really correct?  My gmp.h file has:

#if defined (__cplusplus)
#include <iosfwd>   /* for std::istream, std::ostream, std::string */
#include <cstdio>   /* for std::FILE */
#endif

... so I assume that at least some versions of the library attempt to work 
with C++.

-- c

Reply via email to