/* 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;
_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)