Skip to Content.
Sympa Menu

freetds - RE: configure.in check for long long

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: configure.in check for long long
  • Date: Fri, 9 Aug 2002 08:40:22 -0400 (EDT)


On Fri, 9 Aug 2002, ZIGLIO Frediano wrote:

> > checking size of long long... (cached) 8
> > checking size of __int64... (cached) 0
>
> 0 mean that __int64 type do not exist. (cached) mean that you exec configure
> without deleting config.cache... some problem can raise.

granted, it was an example of my output which obviously i didn't clear my
cache since it was merely an example.

>
> I note in configure.in this code
>
> case 8 in
> $ac_cv_sizeof_long) int64=long;;
> $ac_cv_sizeof_long_long) int64="long long";;
> $ac_cv_sizeof___int64) int64=__int64;;
> esac
>
> if test "$int64"; then
> AC_DEFINE(HAVE_INT64)
> else
> int64=long
> fi
>
> If you have not a 64bit int why you define int64 to long? This can cause
> some problems.

See my other post where I detailed this. Basically if a platform has no
8byte integer, we will not support the type, so the problem code will be
#ifdef HAVE_INT64 anyway. But I have to assign the type as something.

> Perhaps is best to define int64 as a struct like
> struct {
> TDS_UINT low;
> TDS_INT high;
> } int64;
> for little endian and
> struct {
> TDS_INT high;
> TDS_UINT low;
> } int64;
> for big endian
> This also prevent compilating of bad code.

I'd like to see MONEY go back to a high/low int and have it cast as
necessary inside the conversion routines inside the ifdef. TDS_INT8
should only be applicable in a global sense to SYBINT8 types which are
easily optional. But we have to define TDS_INT8 to *something* because of
the substitution.

Brian





Archive powered by MHonArc 2.6.24.

Top of Page