From: Jakub Jelinek <jakub@redhat.com>
To: Hiroshi Fujishima <hiroshi.fujishima@gmail.com>
Cc: Andreas Schwab <schwab@suse.de>,
Michael Veksler <VEKSLER@il.ibm.com>,
Eric Botcazou <ebotcazou@libertysurf.fr>,
gcc@gcc.gnu.org, Joe Buck <Joe.Buck@synopsys.com>
Subject: Re: isinf
Date: Thu, 14 Jul 2005 09:35:00 -0000 [thread overview]
Message-ID: <20050714093542.GS4740@sunsite.mff.cuni.cz> (raw)
In-Reply-To: <7c3bqhkaad.fsf@gmail.com>
On Thu, Jul 14, 2005 at 06:27:06PM +0900, Hiroshi Fujishima wrote:
> Andreas Schwab <schwab@suse.de> writes:
>
> > Why not just use AC_HAVE_FUNCS(isinf)? IIUC this is part of a configure
> > script, although whether it is autoconf generated is not clear so far.
>
> Though I don't know the why, rrdtool-1.2.10/configure.ac has the
> following macro.
>
> dnl HP-UX 11.00 does not have finite but does have isfinite as a macro so we need
> dnl actual code to check if this works
> AC_CHECK_FUNCS(fpclassify, ,
> [AC_MSG_CHECKING(for fpclassify with <math.h>)
> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; fpclassify(f)]])],[AC_MSG_RESULT(yes)
> AC_DEFINE(HAVE_FPCLASSIFY)],[AC_MSG_RESULT(no)])])
> AC_CHECK_FUNCS(finite, ,
> [AC_CHECK_FUNCS(isfinite, ,
> [AC_MSG_CHECKING(for isfinite with <math.h>)
> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; isfinite(f)]])],[AC_MSG_RESULT(yes)
> AC_DEFINE(HAVE_ISFINITE)],[AC_MSG_RESULT(no)])])])
> AC_CHECK_FUNCS(isinf, ,
> [AC_MSG_CHECKING(for isinf with <math.h>)
> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; int x = isinf(f)]])],[AC_MSG_RESULT(yes)
> AC_DEFINE(HAVE_ISINF)],[AC_MSG_RESULT(no)])])
Guess that's because AC_HAVE_FUNCS(isinf) is wrong.
isinf/isfinite/fpclassify are all documented as macros in ISO C99.
So
[AC_MSG_CHECKING(for isinf with <math.h>)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>
volatile int x; volatile float f;]], [[x = isinf(f)]])],[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISINF)],[AC_MSG_RESULT(no)])])
should be reasonably safe for now.
Jakub
next prev parent reply other threads:[~2005-07-14 9:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-13 17:07 isinf Hiroshi Fujishima
2005-07-13 19:08 ` isinf Eric Botcazou
2005-07-13 22:32 ` isinf Hiroshi Fujishima
2005-07-13 22:59 ` isinf Eric Botcazou
2005-07-13 23:17 ` isinf Hiroshi Fujishima
2005-07-13 23:29 ` isinf Joe Buck
2005-07-13 23:39 ` isinf Dale Johannesen
2005-07-13 23:48 ` isinf Hiroshi Fujishima
2005-07-14 6:27 ` isinf Eric Botcazou
2005-07-14 6:52 ` isinf Michael Veksler
2005-07-14 7:33 ` isinf Eric Botcazou
2005-07-14 7:56 ` isinf Michael Veksler
2005-07-14 8:59 ` isinf Andreas Schwab
2005-07-14 9:10 ` isinf Eric Botcazou
2005-07-14 9:27 ` isinf Hiroshi Fujishima
2005-07-14 9:35 ` Jakub Jelinek [this message]
2005-07-14 9:47 ` isinf Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050714093542.GS4740@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=Joe.Buck@synopsys.com \
--cc=VEKSLER@il.ibm.com \
--cc=ebotcazou@libertysurf.fr \
--cc=gcc@gcc.gnu.org \
--cc=hiroshi.fujishima@gmail.com \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).