Testing for int64 (was Re: [COMMITTERS] pgsql-server/ /configure /configure.in...)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org, pgsql-ports(at)postgreSQL(dot)org
Subject: Testing for int64 (was Re: [COMMITTERS] pgsql-server/ /configure /configure.in...)
Date: 2003-01-29 01:50:58
Message-ID: 16645.1043805058@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers pgsql-ports

petere(at)postgresql(dot)org (Peter Eisentraut - PostgreSQL) writes:
> The code that checks for the 64-bit int type now gives more reasonable
> results when cross-compiling: In that case we just take the compiler's
> information and trust that the arithmetic works. Disabling int64 is too
> pessimistic.

It's not so much that we can't trust the arithmetic as that we shouldn't
trust that the platform's s(n)printf supports int64. This situation
used to be a reality on older machines with gcc but no int64 type in the
native compiler, and I suspect there are still some of them out there.

I think a reasonable choice in cross-compiling situations would be to
assume int64 works if we have a long long int datatype, but to force use
of our own snprintf rather than trusting to luck with the platform's.

(It didn't look like that's what happens right now, but I might be
missing something in the autoconf spaghetti.)

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian - CVS 2003-01-29 03:41:56 pgsql-server/src/tools RELEASE_CHANGES
Previous Message Tom Lane 2003-01-29 01:28:33 pgsql-server/src/backend/utils/adt arrayfuncs.c

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-29 02:00:52 Re: [ADMIN] Cannot connect to the database (PG 7.3)
Previous Message Nigel J. Andrews 2003-01-29 01:44:55 Re: [ADMIN] Cannot connect to the database (PG 7.3)

Browse pgsql-ports by date

  From Date Subject
Next Message Peter Eisentraut 2003-01-29 17:59:30 Re: Testing for int64 (was Re: [COMMITTERS] pgsql-server/ /configure
Previous Message Peter Eisentraut - PostgreSQL 2003-01-28 21:57:12 pgsql-server/ /configure /configure.in onfig/c ...