am 66b18dd4
: Merge "Fix the x86_64 fenv.h."
* commit '66b18dd4e4294de72728f51af61b79f6f7885a2f': Fix the x86_64 fenv.h.
This commit is contained in:
commit
14d5e22fee
1 changed files with 35 additions and 5 deletions
|
@ -1,6 +1,3 @@
|
|||
/* $OpenBSD: fenv.h,v 1.4 2011/05/25 21:46:49 martynas Exp $ */
|
||||
/* $NetBSD: fenv.h,v 1.1 2010/07/31 21:47:54 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004-2005 David Schultz <das (at) FreeBSD.ORG>
|
||||
* All rights reserved.
|
||||
|
@ -32,6 +29,14 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* This file combines the OpenBSD include/fenv.h and machine/fenv.h to fit
|
||||
* the style of the other architectures (where we couldn't just take an
|
||||
* upstream fenv.h and had to write our own).
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* Each symbol representing a floating point exception expands to an integer
|
||||
* constant expression with values, such that bitwise-inclusive ORs of _all
|
||||
|
@ -95,9 +100,7 @@ typedef struct {
|
|||
* that manage the floating-point environment, namely fesetenv() and
|
||||
* feupdateenv().
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
extern fenv_t __fe_dfl_env;
|
||||
__END_DECLS
|
||||
#define FE_DFL_ENV ((const fenv_t *)&__fe_dfl_env)
|
||||
|
||||
/*
|
||||
|
@ -114,4 +117,31 @@ __END_DECLS
|
|||
*/
|
||||
typedef unsigned int fexcept_t;
|
||||
|
||||
/* C99 floating-point exception functions */
|
||||
int feclearexcept(int excepts);
|
||||
int fegetexceptflag(fexcept_t *flagp, int excepts);
|
||||
int fesetexceptflag(const fexcept_t *flagp, int excepts);
|
||||
/* feraiseexcept does not set the inexact flag on overflow/underflow */
|
||||
int feraiseexcept(int excepts);
|
||||
int fetestexcept(int excepts);
|
||||
|
||||
/* C99 rounding control functions */
|
||||
int fegetround(void);
|
||||
int fesetround(int round);
|
||||
|
||||
/* C99 floating-point environment functions */
|
||||
int fegetenv(fenv_t *__envp);
|
||||
int feholdexcept(fenv_t *__envp);
|
||||
int fesetenv(const fenv_t *envp);
|
||||
int feupdateenv(const fenv_t *__envp);
|
||||
|
||||
#if __BSD_VISIBLE
|
||||
/* Additional support functions to set/query floating point traps */
|
||||
int feenableexcept(int __mask);
|
||||
int fedisableexcept(int __mask);
|
||||
int fegetexcept(void);
|
||||
#endif /* __BSD_VISIBLE */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_AMD64_FENV_H_ */
|
||||
|
|
Loading…
Reference in a new issue