summary refs log tree commit diff
path: root/math/feenablxcpt.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-06-20 19:10:44 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-20 19:10:44 +0000
commitc91e0825251b4f57e8ce1d9d4673bee6e279e0cd (patch)
tree8ec4d95dc25e260084f23726cbb2cc202ed46e93 /math/feenablxcpt.c
parentbfcacbdec0ea80b12b23f89572c29b87624e76ec (diff)
downloadglibc-c91e0825251b4f57e8ce1d9d4673bee6e279e0cd.tar.gz
glibc-c91e0825251b4f57e8ce1d9d4673bee6e279e0cd.tar.xz
glibc-c91e0825251b4f57e8ce1d9d4673bee6e279e0cd.zip
Avoid spurious failures from <fenv.h> fallback functions (bug 15654).
Diffstat (limited to 'math/feenablxcpt.c')
-rw-r--r--math/feenablxcpt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/math/feenablxcpt.c b/math/feenablxcpt.c
index d8620a03f0..e57d4e3c15 100644
--- a/math/feenablxcpt.c
+++ b/math/feenablxcpt.c
@@ -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)