r3608 - in glibc-package/branches/eglibc-2.10/debian: . patches patches/any
Author: aurel32
Date: 2009-07-11 13:23:59 +0000 (Sat, 11 Jul 2009)
New Revision: 3608
Added:
glibc-package/branches/eglibc-2.10/debian/patches/any/cvs-ldbl-128-errno.diff
Modified:
glibc-package/branches/eglibc-2.10/debian/changelog
glibc-package/branches/eglibc-2.10/debian/patches/series
Log:
* Add debian/patches/any/cvs-ldbl-128-errno.diff from upstream.
Modified: glibc-package/branches/eglibc-2.10/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.10/debian/changelog 2009-07-11 11:07:48 UTC (rev 3607)
+++ glibc-package/branches/eglibc-2.10/debian/changelog 2009-07-11 13:23:59 UTC (rev 3608)
@@ -96,11 +96,12 @@
* Add debian/patches/alpha/submitted-rtld-fPIC.diff to fix build on alpha.
* Add debian/patches/any/submitted-getent-gshadow.diff to add gshadow
support to getent.
+ * Add debian/patches/any/cvs-ldbl-128-errno.diff from upstream.
[ Petr Salinger ]
* Add kfreebsd/local-no-SOCK_NONBLOCK.diff to fix build on GNU/kFreeBSD.
- -- Aurelien Jarno <aurel32@debian.org> Tue, 26 May 2009 09:27:14 +0200
+ -- Aurelien Jarno <aurel32@debian.org> Sat, 11 Jul 2009 15:21:56 +0200
eglibc (2.9-20) UNSTABLE; urgency=low
Added: glibc-package/branches/eglibc-2.10/debian/patches/any/cvs-ldbl-128-errno.diff
===================================================================
--- glibc-package/branches/eglibc-2.10/debian/patches/any/cvs-ldbl-128-errno.diff (rev 0)
+++ glibc-package/branches/eglibc-2.10/debian/patches/any/cvs-ldbl-128-errno.diff 2009-07-11 13:23:59 UTC (rev 3608)
@@ -0,0 +1,119 @@
+ 2009-05-29 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/ieee754/ldbl-128/s_expm1l.c: Include <errno.h>.
+ (__expm1l): Set errno to ERANGE on overflow.
+ * sysdeps/ieee754/ldbl-128/s_tanl.c: Include <errno.h>.
+ (__tanl): Set errno to EDOM for ±Inf.
+ * sysdeps/ieee754/ldbl-128/s_cosl.c: Include <errno.h>.
+ (__cosl): Set errno to EDOM for ±Inf.
+ * sysdeps/ieee754/ldbl-128/s_sinl.c: Include <errno.h>.
+ (__sinl): Set errno to EDOM for ±Inf.
+
+diff --git a/sysdeps/ieee754/ldbl-128/s_cosl.c b/sysdeps/ieee754/ldbl-128/s_cosl.c
+index d1258b2..ef61c3a 100644
+--- a/sysdeps/ieee754/ldbl-128/s_cosl.c
++++ b/sysdeps/ieee754/ldbl-128/s_cosl.c
+@@ -44,6 +44,7 @@
+ * TRIG(x) returns trig(x) nearly rounded
+ */
+
++#include <errno.h>
+ #include "math.h"
+ #include "math_private.h"
+
+@@ -66,7 +67,14 @@
+ return __kernel_cosl(x,z);
+
+ /* cos(Inf or NaN) is NaN */
+- else if (ix>=0x7fff000000000000LL) return x-x;
++ else if (ix>=0x7fff000000000000LL) {
++ if (ix == 0x7fff000000000000LL) {
++ GET_LDOUBLE_LSW64(n,x);
++ if (n == 0)
++ __set_errno (EDOM);
++ }
++ return x-x;
++ }
+
+ /* argument reduction needed */
+ else {
+diff --git a/sysdeps/ieee754/ldbl-128/s_expm1l.c b/sysdeps/ieee754/ldbl-128/s_expm1l.c
+index 78bbe65..a82489b 100644
+--- a/sysdeps/ieee754/ldbl-128/s_expm1l.c
++++ b/sysdeps/ieee754/ldbl-128/s_expm1l.c
+@@ -53,6 +53,7 @@
+
+
+
++#include <errno.h>
+ #include "math.h"
+ #include "math_private.h"
+
+@@ -121,7 +122,10 @@ __expm1l (long double x)
+
+ /* Overflow. */
+ if (x > maxlog)
+- return (big * big);
++ {
++ __set_errno (ERANGE);
++ return (big * big);
++ }
+
+ /* Minimum value. */
+ if (x < minarg)
+diff --git a/sysdeps/ieee754/ldbl-128/s_sinl.c b/sysdeps/ieee754/ldbl-128/s_sinl.c
+index 446a75f..dc509e7 100644
+--- a/sysdeps/ieee754/ldbl-128/s_sinl.c
++++ b/sysdeps/ieee754/ldbl-128/s_sinl.c
+@@ -44,6 +44,7 @@
+ * TRIG(x) returns trig(x) nearly rounded
+ */
+
++#include <errno.h>
+ #include "math.h"
+ #include "math_private.h"
+
+@@ -66,7 +67,14 @@
+ return __kernel_sinl(x,z,0);
+
+ /* sin(Inf or NaN) is NaN */
+- else if (ix>=0x7fff000000000000LL) return x-x;
++ else if (ix>=0x7fff000000000000LL) {
++ if (ix == 0x7fff000000000000LL) {
++ GET_LDOUBLE_LSW64(n,x);
++ if (n == 0)
++ __set_errno (EDOM);
++ }
++ return x-x;
++ }
+
+ /* argument reduction needed */
+ else {
+diff --git a/sysdeps/ieee754/ldbl-128/s_tanl.c b/sysdeps/ieee754/ldbl-128/s_tanl.c
+index ea9d053..2349da6 100644
+--- a/sysdeps/ieee754/ldbl-128/s_tanl.c
++++ b/sysdeps/ieee754/ldbl-128/s_tanl.c
+@@ -44,6 +44,7 @@
+ * TRIG(x) returns trig(x) nearly rounded
+ */
+
++#include <errno.h>
+ #include "math.h"
+ #include "math_private.h"
+
+@@ -65,7 +66,14 @@
+ if(ix <= 0x3ffe921fb54442d1LL) return __kernel_tanl(x,z,1);
+
+ /* tanl(Inf or NaN) is NaN */
+- else if (ix>=0x7fff000000000000LL) return x-x; /* NaN */
++ else if (ix>=0x7fff000000000000LL) {
++ if (ix == 0x7fff000000000000LL) {
++ GET_LDOUBLE_LSW64(n,x);
++ if (n == 0)
++ __set_errno (EDOM);
++ }
++ return x-x; /* NaN */
++ }
+
+ /* argument reduction needed */
+ else {
Modified: glibc-package/branches/eglibc-2.10/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.10/debian/patches/series 2009-07-11 11:07:48 UTC (rev 3607)
+++ glibc-package/branches/eglibc-2.10/debian/patches/series 2009-07-11 13:23:59 UTC (rev 3608)
@@ -189,3 +189,4 @@
any/submitted-accept4-hidden.diff
any/submitted-nptl_db-symbols.diff
any/submitted-getent-gshadow.diff
+any/cvs-ldbl-128-errno.diff
Reply to: