1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29 #include "fenv.h" 30 31 const fenv_t __fe_dfl_env = 0x00000000; 32 const femode_t __fe_dfl_mode = 0x00000000; 33 34 int 35 (feclearexcept)(int excepts) 36 { 37 return (__feclearexcept_int(excepts)); 38 } 39 40 int 41 (fegetexceptflag)(fexcept_t *flagp, int excepts) 42 { 43 return (__fegetexceptflag_int(flagp, excepts)); 44 } 45 46 int 47 (fesetexceptflag)(const fexcept_t *flagp, int excepts) 48 { 49 return (__fesetexceptflag_int(flagp, excepts)); 50 } 51 52 int 53 (feraiseexcept)(int excepts) 54 { 55 return (__feraiseexcept_int(excepts)); 56 } 57 58 int 59 (fetestexcept)(int excepts) 60 { 61 return (__fetestexcept_int(excepts)); 62 } 63 64 int 65 (fegetround)(void) 66 { 67 return (__fegetround_int()); 68 } 69 70 int 71 (fesetround)(int round) 72 { 73 return (__fesetround_int(round)); 74 } 75 76 int 77 (fegetmode)(femode_t *modep) 78 { 79 return (__fegetmode_int(modep)); 80 } 81 82 int 83 (fesetmode)(const femode_t *modep) 84 { 85 return (__fesetmode_int(modep)); 86 } 87 88 int 89 (fegetenv)(fenv_t *envp) 90 { 91 return (__fegetenv_int(envp)); 92 } 93 94 int 95 (feholdexcept)(fenv_t *envp) 96 { 97 return (__feholdexcept_int(envp)); 98 } 99 100 int 101 (fesetenv)(const fenv_t *envp) 102 { 103 return (__fesetenv_int(envp)); 104 } 105 106 int 107 (feupdateenv)(const fenv_t *envp) 108 { 109 return (__feupdateenv_int(envp)); 110 } 111 112 int 113 (feenableexcept)(int mask) 114 { 115 return (__feenableexcept_int(mask)); 116 } 117 118 int 119 (fedisableexcept)(int mask) 120 { 121 return (__fedisableexcept_int(mask)); 122 } 123