/* Enable exceptions (soft-float edition).
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2014 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
+#include "soft-supp.h"
#include <fenv.h>
-extern int __sim_disabled_exceptions;
-
int
feenableexcept (int exceptions)
{
- int old_exceptions = ~__sim_disabled_exceptions & FE_ALL_EXCEPT;
+ int old_exceptions = ~__sim_disabled_exceptions_thread & FE_ALL_EXCEPT;
- __sim_disabled_exceptions &= ~exceptions;
+ __sim_disabled_exceptions_thread &= ~exceptions;
+ SIM_SET_GLOBAL (__sim_disabled_exceptions_global,
+ __sim_disabled_exceptions_thread);
return old_exceptions;
}