Bug 1315956 - Use sincos() on more platforms. r=jandem
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 08 Nov 2016 05:24:10 -0800
changeset 348738 ce4e1e1d0bff70ea540d62eca9e0720853610700
parent 348737 93361acd5e006814f4a039fb429f378763a847ca
child 348739 d6418ae89d3d269bc1bc960886daa95b28dce49a
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1315956
milestone52.0a1
Bug 1315956 - Use sincos() on more platforms. r=jandem
js/src/jsmath.cpp
js/src/old-configure.in
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -850,19 +850,19 @@ js::math_sin(JSContext* cx, unsigned arg
     }
 
     return math_sin_handle(cx, args[0], args.rval());
 }
 
 void
 js::math_sincos_uncached(double x, double *sin, double *cos)
 {
-#if defined(__GLIBC__)
+#if defined(HAVE_SINCOS)
     sincos(x, sin, cos);
-#elif defined(HAVE_SINCOS)
+#elif defined(HAVE___SINCOS)
     __sincos(x, sin, cos);
 #else
     *sin = js::math_sin_uncached(x);
     *cos = js::math_cos_uncached(x);
 #endif
 }
 
 void
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1217,17 +1217,18 @@ Darwin)
       AC_SUBST_LIST(REALTIME_LIBS)
   fi
   ;;
 esac
 
 dnl Checks for math functions.
 dnl ========================================================
 AC_CHECK_LIB(m, sin)
-AC_CHECK_LIB(m, __sincos, AC_DEFINE(HAVE_SINCOS))
+AC_CHECK_LIB(m, sincos, AC_DEFINE(HAVE_SINCOS))
+AC_CHECK_LIB(m, __sincos, AC_DEFINE(HAVE___SINCOS))
 
 
 dnl check for wcrtomb/mbrtowc
 dnl =======================================================================
 if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_CACHE_CHECK(for wcrtomb,