Re: [HACKERS] "24" < INT_MIN returns TRUE ???

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] "24" < INT_MIN returns TRUE ???
Дата
Msg-id 2462.931532532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] "24" < INT_MIN returns TRUE ???  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] "24" < INT_MIN returns TRUE ???  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
I said:
> Do you have <limits.h>, and if so how does it define INT_MIN?

Actually, looking closer, it doesn't matter whether you have <limits.h>,
because there is yet a *third* bug in numutils.c:
#ifdef HAVE_LIMITS#include <limits.h>#endif

should be
#ifdef HAVE_LIMITS_H...

because that is how configure and config.h spell the configuration
symbol.  Thus, <limits.h> is never included on *any* platform,
and our broken default INT_MIN is always used.

Whoever wrote this code was not having a good day...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] "24" < INT_MIN returns TRUE ???
Следующее
От: Louis Bertrand
Дата:
Сообщение: Re: [HACKERS] Hashing passwords (was Updated TODO list)