]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/powerpc/fpu/fgetexcptflg.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / powerpc / fpu / fgetexcptflg.c
CommitLineData
1f205a47 1/* Store current representation for exceptions.
f7a9f785 2 Copyright (C) 1997-2016 Free Software Foundation, Inc.
1f205a47
UD
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
1f205a47
UD
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
1f205a47 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
1f205a47
UD
18
19#include <fenv_libc.h>
20
63ae7b63
UD
21int
22__fegetexceptflag (fexcept_t *flagp, int excepts)
1f205a47
UD
23{
24 fenv_union_t u;
1f205a47
UD
25
26 /* Get the current state. */
27 u.fenv = fegetenv_register ();
28
0413b54c 29 /* Return (all of) it. */
4a28b3ca 30 *flagp = u.l & excepts & FE_ALL_EXCEPT;
63ae7b63
UD
31
32 /* Success. */
33 return 0;
1f205a47 34}
4eb8a862
RM
35
36#include <shlib-compat.h>
37#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
63ae7b63 38strong_alias (__fegetexceptflag, __old_fegetexceptflag)
e97ed6dd 39compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
4eb8a862
RM
40#endif
41
e97ed6dd 42versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);