about summary refs log tree commit diff
path: root/sysdeps/s390/fpu/fesetenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/s390/fpu/fesetenv.c')
-rw-r--r--sysdeps/s390/fpu/fesetenv.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/sysdeps/s390/fpu/fesetenv.c b/sysdeps/s390/fpu/fesetenv.c
index ede3d89b3b..dca26033a7 100644
--- a/sysdeps/s390/fpu/fesetenv.c
+++ b/sysdeps/s390/fpu/fesetenv.c
@@ -17,28 +17,13 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <fenv_libc.h>
-#include <fpu_control.h>
-#include <stddef.h>
-#include <unistd.h>
+#include <fenv_private.h>
 
 int
 __fesetenv (const fenv_t *envp)
 {
-  fenv_t env;
-
-  if (envp == FE_DFL_ENV)
-    {
-      env.__fpc = _FPU_DEFAULT;
-    }
-  else if (envp == FE_NOMASK_ENV)
-    {
-      env.__fpc = FPC_EXCEPTION_MASK;
-    }
-  else
-    env = (*envp);
-
-  _FPU_SETCW (env.__fpc);
+  fenv_t env = libc_handle_user_fenv_s390 (envp);
+  libc_fesetenv_s390 (&env);
 
   /* Success.  */
   return 0;