Determine GMP version

Sisyphus sisyphus1 at optusnet.com.au
Mon Apr 10 12:28:56 CEST 2006


----- Original Message ----- 
From: "Torbjorn Granlund"
.
.
>
> Look for "version" in the GMP manual.
>

I guess you meant me to find:

- Macro: __GNU_MP_VERSION
- Macro: __GNU_MP_VERSION_MINOR
- Macro: __GNU_MP_VERSION_PATCHLEVEL

I was led to the same macros by Paul's post (from yesterday). If I've missed
what I was supposed to find then I apologise - and please let me know.

Sorry - I should have replied to Paul's post earlier. My C (especially
preprocessor stuff) is pretty weak, and I've only now just verified that the
preprocessor understands comparison and logical operators.

That the following works is all I really needed to know:

#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR
>= 2)
#define CAN_CALL_COMBIT_AND_ROOTREM
#endif

Thanks Paul, Torbjorn - for directing me to the __GNU_MP_VERSION* macros.

Cheers,
Rob




More information about the gmp-discuss mailing list