Print this page
5261 libm should stop using synonyms.h


  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #pragma weak feclearexcept = __feclearexcept
  31 #pragma weak feraiseexcept = __feraiseexcept
  32 #pragma weak fetestexcept = __fetestexcept
  33 #pragma weak fegetexceptflag = __fegetexceptflag
  34 #pragma weak fesetexceptflag = __fesetexceptflag
  35 
  36 #pragma weak feclearexcept96 = __feclearexcept
  37 #pragma weak feraiseexcept96 = __feraiseexcept
  38 #pragma weak fetestexcept96 = __fetestexcept
  39 #pragma weak fegetexceptflag96 = __fegetexceptflag
  40 #pragma weak fesetexceptflag96 = __fesetexceptflag
  41 
  42 #include "fenv_synonyms.h"
  43 #include <fenv.h>
  44 #include <sys/ieeefp.h>
  45 #include <ucontext.h>
  46 #include <thread.h>
  47 #include "fex_handler.h"
  48 #include "fenv_inlines.h"
  49 
  50 
  51 int feclearexcept(int e)
  52 {
  53         unsigned long   fsr;
  54 
  55         __fenv_getfsr(&fsr);
  56         __fenv_set_ex(fsr, __fenv_get_ex(fsr) & ~e);
  57         __fenv_setfsr(&fsr);
  58         if (fex_get_log())
  59                 __fex_update_te();
  60         return 0;
  61 }
  62 




  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #pragma weak __feclearexcept = feclearexcept
  31 #pragma weak __feraiseexcept = feraiseexcept
  32 #pragma weak __fetestexcept = fetestexcept
  33 #pragma weak __fegetexceptflag = fegetexceptflag
  34 #pragma weak __fesetexceptflag = fesetexceptflag
  35 
  36 #pragma weak feclearexcept96 = feclearexcept
  37 #pragma weak feraiseexcept96 = feraiseexcept
  38 #pragma weak fetestexcept96 = fetestexcept
  39 #pragma weak fegetexceptflag96 = fegetexceptflag
  40 #pragma weak fesetexceptflag96 = fesetexceptflag
  41 

  42 #include <fenv.h>
  43 #include <sys/ieeefp.h>
  44 #include <ucontext.h>
  45 #include <thread.h>
  46 #include "fex_handler.h"
  47 #include "fenv_inlines.h"
  48 
  49 
  50 int feclearexcept(int e)
  51 {
  52         unsigned long   fsr;
  53 
  54         __fenv_getfsr(&fsr);
  55         __fenv_set_ex(fsr, __fenv_get_ex(fsr) & ~e);
  56         __fenv_setfsr(&fsr);
  57         if (fex_get_log())
  58                 __fex_update_te();
  59         return 0;
  60 }
  61