1130147Sdas/*-
2130147Sdas * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
3130147Sdas * All rights reserved.
4130147Sdas *
5130147Sdas * Redistribution and use in source and binary forms, with or without
6130147Sdas * modification, are permitted provided that the following conditions
7130147Sdas * are met:
8130147Sdas * 1. Redistributions of source code must retain the above copyright
9130147Sdas *    notice, this list of conditions and the following disclaimer.
10130147Sdas * 2. Redistributions in binary form must reproduce the above copyright
11130147Sdas *    notice, this list of conditions and the following disclaimer in the
12130147Sdas *    documentation and/or other materials provided with the distribution.
13130147Sdas *
14130147Sdas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15130147Sdas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16130147Sdas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17130147Sdas * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18130147Sdas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19130147Sdas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20130147Sdas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21130147Sdas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22130147Sdas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23130147Sdas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24130147Sdas * SUCH DAMAGE.
25130147Sdas *
26130147Sdas * $FreeBSD: releng/11.0/lib/msun/sparc64/fenv.c 226415 2011-10-16 05:37:56Z das $
27130147Sdas */
28130147Sdas
29226218Sdas#define	__fenv_static
30226415Sdas#include "fenv.h"
31130147Sdas
32226218Sdas#ifdef __GNUC_GNU_INLINE__
33226218Sdas#error "This file must be compiled with C99 'inline' semantics"
34226218Sdas#endif
35226218Sdas
36130147Sdas/*
37130147Sdas * The FSR_version field may be different on different
38130147Sdas * implementations, but it is immutable and opaque to the
39130147Sdas * application.  Thus, 0 is valid as the default environment.
40130147Sdas */
41130147Sdasconst fenv_t __fe_dfl_env = 0;
42226218Sdas
43226218Sdasextern inline int feclearexcept(int __excepts);
44226218Sdasextern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts);
45226218Sdasextern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
46226218Sdasextern inline int feraiseexcept(int __excepts);
47226218Sdasextern inline int fetestexcept(int __excepts);
48226218Sdasextern inline int fegetround(void);
49226218Sdasextern inline int fesetround(int __round);
50226218Sdasextern inline int fegetenv(fenv_t *__envp);
51226218Sdasextern inline int feholdexcept(fenv_t *__envp);
52226218Sdasextern inline int fesetenv(const fenv_t *__envp);
53226218Sdasextern inline int feupdateenv(const fenv_t *__envp);
54