[PATCH] support for mingw-w64

Ozkan Sezer sezeroz at gmail.com
Fri Sep 11 15:03:24 CEST 2009


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)
AC_CHECK_SIZEOF(void*)
AC_CHECK_TYPES([intptr_t])

and then manually do something like

if test "$ac_cv_type_intptr_t" = "yes"

  intptr_fallback="intptr_t"

else

  if test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_voidp";then
    intptr_fallback="long"
  else
    if test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_voidp";then
      intptr_fallback="long long"
    else
    # crappy fallback
      intptr_fallback="size_t"
    fi
  fi

fi

Then, how do we add that to gmp-in.h / gmp.h ? that's
where I'm not sure..

--
Ozkan


More information about the gmp-devel mailing list