diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-07-17 17:56:43 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2014-07-17 17:56:43 +0000 |
commit | 831b9896d8e957580591a3cbe11dcd5ac6743ba2 (patch) | |
tree | 5242f61fab491bec10b154d470f4b9694a393824 /math/fesetenv.c | |
parent | b21c2d5020d85596c0391e03054d7fe031ffd60b (diff) | |
download | glibc-831b9896d8e957580591a3cbe11dcd5ac6743ba2.zip glibc-831b9896d8e957580591a3cbe11dcd5ac6743ba2.tar.gz glibc-831b9896d8e957580591a3cbe11dcd5ac6743ba2.tar.bz2 |
Fix fallback fesetenv and feupdateenv on FE_NOMASK_ENV (bug 17088).
This patch fixes bug 17088, fallback fesetenv and feupdateenv not
giving an error for an FE_NOMASK_ENV argument when it requires traps
to be enabled. (This is the bug tested for by test-fenv-return.c.)
Tested mips64 soft-float.
[BZ #17088]
* math/fesetenv.c (__fesetenv)
[FE_NOMASK_ENV && FE_ALL_EXCEPT != 0]: Return 1 for FE_NOMASK_ENV.
* math/feupdateenv.c (__feupdateenv)
[FE_NOMASK_ENV && FE_ALL_EXCEPT != 0]: Likewise.
Diffstat (limited to 'math/fesetenv.c')
-rw-r--r-- | math/fesetenv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/math/fesetenv.c b/math/fesetenv.c index acfe5f4..9bf42c0 100644 --- a/math/fesetenv.c +++ b/math/fesetenv.c @@ -23,6 +23,10 @@ int __fesetenv (const fenv_t *envp) { +#if defined FE_NOMASK_ENV && FE_ALL_EXCEPT != 0 + if (envp == FE_NOMASK_ENV) + return 1; +#endif /* Nothing to do. */ return 0; } |