Skip to content

Commit 0fc2c81

Browse files
authored
Merge pull request #2559 from WardF/gh2132.wif
Add fenceposting for HAVE_DECL_ISINF and HAVE_DECL_ISNAN
2 parents c99f4f9 + 4d63f03 commit 0fc2c81

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ IF(ENABLE_DAP)
10661066

10671067
IF(NOT ENABLE_HDF5)
10681068
SET(ENABLE_DAP4 OFF CACHE BOOL "")
1069-
ENDIF(ENABLE_HDF5)
1069+
ENDIF(NOT ENABLE_HDF5)
10701070

10711071
ELSE()
10721072
SET(ENABLE_DAP2 OFF CACHE BOOL "")

libdispatch/dutil.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,12 @@ NC_testmode(NCURI* uri, const char* tag)
396396
return found;
397397
}
398398

399-
#if ! defined __INTEL_COMPILER
399+
#if ! defined __INTEL_COMPILER
400400
#if defined __APPLE__
401401
/** \internal */
402402

403+
#if ! defined HAVE_DECL_ISINF
404+
403405
int isinf(double x)
404406
{
405407
union { unsigned long long u; double f; } ieee754;
@@ -408,6 +410,9 @@ int isinf(double x)
408410
( (unsigned)ieee754.u == 0 );
409411
}
410412

413+
#endif /* HAVE_DECL_ISINF */
414+
415+
#if ! defined HAVE_DECL_ISNAN
411416
/** \internal */
412417
int isnan(double x)
413418
{
@@ -417,6 +422,8 @@ int isnan(double x)
417422
( (unsigned)ieee754.u != 0 ) > 0x7ff00000;
418423
}
419424

425+
#endif /* HAVE_DECL_ISNAN */
426+
420427
#endif /*APPLE*/
421428
#endif /*!_INTEL_COMPILER*/
422429

0 commit comments

Comments
 (0)