This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: isinf


Jakub Jelinek <jakub@redhat.com> writes:

> 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.

Perhaps it should just check whether the macro isinf exists (but still use
AC_CHECK_FUNCS(isinf) for pre-C99 hosts).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]