Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tile: prefer inlines to macros in math_private.h.
  • Loading branch information
Chris Metcalf committed Dec 30, 2014
1 parent e47b8d3 commit cd2c37c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,5 +1,11 @@
2014-12-29 Chris Metcalf <cmetcalf@ezchip.com>

* sysdeps/tile/math_private.h (fetestexcept): Add macro to
parallel other exception macros.
(fegetenv): Convert from macro to extern inline so that it applies
retroactively to inline functions already seen by the compiler.
(fesetenv, feupdateenv, fegetround, fesetround): Likewise.

* posix/Makefile (before-compile): Use $(objpfx) for
posix-conf-vars-def.h.

Expand Down
10 changes: 6 additions & 4 deletions sysdeps/tile/math_private.h
Expand Up @@ -27,9 +27,11 @@

#define feraiseexcept(excepts) ({ 0; })
#define feclearexcept(exc) ({ 0; })
#define fegetenv(env) ({ (void) (env); 0; })
#define fesetenv(env) ({ (void) (env); 0; })
#define feupdateenv(env) ({ (void) (env); 0; })
#define fegetround() ({ FE_TONEAREST; })
#define fetestexcept(exc) ({ 0; })
extern inline int fegetenv (fenv_t *__e) { return 0; }
extern inline int fesetenv (const fenv_t *__e) { return 0; }
extern inline int feupdateenv (const fenv_t *__e) { return 0; }
extern inline int fegetround (void) { return FE_TONEAREST; }
extern inline int fesetround (int __d) { return 0; }

#endif

0 comments on commit cd2c37c

Please sign in to comment.