[PATCH] support for mingw-w64
tg at gmplib.org
Fri Sep 11 15:17:28 CEST 2009
Ozkan Sezer <sezeroz at gmail.com> writes:
On Fri, Sep 11, 2009 at 3:17 PM, Torbjorn Granlund <tg at gmplib.org> wrote:
> Ozkan Sezer <sezeroz at gmail.com> writes:
> Or, how about doing a AC_CHECK_TYPE(intptr_t, size_t)
> in configure.in? (I didn't test this one bit, though..)
> That usage of AC_CHECK_TYPE is, I think, obsoleted. See e.g.,
> for how to do this now. We uise the new methid already in GMP, I think.
Well, one can add
and then manually do something like
if test "$ac_cv_type_intptr_t" = "yes"
if test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_voidp";then
if test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_voidp";then
# crappy fallback
Then, how do we add that to gmp-in.h / gmp.h ? that's
where I'm not sure..
gmp.h (as configure) are generated files.
AC_CHECK_* #defines stuff that goes into config.h, which gmp-impl.h then
should #ifdef/#if and DTRT. There are several examples if this in GMP
already, I think.
Note that it is pointless to check intptr_t without stdint.h, so a
AC_CHECK_TYPES needs to be conditional on the exitence of that.
I'd be lazy and just typedef size_t intptr_t, since I cannot see that
giving any problems. perhaps somebody thinks this is not kosher enough.
But avoiding complexity in GMP is important.
More information about the gmp-devel