Bug 1315956 - Use sincos() on more platforms. r=jandem
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 08 Nov 2016 05:24:10 -0800
changeset 321914 ce4e1e1d0bff70ea540d62eca9e0720853610700
parent 321913 93361acd5e006814f4a039fb429f378763a847ca
child 321915 d6418ae89d3d269bc1bc960886daa95b28dce49a
push id83724
push userryanvm@gmail.com
push dateThu, 10 Nov 2016 14:52:18 +0000
treeherdermozilla-inbound@ce4e1e1d0bff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1315956
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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,