llvm.org GIT mirror llvm / 0df66b8
Drop the hacks used for partial C99 math libraries. All supported platforms have half-way decent C99 support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231679 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 4 years ago
14 changed file(s) with 6 addition(s) and 1200 deletion(s). Raw diff Collapse all Expand all
16981698 dnl===
16991699 dnl===-----------------------------------------------------------------------===
17001700
1701 AC_CHECK_FUNCS([backtrace ceilf floorf roundf rintf nearbyintf getcwd ])
1702 AC_CHECK_FUNCS([powf fmodf strtof round ])
1703 AC_CHECK_FUNCS([log log2 log10 exp exp2])
1701 AC_CHECK_FUNCS([backtrace getcwd ])
17041702 AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ])
17051703 AC_CHECK_FUNCS([isatty mkdtemp mkstemp ])
17061704 AC_CHECK_FUNCS([mktemp posix_spawn pread realpath sbrk setrlimit ])
17631761 ])
17641762 AC_DEFINE_UNQUOTED([WIN32_ELMCB_PCSTR],$llvm_cv_win32_elmcb_pcstr,[Type of 1st arg on ELM Callback])
17651763 fi
1766
1767 dnl Check for variations in the Standard C++ library and STL. These macros are
1768 dnl provided by LLVM in the autoconf/m4 directory.
1769 AC_FUNC_ISNAN
1770 AC_FUNC_ISINF
17711764
17721765 dnl Check for mmap support.We also need to know if /dev/zero is required to
17731766 dnl be opened for allocating RWX memory.
+0
-42
autoconf/m4/func_isinf.m4 less more
None dnl
1 dnl This function determins if the isinf function isavailable on this
2 dnl platform.
3 dnl
4
5 AC_DEFUN([AC_FUNC_ISINF],[
6
7 AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_math_h],
8 [isinf], [],
9 [float f; isinf(f);])
10 if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then
11 AC_DEFINE([HAVE_ISINF_IN_MATH_H], [1],
12 [Set to 1 if the isinf function is found in ])
13 fi
14
15 AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_cmath],
16 [isinf], [],
17 [float f; isinf(f);])
18 if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then
19 AC_DEFINE([HAVE_ISINF_IN_CMATH], [1],
20 [Set to 1 if the isinf function is found in ])
21 fi
22
23 AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
24 [std::isinf], [],
25 [float f; std::isinf(f);])
26 if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
27 AC_DEFINE([HAVE_STD_ISINF_IN_CMATH], [1],
28 [Set to 1 if the std::isinf function is found in ])
29 fi
30
31 AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h],
32 [finite], [],
33 [float f; finite(f);])
34 if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then
35 AC_DEFINE([HAVE_FINITE_IN_IEEEFP_H], [1],
36 [Set to 1 if the finite function is found in ])
37 fi
38
39 ])
40
41
+0
-27
autoconf/m4/func_isnan.m4 less more
None #
1 # This function determines if the isnan function is available on this
2 # platform.
3 #
4 AC_DEFUN([AC_FUNC_ISNAN],[
5 AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h],
6 [isnan], [],
7 [float f; isnan(f);])
8
9 if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then
10 AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in ])
11 fi
12
13 AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath],
14 [isnan], [],
15 [float f; isnan(f);])
16 if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then
17 AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in ])
18 fi
19
20 AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath],
21 [std::isnan], [],
22 [float f; std::isnan(f);])
23 if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then
24 AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in ])
25 fi
26 ])
136136 check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
137137 check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)
138138 check_symbol_exists(isatty unistd.h HAVE_ISATTY)
139 check_symbol_exists(isinf cmath HAVE_ISINF_IN_CMATH)
140 check_symbol_exists(isinf math.h HAVE_ISINF_IN_MATH_H)
141 check_symbol_exists(finite ieeefp.h HAVE_FINITE_IN_IEEEFP_H)
142 check_symbol_exists(isnan cmath HAVE_ISNAN_IN_CMATH)
143 check_symbol_exists(isnan math.h HAVE_ISNAN_IN_MATH_H)
144 check_symbol_exists(ceilf math.h HAVE_CEILF)
145 check_symbol_exists(floorf math.h HAVE_FLOORF)
146 check_symbol_exists(fmodf math.h HAVE_FMODF)
147 check_symbol_exists(log math.h HAVE_LOG)
148 check_symbol_exists(log2 math.h HAVE_LOG2)
149 check_symbol_exists(log10 math.h HAVE_LOG10)
150 check_symbol_exists(exp math.h HAVE_EXP)
151 check_symbol_exists(exp2 math.h HAVE_EXP2)
152 check_symbol_exists(exp10 math.h HAVE_EXP10)
153139 check_symbol_exists(futimens sys/stat.h HAVE_FUTIMENS)
154140 check_symbol_exists(futimes sys/time.h HAVE_FUTIMES)
155141 if( HAVE_SETJMP_H )
161147 if( HAVE_SYS_UIO_H )
162148 check_symbol_exists(writev sys/uio.h HAVE_WRITEV)
163149 endif()
164 check_symbol_exists(nearbyintf math.h HAVE_NEARBYINTF)
165150 check_symbol_exists(mallctl malloc_np.h HAVE_MALLCTL)
166151 check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
167152 check_symbol_exists(malloc_zone_statistics malloc/malloc.h
1369813698
1369913699
1370013700
13701
13702
13703
13704
13705
13706 for ac_func in backtrace ceilf floorf roundf rintf nearbyintf getcwd
13707 do
13708 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13709 { echo "$as_me:$LINENO: checking for $ac_func" >&5
13710 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13711 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13712 echo $ECHO_N "(cached) $ECHO_C" >&6
13713 else
13714 cat >conftest.$ac_ext <<_ACEOF
13715 /* confdefs.h. */
13716 _ACEOF
13717 cat confdefs.h >>conftest.$ac_ext
13718 cat >>conftest.$ac_ext <<_ACEOF
13719 /* end confdefs.h. */
13720 /* Define $ac_func to an innocuous variant, in case declares $ac_func.
13721 For example, HP-UX 11i declares gettimeofday. */
13722 #define $ac_func innocuous_$ac_func
13723
13724 /* System header to define __stub macros and hopefully few prototypes,
13725 which can conflict with char $ac_func (); below.
13726 Prefer to if __STDC__ is defined, since
13727 exists even on freestanding compilers. */
13728
13729 #ifdef __STDC__
13730 # include
13731 #else
13732 # include
13733 #endif
13734
13735 #undef $ac_func
13736
13737 /* Override any GCC internal prototype to avoid an error.
13738 Use char because int might match the return type of a GCC
13739 builtin and then its argument prototype would still apply. */
13740 #ifdef __cplusplus
13741 extern "C"
13742 #endif
13743 char $ac_func ();
13744 /* The GNU C library defines this for functions which it implements
13745 to always fail with ENOSYS. Some functions are actually named
13746 something starting with __ and the normal name is an alias. */
13747 #if defined __stub_$ac_func || defined __stub___$ac_func
13748 choke me
13749 #endif
13750
13751 int
13752 main ()
13753 {
13754 return $ac_func ();
13755 ;
13756 return 0;
13757 }
13758 _ACEOF
13759 rm -f conftest.$ac_objext conftest$ac_exeext
13760 if { (ac_try="$ac_link"
13761 case "(($ac_try" in
13762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13763 *) ac_try_echo=$ac_try;;
13764 esac
13765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13766 (eval "$ac_link") 2>conftest.er1
13767 ac_status=$?
13768 grep -v '^ *+' conftest.er1 >conftest.err
13769 rm -f conftest.er1
13770 cat conftest.err >&5
13771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772 (exit $ac_status); } &&
13773 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13774 { (case "(($ac_try" in
13775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13776 *) ac_try_echo=$ac_try;;
13777 esac
13778 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13779 (eval "$ac_try") 2>&5
13780 ac_status=$?
13781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782 (exit $ac_status); }; } &&
13783 { ac_try='test -s conftest$ac_exeext'
13784 { (case "(($ac_try" in
13785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13786 *) ac_try_echo=$ac_try;;
13787 esac
13788 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13789 (eval "$ac_try") 2>&5
13790 ac_status=$?
13791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13792 (exit $ac_status); }; }; then
13793 eval "$as_ac_var=yes"
13794 else
13795 echo "$as_me: failed program was:" >&5
13796 sed 's/^/| /' conftest.$ac_ext >&5
13797
13798 eval "$as_ac_var=no"
13799 fi
13800
13801 rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
13803 fi
13804 ac_res=`eval echo '${'$as_ac_var'}'`
13805 { echo "$as_me:$LINENO: result: $ac_res" >&5
13806 echo "${ECHO_T}$ac_res" >&6; }
13807 if test `eval echo '${'$as_ac_var'}'` = yes; then
13808 cat >>confdefs.h <<_ACEOF
13809 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13810 _ACEOF
13811
13812 fi
13813 done
13814
13815
13816
13817
13818
13819 for ac_func in powf fmodf strtof round
13820 do
13821 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13822 { echo "$as_me:$LINENO: checking for $ac_func" >&5
13823 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13824 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13825 echo $ECHO_N "(cached) $ECHO_C" >&6
13826 else
13827 cat >conftest.$ac_ext <<_ACEOF
13828 /* confdefs.h. */
13829 _ACEOF
13830 cat confdefs.h >>conftest.$ac_ext
13831 cat >>conftest.$ac_ext <<_ACEOF
13832 /* end confdefs.h. */
13833 /* Define $ac_func to an innocuous variant, in case declares $ac_func.
13834 For example, HP-UX 11i declares gettimeofday. */
13835 #define $ac_func innocuous_$ac_func
13836
13837 /* System header to define __stub macros and hopefully few prototypes,
13838 which can conflict with char $ac_func (); below.
13839 Prefer to if __STDC__ is defined, since
13840 exists even on freestanding compilers. */
13841
13842 #ifdef __STDC__
13843 # include
13844 #else
13845 # include
13846 #endif
13847
13848 #undef $ac_func
13849
13850 /* Override any GCC internal prototype to avoid an error.
13851 Use char because int might match the return type of a GCC
13852 builtin and then its argument prototype would still apply. */
13853 #ifdef __cplusplus
13854 extern "C"
13855 #endif
13856 char $ac_func ();
13857 /* The GNU C library defines this for functions which it implements
13858 to always fail with ENOSYS. Some functions are actually named
13859 something starting with __ and the normal name is an alias. */
13860 #if defined __stub_$ac_func || defined __stub___$ac_func
13861 choke me
13862 #endif
13863
13864 int
13865 main ()
13866 {
13867 return $ac_func ();
13868 ;
13869 return 0;
13870 }
13871 _ACEOF
13872 rm -f conftest.$ac_objext conftest$ac_exeext
13873 if { (ac_try="$ac_link"
13874 case "(($ac_try" in
13875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13876 *) ac_try_echo=$ac_try;;
13877 esac
13878 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13879 (eval "$ac_link") 2>conftest.er1
13880 ac_status=$?
13881 grep -v '^ *+' conftest.er1 >conftest.err
13882 rm -f conftest.er1
13883 cat conftest.err >&5
13884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885 (exit $ac_status); } &&
13886 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13887 { (case "(($ac_try" in
13888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13889 *) ac_try_echo=$ac_try;;
13890 esac
13891 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13892 (eval "$ac_try") 2>&5
13893 ac_status=$?
13894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13895 (exit $ac_status); }; } &&
13896 { ac_try='test -s conftest$ac_exeext'
13897 { (case "(($ac_try" in
13898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13899 *) ac_try_echo=$ac_try;;
13900 esac
13901 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13902 (eval "$ac_try") 2>&5
13903 ac_status=$?
13904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13905 (exit $ac_status); }; }; then
13906 eval "$as_ac_var=yes"
13907 else
13908 echo "$as_me: failed program was:" >&5
13909 sed 's/^/| /' conftest.$ac_ext >&5
13910
13911 eval "$as_ac_var=no"
13912 fi
13913
13914 rm -f core conftest.err conftest.$ac_objext \
13915 conftest$ac_exeext conftest.$ac_ext
13916 fi
13917 ac_res=`eval echo '${'$as_ac_var'}'`
13918 { echo "$as_me:$LINENO: result: $ac_res" >&5
13919 echo "${ECHO_T}$ac_res" >&6; }
13920 if test `eval echo '${'$as_ac_var'}'` = yes; then
13921 cat >>confdefs.h <<_ACEOF
13922 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13923 _ACEOF
13924
13925 fi
13926 done
13927
13928
13929
13930
13931
13932
13933 for ac_func in log log2 log10 exp exp2
13701 for ac_func in backtrace getcwd
1393413702 do
1393513703 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1393613704 { echo "$as_me:$LINENO: checking for $ac_func" >&5
1680016568 _ACEOF
1680116569
1680216570 fi
16803
16804
16805
16806 { echo "$as_me:$LINENO: checking for isnan in " >&5
16807 echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6; }
16808 if test "${ac_cv_func_isnan_in_math_h+set}" = set; then
16809 echo $ECHO_N "(cached) $ECHO_C" >&6
16810 else
16811
16812 ac_ext=cpp
16813 ac_cpp='$CXXCPP $CPPFLAGS'
16814 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16815 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16816 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16817
16818 cat >conftest.$ac_ext <<_ACEOF
16819 /* confdefs.h. */
16820 _ACEOF
16821 cat confdefs.h >>conftest.$ac_ext
16822 cat >>conftest.$ac_ext <<_ACEOF
16823 /* end confdefs.h. */
16824 #include
16825 int
16826 main ()
16827 {
16828 float f; isnan(f);
16829 ;
16830 return 0;
16831 }
16832 _ACEOF
16833 rm -f conftest.$ac_objext
16834 if { (ac_try="$ac_compile"
16835 case "(($ac_try" in
16836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16837 *) ac_try_echo=$ac_try;;
16838 esac
16839 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16840 (eval "$ac_compile") 2>conftest.er1
16841 ac_status=$?
16842 grep -v '^ *+' conftest.er1 >conftest.err
16843 rm -f conftest.er1
16844 cat conftest.err >&5
16845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16846 (exit $ac_status); } &&
16847 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
16848 { (case "(($ac_try" in
16849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16850 *) ac_try_echo=$ac_try;;
16851 esac
16852 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16853 (eval "$ac_try") 2>&5
16854 ac_status=$?
16855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16856 (exit $ac_status); }; } &&
16857 { ac_try='test -s conftest.$ac_objext'
16858 { (case "(($ac_try" in
16859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16860 *) ac_try_echo=$ac_try;;
16861 esac
16862 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16863 (eval "$ac_try") 2>&5
16864 ac_status=$?
16865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16866 (exit $ac_status); }; }; then
16867 ac_cv_func_isnan_in_math_h=yes
16868 else
16869 echo "$as_me: failed program was:" >&5
16870 sed 's/^/| /' conftest.$ac_ext >&5
16871
16872 ac_cv_func_isnan_in_math_h=no
16873 fi
16874
16875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16876 ac_ext=c
16877 ac_cpp='$CPP $CPPFLAGS'
16878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16880 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16881
16882
16883 fi
16884 { echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_math_h" >&5
16885 echo "${ECHO_T}$ac_cv_func_isnan_in_math_h" >&6; }
16886
16887
16888 if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then
16889
16890 cat >>confdefs.h <<\_ACEOF
16891 #define HAVE_ISNAN_IN_MATH_H 1
16892 _ACEOF
16893
16894 fi
16895
16896
16897 { echo "$as_me:$LINENO: checking for isnan in " >&5
16898 echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6; }
16899 if test "${ac_cv_func_isnan_in_cmath+set}" = set; then
16900 echo $ECHO_N "(cached) $ECHO_C" >&6
16901 else
16902
16903 ac_ext=cpp
16904 ac_cpp='$CXXCPP $CPPFLAGS'
16905 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16906 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16907 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16908
16909 cat >conftest.$ac_ext <<_ACEOF
16910 /* confdefs.h. */
16911 _ACEOF
16912 cat confdefs.h >>conftest.$ac_ext
16913 cat >>conftest.$ac_ext <<_ACEOF
16914 /* end confdefs.h. */
16915 #include
16916 int
16917 main ()
16918 {
16919 float f; isnan(f);
16920 ;
16921 return 0;
16922 }
16923 _ACEOF
16924 rm -f conftest.$ac_objext
16925 if { (ac_try="$ac_compile"
16926 case "(($ac_try" in
16927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16928 *) ac_try_echo=$ac_try;;
16929 esac
16930 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16931 (eval "$ac_compile") 2>conftest.er1
16932 ac_status=$?
16933 grep -v '^ *+' conftest.er1 >conftest.err
16934 rm -f conftest.er1
16935 cat conftest.err >&5
16936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16937 (exit $ac_status); } &&
16938 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
16939 { (case "(($ac_try" in
16940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16941 *) ac_try_echo=$ac_try;;
16942 esac
16943 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16944 (eval "$ac_try") 2>&5
16945 ac_status=$?
16946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16947 (exit $ac_status); }; } &&
16948 { ac_try='test -s conftest.$ac_objext'
16949 { (case "(($ac_try" in
16950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16951 *) ac_try_echo=$ac_try;;
16952 esac
16953 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16954 (eval "$ac_try") 2>&5
16955 ac_status=$?
16956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16957 (exit $ac_status); }; }; then
16958 ac_cv_func_isnan_in_cmath=yes
16959 else
16960 echo "$as_me: failed program was:" >&5
16961 sed 's/^/| /' conftest.$ac_ext >&5
16962
16963 ac_cv_func_isnan_in_cmath=no
16964 fi
16965
16966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16967 ac_ext=c
16968 ac_cpp='$CPP $CPPFLAGS'
16969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16972
16973
16974 fi
16975 { echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_cmath" >&5
16976 echo "${ECHO_T}$ac_cv_func_isnan_in_cmath" >&6; }
16977
16978 if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then
16979
16980 cat >>confdefs.h <<\_ACEOF
16981 #define HAVE_ISNAN_IN_CMATH 1
16982 _ACEOF
16983
16984 fi
16985
16986
16987 { echo "$as_me:$LINENO: checking for std::isnan in " >&5
16988 echo $ECHO_N "checking for std::isnan in ... $ECHO_C" >&6; }
16989 if test "${ac_cv_func_std_isnan_in_cmath+set}" = set; then
16990 echo $ECHO_N "(cached) $ECHO_C" >&6
16991 else
16992
16993 ac_ext=cpp
16994 ac_cpp='$CXXCPP $CPPFLAGS'
16995 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16996 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16997 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16998
16999 cat >conftest.$ac_ext <<_ACEOF
17000 /* confdefs.h. */
17001 _ACEOF
17002 cat confdefs.h >>conftest.$ac_ext
17003 cat >>conftest.$ac_ext <<_ACEOF
17004 /* end confdefs.h. */
17005 #include
17006 int
17007 main ()
17008 {
17009 float f; std::isnan(f);
17010 ;
17011 return 0;
17012 }
17013 _ACEOF
17014 rm -f conftest.$ac_objext
17015 if { (ac_try="$ac_compile"
17016 case "(($ac_try" in
17017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17018 *) ac_try_echo=$ac_try;;
17019 esac
17020 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17021 (eval "$ac_compile") 2>conftest.er1
17022 ac_status=$?
17023 grep -v '^ *+' conftest.er1 >conftest.err
17024 rm -f conftest.er1
17025 cat conftest.err >&5
17026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17027 (exit $ac_status); } &&
17028 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
17029 { (case "(($ac_try" in
17030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17031 *) ac_try_echo=$ac_try;;
17032 esac
17033 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17034 (eval "$ac_try") 2>&5
17035 ac_status=$?
17036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037 (exit $ac_status); }; } &&
17038 { ac_try='test -s conftest.$ac_objext'
17039 { (case "(($ac_try" in
17040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17041 *) ac_try_echo=$ac_try;;
17042 esac
17043 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17044 (eval "$ac_try") 2>&5
17045 ac_status=$?
17046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17047 (exit $ac_status); }; }; then
17048 ac_cv_func_std_isnan_in_cmath=yes
17049 else
17050 echo "$as_me: failed program was:" >&5
17051 sed 's/^/| /' conftest.$ac_ext >&5
17052
17053 ac_cv_func_std_isnan_in_cmath=no
17054 fi
17055
17056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17057 ac_ext=c
17058 ac_cpp='$CPP $CPPFLAGS'
17059 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17060 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17061 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17062
17063
17064 fi
17065 { echo "$as_me:$LINENO: result: $ac_cv_func_std_isnan_in_cmath" >&5
17066 echo "${ECHO_T}$ac_cv_func_std_isnan_in_cmath" >&6; }
17067
17068 if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then
17069
17070 cat >>confdefs.h <<\_ACEOF
17071 #define HAVE_STD_ISNAN_IN_CMATH 1
17072 _ACEOF
17073
17074 fi
17075
17076
17077
17078
17079 { echo "$as_me:$LINENO: checking for isinf in " >&5
17080 echo $ECHO_N "checking for isinf in ... $ECHO_C" >&6; }
17081 if test "${ac_cv_func_isinf_in_math_h+set}" = set; then
17082 echo $ECHO_N "(cached) $ECHO_C" >&6
17083 else
17084
17085 ac_ext=cpp
17086 ac_cpp='$CXXCPP $CPPFLAGS'
17087 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17088 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17089 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17090
17091 cat >conftest.$ac_ext <<_ACEOF
17092 /* confdefs.h. */
17093 _ACEOF
17094 cat confdefs.h >>conftest.$ac_ext
17095 cat >>conftest.$ac_ext <<_ACEOF
17096 /* end confdefs.h. */
17097 #include
17098 int
17099 main ()
17100 {
17101 float f; isinf(f);
17102 ;
17103 return 0;
17104 }
17105 _ACEOF
17106 rm -f conftest.$ac_objext
17107 if { (ac_try="$ac_compile"
17108 case "(($ac_try" in
17109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17110 *) ac_try_echo=$ac_try;;
17111 esac
17112 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17113 (eval "$ac_compile") 2>conftest.er1
17114 ac_status=$?
17115 grep -v '^ *+' conftest.er1 >conftest.err
17116 rm -f conftest.er1
17117 cat conftest.err >&5
17118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17119 (exit $ac_status); } &&
17120 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
17121 { (case "(($ac_try" in
17122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17123 *) ac_try_echo=$ac_try;;
17124 esac
17125 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17126 (eval "$ac_try") 2>&5
17127 ac_status=$?
17128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17129 (exit $ac_status); }; } &&
17130 { ac_try='test -s conftest.$ac_objext'
17131 { (case "(($ac_try" in
17132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17133 *) ac_try_echo=$ac_try;;
17134 esac
17135 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17136 (eval "$ac_try") 2>&5
17137 ac_status=$?
17138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17139 (exit $ac_status); }; }; then
17140 ac_cv_func_isinf_in_math_h=yes
17141 else
17142 echo "$as_me: failed program was:" >&5
17143 sed 's/^/| /' conftest.$ac_ext >&5
17144
17145 ac_cv_func_isinf_in_math_h=no
17146 fi
17147
17148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17149 ac_ext=c
17150 ac_cpp='$CPP $CPPFLAGS'
17151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17154
17155
17156 fi
17157 { echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_math_h" >&5
17158 echo "${ECHO_T}$ac_cv_func_isinf_in_math_h" >&6; }
17159
17160 if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then
17161
17162 cat >>confdefs.h <<\_ACEOF
17163 #define HAVE_ISINF_IN_MATH_H 1
17164 _ACEOF
17165
17166 fi
17167
17168
17169 { echo "$as_me:$LINENO: checking for isinf in " >&5
17170 echo $ECHO_N "checking for isinf in ... $ECHO_C" >&6; }
17171 if test "${ac_cv_func_isinf_in_cmath+set}" = set; then
17172 echo $ECHO_N "(cached) $ECHO_C" >&6
17173 else
17174
17175 ac_ext=cpp
17176 ac_cpp='$CXXCPP $CPPFLAGS'
17177 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17178 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17179 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17180
17181 cat >conftest.$ac_ext <<_ACEOF
17182 /* confdefs.h. */
17183 _ACEOF
17184 cat confdefs.h >>conftest.$ac_ext
17185 cat >>conftest.$ac_ext <<_ACEOF
17186 /* end confdefs.h. */
17187 #include
17188 int
17189 main ()
17190 {
17191 float f; isinf(f);
17192 ;
17193 return 0;
17194 }
17195 _ACEOF
17196 rm -f conftest.$ac_objext
17197 if { (ac_try="$ac_compile"
17198 case "(($ac_try" in
17199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17200 *) ac_try_echo=$ac_try;;
17201 esac
17202 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17203 (eval "$ac_compile") 2>conftest.er1
17204 ac_status=$?
17205 grep -v '^ *+' conftest.er1 >conftest.err
17206 rm -f conftest.er1
17207 cat conftest.err >&5
17208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17209 (exit $ac_status); } &&
17210 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
17211 { (case "(($ac_try" in
17212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17213 *) ac_try_echo=$ac_try;;
17214 esac
17215 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17216 (eval "$ac_try") 2>&5
17217 ac_status=$?
17218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17219 (exit $ac_status); }; } &&
17220 { ac_try='test -s conftest.$ac_objext'
17221 { (case "(($ac_try" in
17222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17223 *) ac_try_echo=$ac_try;;
17224 esac
17225 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17226 (eval "$ac_try") 2>&5
17227 ac_status=$?
17228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229 (exit $ac_status); }; }; then
17230 ac_cv_func_isinf_in_cmath=yes
17231 else
17232 echo "$as_me: failed program was:" >&5
17233 sed 's/^/| /' conftest.$ac_ext >&5
17234
17235 ac_cv_func_isinf_in_cmath=no
17236 fi
17237
17238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17239 ac_ext=c
17240 ac_cpp='$CPP $CPPFLAGS'
17241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17244
17245
17246 fi
17247 { echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_cmath" >&5
17248 echo "${ECHO_T}$ac_cv_func_isinf_in_cmath" >&6; }
17249
17250 if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then
17251
17252 cat >>confdefs.h <<\_ACEOF
17253 #define HAVE_ISINF_IN_CMATH 1
17254 _ACEOF
17255
17256 fi
17257
17258
17259 { echo "$as_me:$LINENO: checking for std::isinf in " >&5
17260 echo $ECHO_N "checking for std::isinf in ... $ECHO_C" >&6; }
17261 if test "${ac_cv_func_std_isinf_in_cmath+set}" = set; then
17262 echo $ECHO_N "(cached) $ECHO_C" >&6
17263 else
17264
17265 ac_ext=cpp
17266 ac_cpp='$CXXCPP $CPPFLAGS'
17267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17270
17271 cat >conftest.$ac_ext <<_ACEOF
17272 /* confdefs.h. */
17273 _ACEOF
17274 cat confdefs.h >>conftest.$ac_ext
17275 cat >>conftest.$ac_ext <<_ACEOF
17276 /* end confdefs.h. */
17277 #include
17278 int
17279 main ()
17280 {
17281 float f; std::isinf(f);
17282 ;
17283 return 0;
17284 }
17285 _ACEOF
17286 rm -f conftest.$ac_objext
17287 if { (ac_try="$ac_compile"
17288 case "(($ac_try" in
17289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17290 *) ac_try_echo=$ac_try;;
17291 esac
17292 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17293 (eval "$ac_compile") 2>conftest.er1
17294 ac_status=$?
17295 grep -v '^ *+' conftest.er1 >conftest.err
17296 rm -f conftest.er1
17297 cat conftest.err >&5
17298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17299 (exit $ac_status); } &&
17300 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
17301 { (case "(($ac_try" in
17302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17303 *) ac_try_echo=$ac_try;;
17304 esac
17305 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17306 (eval "$ac_try") 2>&5
17307 ac_status=$?
17308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17309 (exit $ac_status); }; } &&
17310 { ac_try='test -s conftest.$ac_objext'
17311 { (case "(($ac_try" in
17312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17313 *) ac_try_echo=$ac_try;;
17314 esac
17315 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17316 (eval "$ac_try") 2>&5
17317 ac_status=$?
17318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17319 (exit $ac_status); }; }; then
17320 ac_cv_func_std_isinf_in_cmath=yes
17321 else
17322 echo "$as_me: failed program was:" >&5
17323 sed 's/^/| /' conftest.$ac_ext >&5
17324
17325 ac_cv_func_std_isinf_in_cmath=no
17326 fi
17327
17328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17329 ac_ext=c
17330 ac_cpp='$CPP $CPPFLAGS'
17331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17334
17335
17336 fi
17337 { echo "$as_me:$LINENO: result: $ac_cv_func_std_isinf_in_cmath" >&5
17338 echo "${ECHO_T}$ac_cv_func_std_isinf_in_cmath" >&6; }
17339
17340 if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
17341
17342 cat >>confdefs.h <<\_ACEOF
17343 #define HAVE_STD_ISINF_IN_CMATH 1
17344 _ACEOF
17345
17346 fi
17347
17348
17349 { echo "$as_me:$LINENO: checking for finite in " >&5
17350 echo $ECHO_N "checking for finite in ... $ECHO_C" >&6; }
17351 if test "${ac_cv_func_finite_in_ieeefp_h+set}" = set; then
17352 echo $ECHO_N "(cached) $ECHO_C" >&6
17353 else
17354
17355 ac_ext=cpp
17356 ac_cpp='$CXXCPP $CPPFLAGS'
17357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17358 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17360
17361 cat >conftest.$ac_ext <<_ACEOF
17362 /* confdefs.h. */
17363 _ACEOF
17364 cat confdefs.h >>conftest.$ac_ext
17365 cat >>conftest.$ac_ext <<_ACEOF
17366 /* end confdefs.h. */
17367 #include
17368 int
17369 main ()
17370 {
17371 float f; finite(f);
17372 ;
17373 return 0;
17374 }
17375 _ACEOF
17376 rm -f conftest.$ac_objext
17377 if { (ac_try="$ac_compile"
17378 case "(($ac_try" in
17379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17380 *) ac_try_echo=$ac_try;;
17381 esac
17382 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17383 (eval "$ac_compile") 2>conftest.er1
17384 ac_status=$?
17385 grep -v '^ *+' conftest.er1 >conftest.err
17386 rm -f conftest.er1
17387 cat conftest.err >&5
17388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17389 (exit $ac_status); } &&
17390 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
17391 { (case "(($ac_try" in
17392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17393 *) ac_try_echo=$ac_try;;
17394 esac
17395 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17396 (eval "$ac_try") 2>&5
17397 ac_status=$?
17398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17399 (exit $ac_status); }; } &&
17400 { ac_try='test -s conftest.$ac_objext'
17401 { (case "(($ac_try" in
17402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17403 *) ac_try_echo=$ac_try;;
17404 esac
17405 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17406 (eval "$ac_try") 2>&5
17407 ac_status=$?
17408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17409 (exit $ac_status); }; }; then
17410 ac_cv_func_finite_in_ieeefp_h=yes
17411 else
17412 echo "$as_me: failed program was:" >&5
17413 sed 's/^/| /' conftest.$ac_ext >&5
17414
17415 ac_cv_func_finite_in_ieeefp_h=no
17416 fi
17417
17418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17419 ac_ext=c
17420 ac_cpp='$CPP $CPPFLAGS'
17421 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17422 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17423 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17424
17425
17426 fi
17427 { echo "$as_me:$LINENO: result: $ac_cv_func_finite_in_ieeefp_h" >&5
17428 echo "${ECHO_T}$ac_cv_func_finite_in_ieeefp_h" >&6; }
17429
17430 if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then
17431
17432 cat >>confdefs.h <<\_ACEOF
17433 #define HAVE_FINITE_IN_IEEEFP_H 1
17434 _ACEOF
17435
17436 fi
17437
17438
1743916571
1744016572 if test "$llvm_cv_platform_type" = "Unix" ; then
1744116573
3131
3232 /* Define to 1 if you have the `bcopy' function. */
3333 #undef HAVE_BCOPY
34
35 /* Define to 1 if you have the `ceilf' function. */
36 #cmakedefine HAVE_CEILF ${HAVE_CEILF}
3734
3835 /* Define to 1 if you have the `closedir' function. */
3936 #cmakedefine HAVE_CLOSEDIR ${HAVE_CLOSEDIR}
9491 /* Define to 1 if you have the header file. */
9592 #cmakedefine HAVE_FFI_H ${HAVE_FFI_H}
9693
97 /* Set to 1 if the finite function is found in */
98 #cmakedefine HAVE_FINITE_IN_IEEEFP_H ${HAVE_FINITE_IN_IEEEFP_H}
99
100 /* Define to 1 if you have the `floorf' function. */
101 #cmakedefine HAVE_FLOORF ${HAVE_FLOORF}
102
103 /* Define to 1 if you have the `log' function. */
104 #cmakedefine HAVE_LOG ${HAVE_LOG}
105
106 /* Define to 1 if you have the `log2' function. */
107 #cmakedefine HAVE_LOG2 ${HAVE_LOG2}
108
109 /* Define to 1 if you have the `log10' function. */
110 #cmakedefine HAVE_LOG10 ${HAVE_LOG10}
111
112 /* Define to 1 if you have the `exp' function. */
113 #cmakedefine HAVE_EXP ${HAVE_EXP}
114
115 /* Define to 1 if you have the `exp2' function. */
116 #cmakedefine HAVE_EXP2 ${HAVE_EXP2}
117
118 /* Define to 1 if you have the `exp10' function. */
119 #cmakedefine HAVE_EXP10 ${HAVE_EXP10}
120
121 /* Define to 1 if you have the `fmodf' function. */
122 #cmakedefine HAVE_FMODF ${HAVE_FMODF}
123
12494 /* Define to 1 if you have the `futimes' function. */
12595 #cmakedefine HAVE_FUTIMES ${HAVE_FUTIMES}
12696
150120
151121 /* Define to 1 if you have the `isatty' function. */
152122 #cmakedefine HAVE_ISATTY 1
153
154 /* Set to 1 if the isinf function is found in */
155 #cmakedefine HAVE_ISINF_IN_CMATH ${HAVE_ISINF_IN_CMATH}
156
157 /* Set to 1 if the isinf function is found in */
158 #cmakedefine HAVE_ISINF_IN_MATH_H ${HAVE_ISINF_IN_MATH_H}
159
160 /* Set to 1 if the isnan function is found in */
161 #cmakedefine HAVE_ISNAN_IN_CMATH ${HAVE_ISNAN_IN_CMATH}
162
163 /* Set to 1 if the isnan function is found in */
164 #cmakedefine HAVE_ISNAN_IN_MATH_H ${HAVE_ISNAN_IN_MATH_H}
165123
166124 /* Define if you have the libdl library or equivalent. */
167125 #cmakedefine HAVE_LIBDL ${HAVE_LIBDL}
246204 /* Define to 1 if you have the header file, and it defines `DIR'. */
247205 #cmakedefine HAVE_NDIR_H ${HAVE_NDIR_H}
248206
249 /* Define to 1 if you have the `nearbyintf' function. */
250 #cmakedefine HAVE_NEARBYINTF ${HAVE_NEARBYINTF}
251
252207 /* Define to 1 if you have the `opendir' function. */
253208 #cmakedefine HAVE_OPENDIR ${HAVE_OPENDIR}
254209
255210 /* Define to 1 if you have the `posix_spawn' function. */
256211 #cmakedefine HAVE_POSIX_SPAWN ${HAVE_POSIX_SPAWN}
257212
258 /* Define to 1 if you have the `powf' function. */
259 #cmakedefine HAVE_POWF ${HAVE_POWF}
260
261213 /* Define to 1 if you have the `pread' function. */
262214 #cmakedefine HAVE_PREAD ${HAVE_PREAD}
263215
288240 /* Define to 1 if you have the `realpath' function. */
289241 #cmakedefine HAVE_REALPATH ${HAVE_REALPATH}
290242
291 /* Define to 1 if you have the `rintf' function. */
292 #undef HAVE_RINTF
293
294 /* Define to 1 if you have the `round' function. */
295 #cmakedefine HAVE_ROUND ${HAVE_ROUND}
296
297 /* Define to 1 if you have the `roundf' function. */
298 #undef HAVE_ROUNDF
299
300243 /* Define to 1 if you have the `sbrk' function. */
301244 #cmakedefine HAVE_SBRK ${HAVE_SBRK}
302245
338281
339282 /* Define to 1 if you have the `strerror_r' function. */
340283 #cmakedefine HAVE_STRERROR_R ${HAVE_STRERROR_R}
341
342 /* Define to 1 if you have the `strtof' function. */
343 #cmakedefine HAVE_STRTOF ${HAVE_STRTOF}
344284
345285 /* Define to 1 if you have the `strtoll' function. */
346286 #cmakedefine HAVE_STRTOLL ${HAVE_STRTOLL}
3737
3838 /* Define to 1 if you have the `backtrace' function. */
3939 #undef HAVE_BACKTRACE
40
41 /* Define to 1 if you have the `ceilf' function. */
42 #undef HAVE_CEILF
4340
4441 /* Define to 1 if you have the header file. */
4542 #undef HAVE_CRASHREPORTERCLIENT_H
6663 don't. */
6764 #undef HAVE_DECL_STRERROR_S
6865
69 /* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
70 #undef HAVE_DIA_SDK
71
7266 /* Define to 1 if you have the header file, and it defines `DIR'.
7367 */
7468 #undef HAVE_DIRENT_H
8882 /* Define to 1 if you have the header file. */
8983 #undef HAVE_EXECINFO_H
9084
91 /* Define to 1 if you have the `exp' function. */
92 #undef HAVE_EXP
93
94 /* Define to 1 if you have the `exp2' function. */
95 #undef HAVE_EXP2
96
9785 /* Define to 1 if you have the header file. */
9886 #undef HAVE_FCNTL_H
9987
10997 /* Define to 1 if you have the header file. */
11098 #undef HAVE_FFI_H
11199
112 /* Set to 1 if the finite function is found in */
113 #undef HAVE_FINITE_IN_IEEEFP_H
114
115 /* Define to 1 if you have the `floorf' function. */
116 #undef HAVE_FLOORF
117
118 /* Define to 1 if you have the `fmodf' function. */
119 #undef HAVE_FMODF
120
121100 /* Define to 1 if you have the `futimens' function. */
122101 #undef HAVE_FUTIMENS
123102
147126
148127 /* Define to 1 if you have the `isatty' function. */
149128 #undef HAVE_ISATTY
150
151 /* Set to 1 if the isinf function is found in */
152 #undef HAVE_ISINF_IN_CMATH
153
154 /* Set to 1 if the isinf function is found in */
155 #undef HAVE_ISINF_IN_MATH_H
156
157 /* Set to 1 if the isnan function is found in */
158 #undef HAVE_ISNAN_IN_CMATH
159
160 /* Set to 1 if the isnan function is found in */
161 #undef HAVE_ISNAN_IN_MATH_H
162129
163130 /* Define if libedit is available on this platform. */
164131 #undef HAVE_LIBEDIT
191158 the current directory to the dynamic linker search path. */
192159 #undef HAVE_LINK_R
193160
194 /* Define to 1 if you have the `log' function. */
195 #undef HAVE_LOG
196
197 /* Define to 1 if you have the `log10' function. */
198 #undef HAVE_LOG10
199
200 /* Define to 1 if you have the `log2' function. */
201 #undef HAVE_LOG2
202
203161 /* Define to 1 if you have the `longjmp' function. */
204162 #undef HAVE_LONGJMP
205163
208166
209167 /* Define if mallinfo() is available on this platform. */
210168 #undef HAVE_MALLINFO
211
212 /* Define if mallctl() is available on this plaform. */
213 #undef HAVE_MALLCTL
214169
215170 /* Define to 1 if you have the header file. */
216171 #undef HAVE_MALLOC_H
246201 /* Define to 1 if you have the header file, and it defines `DIR'. */
247202 #undef HAVE_NDIR_H
248203
249 /* Define to 1 if you have the `nearbyintf' function. */
250 #undef HAVE_NEARBYINTF
251
252204 /* Define to 1 if you have the `posix_spawn' function. */
253205 #undef HAVE_POSIX_SPAWN
254206
255 /* Define to 1 if you have the `powf' function. */
256 #undef HAVE_POWF
257
258207 /* Define to 1 if you have the `pread' function. */
259208 #undef HAVE_PREAD
260209
279228 /* Define to 1 if you have the `realpath' function. */
280229 #undef HAVE_REALPATH
281230
282 /* Define to 1 if you have the `rintf' function. */
283 #undef HAVE_RINTF
284
285 /* Define to 1 if you have the `round' function. */
286 #undef HAVE_ROUND
287
288 /* Define to 1 if you have the `roundf' function. */
289 #undef HAVE_ROUNDF
290
291231 /* Define to 1 if you have the `sbrk' function. */
292232 #undef HAVE_SBRK
293233
318258 /* Define to 1 if you have the header file. */
319259 #undef HAVE_STDLIB_H
320260
321 /* Set to 1 if the std::isinf function is found in */
322 #undef HAVE_STD_ISINF_IN_CMATH
323
324 /* Set to 1 if the std::isnan function is found in */
325 #undef HAVE_STD_ISNAN_IN_CMATH
326
327261 /* Define to 1 if you have the `strerror' function. */
328262 #undef HAVE_STRERROR
329263
335269
336270 /* Define to 1 if you have the header file. */
337271 #undef HAVE_STRING_H
338
339 /* Define to 1 if you have the `strtof' function. */
340 #undef HAVE_STRTOF
341272
342273 /* Define to 1 if you have the `strtoll' function. */
343274 #undef HAVE_STRTOLL
533533 return T.I;
534534 }
535535
536 /// Platform-independent wrappers for the C99 isnan() function.
537 int IsNAN(float f);
538 int IsNAN(double d);
539
540 /// Platform-independent wrappers for the C99 isinf() function.
541 int IsInf(float f);
542 int IsInf(double d);
543
544536 /// MinAlign - A and B are either alignments or offsets. Return the minimum
545537 /// alignment that may be assumed after adding the two together.
546538 inline uint64_t MinAlign(uint64_t A, uint64_t B) {
14501450 default: break;
14511451 case Intrinsic::fabs:
14521452 return ConstantFoldFP(fabs, V, Ty);
1453 #if HAVE_LOG2
14541453 case Intrinsic::log2:
14551454 return ConstantFoldFP(log2, V, Ty);
1456 #endif
1457 #if HAVE_LOG
14581455 case Intrinsic::log:
14591456 return ConstantFoldFP(log, V, Ty);
1460 #endif
1461 #if HAVE_LOG10
14621457 case Intrinsic::log10:
14631458 return ConstantFoldFP(log10, V, Ty);
1464 #endif
1465 #if HAVE_EXP
14661459 case Intrinsic::exp:
14671460 return ConstantFoldFP(exp, V, Ty);
1468 #endif
1469 #if HAVE_EXP2
14701461 case Intrinsic::exp2:
14711462 return ConstantFoldFP(exp2, V, Ty);
1472 #endif
14731463 case Intrinsic::floor:
14741464 return ConstantFoldFP(floor, V, Ty);
14751465 case Intrinsic::ceil:
13091309 // libc sqrt function which will probably use a hardware sqrt computation.
13101310 // This should be faster than the algorithm below.
13111311 if (magnitude < 52) {
1312 #if HAVE_ROUND
13131312 return APInt(BitWidth,
13141313 uint64_t(::round(::sqrt(double(isSingleWord()?VAL:pVal[0])))));
1315 #else
1316 return APInt(BitWidth,
1317 uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0])) + 0.5));
1318 #endif
13191314 }
13201315
13211316 // Okay, all the short cuts are exhausted. We must compute it. The following
5757 IntEqClasses.cpp
5858 IntervalMap.cpp
5959 IntrusiveRefCntPtr.cpp
60 IsInf.cpp
61 IsNAN.cpp
6260 LEB128.cpp
6361 LineIterator.cpp
6462 Locale.cpp
+0
-49
lib/Support/IsInf.cpp less more
None //===-- IsInf.cpp - Platform-independent wrapper around C99 isinf() -------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Platform-independent wrapper around C99 isinf()
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "llvm/Config/config.h"
14
15 #if HAVE_ISINF_IN_MATH_H
16 # include
17 #elif HAVE_ISINF_IN_CMATH
18 # include
19 #elif HAVE_STD_ISINF_IN_CMATH
20 # include
21 using std::isinf;
22 #elif HAVE_FINITE_IN_IEEEFP_H
23 // A handy workaround I found at http://www.unixguide.net/sun/faq ...
24 // apparently this has been a problem with Solaris for years.
25 # include
26 static int isinf(double x) { return !finite(x) && x==x; }
27 #elif defined(_MSC_VER)
28 #include
29 #define isinf(X) (!_finite(X))
30 #elif defined(_AIX) && defined(__GNUC__)
31 // GCC's fixincludes seems to be removing the isinf() declaration from the
32 // system header /usr/include/math.h
33 # include
34 static int isinf(double x) { return !finite(x) && x==x; }
35 #elif defined(__hpux)
36 // HP-UX is "special"
37 #include
38 static int isinf(double x) { return ((x) == INFINITY) || ((x) == -INFINITY); }
39 #else
40 # error "Don't know how to get isinf()"
41 #endif
42
43 namespace llvm {
44
45 int IsInf(float f) { return isinf(f); }
46 int IsInf(double d) { return isinf(d); }
47
48 } // end namespace llvm;
+0
-33
lib/Support/IsNAN.cpp less more
None //===-- IsNAN.cpp ---------------------------------------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Platform-independent wrapper around C99 isnan().
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "llvm/Config/config.h"
14
15 #if HAVE_ISNAN_IN_MATH_H
16 # include
17 #elif HAVE_ISNAN_IN_CMATH
18 # include
19 #elif HAVE_STD_ISNAN_IN_CMATH
20 # include
21 using std::isnan;
22 #elif defined(_MSC_VER)
23 #include
24 #define isnan _isnan
25 #else
26 # error "Don't know how to get isnan()"
27 #endif
28
29 namespace llvm {
30 int IsNAN(float f) { return isnan(f); }
31 int IsNAN(double d) { return isnan(d); }
32 } // end namespace llvm;
1212 #include "llvm/ADT/SmallVector.h"
1313 #include "llvm/Support/raw_ostream.h"
1414 #include "gtest/gtest.h"
15 #include
1516 #include
1617 #include
1718
13041305 EXPECT_EQ(-0.0, P.convertToDouble());
13051306 P = APFloat::getNaN(APFloat::IEEEdouble);
13061307 P.roundToIntegral(APFloat::rmTowardZero);
1307 EXPECT_TRUE(IsNAN(P.convertToDouble()));
1308 EXPECT_TRUE(std::isnan(P.convertToDouble()));
13081309 P = APFloat::getInf(APFloat::IEEEdouble);
13091310 P.roundToIntegral(APFloat::rmTowardZero);
1310 EXPECT_TRUE(IsInf(P.convertToDouble()) && P.convertToDouble() > 0.0);
1311 EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() > 0.0);
13111312 P = APFloat::getInf(APFloat::IEEEdouble, true);
13121313 P.roundToIntegral(APFloat::rmTowardZero);
1313 EXPECT_TRUE(IsInf(P.convertToDouble()) && P.convertToDouble() < 0.0);
1314 EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() < 0.0);
13141315
13151316 }
13161317