[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r23336 - in /fsf/trunk/libc: ./ math/



Author: eglibc
Date: Fri Jun 21 00:02:09 2013
New Revision: 23336

Log:
Import glibc-mainline for 2013-06-21

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/math/fedisblxcpt.c
    fsf/trunk/libc/math/feenablxcpt.c
    fsf/trunk/libc/math/fegetenv.c
    fsf/trunk/libc/math/fegetexcept.c
    fsf/trunk/libc/math/fegetround.c
    fsf/trunk/libc/math/feholdexcpt.c
    fsf/trunk/libc/math/fesetenv.c
    fsf/trunk/libc/math/fesetround.c
    fsf/trunk/libc/math/feupdateenv.c
    fsf/trunk/libc/math/fgetexcptflg.c
    fsf/trunk/libc/math/test-misc.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jun 21 00:02:09 2013
@@ -1,3 +1,22 @@
+2013-06-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* math/test-misc.c (main): Ignore fesetround failure when failures
+	of subsequent rounding tests would be ignored.
+
+	[BZ #15654]
+	* math/fedisblxcpt.c (fedisableexcept): Return 0.
+	* math/feenablxcpt.c (feenableexcept): Return 0 for argument 0.
+	* math/fegetenv.c (__fegetenv): Return 0.
+	* math/fegetexcept.c (fegetexcept): Return 0.
+	* math/fegetround.c (fegetround) [FE_TONEAREST]: Return
+	FE_TONEAREST.
+	* math/feholdexcpt.c (feholdexcept): Return 0.
+	* math/fesetenv.c (__fesetenv): Return 0.
+	* math/fesetround.c (fesetround) [FE_TONEAREST]: Return 0 for
+	argument FE_TONEAREST.
+	* math/feupdateenv.c (__feupdateenv): Return 0.
+	* math/fgetexcptflg.c (__fegetexceptflag): Return 0.
+
 2013-06-18  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* elf/rtld-Rules (rtld-compile-command.S): New variable.

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Jun 21 00:02:09 2013
@@ -20,7 +20,7 @@
   15361, 15366, 15380, 15381, 15394, 15395, 15405, 15406, 15409, 15416,
   15418, 15419, 15423, 15424, 15426, 15429, 15431, 15432, 15441, 15442,
   15448, 15465, 15480, 15485, 15488, 15490, 15492, 15493, 15497, 15506,
-  15529, 15536, 15553, 15577, 15583, 15618, 15627, 15631.
+  15529, 15536, 15553, 15577, 15583, 15618, 15627, 15631, 15654.
 
 * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
   #15078).

Modified: fsf/trunk/libc/math/fedisblxcpt.c
==============================================================================
--- fsf/trunk/libc/math/fedisblxcpt.c (original)
+++ fsf/trunk/libc/math/fedisblxcpt.c Fri Jun 21 00:02:09 2013
@@ -22,7 +22,7 @@
 int
 fedisableexcept (int excepts)
 {
-  /* Signal failure.  */
-  return -1;
+  /* All exception traps are disabled.  */
+  return 0;
 }
 stub_warning (fedisableexcept)

Modified: fsf/trunk/libc/math/feenablxcpt.c
==============================================================================
--- fsf/trunk/libc/math/feenablxcpt.c (original)
+++ fsf/trunk/libc/math/feenablxcpt.c Fri Jun 21 00:02:09 2013
@@ -22,7 +22,10 @@
 int
 feenableexcept (int excepts)
 {
-  /* Signal failure.  */
-  return -1;
+  /* Signal failure if any exception traps are to be enabled.  */
+  if (excepts != 0)
+    return -1;
+  else
+    return 0;
 }
 stub_warning (feenableexcept)

Modified: fsf/trunk/libc/math/fegetenv.c
==============================================================================
--- fsf/trunk/libc/math/fegetenv.c (original)
+++ fsf/trunk/libc/math/fegetenv.c Fri Jun 21 00:02:09 2013
@@ -23,8 +23,8 @@
 int
 __fegetenv (fenv_t *envp)
 {
-  /* This always fails.  */
-  return 1;
+  /* Nothing to do.  */
+  return 0;
 }
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 strong_alias (__fegetenv, __old_fegetenv)

Modified: fsf/trunk/libc/math/fegetexcept.c
==============================================================================
--- fsf/trunk/libc/math/fegetexcept.c (original)
+++ fsf/trunk/libc/math/fegetexcept.c Fri Jun 21 00:02:09 2013
@@ -22,7 +22,7 @@
 int
 fegetexcept (void)
 {
-  /* Signal failure.  */
-  return -1;
+  /* All exception traps are disabled.  */
+  return 0;
 }
 stub_warning (fegetexcept)

Modified: fsf/trunk/libc/math/fegetround.c
==============================================================================
--- fsf/trunk/libc/math/fegetround.c (original)
+++ fsf/trunk/libc/math/fegetround.c Fri Jun 21 00:02:09 2013
@@ -22,6 +22,10 @@
 int
 fegetround (void)
 {
+#ifdef FE_TONEAREST
+  return FE_TONEAREST;
+#else
   return 0;
+#endif
 }
 stub_warning (fegetround)

Modified: fsf/trunk/libc/math/feholdexcpt.c
==============================================================================
--- fsf/trunk/libc/math/feholdexcpt.c (original)
+++ fsf/trunk/libc/math/feholdexcpt.c Fri Jun 21 00:02:09 2013
@@ -22,7 +22,8 @@
 int
 feholdexcept (fenv_t *envp)
 {
-  return 1;		/* Signal failure.  */
+  /* No exception traps to disable and no state to save.  */
+  return 0;
 }
 libm_hidden_def (feholdexcept)
 stub_warning (feholdexcept)

Modified: fsf/trunk/libc/math/fesetenv.c
==============================================================================
--- fsf/trunk/libc/math/fesetenv.c (original)
+++ fsf/trunk/libc/math/fesetenv.c Fri Jun 21 00:02:09 2013
@@ -23,8 +23,8 @@
 int
 __fesetenv (const fenv_t *envp)
 {
-  /* This always fails.  */
-  return 1;
+  /* Nothing to do.  */
+  return 0;
 }
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 strong_alias (__fesetenv, __old_fesetenv)

Modified: fsf/trunk/libc/math/fesetround.c
==============================================================================
--- fsf/trunk/libc/math/fesetround.c (original)
+++ fsf/trunk/libc/math/fesetround.c Fri Jun 21 00:02:09 2013
@@ -22,7 +22,11 @@
 int
 fesetround (int round)
 {
+#ifdef FE_TONEAREST
+  return (round == FE_TONEAREST) ? 0 : 1;
+#else
   return 1;	/* Signal we are unable to set the direction.  */
+#endif
 }
 libm_hidden_def (fesetround)
 stub_warning (fesetround)

Modified: fsf/trunk/libc/math/feupdateenv.c
==============================================================================
--- fsf/trunk/libc/math/feupdateenv.c (original)
+++ fsf/trunk/libc/math/feupdateenv.c Fri Jun 21 00:02:09 2013
@@ -23,8 +23,8 @@
 int
 __feupdateenv (const fenv_t *envp)
 {
-  /* This always fails.  */
-  return 1;
+  /* Nothing to do.  */
+  return 0;
 }
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 strong_alias (__feupdateenv, __old_feupdateenv)

Modified: fsf/trunk/libc/math/fgetexcptflg.c
==============================================================================
--- fsf/trunk/libc/math/fgetexcptflg.c (original)
+++ fsf/trunk/libc/math/fgetexcptflg.c Fri Jun 21 00:02:09 2013
@@ -23,8 +23,8 @@
 int
 __fegetexceptflag (fexcept_t *flagp, int excepts)
 {
-  /* This always fails.  */
-  return 1;
+  /* Nothing to do.  */
+  return 0;
 }
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 strong_alias (__fegetexceptflag, __old_fegetexceptflag)

Modified: fsf/trunk/libc/math/test-misc.c
==============================================================================
--- fsf/trunk/libc/math/test-misc.c (original)
+++ fsf/trunk/libc/math/test-misc.c Fri Jun 21 00:02:09 2013
@@ -1295,7 +1295,11 @@
 	  if (fesetround (mode))
 	    {
 	      printf ("failed to set rounding mode to %s\n", mstr);
-	      result = 1;
+	      if (ROUNDING_TESTS (long double, mode)
+		  && ROUNDING_TESTS (double, mode))
+		result = 1;
+	      else
+		puts ("ignoring this failure");
 	      break;
 	    }
 	  d5 = ld5 * i;

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits