OSDN Git Service

DO_XSI_MATH: add config knob
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 19 Nov 2009 17:49:24 +0000 (18:49 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 19 Nov 2009 17:49:24 +0000 (18:49 +0100)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
extra/Configs/Config.in.arch
libc/sysdeps/linux/common/bits/mathcalls.h
libm/Makefile.in

index 76ab002..8a02cb1 100644 (file)
@@ -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
index 8117382..df2e21c 100644 (file)
@@ -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
 
 
index d17d64f..56b2d76 100644 (file)
@@ -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)