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-40-gd0cd7d0


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  d0cd7d02120a1700a9b9f2b5601c35142f1be44b (commit)
      from  dd31893430a76e81cbd8b5412c5894f27bab39c7 (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=d0cd7d02120a1700a9b9f2b5601c35142f1be44b

commit d0cd7d02120a1700a9b9f2b5601c35142f1be44b
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Mon Jul 16 16:51:13 2012 +0200

    Fix bug-getcontext test

diff --git a/ChangeLog b/ChangeLog
index bc144a0..f6c1cc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-16  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* stdlib/bug-getcontext.c (do_test): Don't test FE_ALL_EXCEPT in
+	preprocessor.  Test for each exception mask separately.
+
 2012-07-16  Andreas Jaeger  <aj@suse.de>
 
 	* po/ru.po: Update from translation team.
diff --git a/stdlib/bug-getcontext.c b/stdlib/bug-getcontext.c
index 7db49c8..133ee91 100644
--- a/stdlib/bug-getcontext.c
+++ b/stdlib/bug-getcontext.c
@@ -9,10 +9,25 @@
 static int
 do_test (void)
 {
-#if FE_ALL_EXCEPT == 0
-  printf("Skipping test; no support for FP exceptions.\n");
-#else
-  int except_mask =  FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW;
+  if (FE_ALL_EXCEPT == 0)
+    {
+      printf("Skipping test; no support for FP exceptions.\n");
+      return 0;
+    }
+
+  int except_mask = 0;
+#ifdef FE_DIVBYZERO
+  except_mask |= FE_DIVBYZERO;
+#endif
+#ifdef FE_INVALID
+  except_mask |= FE_INVALID;
+#endif
+#ifdef FE_OVERFLOW
+  except_mask |= FE_OVERFLOW;
+#endif
+#ifdef FE_UNDERFLOW
+  except_mask |= FE_UNDERFLOW;
+#endif
   int status = feenableexcept (except_mask);
 
   except_mask = fegetexcept ();
@@ -44,7 +59,7 @@ do_test (void)
 
   printf("\nAt end fegetexcept() returned %d, expected: %d.\n",
 	 mask, except_mask);
-#endif
+
   return 0;
 }
 

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

Summary of changes:
 ChangeLog               |    5 +++++
 stdlib/bug-getcontext.c |   25 ++++++++++++++++++++-----
 2 files changed, 25 insertions(+), 5 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]