Merge pull request #2559 from WardF/gh2132.wif

Add fenceposting for HAVE_DECL_ISINF and HAVE_DECL_ISNAN
This commit is contained in:
Ward Fisher 2022-11-16 16:42:29 -07:00 committed by GitHub
commit 0fc2c817b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -1066,7 +1066,7 @@ IF(ENABLE_DAP)
IF(NOT ENABLE_HDF5)
SET(ENABLE_DAP4 OFF CACHE BOOL "")
ENDIF(ENABLE_HDF5)
ENDIF(NOT ENABLE_HDF5)
ELSE()
SET(ENABLE_DAP2 OFF CACHE BOOL "")

View File

@ -396,10 +396,12 @@ done:
return found;
}
#if ! defined __INTEL_COMPILER
#if ! defined __INTEL_COMPILER
#if defined __APPLE__
/** \internal */
#if ! defined HAVE_DECL_ISINF
int isinf(double x)
{
union { unsigned long long u; double f; } ieee754;
@ -408,6 +410,9 @@ int isinf(double x)
( (unsigned)ieee754.u == 0 );
}
#endif /* HAVE_DECL_ISINF */
#if ! defined HAVE_DECL_ISNAN
/** \internal */
int isnan(double x)
{
@ -417,6 +422,8 @@ int isnan(double x)
( (unsigned)ieee754.u != 0 ) > 0x7ff00000;
}
#endif /* HAVE_DECL_ISNAN */
#endif /*APPLE*/
#endif /*!_INTEL_COMPILER*/