Re: [HACKERS] int 8 on FreeBSD - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] int 8 on FreeBSD
Date
Msg-id 21285.920824608@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] int 8 on FreeBSD  (Kevin Lo <jwlo@ms11.hinet.net>)
Responses Re: [HACKERS] int 8 on FreeBSD
List pgsql-hackers
Kevin Lo <jwlo@ms11.hinet.net> writes:
>> While compiling of 6.4.2 I've realized that int8's are not supported
>> on FreeBSD by default. The Configure script looks if %ld or %lld
>> will do the job but FreeBSD is using %qd as the long long int format.

> Here are the patches I've used to enable int8 support.

Actually, given the way that the 6.5 sources currently stand, the right
long-term solution is to make two separate tests: (1) does the compiler
do 64-bit arithmetic correctly, and if so then (2) does snprintf have a
working format for the chosen type.  If (1) passes but (2) fails we have
a fallback: enable use of our own snprintf code.  When I wrote the 6.4
configure test for int8, we hadn't yet developed that fallback, so there
wasn't much point in distinguishing compiler support from library
support.  But now we should.

If we do it this way then it doesn't matter a whole lot whether "%qd" is
one of the tested alternatives or not ;-).

I will pursue fixing things that way in the 6.5 sources.  In the
meantime, do we want to check Kevin's fixes into REL6_4, or is adding
int8 support for more machines too low-priority to justify taking any
chance of breaking 6.4.3?
        regards, tom lane


pgsql-hackers by date:

Previous
From: James Thompson
Date:
Subject: Re: [HACKERS] palloc.h again
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Why is that so slow?