[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gmp 3.1.1] LONG_MAX and ULONG_MAX redefined

From: Kevin Ryde
Subject: Re: [gmp 3.1.1] LONG_MAX and ULONG_MAX redefined
Date: 15 Dec 2000 07:48:04 +1000
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.5

Vincent Lefevre <address@hidden> writes:
> In GMP 3.1.1, gmp-impl.h defines LONG_MAX and ULONG_MAX, though these
> macros should be defined in <limits.h>, and this is a problem when a
> program using gmp-impl.h includes <limits.h> later (e.g. MPFR).

The suggestion would be to include limits.h before including
gmp-impl.h.  You can see gmp-impl.h has suitable #ifndef's.  I guess I
generally believe in standard headers before application ones.

> To avoid such errors, gmp-impl.h should include <limits.h> at the
> beginning.

Not sure about the merits of nested includes.

In any case this is gmp internals, and while it's not meant to be
deliberately difficult, it's not a published interface.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]