Re: [HACKERS] int 8 on FreeBSD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] int 8 on FreeBSD
Дата
Msg-id 21285.920824608@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] int 8 on FreeBSD  (Kevin Lo <jwlo@ms11.hinet.net>)
Ответы Re: [HACKERS] int 8 on FreeBSD  (The Hermit Hacker <scrappy@hub.org>)
Список 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 по дате отправления:

Предыдущее
От: James Thompson
Дата:
Сообщение: Re: [HACKERS] palloc.h again
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Why is that so slow?