Re: [HACKERS] int 8 on FreeBSD
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Lo <jwlo@ms11.hinet.net>
Cc: pgsql-hackers@postgreSQL.org
Date: 1999-03-07T16:36:48Z
Lists: 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