summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra/Configs/Config.in.arch11
-rw-r--r--libc/sysdeps/linux/common/bits/mathcalls.h2
-rw-r--r--libm/Makefile.in8
3 files changed, 19 insertions, 2 deletions
diff --git a/extra/Configs/Config.in.arch b/extra/Configs/Config.in.arch
index 76ab0022f..8a02cb1a2 100644
--- a/extra/Configs/Config.in.arch
+++ b/extra/Configs/Config.in.arch
@@ -160,6 +160,17 @@ config DO_C99_MATH
If your applications require the newer C99 math library functions,
then answer Y.
+config DO_XSI_MATH
+ bool "Enable XSI math extensions to the ISO C standard (bessel)"
+ depends on UCLIBC_HAS_FLOATS
+ default n
+ help
+ X/Open System Interfaces extensions to ISO C math functions
+ (differential equation functions):
+
+ j0, j1, jn - Bessel functions of the first kind
+ y0, y1, yn - Bessel functions of the second kind
+
config UCLIBC_HAS_FENV
bool "Enable C99 Floating-point environment"
depends on UCLIBC_HAS_FLOATS
diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h
index 811738238..df2e21cc8 100644
--- a/libc/sysdeps/linux/common/bits/mathcalls.h
+++ b/libc/sysdeps/linux/common/bits/mathcalls.h
@@ -244,6 +244,7 @@ __END_NAMESPACE_C99
/* Return nonzero if VALUE is not a number. */
__MATHDECL_PRIV (int,isnan,, (_Mdouble_ __value), (__const__))
+# ifdef __DO_XSI_MATH__
/* Bessel functions. */
__MATHCALL (j0,, (_Mdouble_))
__MATHCALL (j1,, (_Mdouble_))
@@ -251,6 +252,7 @@ __MATHCALL (jn,, (int, _Mdouble_))
__MATHCALL (y0,, (_Mdouble_))
__MATHCALL (y1,, (_Mdouble_))
__MATHCALL (yn,, (int, _Mdouble_))
+# endif
#endif
diff --git a/libm/Makefile.in b/libm/Makefile.in
index d17d64fae..56b2d76c3 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -56,8 +56,8 @@ LD_MSRC := ldouble_wrappers.c
ifeq ($(DO_C99_MATH),y)
libm_CSRC := \
e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c \
- e_exp.c e_fmod.c e_hypot.c e_j0.c \
- e_j1.c e_jn.c e_lgamma_r.c e_log.c e_log2.c e_log10.c \
+ e_exp.c e_fmod.c e_hypot.c \
+ e_lgamma_r.c e_log.c e_log2.c e_log10.c \
e_pow.c e_remainder.c e_rem_pio2.c e_scalb.c e_sinh.c \
e_sqrt.c k_cos.c k_rem_pio2.c k_sin.c k_standard.c k_tan.c \
s_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c \
@@ -209,6 +209,10 @@ libm_CSRC := \
FL_MOBJ := sqrtf.o
endif
+ifeq ($(DO_XSI_MATH),y)
+libm_CSRC += e_j0.c e_j1.c e_jn.c
+endif
+
# assume that arch specific versions are provided as single sources/objects
ifeq ($(UCLIBC_HAS_FPU),y)
ifeq ($(DO_C99_MATH),y)