From: Ben Pfaff Date: Wed, 7 Feb 2007 04:01:59 +0000 (+0000) Subject: Define isinf macro only if it is not defined as a macro, even if X-Git-Tag: v0.6.0~560 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=470affdb48180aebfa764941bbdb353062978444;p=pspp-builds.git Define isinf macro only if it is not defined as a macro, even if !HAVE_ISINF, because mingw seems to have the macro without the function. --- diff --git a/src/libpspp/ChangeLog b/src/libpspp/ChangeLog index 5fcc9df9..2e5ac512 100644 --- a/src/libpspp/ChangeLog +++ b/src/libpspp/ChangeLog @@ -1,3 +1,11 @@ +Tue Feb 6 20:00:13 2007 Ben Pfaff + + * misc.h [!HAVE_ISINF] (isinf): Define only if isinf is not + defined as a macro, because mingw seems to have the macro without + the function. + [!HAVE_ISNAN] (isnan): Ditto, for symmetry only. + [!AHVE_FINITE] (finite): Ditto, for symmetry only. + Tue Feb 6 19:58:46 2007 Ben Pfaff * compiler.h (PRINTF_FORMAT): Use __printf__ instead of printf to diff --git a/src/libpspp/misc.h b/src/libpspp/misc.h index 2d30bddc..39aa535e 100644 --- a/src/libpspp/misc.h +++ b/src/libpspp/misc.h @@ -26,17 +26,17 @@ /* HUGE_VAL is traditionally defined as positive infinity, or alternatively, DBL_MAX. */ -#if !HAVE_ISINF +#if !HAVE_ISINF && !defined (isinf) #define isinf(X) (fabs (X) == HUGE_VAL) #endif /* A Not a Number is not equal to itself. */ -#if !HAVE_ISNAN +#if !HAVE_ISNAN && !defined (isnan) #define isnan(X) ((X) != (X)) #endif /* Finite numbers are not infinities or NaNs. */ -#if !HAVE_FINITE +#if !HAVE_FINITE && !defined (finite) #define finite(X) (!isinf (X) && !isnan (X)) #elif HAVE_IEEEFP_H #include /* Declares finite() under Solaris. */