Browse Source

DO_XSI_MATH: add config knob

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 14 years ago
parent
commit
4c5c4502d0
3 changed files with 19 additions and 2 deletions
  1. 11 0
      extra/Configs/Config.in.arch
  2. 2 0
      libc/sysdeps/linux/common/bits/mathcalls.h
  3. 6 2
      libm/Makefile.in

+ 11 - 0
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

+ 2 - 0
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
 
 

+ 6 - 2
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)