This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.16-ports-merge-71-g354691b


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 "GNU C Library master sources".

The branch, master has been updated
       via  354691b7b55d014b9a4d3a94e2f8f934870b6bff (commit)
      from  bf9e20711e4f3905b2bbcceab2b339b50c7097dd (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 -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=354691b7b55d014b9a4d3a94e2f8f934870b6bff

commit 354691b7b55d014b9a4d3a94e2f8f934870b6bff
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Jul 25 12:59:36 2012 +0200

    Set up errno properly for yn.

diff --git a/ChangeLog b/ChangeLog
index b98741f..d855526 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-07-25  Marek Polacek  <polacek@redhat.com>
+
+	[BZ #6808]
+	* math/libm-test.inc (yn_test): Add another test.
+	* sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_ynl): Set errno
+	to ERANGE when the result is +-Inf.
+	* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_ynl): Likewise.
+	* sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_ynf): Likewise.
+	* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_ynl): Likewise.
+	* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_yn): Likewise.
+
 2012-07-24  Joseph Myers  <joseph@codesourcery.com>
 
 	* conform/data/time.h-data (NULL): Use macro-constant.  Require
diff --git a/NEWS b/NEWS
index 416bf89..65ca380 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.17
 
 * The following bugs are resolved with this release:
 
-  6778, 14042, 14151, 14154, 14157, 14173, 14283, 14328, 14331, 14337,
+  6778, 6808, 14042, 14151, 14154, 14157, 14173, 14283, 14328, 14331, 14337,
   14347, 14349
 
 * Support for STT_GNU_IFUNC symbols added for s390 and s390x.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 25a8f41..60abf0e 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -9019,6 +9019,10 @@ yn_test (void)
      and FLT_MIN.  See Bug 14173.  */
   TEST_ff_f (yn, 10, min_value, minus_infty, OVERFLOW_EXCEPTION);
 
+  errno = 0;
+  TEST_ff_f (yn, 10, min_value, minus_infty, OVERFLOW_EXCEPTION);
+  check_int ("errno for yn(10,-min) == ERANGE", errno, ERANGE, 0, 0, 0);
+
   END (yn);
 }
 
diff --git a/sysdeps/ieee754/dbl-64/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c
index 63788c5..0d2a24c 100644
--- a/sysdeps/ieee754/dbl-64/e_jn.c
+++ b/sysdeps/ieee754/dbl-64/e_jn.c
@@ -36,6 +36,7 @@
  *
  */
 
+#include <errno.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -276,6 +277,9 @@ __ieee754_yn(int n, double x)
 		GET_HIGH_WORD(high,b);
 		a = temp;
 	    }
+	    /* If B is +-Inf, set up errno accordingly.  */
+	    if (! __finite (b))
+	      __set_errno (ERANGE);
 	}
 	if(sign>0) return b; else return -b;
 }
diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c
index bed9cee..ad26d7e 100644
--- a/sysdeps/ieee754/flt-32/e_jnf.c
+++ b/sysdeps/ieee754/flt-32/e_jnf.c
@@ -13,6 +13,7 @@
  * ====================================================
  */
 
+#include <errno.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -199,6 +200,9 @@ __ieee754_ynf(int n, float x)
 	    GET_FLOAT_WORD(ib,b);
 	    a = temp;
 	}
+	/* If B is +-Inf, set up errno accordingly.  */
+	if (! __finitef (b))
+	  __set_errno (ERANGE);
 	if(sign>0) return b; else return -b;
 }
 strong_alias (__ieee754_ynf, __ynf_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_jnl.c b/sysdeps/ieee754/ldbl-128/e_jnl.c
index e320d99..70d5672 100644
--- a/sysdeps/ieee754/ldbl-128/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-128/e_jnl.c
@@ -56,6 +56,7 @@
  *
  */
 
+#include <errno.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -385,6 +386,9 @@ __ieee754_ynl (int n, long double x)
 	  a = temp;
 	}
     }
+  /* If B is +-Inf, set up errno accordingly.  */
+  if (! __finitel (b))
+    __set_errno (ERANGE);
   if (sign > 0)
     return b;
   else
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
index 930a2bc..40012e4 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
@@ -56,6 +56,7 @@
  *
  */
 
+#include <errno.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -387,6 +388,9 @@ __ieee754_ynl (int n, long double x)
 	  a = temp;
 	}
     }
+  /* If B is +-Inf, set up errno accordingly.  */
+  if (! __finitel (b))
+    __set_errno (ERANGE);
   if (sign > 0)
     return b;
   else
diff --git a/sysdeps/ieee754/ldbl-96/e_jnl.c b/sysdeps/ieee754/ldbl-96/e_jnl.c
index 36b0d8b..58a9107 100644
--- a/sysdeps/ieee754/ldbl-96/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-96/e_jnl.c
@@ -56,6 +56,7 @@
  *
  */
 
+#include <errno.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -369,6 +370,9 @@ __ieee754_ynl (int n, long double x)
 	  a = temp;
 	}
     }
+  /* If B is +-Inf, set up errno accordingly.  */
+  if (! __finitel (b))
+    __set_errno (ERANGE);
   if (sign > 0)
     return b;
   else

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |   11 +++++++++++
 NEWS                                |    2 +-
 math/libm-test.inc                  |    4 ++++
 sysdeps/ieee754/dbl-64/e_jn.c       |    4 ++++
 sysdeps/ieee754/flt-32/e_jnf.c      |    4 ++++
 sysdeps/ieee754/ldbl-128/e_jnl.c    |    4 ++++
 sysdeps/ieee754/ldbl-128ibm/e_jnl.c |    4 ++++
 sysdeps/ieee754/ldbl-96/e_jnl.c     |    4 ++++
 8 files changed, 36 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]