Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Дата
Msg-id 28086.1137013304@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2162: Same as bug #1679 - finite() - unresolved symbol  ("Francois Laupretre" <flconseil@yahoo.fr>)
Ответы Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol  ("F. Laupretre" <flconseil@yahoo.fr>)
Список pgsql-bugs
"F. Laupretre" <flconseil@yahoo.fr> writes:
> In order for the check to be done correctly, we have to provide a
> program that the compiler cannot optimize, ie where it cannot detect
> that the call is useless, even if it is very very smart. Here is a
> patch with such a program.

I haven't got a lot of faith in your proposed patch --- with
sufficiently aggressive optimization, the compiler might inline
the is_f() function, no?  After looking at the modern version of
AC_CHECK_FUNC, I'm thinking that the best answer is to make the
finite() result affect the program's exit status.  Would you try
this version of the check and see if it works for you?

AC_TRY_LINK([#include <math.h>],
            [return finite(1.0) ? 0 : 1;],
            [AC_DEFINE(HAVE_FINITE, 1, [Define to 1 if you have finite().])
AC_MSG_RESULT(yes)],
            [AC_MSG_RESULT(no)])

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol