Including <limits.h> in gmp-impl.h

Marc Glisse marc.glisse at
Thu Jan 2 11:45:27 UTC 2014

On Thu, 2 Jan 2014, Torbjorn Granlund wrote:

> Marc Glisse <marc.glisse at> writes:
>  On Fri, 27 Dec 2013, Niels Möller wrote:
>  > Marc Glisse <marc.glisse at> writes:
>  >
>  >> Then I am considering pushing the attached patch soon.
>  >
>  > Do we really need a configure test?
>  No idea. It seemed safer, and since we already have fallback code...
>  On the other hand, mini-gmp seems happy enough with <limits.h>.
>  If we really want to assume limits.h exists and works, there is more
>  cleanup that can be done in gmp-impl.h (remove the fallback code for
>  INT_MAX etc).
> Let's make sure either is made before 5.2.

I compromised: we now always include <limits.h>, but the fallback code is 
still there, in case anything shows up.

I'll also push a patch handling the fact that the standard SHRT_MAX and 
others don't have type short but int.

Marc Glisse

More information about the gmp-devel mailing list