GMP and 64-bit systems

Vincent Lefevre vincent at
Mon Jun 2 21:09:49 CEST 2008

On 2008-06-02 17:46:17 +0200, Torbjorn Granlund wrote:
> One needs to make one of two things, instead of requiring
> 1) Test one or several macros that reliably implies that we have
>    sizeof(*) > sizeof(long).  #ifdef LOSE64 ... #endif

The ones in <limits.h> I assume. But I know you don't want to use it
in general (this is explicitly stated in gmp-impl.h).

> 2) Have configure edit gmp.h, e.g., insert
>      #define __GMP_LONG_LONG_SIZE 1
>    when relevant.  Note that we already edit gmp.h for other things.

Yes, since gmp.h is already edited, I'd say that this is the best

> (I should perhaps mention that it would be nice to get rid of this
> gmp.h editing, and have everything wrok right from compiler options.
> Unfortunately, we have not managed to get that to work reliably.)

Any example of problems?

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

More information about the gmp-discuss mailing list