This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
V3 PATCH: Remove unncessary FINITE_P macro definition in libmath/mathcinf.h
- To: gcc-patches at gcc dot gnu dot org
- Subject: V3 PATCH: Remove unncessary FINITE_P macro definition in libmath/mathcinf.h
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 16 Feb 2001 18:16:29 +0100
- Cc: libstdc++ at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
This patch removes FINITE_P and INFINITE_P macro definitions. They
were no longer necessary to built V3 but their presences were causing
build failures on some plateforms.
Bootstrapped and tested on i686-pc-linux-gnu
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
* libmath/mathconf.h (FINITE_P, INFINITE_P): Remove macro
definitions.
Index: libmath/mathconf.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libmath/mathconf.h,v
retrieving revision 1.4
diff -p -r1.4 mathconf.h
*** mathconf.h 2000/12/21 01:28:57 1.4
--- mathconf.h 2001/02/16 17:04:34
*************** double nan (void);
*** 128,227 ****
# define M_PI 3.14159265358979323846
#endif
- /* Test whether number is finite. */
- #ifdef isfinite
- /* This is an ISO C99 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
- # if defined _GLIBCPP_HAVE_ISINFF && defined _GLIBCPP_HAVE_ISNANF
- # define FINITEF_P(X) ({ float __x = (X); !isinff (__x) && !isnanf (__x); })
- # else
- # ifdef _GLIBCPP_HAVE_FINITE
- # define FINITEF_P(X) finite (X)
- # else
- # define FINITEF_P(X) FINITE_P (X)
- # endif
- # endif
- # if defined _GLIBCPP_HAVE_ISINFL && defined _GLIBCPP_HAVE_ISNANL
- # define FINITEL_P(X) ({ long double __x = (X); \
- !isinfl (__x) && !isnanl (__x); })
- # else
- # ifdef _GLIBCPP_HAVE_QFINITE
- # define FINITEL_P(X) qfinite (X)
- # else
- # define FINITEL_P(X) FINITE_P (X)
- # endif
- # endif
- # endif
- #endif
-
- /* Test whether number is infinite. */
- #ifdef isinf
- /* This is an ISO C99 macro. */
- # define INFINITE_P(X) isinf (X)
- # define INFINITEF_P(X) isinf (X)
- # define INFINITEL_P(X) isinf (X)
- #else
- # ifdef IsINF
- /* This is for Solaris, which does not have special macros for other
- types. */
- # define INFINITE_P(X) IsINF (X)
- # define INFINITEF_P(X) IsINF (X)
- # define INFINITEL_P(X) IsINF (X)
- # else
- # if defined _GLIBCPP_HAVE_ISINF
- # define INFINITE_P(X) isinf (X)
- # else
- # ifdef _GLIBCPP_HAVE_FPCLASS
- # ifdef _FPCLASS_PINF
- /* Mingw defines _FPCLASS_PINF. */
- # define FP_PINF _FPCLASS_PINF
- # endif
- /* This is for Irix and Mingw. */
- # define INFINITE_P(X) (fpclass (fabs (X)) == FP_PINF)
- # else
- # ifdef IS_INF
- /* This is for AIX. */
- # define INFINITE_P(X) ({ double __d = (X); IS_INF (__d); })
- # else
- # error "We need INFINITE_P"
- # endif
- # endif
- # endif
- # if defined _GLIBCPP_HAVE_ISINFF
- # define INFINITEF_P(X) isinff (X)
- # else
- # define INFINITEF_P(X) INFINITE_P (X)
- # endif
- # if defined _GLIBCPP_HAVE_ISINFL
- # define INFINITEL_P(X) isinfl (X)
- # else
- # ifdef _GLIBCPP_HAVE_QFPCLASS
- # define INFINITEL_P(X) (qfpclass (fabsl (X)) == FP_PINF)
- # else
- # define INFINITEL_P(X) INFINITE_P (X)
- # endif
- # endif
- # endif
- #endif
#ifdef __cplusplus
extern "C" {
--- 128,133 ----