[PATCH] support for mingw-w64
sezeroz at gmail.com
Fri Sep 11 14:11:08 CEST 2009
On Fri, Sep 11, 2009 at 3:05 PM, Torbjorn Granlund <tg at gmplib.org> wrote:
> nisse at lysator.liu.se (Niels Möller) writes:
> Torbjorn Granlund <tg at gmplib.org> writes:
> > * We unfortunately cannot use intptr_t unconditionally, since it is not
> > available everywhere we want GMP to work; it is a C99 feature.
> > I wonder if size_t could be used instead? While perhaps not elegant,
> > it should work. Does anybody see any problem?
> Another alternative is ptrdiff_t. My understanding is that this is
> fairly portable in both theory and practice.
> My undertanding is that sizeof(ptrdiff_t) == sizeof(size_t) should hold
> true on any ISO C90 or C99 system. They only differ in signedness.
> Perhaps some usages of ptrdiff_t could make use of the sign ("which
> sub-object within the objext comnes first in memory?"), but I doubt GMP
> will care.
> I suggest that we either use size_t, or if people think ptrdiff_t make
I am OK with these.
> more sense, use that. But we might as well use a typedef in gmp-impl.h:
> typedef size_t gmp_intptr_t;
Or, how about doing a AC_CHECK_TYPE(intptr_t, size_t)
in configure.in? (I didn't test this one bit, though..)
More information about the gmp-devel