[PATCH] support for mingw-w64
sezeroz at gmail.com
Fri Sep 11 15:26:43 CEST 2009
On Fri, Sep 11, 2009 at 4:17 PM, Torbjorn Granlund <tg at gmplib.org> wrote:
> 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.,
> > http://www.gnu.org/software/autoconf/manual/html_node/Obsolete-Macros.html
> > for how to do this now. We uise the new methid already in GMP, I think.
> > --
> > Torbjörn
> Well, one can add
> AC_CHECK_SIZEOF(long long)
> 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
> intptr_fallback="long long"
> # 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.
As you wish. I can try and make a new patch using
gmp_intptr_t, if you want?
More information about the gmp-devel