Re: Including limits.h in gmp-impl.h

2014-01-03 Thread Vincent Lefevre
On 2014-01-03 12:19:26 +0100, Marc Glisse wrote: On Fri, 3 Jan 2014, Torbjorn Granlund wrote: Vincent Lefevre vinc...@vinc17.net writes: Note that if you want to care of non-two's-complement implementations, you should write: Isn't the notion of 2's complement restricted to signed

Re: Including limits.h in gmp-impl.h

2014-01-02 Thread Marc Glisse
On Thu, 2 Jan 2014, Niels Möller wrote: Marc Glisse marc.gli...@inria.fr writes: I'll also push a patch handling the fact that the standard SHRT_MAX and others don't have type short but int. Can you explain what the problem is? I noticed this change, --- a/gmp-h.in Thu Jan 02 12:28:21

Re: Including limits.h in gmp-impl.h

2014-01-02 Thread Niels Möller
Marc Glisse marc.gli...@inria.fr writes: So, do you agree with the change? Yes. I don't understand why the C spec doesn't define USHORT_MAX the way it does, but we should nevertheless define our constant in the same way as C's USHORT_MAX. (care to add a suitable comment?) I think the comment

Re: Including limits.h in gmp-impl.h

2013-12-27 Thread Marc Glisse
On Fri, 27 Dec 2013, Torbjorn Granlund wrote: Marc Glisse marc.gli...@inria.fr writes: I couldn't find anything other than the -mcpu=ultrasparc ABI=32 issue with gcc-2.9x around 1999-2000. I haven't looked deeply into this issue, but to me it seems strange that we define INT_MAX etc

Re: Including limits.h in gmp-impl.h

2013-12-27 Thread Niels Möller
Marc Glisse marc.gli...@inria.fr writes: Then I am considering pushing the attached patch soon. Do we really need a configure test? Which C compilers lack limits.h? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale

Re: Including limits.h in gmp-impl.h

2013-12-27 Thread Marc Glisse
On Fri, 27 Dec 2013, Niels Möller wrote: Marc Glisse marc.gli...@inria.fr 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

Including limits.h in gmp-impl.h

2013-12-25 Thread Marc Glisse
by including limits.h in gmp-impl.h, but I see this comment: /* limits.h is not used in general, since it's an ANSI-ism, and since on solaris gcc 2.95 under -mcpu=ultrasparc in ABI=32 ends up getting wrong values (the ABI=64 values). On Cray vector systems, however, we need the system

Re: Including limits.h in gmp-impl.h

2013-12-25 Thread Marc Glisse
Oups, looks like I already asked about that: https://gmplib.org/list-archives/gmp-bugs/2011-November/002443.html and the reply was to try including tests.h before gmp-impl.h. -- Marc Glisse ___ gmp-devel mailing list gmp-devel@gmplib.org

Re: Including limits.h in gmp-impl.h

2013-12-25 Thread Torbjorn Granlund
Vincent Lefevre vinc...@vinc17.net writes: On 2013-12-25 12:13:39 +0100, Marc Glisse wrote: Oups, looks like I already asked about that: https://gmplib.org/list-archives/gmp-bugs/2011-November/002443.html and the reply was to try including tests.h before gmp-impl.h. I'd say

Re: Including limits.h in gmp-impl.h

2013-12-25 Thread Vincent Lefevre
On 2013-12-25 13:28:20 +0100, Torbjorn Granlund wrote: IIRC, limits.h was unreliable for many years, and our workarounds allowed GMP to work on more systems. I've tried to find something about that on Google, but couldn't find anything. Any reference? -- Vincent Lefèvre vinc...@vinc17.net -

Re: Including limits.h in gmp-impl.h

2013-12-25 Thread Torbjorn Granlund
Vincent Lefevre vinc...@vinc17.net writes: I've tried to find something about that on Google, but couldn't find anything. Any reference? Perhaps ChangeLog has some history. Torbjörn ___ gmp-devel mailing list gmp-devel@gmplib.org