Skip to content

Commit 039d678

Browse files
committed
Remove now obsolete configure checks for INFINITY and NAN.
1 parent 67f8557 commit 039d678

File tree

2 files changed

+0
-135
lines changed

2 files changed

+0
-135
lines changed

Zend/Zend.m4

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -387,135 +387,6 @@ else
387387
fi
388388
AC_MSG_RESULT($ZEND_GCC_GLOBAL_REGS)
389389

390-
dnl Check if atof() accepts NAN.
391-
AC_CACHE_CHECK(whether atof() accepts NAN, ac_cv_atof_accept_nan,[
392-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
393-
#include <math.h>
394-
#include <stdlib.h>
395-
396-
#ifdef HAVE_ISNAN
397-
#define zend_isnan(a) isnan(a)
398-
#elif defined(HAVE_FPCLASS)
399-
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
400-
#else
401-
#define zend_isnan(a) 0
402-
#endif
403-
404-
int main(int argc, char** argv)
405-
{
406-
return zend_isnan(atof("NAN")) ? 0 : 1;
407-
}
408-
]])],[
409-
ac_cv_atof_accept_nan=yes
410-
],[
411-
ac_cv_atof_accept_nan=no
412-
],[
413-
ac_cv_atof_accept_nan=no
414-
])])
415-
if test "$ac_cv_atof_accept_nan" = "yes"; then
416-
AC_DEFINE([HAVE_ATOF_ACCEPTS_NAN], 1, [whether atof() accepts NAN])
417-
fi
418-
419-
dnl Check if atof() accepts INF.
420-
AC_CACHE_CHECK(whether atof() accepts INF, ac_cv_atof_accept_inf,[
421-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
422-
#include <math.h>
423-
#include <stdlib.h>
424-
425-
#ifdef HAVE_ISINF
426-
#define zend_isinf(a) isinf(a)
427-
#elif defined(INFINITY)
428-
/* Might not work, but is required by ISO C99 */
429-
#define zend_isinf(a) (((a)==INFINITY)?1:0)
430-
#elif defined(HAVE_FPCLASS)
431-
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
432-
#else
433-
#define zend_isinf(a) 0
434-
#endif
435-
436-
int main(int argc, char** argv)
437-
{
438-
return zend_isinf(atof("INF")) && zend_isinf(atof("-INF")) ? 0 : 1;
439-
}
440-
]])],[
441-
ac_cv_atof_accept_inf=yes
442-
],[
443-
ac_cv_atof_accept_inf=no
444-
],[
445-
ac_cv_atof_accept_inf=no
446-
])])
447-
if test "$ac_cv_atof_accept_inf" = "yes"; then
448-
AC_DEFINE([HAVE_ATOF_ACCEPTS_INF], 1, [whether atof() accepts INF])
449-
fi
450-
451-
dnl Check if HUGE_VAL == INF.
452-
AC_CACHE_CHECK(whether HUGE_VAL == INF, ac_cv_huge_val_inf,[
453-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
454-
#include <math.h>
455-
#include <stdlib.h>
456-
457-
#ifdef HAVE_ISINF
458-
#define zend_isinf(a) isinf(a)
459-
#elif defined(INFINITY)
460-
/* Might not work, but is required by ISO C99 */
461-
#define zend_isinf(a) (((a)==INFINITY)?1:0)
462-
#elif defined(HAVE_FPCLASS)
463-
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
464-
#else
465-
#define zend_isinf(a) 0
466-
#endif
467-
468-
int main(int argc, char** argv)
469-
{
470-
return zend_isinf(HUGE_VAL) ? 0 : 1;
471-
}
472-
]])],[
473-
ac_cv_huge_val_inf=yes
474-
],[
475-
ac_cv_huge_val_inf=no
476-
],[
477-
ac_cv_huge_val_inf=yes
478-
])])
479-
dnl This is the most probable fallback so we assume yes in case of cross compile.
480-
if test "$ac_cv_huge_val_inf" = "yes"; then
481-
AC_DEFINE([HAVE_HUGE_VAL_INF], 1, [whether HUGE_VAL == INF])
482-
fi
483-
484-
dnl Check if HUGE_VAL + -HUGEVAL == NAN.
485-
AC_CACHE_CHECK(whether HUGE_VAL + -HUGEVAL == NAN, ac_cv_huge_val_nan,[
486-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
487-
#include <math.h>
488-
#include <stdlib.h>
489-
490-
#ifdef HAVE_ISNAN
491-
#define zend_isnan(a) isnan(a)
492-
#elif defined(HAVE_FPCLASS)
493-
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
494-
#else
495-
#define zend_isnan(a) 0
496-
#endif
497-
498-
int main(int argc, char** argv)
499-
{
500-
#if defined(__sparc__) && !(__GNUC__ >= 3)
501-
/* prevent bug #27830 */
502-
return 1;
503-
#else
504-
return zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1;
505-
#endif
506-
}
507-
]])],[
508-
ac_cv_huge_val_nan=yes
509-
],[
510-
ac_cv_huge_val_nan=no
511-
],[
512-
ac_cv_huge_val_nan=yes
513-
])])
514-
dnl This is the most probable fallback so we assume yes in case of cross compile.
515-
if test "$ac_cv_huge_val_nan" = "yes"; then
516-
AC_DEFINE([HAVE_HUGE_VAL_NAN], 1, [whether HUGE_VAL + -HUGEVAL == NAN])
517-
fi
518-
519390
dnl Check whether __cpuid_count is available.
520391
AC_CACHE_CHECK(whether __cpuid_count is available, ac_cv_cpuid_count_available, [
521392
AC_LINK_IFELSE([AC_LANG_PROGRAM([[

win32/build/config.w32.h.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@
118118

119119
#define HAVE_MBLEN
120120

121-
#undef HAVE_ATOF_ACCEPTS_NAN
122-
#undef HAVE_ATOF_ACCEPTS_INF
123-
#define HAVE_HUGE_VAL_NAN 0
124-
125121
/* vs.net 2005 has a 64-bit time_t. This will likely break
126122
* 3rdParty libs that were built with older compilers; switch
127123
* back to 32-bit */
@@ -133,8 +129,6 @@
133129
#define HAVE_MBRLEN 1
134130
#define HAVE_MBSTATE_T 1
135131

136-
#define HAVE_HUGE_VAL_INF 1
137-
138132
#define HAVE_GETRUSAGE
139133

140134
#define HAVE_FTOK 1

0 commit comments

Comments
 (0)