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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: flconseil(at)yahoo(dot)fr, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Date: 2006-01-11 21:03:04
Message-ID: 200601112103.k0BL34t21956@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> "F. Laupretre" <flconseil(at)yahoo(dot)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)])

Could any other configure tests fail in this way?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-01-11 21:06:33 Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol
Previous Message Tom Lane 2006-01-11 21:01:44 Re: BUG #2162: Same as bug #1679 - finite() - unresolved symbol