Bug 1315956 - Use sincos() on more platforms. r=jandem
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 08 Nov 2016 05:24:10 -0800
changeset 322045 ce4e1e1d0bff70ea540d62eca9e0720853610700
parent 322044 93361acd5e006814f4a039fb429f378763a847ca
child 322046 d6418ae89d3d269bc1bc960886daa95b28dce49a
push id30941
push userkwierso@gmail.com
push dateFri, 11 Nov 2016 21:56:54 +0000
treeherdermozilla-central@fc104971a4db [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,