1264391Snwhitehorn/*- 2264391Snwhitehorn * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> 3264925Simp * All rights reserved. 4264391Snwhitehorn * 5294060Ssmh * Redistribution and use in source and binary forms, with or without 6264391Snwhitehorn * modification, are permitted provided that the following conditions 7264391Snwhitehorn * are met: 8264391Snwhitehorn * 1. Redistributions of source code must retain the above copyright 9287930Sjhb * notice, this list of conditions and the following disclaimer. 10264391Snwhitehorn * 2. Redistributions in binary form must reproduce the above copyright 11293724Ssmh * notice, this list of conditions and the following disclaimer in the 12264391Snwhitehorn * documentation and/or other materials provided with the distribution. 13294068Ssmh * 14294068Ssmh * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15294068Ssmh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16294068Ssmh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17294068Ssmh * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18294068Ssmh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19294068Ssmh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20294068Ssmh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21294068Ssmh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22294068Ssmh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23294068Ssmh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24264391Snwhitehorn * SUCH DAMAGE. 25294060Ssmh * 26294068Ssmh * $FreeBSD$ 27294068Ssmh */ 28294068Ssmh 29264391Snwhitehorn#define __fenv_static 30264391Snwhitehorn#include "fenv.h" 31280950Sandrew 32281524Sandrew#ifdef __GNUC_GNU_INLINE__ 33264391Snwhitehorn#error "This file must be compiled with C99 'inline' semantics" 34264391Snwhitehorn#endif 35294060Ssmh 36294265Ssmhconst fenv_t __fe_dfl_env = 0x00000000; 37294265Ssmh 38294265Ssmhextern inline int feclearexcept(int __excepts); 39264391Snwhitehornextern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); 40294068Ssmhextern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); 41294068Ssmhextern inline int feraiseexcept(int __excepts); 42294068Ssmhextern inline int fetestexcept(int __excepts); 43294068Ssmhextern inline int fegetround(void); 44294068Ssmhextern inline int fesetround(int __round); 45294068Ssmhextern inline int fegetenv(fenv_t *__envp); 46264403Snwhitehornextern inline int feholdexcept(fenv_t *__envp); 47281524Sandrewextern inline int fesetenv(const fenv_t *__envp); 48281237Semasteextern inline int feupdateenv(const fenv_t *__envp); 49281237Semaste