Fix fenv.h fallback returns (bug 14027).

This commit is contained in:
Joseph Myers 2012-04-27 13:54:09 +00:00
parent 5aeb141a56
commit 6ad3493e22
5 changed files with 18 additions and 10 deletions

View File

@ -1,3 +1,11 @@
2012-04-27 Joseph Myers <joseph@codesourcery.com>
[BZ #14027]
* math/fclrexcpt.c (__feclearexcept): Return zero if nothing needs
to be done.
* math/fraiseexcpt.c (__feraiseexcept): Likewise.
* math/fsetexcptflg.c (__fesetexceptflag): Likewise.
2012-04-26 Joseph Myers <joseph@codesourcery.com> 2012-04-26 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/i386/brk.S: Remove file. * sysdeps/unix/i386/brk.S: Remove file.

2
NEWS
View File

@ -22,7 +22,7 @@ Version 2.16
13846, 13851, 13852, 13854, 13871, 13872, 13873, 13879, 13883, 13886, 13846, 13851, 13852, 13854, 13871, 13872, 13873, 13879, 13883, 13886,
13892, 13895, 13908, 13910, 13911, 13912, 13913, 13915, 13916, 13917, 13892, 13895, 13908, 13910, 13911, 13912, 13913, 13915, 13916, 13917,
13918, 13919, 13920, 13921, 13926, 13927, 13928, 13938, 13963, 13967, 13918, 13919, 13920, 13921, 13926, 13927, 13928, 13938, 13963, 13967,
13970, 13973 13970, 13973, 14027
* ISO C11 support: * ISO C11 support:

View File

@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment. /* Clear given exceptions in current floating-point environment.
Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -23,8 +23,8 @@
int int
__feclearexcept (int excepts) __feclearexcept (int excepts)
{ {
/* This always fails. */ /* This always fails unless nothing needs to be done. */
return 1; return (excepts != 0);
} }
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feclearexcept, __old_feclearexcept) strong_alias (__feclearexcept, __old_feclearexcept)

View File

@ -1,5 +1,5 @@
/* Raise given exceptions. /* Raise given exceptions.
Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc. Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -23,8 +23,8 @@
int int
__feraiseexcept (int excepts) __feraiseexcept (int excepts)
{ {
/* This always fails. */ /* This always fails unless nothing needs to be done. */
return 1; return (excepts != 0);
} }
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feraiseexcept, __old_feraiseexcept) strong_alias (__feraiseexcept, __old_feraiseexcept)

View File

@ -1,5 +1,5 @@
/* Set floating-point environment exception handling. /* Set floating-point environment exception handling.
Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -23,8 +23,8 @@
int int
__fesetexceptflag (const fexcept_t *flagp, int excepts) __fesetexceptflag (const fexcept_t *flagp, int excepts)
{ {
/* This always fails. */ /* This always fails unless nothing needs to be done. */
return 1; return (excepts != 0);
} }
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetexceptflag, __old_fesetexceptflag) strong_alias (__fesetexceptflag, __old_fesetexceptflag)