]>
Commit | Line | Data |
---|---|---|
1f205a47 | 1 | /* Store current representation for exceptions. |
4eb8a862 | 2 | Copyright (C) 1997,99,2000,01 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> | |
e279e90b | 20 | #include <bp-sym.h> |
1f205a47 | 21 | |
63ae7b63 UD |
22 | int |
23 | __fegetexceptflag (fexcept_t *flagp, int excepts) | |
1f205a47 UD |
24 | { |
25 | fenv_union_t u; | |
1f205a47 UD |
26 | |
27 | /* Get the current state. */ | |
28 | u.fenv = fegetenv_register (); | |
29 | ||
0413b54c | 30 | /* Return (all of) it. */ |
c2630c3a | 31 | *flagp = u.l[1] & excepts & FE_ALL_EXCEPT; |
63ae7b63 UD |
32 | |
33 | /* Success. */ | |
34 | return 0; | |
1f205a47 | 35 | } |
4eb8a862 RM |
36 | |
37 | #include <shlib-compat.h> | |
38 | #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) | |
63ae7b63 | 39 | strong_alias (__fegetexceptflag, __old_fegetexceptflag) |
4eb8a862 RM |
40 | compat_symbol (libm, BP_SYM (__old_fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_1); |
41 | #endif | |
42 | ||
43 | versioned_symbol (libm, BP_SYM (__fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_2); |