1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

Apple happiness

This commit is contained in:
Peter Boyle 2021-08-20 01:15:00 +01:00
parent 5d29e175d8
commit ffbdd91e0e

View File

@ -52,10 +52,12 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
#include <fenv.h>
#ifdef __APPLE__
static int
#ifdef __APPLE__
feenableexcept (unsigned int excepts)
{
#if 0
// Fails on Apple M1
static fenv_t fenv;
unsigned int new_excepts = excepts & FE_ALL_EXCEPT;
unsigned int old_excepts; // previous masks
@ -70,6 +72,7 @@ feenableexcept (unsigned int excepts)
iold_excepts = (int) old_excepts;
return ( fesetenv (&fenv) ? -1 : iold_excepts );
#endif
}
#endif