diff options
Diffstat (limited to 'libraries/integer-gmp2/cbits/wrappers.c')
-rw-r--r-- | libraries/integer-gmp2/cbits/wrappers.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libraries/integer-gmp2/cbits/wrappers.c b/libraries/integer-gmp2/cbits/wrappers.c index ecee592317..930f5b8508 100644 --- a/libraries/integer-gmp2/cbits/wrappers.c +++ b/libraries/integer-gmp2/cbits/wrappers.c @@ -14,6 +14,15 @@ #include "HsFFI.h" #include "MachDeps.h" +// GMP 4.x compatibility +#if !defined(__GNU_MP_VERSION) +# error __GNU_MP_VERSION not defined +#elif __GNU_MP_VERSION < 4 +# error need GMP 4.0 or later +#elif __GNU_MP_VERSION < 5 +typedef unsigned long int mp_bitcnt_t; +#endif + #if (GMP_NUMB_BITS) != (GMP_LIMB_BITS) # error GMP_NUMB_BITS != GMP_LIMB_BITS not supported #endif |