diff options
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r-- | winsup/mingw/mingwex/feclearexcept.c | 4 | ||||
-rw-r--r-- | winsup/mingw/mingwex/fegetenv.c | 3 | ||||
-rw-r--r-- | winsup/mingw/mingwex/fegetexceptflag.c | 3 | ||||
-rw-r--r-- | winsup/mingw/mingwex/feraiseexcept.c | 3 | ||||
-rw-r--r-- | winsup/mingw/mingwex/fesetenv.c | 4 | ||||
-rw-r--r-- | winsup/mingw/mingwex/fesetexceptflag.c | 3 | ||||
-rw-r--r-- | winsup/mingw/mingwex/feupdateenv.c | 3 |
7 files changed, 16 insertions, 7 deletions
diff --git a/winsup/mingw/mingwex/feclearexcept.c b/winsup/mingw/mingwex/feclearexcept.c index 127efb999..8c943893b 100644 --- a/winsup/mingw/mingwex/feclearexcept.c +++ b/winsup/mingw/mingwex/feclearexcept.c @@ -4,10 +4,12 @@ The feclearexcept function clears the supported exceptions represented by its argument. */ -void feclearexcept (int excepts) +int feclearexcept (int excepts) { fenv_t _env; __asm__ volatile ("fnstenv %0;" : "=m" (_env)); /* get the env */ _env.__status_word &= ~(excepts & FE_ALL_EXCEPT); /* clear the except */ __asm__ volatile ("fldenv %0;" :: "m" (_env)); /*set the env */ + + return 0; } diff --git a/winsup/mingw/mingwex/fegetenv.c b/winsup/mingw/mingwex/fegetenv.c index 4553ce1a3..5ea5bd011 100644 --- a/winsup/mingw/mingwex/fegetenv.c +++ b/winsup/mingw/mingwex/fegetenv.c @@ -4,8 +4,9 @@ The fegetenv function stores the current floating-point environment in the object pointed to by envp. */ -void fegetenv (fenv_t * envp) +int fegetenv (fenv_t * envp) { __asm__ ("fnstenv %0;": "=m" (*envp)); + return 0; } diff --git a/winsup/mingw/mingwex/fegetexceptflag.c b/winsup/mingw/mingwex/fegetexceptflag.c index 126751bf1..353e90dfa 100644 --- a/winsup/mingw/mingwex/fegetexceptflag.c +++ b/winsup/mingw/mingwex/fegetexceptflag.c @@ -6,9 +6,10 @@ representation of the exception flags indicated by the argument excepts in the object pointed to by the argument flagp. */ -void fegetexceptflag (fexcept_t * flagp, int excepts) +int fegetexceptflag (fexcept_t * flagp, int excepts) { unsigned short _sw; __asm__ ("fnstsw %%ax;": "=a" (_sw)); *flagp = _sw & excepts & FE_ALL_EXCEPT; + return 0; } diff --git a/winsup/mingw/mingwex/feraiseexcept.c b/winsup/mingw/mingwex/feraiseexcept.c index 7cc49fd8f..b1ba87006 100644 --- a/winsup/mingw/mingwex/feraiseexcept.c +++ b/winsup/mingw/mingwex/feraiseexcept.c @@ -8,11 +8,12 @@ the inexact exception whenever it raises the overflow or underflow exception is implementation-defined. */ -void feraiseexcept (int excepts) +int feraiseexcept (int excepts) { fenv_t _env; __asm__ volatile ("fnstenv %0;" : "=m" (_env)); _env.__status_word |= excepts & FE_ALL_EXCEPT; __asm__ volatile ("fldenv %0;" "fwait;" : : "m" (_env)); + return 0; } diff --git a/winsup/mingw/mingwex/fesetenv.c b/winsup/mingw/mingwex/fesetenv.c index 2845015c3..3d7b5604a 100644 --- a/winsup/mingw/mingwex/fesetenv.c +++ b/winsup/mingw/mingwex/fesetenv.c @@ -13,7 +13,7 @@ extern void (*_imp___fpreset)( void ) ; -void fesetenv (const fenv_t * envp) +int fesetenv (const fenv_t * envp) { if (envp == FE_PC64_ENV) /* @@ -38,4 +38,6 @@ void fesetenv (const fenv_t * envp) else __asm__ ("fldenv %0;" : : "m" (*envp)); + + return 0; } diff --git a/winsup/mingw/mingwex/fesetexceptflag.c b/winsup/mingw/mingwex/fesetexceptflag.c index e4aecad3b..7f4b8e562 100644 --- a/winsup/mingw/mingwex/fesetexceptflag.c +++ b/winsup/mingw/mingwex/fesetexceptflag.c @@ -9,7 +9,7 @@ represented by the argument excepts. This function does not raise exceptions, but only sets the state of the flags. */ -void fesetexceptflag (const fexcept_t * flagp, int excepts) +int fesetexceptflag (const fexcept_t * flagp, int excepts) { fenv_t _env; @@ -18,4 +18,5 @@ void fesetexceptflag (const fexcept_t * flagp, int excepts) _env.__status_word &= ~excepts; _env.__status_word |= (*flagp & excepts); __asm__ volatile ("fldenv %0;" : : "m" (_env)); + return 0; } diff --git a/winsup/mingw/mingwex/feupdateenv.c b/winsup/mingw/mingwex/feupdateenv.c index fd01425ec..f414837f5 100644 --- a/winsup/mingw/mingwex/feupdateenv.c +++ b/winsup/mingw/mingwex/feupdateenv.c @@ -10,10 +10,11 @@ /* FIXME: this works but surely there must be a better way. */ -void feupdateenv (const fenv_t * envp) +int feupdateenv (const fenv_t * envp) { unsigned int _fexcept = fetestexcept (FE_ALL_EXCEPT); /*save excepts */ fesetenv (envp); /* install the env */ feraiseexcept (_fexcept); /* raise the execept */ + return 0; } |