This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via 12a85731dc5fda3bc01ab19c82678b3bf122d794 (commit)
from e6acefa2ddd445e7e13aa89ced6d184a08ad8da6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 12a85731dc5fda3bc01ab19c82678b3bf122d794
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Sat Jan 30 10:36:17 2016 +0100
add exp10() from glibc
Some software make use of exp10, so add it.
Basic testing with LTP.
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
-----------------------------------------------------------------------
Summary of changes:
libc/sysdeps/linux/common/bits/mathcalls.h | 6 +++---
libm/Makefile.in | 4 ++--
libc/signal/sigignore.c => libm/e_exp10.c | 26 +++++++++++++-------------
libm/math_private.h | 1 +
4 files changed, 19 insertions(+), 18 deletions(-)
copy libc/signal/sigignore.c => libm/e_exp10.c (63%)
diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h
b/libc/sysdeps/linux/common/bits/mathcalls.h
index 9bebb51..8ab8075 100644
--- a/libc/sysdeps/linux/common/bits/mathcalls.h
+++ b/libc/sysdeps/linux/common/bits/mathcalls.h
@@ -145,11 +145,11 @@ __MATHCALLI (log10,, (_Mdouble_ __x))
__MATHCALLI (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr))
_Mdouble_END_NAMESPACE
-#if 0 /*def __USE_GNU*/
+#if defined __USE_GNU
/* A function missing in all standards: compute exponent to base ten. */
-__MATHCALL (exp10,, (_Mdouble_ __x))
+__MATHCALLI (exp10,, (_Mdouble_ __x))
/* Another name occasionally used. */
-__MATHCALL (pow10,, (_Mdouble_ __x))
+__MATHCALLI (pow10,, (_Mdouble_ __x))
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
diff --git a/libm/Makefile.in b/libm/Makefile.in
index d886cdb..f0e5528 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -56,7 +56,7 @@ 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_exp.c e_exp10.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 \
@@ -238,7 +238,7 @@ libm_CSRC := \
s_expm1.c s_scalbn.c s_copysign.c e_acos.c e_asin.c e_atan2.c \
k_cos.c e_cosh.c e_exp.c e_fmod.c e_log.c e_log10.c e_pow.c \
k_sin.c e_sinh.c e_sqrt.c k_tan.c e_rem_pio2.c k_rem_pio2.c \
- s_finite.c
+ s_finite.c e_exp10.c
# We'll add sqrtf to avoid problems with libstdc++
FL_MOBJ := sqrtf.o
endif
diff --git a/libc/signal/sigignore.c b/libm/e_exp10.c
similarity index 63%
copy from libc/signal/sigignore.c
copy to libm/e_exp10.c
index 1ddce81..f0ee878 100644
--- a/libc/signal/sigignore.c
+++ b/libm/e_exp10.c
@@ -1,5 +1,4 @@
-/* Set the disposition of SIG to SIG_IGN.
- Copyright (C) 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper(a)cygnus.com>om>, 1998.
@@ -17,17 +16,18 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#define __need_NULL
-#include <stddef.h>
-#include <signal.h>
-#include <string.h>
+#include "math.h"
+#include "math_private.h"
+#include <float.h>
-int sigignore (int sig)
+double __ieee754_exp10 (double arg)
{
- struct sigaction act;
-
- memset(&act, 0, sizeof(act));
- act.sa_handler = SIG_IGN;
-
- return sigaction (sig, &act, NULL);
+ if (isfinite (arg) && arg < DBL_MIN_10_EXP - DBL_DIG - 10)
+ return DBL_MIN * DBL_MIN;
+ else
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_exp (M_LN10 * arg);
}
+strong_alias(__ieee754_exp10, exp10)
+libm_hidden_def(exp10)
diff --git a/libm/math_private.h b/libm/math_private.h
index be8031e..b62dcfe 100644
--- a/libm/math_private.h
+++ b/libm/math_private.h
@@ -158,6 +158,7 @@ extern double __ieee754_atanh (double) attribute_hidden;
extern double __ieee754_asin (double) attribute_hidden;
extern double __ieee754_atan2 (double,double) attribute_hidden;
extern double __ieee754_exp (double) attribute_hidden;
+extern double __ieee754_exp10 (double) attribute_hidden;
extern double __ieee754_cosh (double) attribute_hidden;
extern double __ieee754_fmod (double,double) attribute_hidden;
extern double __ieee754_pow (double,double) attribute_hidden;
hooks/post-receive
--
uClibc-ng - small C library for embedded systems