@@ -41,7 +41,8 @@
#define HAVE_LGAMMA_COMPAT SHLIB_COMPAT (libm, LGAMMA_OLD_VER, LGAMMA_NEW_VER)
/* Whether to build this version at all. */
-#define BUILD_LGAMMA (HAVE_LGAMMA_COMPAT || !USE_AS_COMPAT)
+#define BUILD_LGAMMA \
+ (LIBM_SVID_COMPAT && (HAVE_LGAMMA_COMPAT || !USE_AS_COMPAT))
/* The name to use for this version. */
#if USE_AS_COMPAT
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper acos */
double
__acos (double x)
@@ -37,7 +38,8 @@ __acos (double x)
return __ieee754_acos (x);
}
weak_alias (__acos, acos)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__acos, __acosl)
weak_alias (__acos, acosl)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper acosf */
float
__acosf (float x)
@@ -37,3 +38,4 @@ __acosf (float x)
return __ieee754_acosf (x);
}
weak_alias (__acosf, acosf)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper acosh */
double
__acosh (double x)
@@ -32,7 +33,8 @@ __acosh (double x)
return __ieee754_acosh (x);
}
weak_alias (__acosh, acosh)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__acosh, __acoshl)
weak_alias (__acosh, acoshl)
+# endif
#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper acoshf */
float
__acoshf (float x)
@@ -32,3 +33,4 @@ __acoshf (float x)
return __ieee754_acoshf (x);
}
weak_alias (__acoshf, acoshf)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper acosl */
long double
__acoshl (long double x)
@@ -32,3 +33,4 @@ __acoshl (long double x)
return __ieee754_acoshl (x);
}
weak_alias (__acoshl, acoshl)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper acosl */
long double
__acosl (long double x)
@@ -37,3 +38,4 @@ __acosl (long double x)
return __ieee754_acosl (x);
}
weak_alias (__acosl, acosl)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper asin */
double
__asin (double x)
@@ -37,7 +38,8 @@ __asin (double x)
return __ieee754_asin (x);
}
weak_alias (__asin, asin)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__asin, __asinl)
weak_alias (__asin, asinl)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper asinf */
float
__asinf (float x)
@@ -37,3 +38,4 @@ __asinf (float x)
return __ieee754_asinf (x);
}
weak_alias (__asinf, asinf)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper asinl */
long double
__asinl (long double x)
@@ -37,3 +38,4 @@ __asinl (long double x)
return __ieee754_asinl (x);
}
weak_alias (__asinl, asinl)
+#endif
@@ -26,6 +26,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__atan2 (double y, double x)
{
@@ -40,7 +41,8 @@ __atan2 (double y, double x)
return z;
}
weak_alias (__atan2, atan2)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__atan2, __atan2l)
weak_alias (__atan2, atan2l)
+# endif
#endif
@@ -26,6 +26,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__atan2f (float y, float x)
{
@@ -40,3 +41,4 @@ __atan2f (float y, float x)
return z;
}
weak_alias (__atan2f, atan2f)
+#endif
@@ -26,6 +26,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__atan2l (long double y, long double x)
{
@@ -40,3 +41,4 @@ __atan2l (long double y, long double x)
return z;
}
weak_alias (__atan2l, atan2l)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper atanh */
double
__atanh (double x)
@@ -35,7 +36,8 @@ __atanh (double x)
return __ieee754_atanh (x);
}
weak_alias (__atanh, atanh)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__atanh, __atanhl)
weak_alias (__atanh, atanhl)
+# endif
#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper atanhf */
float
__atanhf (float x)
@@ -35,3 +36,4 @@ __atanhf (float x)
return __ieee754_atanhf (x);
}
weak_alias (__atanhf, atanhf)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper atanhl */
long double
__atanhl (long double x)
@@ -35,3 +36,4 @@ __atanhl (long double x)
return __ieee754_atanhl (x);
}
weak_alias (__atanhl, atanhl)
+#endif
@@ -18,6 +18,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__cosh (double x)
{
@@ -29,7 +30,8 @@ __cosh (double x)
return z;
}
weak_alias (__cosh, cosh)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__cosh, __coshl)
weak_alias (__cosh, coshl)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__coshf (float x)
{
@@ -33,3 +34,4 @@ __coshf (float x)
return z;
}
weak_alias (__coshf, coshf)
+#endif
@@ -23,6 +23,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__coshl (long double x)
{
@@ -34,3 +35,4 @@ __coshl (long double x)
return z;
}
weak_alias (__coshl, coshl)
+#endif
@@ -25,6 +25,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__exp10 (double x)
{
@@ -37,15 +38,16 @@ __exp10 (double x)
return z;
}
weak_alias (__exp10, exp10)
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
strong_alias (__exp10, __pow10)
compat_symbol (libm, __pow10, pow10, GLIBC_2_1);
-#endif
-#ifdef NO_LONG_DOUBLE
+# endif
+# ifdef NO_LONG_DOUBLE
strong_alias (__exp10, __exp10l)
weak_alias (__exp10, exp10l)
-# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
strong_alias (__exp10l, __pow10l)
compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
+# endif
# endif
#endif
@@ -25,6 +25,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__exp10f (float x)
{
@@ -37,7 +38,8 @@ __exp10f (float x)
return z;
}
weak_alias (__exp10f, exp10f)
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
strong_alias (__exp10f, __pow10f)
compat_symbol (libm, __pow10f, pow10f, GLIBC_2_1);
+# endif
#endif
@@ -25,6 +25,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__exp10l (long double x)
{
@@ -37,7 +38,8 @@ __exp10l (long double x)
return z;
}
weak_alias (__exp10l, exp10l)
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
strong_alias (__exp10l, __pow10l)
compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
+# endif
#endif
@@ -6,6 +6,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__exp2 (double x)
{
@@ -18,7 +19,8 @@ __exp2 (double x)
return z;
}
weak_alias (__exp2, exp2)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__exp2, __exp2l)
weak_alias (__exp2, exp2l)
+# endif
#endif
@@ -6,6 +6,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__exp2f (float x)
{
@@ -18,3 +19,4 @@ __exp2f (float x)
return z;
}
weak_alias (__exp2f, exp2f)
+#endif
@@ -6,6 +6,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__exp2l (long double x)
{
@@ -18,3 +19,4 @@ __exp2l (long double x)
return z;
}
weak_alias (__exp2l, exp2l)
+#endif
@@ -20,6 +20,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper fmod */
double
__fmod (double x, double y)
@@ -32,7 +33,8 @@ __fmod (double x, double y)
return __ieee754_fmod (x, y);
}
weak_alias (__fmod, fmod)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__fmod, __fmodl)
weak_alias (__fmod, fmodl)
+# endif
#endif
@@ -20,6 +20,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper fmodf */
float
__fmodf (float x, float y)
@@ -32,3 +33,4 @@ __fmodf (float x, float y)
return __ieee754_fmodf (x, y);
}
weak_alias (__fmodf, fmodf)
+#endif
@@ -20,6 +20,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper fmodl */
long double
__fmodl (long double x, long double y)
@@ -32,3 +33,4 @@ __fmodl (long double x, long double y)
return __ieee754_fmodl (x, y);
}
weak_alias (__fmodl, fmodl)
+#endif
@@ -19,6 +19,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__hypot (double x, double y)
{
@@ -30,7 +31,8 @@ __hypot (double x, double y)
return z;
}
weak_alias (__hypot, hypot)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__hypot, __hypotl)
weak_alias (__hypot, hypotl)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__hypotf(float x, float y)
{
@@ -34,3 +35,4 @@ __hypotf(float x, float y)
return z;
}
weak_alias (__hypotf, hypotf)
+#endif
@@ -23,6 +23,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__hypotl(long double x, long double y)
{
@@ -35,3 +36,4 @@ __hypotl(long double x, long double y)
return z;
}
weak_alias (__hypotl, hypotl)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper j0 */
double
j0 (double x)
@@ -33,9 +34,9 @@ j0 (double x)
return __ieee754_j0 (x);
}
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
weak_alias (j0, j0l)
-#endif
+# endif
/* wrapper y0 */
@@ -64,6 +65,7 @@ y0 (double x)
return __ieee754_y0 (x);
}
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
weak_alias (y0, y0l)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper j0f */
float
j0f (float x)
@@ -62,3 +63,4 @@ y0f (float x)
return __ieee754_y0f (x);
}
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper j0l */
long double
__j0l (long double x)
@@ -63,3 +64,4 @@ __y0l (long double x)
return __ieee754_y0l (x);
}
weak_alias (__y0l, y0l)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper j1 */
double
j1 (double x)
@@ -33,9 +34,9 @@ j1 (double x)
return __ieee754_j1 (x);
}
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
weak_alias (j1, j1l)
-#endif
+# endif
/* wrapper y1 */
@@ -64,6 +65,7 @@ y1 (double x)
return __ieee754_y1 (x);
}
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
weak_alias (y1, y1l)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper j1f */
float
j1f (float x)
@@ -62,3 +63,4 @@ y1f (float x)
return __ieee754_y1f (x);
}
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper j1l */
long double
__j1l (long double x)
@@ -63,3 +64,4 @@ __y1l (long double x)
return __ieee754_y1l (x);
}
weak_alias (__y1l, y1l)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper jn */
double
jn (int n, double x)
@@ -33,9 +34,9 @@ jn (int n, double x)
return __ieee754_jn (n, x);
}
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
weak_alias (jn, jnl)
-#endif
+# endif
/* wrapper yn */
@@ -64,6 +65,7 @@ yn (int n, double x)
return __ieee754_yn (n, x);
}
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
weak_alias (yn, ynl)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper jnf */
float
jnf (int n, float x)
@@ -62,3 +63,4 @@ ynf (int n, float x)
return __ieee754_ynf (n, x);
}
+#endif
@@ -48,11 +48,12 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double __jnl(int n, long double x) /* wrapper jnl */
{
-#ifdef _IEEE_LIBM
+# ifdef _IEEE_LIBM
return __ieee754_jnl(n,x);
-#else
+# else
long double z;
z = __ieee754_jnl(n,x);
if (_LIB_VERSION == _IEEE_
@@ -63,15 +64,15 @@ long double __jnl(int n, long double x) /* wrapper jnl */
return __kernel_standard_l((double)n,x,238); /* jn(|x|>X_TLOSS,n) */
} else
return z;
-#endif
+# endif
}
weak_alias (__jnl, jnl)
long double __ynl(int n, long double x) /* wrapper ynl */
{
-#ifdef _IEEE_LIBM
+# ifdef _IEEE_LIBM
return __ieee754_ynl(n,x);
-#else
+# else
long double z;
z = __ieee754_ynl(n,x);
if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
@@ -87,6 +88,7 @@ long double __ynl(int n, long double x) /* wrapper ynl */
return __kernel_standard_l((double)n,x,239); /* yn(x>X_TLOSS,n) */
} else
return z;
-#endif
+# endif
}
weak_alias (__ynl, ynl)
+#endif
@@ -19,6 +19,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__lgamma_r(double x, int *signgamp)
{
@@ -33,7 +34,8 @@ __lgamma_r(double x, int *signgamp)
return y;
}
weak_alias (__lgamma_r, lgamma_r)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__lgamma_r, __lgammal_r)
weak_alias (__lgamma_r, lgammal_r)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__lgammaf_r(float x, int *signgamp)
{
@@ -36,3 +37,4 @@ __lgammaf_r(float x, int *signgamp)
return y;
}
weak_alias (__lgammaf_r, lgammaf_r)
+#endif
@@ -23,6 +23,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__lgammal_r(long double x, int *signgamp)
{
@@ -37,3 +38,4 @@ __lgammal_r(long double x, int *signgamp)
return y;
}
weak_alias (__lgammal_r, lgammal_r)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper log10(x) */
double
__log10 (double x)
@@ -43,7 +44,8 @@ __log10 (double x)
return __ieee754_log10 (x);
}
weak_alias (__log10, log10)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__log10, __log10l)
weak_alias (__log10, log10l)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper log10f(x) */
float
__log10f (float x)
@@ -43,3 +44,4 @@ __log10f (float x)
return __ieee754_log10f (x);
}
weak_alias (__log10f, log10f)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper log10l(x) */
long double
__log10l (long double x)
@@ -43,3 +44,4 @@ __log10l (long double x)
return __ieee754_log10l (x);
}
weak_alias (__log10l, log10l)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper log2(x) */
double
__log2 (double x)
@@ -43,7 +44,8 @@ __log2 (double x)
return __ieee754_log2 (x);
}
weak_alias (__log2, log2)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__log2, __log2l)
weak_alias (__log2, log2l)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper log2f(x) */
float
__log2f (float x)
@@ -43,3 +44,4 @@ __log2f (float x)
return __ieee754_log2f (x);
}
weak_alias (__log2f, log2f)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper log2l(x) */
long double
__log2l (long double x)
@@ -43,3 +44,4 @@ __log2l (long double x)
return __ieee754_log2l (x);
}
weak_alias (__log2l, log2l)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper log(x) */
double
__log (double x)
@@ -43,7 +44,8 @@ __log (double x)
return __ieee754_log (x);
}
weak_alias (__log, log)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__log, __logl)
weak_alias (__log, logl)
+# endif
#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper logf(x) */
float
__logf (float x)
@@ -43,3 +44,4 @@ __logf (float x)
return __ieee754_logf (x);
}
weak_alias (__logf, logf)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper logl(x) */
long double
__logl (long double x)
@@ -43,3 +44,4 @@ __logl (long double x)
return __ieee754_logl (x);
}
weak_alias (__logl, logl)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper pow */
double
__pow (double x, double y)
@@ -59,7 +60,8 @@ __pow (double x, double y)
return z;
}
weak_alias (__pow, pow)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__pow, __powl)
weak_alias (__pow, powl)
+# endif
#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper powf */
float
__powf (float x, float y)
@@ -59,3 +60,4 @@ __powf (float x, float y)
return z;
}
weak_alias (__powf, powf)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper powl */
long double
__powl (long double x, long double y)
@@ -59,3 +60,4 @@ __powl (long double x, long double y)
return z;
}
weak_alias (__powl, powl)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper remainder */
double
__remainder (double x, double y)
@@ -34,8 +35,9 @@ __remainder (double x, double y)
}
weak_alias (__remainder, remainder)
weak_alias (__remainder, drem)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__remainder, __remainderl)
weak_alias (__remainder, remainderl)
weak_alias (__remainder, dreml)
+# endif
#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper remainderf */
float
__remainderf (float x, float y)
@@ -34,3 +35,4 @@ __remainderf (float x, float y)
}
weak_alias (__remainderf, remainderf)
weak_alias (__remainderf, dremf)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper remainderl */
long double
__remainderl (long double x, long double y)
@@ -34,3 +35,4 @@ __remainderl (long double x, long double y)
}
weak_alias (__remainderl, remainderl)
weak_alias (__remainderl, dreml)
+#endif
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
static double
__attribute__ ((noinline))
sysv_scalb (double x, double fn)
@@ -40,15 +41,18 @@ sysv_scalb (double x, double fn)
return z;
}
+#endif
/* Wrapper scalb */
double
__scalb (double x, double fn)
{
+#if LIBM_SVID_COMPAT
if (__glibc_unlikely (_LIB_VERSION == _SVID_))
return sysv_scalb (x, fn);
else
+#endif
{
double z = __ieee754_scalb (x, fn);
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
static float
__attribute__ ((noinline))
sysv_scalbf (float x, float fn)
@@ -40,15 +41,18 @@ sysv_scalbf (float x, float fn)
return z;
}
+#endif
/* Wrapper scalbf */
float
__scalbf (float x, float fn)
{
+#if LIBM_SVID_COMPAT
if (__glibc_unlikely (_LIB_VERSION == _SVID_))
return sysv_scalbf (x, fn);
else
+#endif
{
float z = __ieee754_scalbf (x, fn);
@@ -22,6 +22,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
static long double
__attribute__ ((noinline))
sysv_scalbl (long double x, long double fn)
@@ -40,15 +41,18 @@ sysv_scalbl (long double x, long double fn)
return z;
}
+#endif
/* Wrapper scalbl */
long double
__scalbl (long double x, long double fn)
{
+#if LIBM_SVID_COMPAT
if (__glibc_unlikely (_LIB_VERSION == _SVID_))
return sysv_scalbl (x, fn);
else
+#endif
{
long double z = __ieee754_scalbl (x, fn);
@@ -18,6 +18,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__sinh (double x)
{
@@ -29,7 +30,8 @@ __sinh (double x)
return z;
}
weak_alias (__sinh, sinh)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__sinh, __sinhl)
weak_alias (__sinh, sinhl)
+# endif
#endif
@@ -21,6 +21,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__sinhf (float x)
{
@@ -32,3 +33,4 @@ __sinhf (float x)
return z;
}
weak_alias (__sinhf, sinhf)
+#endif
@@ -22,6 +22,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__sinhl (long double x)
{
@@ -33,3 +34,4 @@ __sinhl (long double x)
return z;
}
weak_alias (__sinhl, sinhl)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper sqrt */
double
__sqrt (double x)
@@ -31,7 +32,8 @@ __sqrt (double x)
return __ieee754_sqrt (x);
}
weak_alias (__sqrt, sqrt)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__sqrt, __sqrtl)
weak_alias (__sqrt, sqrtl)
+# endif
#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper sqrtf */
float
__sqrtf (float x)
@@ -31,3 +32,4 @@ __sqrtf (float x)
return __ieee754_sqrtf (x);
}
weak_alias (__sqrtf, sqrtf)
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper sqrtl */
long double
__sqrtl (long double x)
@@ -31,3 +32,4 @@ __sqrtl (long double x)
return __ieee754_sqrtl (x);
}
weak_alias (__sqrtl, sqrtl)
+#endif
@@ -20,6 +20,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
double
__tgamma(double x)
{
@@ -41,7 +42,8 @@ __tgamma(double x)
return local_signgam < 0 ? -y : y;
}
weak_alias (__tgamma, tgamma)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__tgamma, __tgammal)
weak_alias (__tgamma, tgammal)
+# endif
#endif
@@ -18,6 +18,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
float
__tgammaf(float x)
{
@@ -43,3 +44,4 @@ __tgammaf(float x)
return local_signgam < 0 ? - y : y;
}
weak_alias (__tgammaf, tgammaf)
+#endif
@@ -23,6 +23,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double
__tgammal(long double x)
{
@@ -44,3 +45,4 @@ __tgammal(long double x)
return local_signgam < 0 ? - y : y;
}
weak_alias (__tgammal, tgammal)
+#endif
@@ -47,7 +47,9 @@
/* Supply the generic macros. */
#include <math-type-macros.h>
-/* Do not use the type-generic wrapper templates. */
-#define __USE_WRAPPER_TEMPLATE 0
+/* Do not use the type-generic wrapper templates if compatibility with
+ SVID error handling is needed. */
+#include <math-svid-compat.h>
+#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT
#endif
@@ -33,7 +33,9 @@
/* Supply the generic macros. */
#include <math-type-macros.h>
-/* Do not use the type-generic wrapper templates. */
-#define __USE_WRAPPER_TEMPLATE 0
+/* Do not use the type-generic wrapper templates if compatibility with
+ SVID error handling is needed. */
+#include <math-svid-compat.h>
+#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT
#endif
@@ -30,7 +30,9 @@
/* Supply the generic macros. */
#include <math-type-macros.h>
-/* Do not use the type-generic wrapper templates. */
-#define __USE_WRAPPER_TEMPLATE 0
+/* Do not use the type-generic wrapper templates if compatibility with
+ SVID error handling is needed. */
+#include <math-svid-compat.h>
+#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT
#endif
new file mode 100644
@@ -0,0 +1,9 @@
+/* The inline __ieee754_sqrt is not correctly rounding; it's OK for
+ most internal uses in glibc, but not for sqrt itself. */
+#define __ieee754_sqrt __avoid_ieee754_sqrt
+#include <math.h>
+#include <math_private.h>
+#undef __ieee754_sqrt
+extern double __ieee754_sqrt (double);
+#include <math-type-macros-double.h>
+#include <w_sqrt_template.c>
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
new file mode 100644
@@ -0,0 +1 @@
+/* Not needed. */
@@ -20,6 +20,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper exp */
double
__exp (double x)
@@ -33,7 +34,8 @@ __exp (double x)
}
hidden_def (__exp)
weak_alias (__exp, exp)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__exp, __expl)
weak_alias (__exp, expl)
+# endif
#endif
@@ -20,6 +20,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper expf */
float
__expf (float x)
@@ -33,3 +34,4 @@ __expf (float x)
}
hidden_def (__expf)
weak_alias (__expf, expf)
+#endif
@@ -21,23 +21,25 @@ static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $
#include <assert.h>
-#ifndef _USE_WRITE
-#include <stdio.h> /* fputs(), stderr */
-#define WRITE2(u,v) fputs(u, stderr)
-#else /* !defined(_USE_WRITE) */
-#include <unistd.h> /* write */
-#define WRITE2(u,v) write(2, u, v)
-#undef fflush
-#endif /* !defined(_USE_WRITE) */
+#if LIBM_SVID_COMPAT
+
+# ifndef _USE_WRITE
+# include <stdio.h> /* fputs(), stderr */
+# define WRITE2(u,v) fputs(u, stderr)
+# else /* !defined(_USE_WRITE) */
+# include <unistd.h> /* write */
+# define WRITE2(u,v) write(2, u, v)
+# undef fflush
+# endif /* !defined(_USE_WRITE) */
/* XXX gcc versions until now don't delay the 0.0/0.0 division until
runtime but produce NaN at compile time. This is wrong since the
exceptions are not set correctly. */
-#if 0
+# if 0
static const double zero = 0.0; /* used as const */
-#else
+# else
static double zero = 0.0; /* used as const */
-#endif
+# endif
/*
* Standard conformance (non-IEEE) on exception cases.
@@ -97,21 +99,21 @@ double
__kernel_standard(double x, double y, int type)
{
struct exception exc;
-#ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */
-#define HUGE_VAL inf
+# ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */
+# define HUGE_VAL inf
double inf = 0.0;
SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */
-#endif
+# endif
/* The SVID struct exception uses a field "char *name;". */
-#define CSTR(func) ((char *) (type < 100 \
+# define CSTR(func) ((char *) (type < 100 \
? func \
: (type < 200 ? func "f" : func "l")))
-#ifdef _USE_WRITE
+# ifdef _USE_WRITE
(void) fflush(stdout);
-#endif
+# endif
exc.arg1 = x;
exc.arg2 = y;
switch(type) {
@@ -945,3 +947,4 @@ __kernel_standard(double x, double y, int type)
}
return exc.retval;
}
+#endif
@@ -21,6 +21,7 @@
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* Handle errors for a libm function as specified by TYPE (see
comments in k_standard.c for details), with arguments X and Y,
returning the appropriate return value for that function. */
@@ -30,3 +31,4 @@ __kernel_standard_f (float x, float y, int type)
{
return __kernel_standard (x, y, type);
}
+#endif
@@ -38,6 +38,8 @@
#include <errno.h>
+#if LIBM_SVID_COMPAT
+
static double zero = 0.0;
/* Handle errors for a libm function as specified by TYPE (see
@@ -106,3 +108,4 @@ __kernel_standard_l (long double x, long double y, int type)
return __kernel_standard (dx, dy, type);
}
}
+#endif
@@ -26,18 +26,20 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
long double __expl(long double x) /* wrapper exp */
{
-#ifdef _IEEE_LIBM
+# ifdef _IEEE_LIBM
return __ieee754_expl(x);
-#else
+# else
long double z = __ieee754_expl (x);
if (__glibc_unlikely (!isfinite (z) || z == 0)
&& isfinite (x) && _LIB_VERSION != _IEEE_)
return __kernel_standard_l (x, x, 206 + !!signbit (x));
return z;
-#endif
+# endif
}
hidden_def (__expl)
weak_alias (__expl, expl)
+#endif
@@ -3,6 +3,7 @@
#include <math-svid-compat.h>
#include <math_ldbl_opt.h>
+#if LIBM_SVID_COMPAT
long double __expl(long double x) /* wrapper exp */
{
long double z;
@@ -20,3 +21,4 @@ long double __expl(long double x) /* wrapper exp */
}
hidden_def (__expl)
long_double_symbol (libm, __expl, expl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <sysdeps/ieee754/ldbl-128/w_expl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __expl, expl);
+#endif
@@ -20,6 +20,7 @@
#include <math_private.h>
#include <math-svid-compat.h>
+#if LIBM_SVID_COMPAT
/* wrapper expl */
long double
__expl (long double x)
@@ -33,3 +34,4 @@ __expl (long double x)
}
hidden_def (__expl)
weak_alias (__expl, expl)
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_acoshl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __acoshl, acoshl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_acosl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __acosl, acosl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_asinl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __asinl, asinl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_atan2l_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __atan2l, atan2l);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_atanhl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __atanhl, atanhl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_coshl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __coshl, coshl);
+#endif
@@ -4,15 +4,17 @@
#undef compat_symbol
#define compat_symbol(l,n,a,v)
#include <math/w_exp10l_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __exp10l, exp10l);
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
+# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
/* compat_symbol was undefined and redefined above to avoid the
default pow10l compat symbol at version GLIBC_2_1 (as for ldbl-opt
configurations, that version should have the alias to exp10). So
it now needs to be redefined to define the compat symbol at version
LONG_DOUBLE_COMPAT_VERSION. */
-# undef compat_symbol
-# define compat_symbol(lib, local, symbol, version) \
+# undef compat_symbol
+# define compat_symbol(lib, local, symbol, version) \
compat_symbol_reference (lib, local, symbol, version)
compat_symbol (libm, __pow10l, pow10l, LONG_DOUBLE_COMPAT_VERSION);
+# endif
#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_fmodl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __fmodl, fmodl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_hypotl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __hypotl, hypotl);
+#endif
@@ -2,5 +2,7 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_j0l_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __j0l, j0l);
long_double_symbol (libm, __y0l, y0l);
+#endif
@@ -2,5 +2,7 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_j1l_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __j1l, j1l);
long_double_symbol (libm, __y1l, y1l);
+#endif
@@ -2,5 +2,7 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_jnl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __jnl, jnl);
long_double_symbol (libm, __ynl, ynl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_lgammal_r_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __lgammal_r, lgammal_r);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_log10l_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __log10l, log10l);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_log2l_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __log2l, log2l);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_logl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __logl, logl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_powl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __powl, powl);
+#endif
@@ -2,6 +2,8 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_remainderl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __remainderl, remainderl);
strong_alias (__remainderl, __dreml)
long_double_symbol (libm, __dreml, dreml);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_sinhl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __sinhl, sinhl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_sqrtl_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __sqrtl, sqrtl);
+#endif
@@ -2,4 +2,6 @@
#undef weak_alias
#define weak_alias(n,a)
#include <math/w_tgammal_compat.c>
+#if LIBM_SVID_COMPAT
long_double_symbol (libm, __tgammal, tgammal);
+#endif