[PATCH] libm: Export bessel functions

Khem Raj raj.khem at gmail.com
Fri Jan 20 07:05:35 UTC 2012


Currently j0,j1,jn and y0,y1 and yn
are defined but with hidden visibility
With this patch we export them and also
keep a hidden alias for internal use

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 libc/sysdeps/linux/common/bits/mathcalls.h |   12 ++++++------
 libm/e_j0.c                                |    3 ++-
 libm/e_j1.c                                |    2 ++
 libm/e_jn.c                                |    2 ++
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h
index 013d2b2..b16a4b9 100644
--- a/libc/sysdeps/linux/common/bits/mathcalls.h
+++ b/libc/sysdeps/linux/common/bits/mathcalls.h
@@ -250,12 +250,12 @@ __END_NAMESPACE_C99
 #if defined __USE_MISC || defined __USE_XOPEN
 # ifdef __DO_XSI_MATH__
 /* Bessel functions.  */
-__MATHCALL (j0,, (_Mdouble_))
-__MATHCALL (j1,, (_Mdouble_))
-__MATHCALL (jn,, (int, _Mdouble_))
-__MATHCALL (y0,, (_Mdouble_))
-__MATHCALL (y1,, (_Mdouble_))
-__MATHCALL (yn,, (int, _Mdouble_))
+__MATHCALLI (j0,, (_Mdouble_))
+__MATHCALLI (j1,, (_Mdouble_))
+__MATHCALLI (jn,, (int, _Mdouble_))
+__MATHCALLI (y0,, (_Mdouble_))
+__MATHCALLI (y1,, (_Mdouble_))
+__MATHCALLI (yn,, (int, _Mdouble_))
 # endif
 #endif
 
diff --git a/libm/e_j0.c b/libm/e_j0.c
index ea37460..7408b3d 100644
--- a/libm/e_j0.c
+++ b/libm/e_j0.c
@@ -139,6 +139,7 @@ double j0(double x)
 #else
 strong_alias(__ieee754_j0, j0)
 #endif
+libm_hidden_def(j0)
 
 static const double
 u00  = -7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F */
@@ -227,7 +228,7 @@ double y0(double x)
 #else
 strong_alias(__ieee754_y0, y0)
 #endif
-
+libm_hidden_def(y0)
 
 /* The asymptotic expansions of pzero is
  *	1 - 9/128 s^2 + 11025/98304 s^4 - ...,	where s = 1/x.
diff --git a/libm/e_j1.c b/libm/e_j1.c
index 1f674e9..79fffe5 100644
--- a/libm/e_j1.c
+++ b/libm/e_j1.c
@@ -134,6 +134,7 @@ double j1(double x)
 #else
 strong_alias(__ieee754_j1, j1)
 #endif
+libm_hidden_def(j1)
 
 static const double U0[5] = {
  -1.96057090646238940668e-01, /* 0xBFC91866, 0x143CBC8A */
@@ -220,6 +221,7 @@ double y1(double x)
 #else
 strong_alias(__ieee754_y1, y1)
 #endif
+libm_hidden_def(y1)
 
 /* For x >= 8, the asymptotic expansions of pone is
  *	1 + 15/128 s^2 - 4725/2^15 s^4 - ...,	where s = 1/x.
diff --git a/libm/e_jn.c b/libm/e_jn.c
index 3825bea..5ecc456 100644
--- a/libm/e_jn.c
+++ b/libm/e_jn.c
@@ -216,6 +216,7 @@ double jn(int n, double x)
 #else
 strong_alias(__ieee754_jn, jn)
 #endif
+libm_hidden_def(jn)
 
 double attribute_hidden __ieee754_yn(int n, double x)
 {
@@ -296,3 +297,4 @@ double yn(int n, double x)	/* wrapper yn */
 #else
 strong_alias(__ieee754_yn, yn)
 #endif
+libm_hidden_def(yn)
-- 
1.7.0.4



More information about the uClibc mailing list