From e6e364088ac5c980e3fb99300ba74cc26296000b Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Mon, 2 Feb 1998 00:04:08 +0000 Subject: Move all the isinf() stuff from float.c to isinf.c, and build it according to configure vs port specific #ifdef's... --- src/backend/utils/adt/float.c | 129 +----------------------------------------- 1 file changed, 1 insertion(+), 128 deletions(-) (limited to 'src/backend/utils/adt/float.c') diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index a157c992c3f..71b324a5c37 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.27 1998/01/13 19:28:32 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.28 1998/02/02 00:03:54 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -1507,130 +1507,3 @@ double x; } #endif /* !HAVE_CBRT */ - -#ifndef HAVE_ISINF - -#if defined(aix) - -#ifdef CLASS_CONFLICT -/* we want the math symbol */ -#undef class -#endif /* CLASS_CONFICT */ - -/* The gcc doesn't support isinf() (without libgcc?) so we - * have to do it - Gerhard Reitofer - */ -#ifdef __GNUC__ - -static int -isinf(double x) -{ - if (x == HUGE_VAL) - return(1); - if (x == -HUGE_VAL) - return(-1); - return(0); -} - -#else /* __GNUC__ */ - -static int -isinf(double x) -{ - int fpclass = class(x); - - if (fpclass == FP_PLUS_INF) - return (1); - if (fpclass == FP_MINUS_INF) - return (-1); - return (0); -} - -#endif /* __GNUC__ */ - -#endif /* aix */ - -#if defined(ultrix4) -#include -static int -isinf(x) -double x; -{ - int fpclass = fp_class_d(x); - - if (fpclass == FP_POS_INF) - return (1); - if (fpclass == FP_NEG_INF) - return (-1); - return (0); -} - -#endif /* ultrix4 */ - -#if defined(alpha) -#include -static int -isinf(x) -double x; -{ - int fpclass = fp_class(x); - - if (fpclass == FP_POS_INF) - return (1); - if (fpclass == FP_NEG_INF) - return (-1); - return (0); -} - -#endif /* alpha */ - -#if defined(sparc_solaris) || defined(i386_solaris) || defined(svr4) || \ - defined(sco) -#include -static int -isinf(d) -double d; -{ - fpclass_t type = fpclass(d); - - switch (type) - { - case FP_SNAN: - case FP_QNAN: - case FP_NINF: - case FP_PINF: - return (1); - default: - break; - } - - return (0); -} - -#endif /* sparc_solaris */ - -#if defined(irix5) -#include -static int -isinf(d) -double d; -{ - fpclass_t type = fpclass(d); - - switch (type) - { - case FP_SNAN: - case FP_QNAN: - case FP_NINF: - case FP_PINF: - return (1); - default: - break; - } - - return (0); -} - -#endif /* irix5 */ - -#endif /* !HAVE_ISINF */ -- cgit v1.2.3