]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/sh/sh4/fpu/fesetround.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / sh / sh4 / fpu / fesetround.c
index 3269199ea9381a819367ba306b9ed33190728ac9..fc5f9a7464b98c8202877af1eb3bba5785a18f2b 100644 (file)
@@ -1,5 +1,5 @@
 /* Set current rounding direction.
-   Copyright (C) 1998, 2000, 2005, 2012 Free Software Foundation, Inc.
+   Copyright (C) 1998-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
 
 #include <fpu_control.h>
 
 int
-fesetround (int round)
+__fesetround (int round)
 {
-  unsigned int cw;
+  fpu_control_t cw;
 
-  if ((round & ~0x3) != 0)
+  if ((round & ~0x1) != 0)
     /* ROUND is no valid rounding mode.  */
     return 1;
 
@@ -33,11 +33,13 @@ fesetround (int round)
   _FPU_GETCW (cw);
 
   /* Set rounding bits.  */
-  cw &= ~0x3;
+  cw &= ~0x1;
   cw |= round;
   /* Set new state.  */
   _FPU_SETCW (cw);
 
   return 0;
 }
-libm_hidden_def (fesetround)
+libm_hidden_def (__fesetround)
+weak_alias (__fesetround, fesetround)
+libm_hidden_weak (fesetround)