Re: G_TYPE_INT64



vishnu pobox com writes:

> On Wed, Oct 10, 2001 at 05:50:34PM -0400, Owen Taylor wrote:
> > > 3) i removed G_HAVE_GINT64 conditionalization per Tim's suggestion.
> > 
> > configure.in needs a check along the lines of:
> > 
> >  if [ $ac_cv_sizeof_long == 8 -o $ac_cv_sizeof_long_long == 8 ] ; then
> >    :
> >  else
> >    AC_MSG_ERROR([
> > *** GLib require a 64 bit type. You might want to consider
> > *** using the GNU C compiler.
> > ])
> >  fi
> 
> Sorry for being clueless about autoconf, but approximately where
> does this go in configure.in? 

I'd put it in near the AC_CHECK_SIZEOF() calls. You probably
can integrate it with the if statements that are used for
running additional format checks; (note that the above is incomplete
and gint64 is also allowed to be int or __int64.)

>  Can i write it like this to avoid
> any duplication of type-width test logic?
> 
> if test -n "$gint64"; then
>   :
> else
>   AC_MSG_ERROR([
> *** GLib require a 64 bit type. You might want to consider
> *** using the GNU C compiler.
> ])
> fi

I wouldn't advise it, because the definition of gint64 is
being done as part of the AC_OUTPUT() definition, and stuff
in AC_OUTPUT() is "special" in ways that mere mortals have
trouble understanding. I wouldn't trust it to get run at
the right time.

Regards,
                                        Owen




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