r6089 - in glibc-package/branches/eglibc-2.19/debian: . patches patches/any
Author: aurel32
Date: 2014-05-20 17:30:39 +0000 (Tue, 20 May 2014)
New Revision: 6089
Added:
glibc-package/branches/eglibc-2.19/debian/patches/any/cvs-strtod.diff
Modified:
glibc-package/branches/eglibc-2.19/debian/changelog
glibc-package/branches/eglibc-2.19/debian/patches/series
Log:
patches/any/cvs-strtod.diff: new patch to fix strtod on some
architectures, fixing a FTBFS on sparc.
Modified: glibc-package/branches/eglibc-2.19/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.19/debian/changelog 2014-05-20 07:27:50 UTC (rev 6088)
+++ glibc-package/branches/eglibc-2.19/debian/changelog 2014-05-20 17:30:39 UTC (rev 6089)
@@ -72,6 +72,8 @@
test, as it is due to GCC bug #748616.
* debian/control.in/main: build-depends on systemtap-sdt-dev on linux-any.
debian/sysdeps/linux.mk: enable systemtap support. Closes: #700760.
+ * patches/any/cvs-strtod.diff: new patch to fix strtod on some
+ architectures, fixing a FTBFS on sparc.
[ Samuel Thibault ]
* Hurd fixes for new upstream
Added: glibc-package/branches/eglibc-2.19/debian/patches/any/cvs-strtod.diff
===================================================================
--- glibc-package/branches/eglibc-2.19/debian/patches/any/cvs-strtod.diff (rev 0)
+++ glibc-package/branches/eglibc-2.19/debian/patches/any/cvs-strtod.diff 2014-05-20 17:30:39 UTC (rev 6089)
@@ -0,0 +1,27 @@
+2014-05-20 Aurelien Jarno <aurelien@aurel32.net>
+
+ [BZ #16965]
+ * stdlib/strtod_l.c (round_and_return): Add code to shift limbs
+ when the shift amount is modulo the limb size.
+
+diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
+--- a/stdlib/strtod_l.c
++++ b/stdlib/strtod_l.c
+@@ -243,9 +243,14 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
+ more_bits |= ((round_limb & ((((mp_limb_t) 1) << round_bit) - 1))
+ != 0);
+
+- (void) __mpn_rshift (retval, &retval[shift / BITS_PER_MP_LIMB],
+- RETURN_LIMB_SIZE - (shift / BITS_PER_MP_LIMB),
+- shift % BITS_PER_MP_LIMB);
++ /* __mpn_rshift requires 0 < shift < BITS_PER_MP_LIMB. */
++ if ((shift % BITS_PER_MP_LIMB) != 0)
++ (void) __mpn_rshift (retval, &retval[shift / BITS_PER_MP_LIMB],
++ RETURN_LIMB_SIZE - (shift / BITS_PER_MP_LIMB),
++ shift % BITS_PER_MP_LIMB);
++ else
++ for (i = 0; i < RETURN_LIMB_SIZE - (shift / BITS_PER_MP_LIMB); i++)
++ retval[i] = retval[i + (shift / BITS_PER_MP_LIMB)];
+ MPN_ZERO (&retval[RETURN_LIMB_SIZE - (shift / BITS_PER_MP_LIMB)],
+ shift / BITS_PER_MP_LIMB);
+ }
Modified: glibc-package/branches/eglibc-2.19/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.19/debian/patches/series 2014-05-20 07:27:50 UTC (rev 6088)
+++ glibc-package/branches/eglibc-2.19/debian/patches/series 2014-05-20 17:30:39 UTC (rev 6089)
@@ -243,3 +243,4 @@
any/submitted-ptsname_r-uninitialized-memory.diff
any/cvs-socketcall-syscall.diff
any/submitted-nl_langinfo-static.diff
+any/cvs-strtod.diff
Reply to: