1122e1380SDavid Schultz /*- 2122e1380SDavid Schultz * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> 3122e1380SDavid Schultz * All rights reserved. 4122e1380SDavid Schultz * 5122e1380SDavid Schultz * Redistribution and use in source and binary forms, with or without 6122e1380SDavid Schultz * modification, are permitted provided that the following conditions 7122e1380SDavid Schultz * are met: 8122e1380SDavid Schultz * 1. Redistributions of source code must retain the above copyright 9122e1380SDavid Schultz * notice, this list of conditions and the following disclaimer. 10122e1380SDavid Schultz * 2. Redistributions in binary form must reproduce the above copyright 11122e1380SDavid Schultz * notice, this list of conditions and the following disclaimer in the 12122e1380SDavid Schultz * documentation and/or other materials provided with the distribution. 13122e1380SDavid Schultz * 14122e1380SDavid Schultz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15122e1380SDavid Schultz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16122e1380SDavid Schultz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17122e1380SDavid Schultz * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18122e1380SDavid Schultz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19122e1380SDavid Schultz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20122e1380SDavid Schultz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21122e1380SDavid Schultz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22122e1380SDavid Schultz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23122e1380SDavid Schultz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24122e1380SDavid Schultz * SUCH DAMAGE. 25122e1380SDavid Schultz * 26122e1380SDavid Schultz * $FreeBSD$ 27122e1380SDavid Schultz */ 28122e1380SDavid Schultz 29d78e594bSDavid Schultz #define __fenv_static 30*5d9fefacSDavid Schultz #include "fenv.h" 31122e1380SDavid Schultz 32d78e594bSDavid Schultz #ifdef __GNUC_GNU_INLINE__ 33d78e594bSDavid Schultz #error "This file must be compiled with C99 'inline' semantics" 34d78e594bSDavid Schultz #endif 35d78e594bSDavid Schultz 36122e1380SDavid Schultz const fenv_t __fe_dfl_env = 0x00000000; 37d78e594bSDavid Schultz 38d78e594bSDavid Schultz extern inline int feclearexcept(int __excepts); 39d78e594bSDavid Schultz extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); 40d78e594bSDavid Schultz extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); 41d78e594bSDavid Schultz extern inline int feraiseexcept(int __excepts); 42d78e594bSDavid Schultz extern inline int fetestexcept(int __excepts); 43d78e594bSDavid Schultz extern inline int fegetround(void); 44d78e594bSDavid Schultz extern inline int fesetround(int __round); 45d78e594bSDavid Schultz extern inline int fegetenv(fenv_t *__envp); 46d78e594bSDavid Schultz extern inline int feholdexcept(fenv_t *__envp); 47d78e594bSDavid Schultz extern inline int fesetenv(const fenv_t *__envp); 48d78e594bSDavid Schultz extern inline int feupdateenv(const fenv_t *__envp); 49