This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
"We need FINITE_P" for cross compiles
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: "We need FINITE_P" for cross compiles
- From: Benjamin Kosnik <bkoz at cygnus dot com>
- Date: Mon, 7 Feb 2000 13:33:40 -0800 (PST)
As more of the cross compiling support goes in, the math subdir gives
fits: newlib doesn't have any of these (math/mathconf.h):
/* Test whether number is finite. */
#ifdef isfinite
/* This is an ISO C 9x function. */
# define FINITE_P(X) isfinite (X)
# define FINITEF_P(X) isfinite (X)
# define FINITEL_P(X) isfinite (X)
#else
# ifdef IsNANorINF
/* This is for Solaris, which does not have special macros for other
types. */
# define FINITE_P(X) (!IsNANorINF (X))
# define FINITEF_P(X) (!IsNANorINF (X))
# define FINITEL_P(X) (!IsNANorINF (X))
# else
# if defined _GLIBCPP_HAVE_ISINF && defined _GLIBCPP_HAVE_ISNAN
# define FINITE_P(X) ({ double __x = (X); !isinf (__x) && !isnan (__x); })
# else
# ifdef _GLIBCPP_HAVE_FINITE
# define FINITE_P(X) finite (X)
# else
# error "We need FINITE_P"
# endif
# endif
IT looks like this part of v3's complex support went in to ccos, ccosh,
cexp a while ago, to work around bugs that are still present in v2.
Anybody know of any workarounds? (Gaby please help! You know more about
numerics than I.)
Or should I add yet another COMPLEX_IS_REALLY_SCREWEDUP_REALLY_REALLY
macro and put in the old v-2 code for these cases?
-benjamin