Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackerspgsql-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

pgsql-ports by date

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

pgsql-hackers by date

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

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group