Print this page
5261 libm should stop using synonyms.h
5298 fabs is 0-sized, confuses dis(1) and others
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Gordon Ross <gwr@nexenta.com>
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Gordon Ross <gwr@nexenta.com>


  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 #if defined(ELFOBJ)
  31 #pragma weak isinfl = __isinfl
  32 #pragma weak isnormall = __isnormall
  33 #pragma weak issubnormall = __issubnormall
  34 #pragma weak iszerol = __iszerol
  35 #pragma weak signbitl = __signbitl
  36 #endif
  37 
  38 #include "libm.h"
  39 
  40 #if defined(__sparc)
  41 int
  42 isinfl(long double x) {
  43         int *px = (int *) &x;
  44         return ((px[0] & ~0x80000000) == 0x7fff0000 && px[1] == 0 &&
  45                 px[2] == 0 && px[3] == 0);
  46 }
  47 
  48 int
  49 isnormall(long double x) {
  50         int *px = (int *) &x;
  51         return ((unsigned) ((px[0] & 0x7fff0000) - 0x10000) < 0x7ffe0000);
  52 }
  53 
  54 int
  55 issubnormall(long double x) {
  56         int *px = (int *) &x;
  57         px[0] &= ~0x80000000;




  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 #include "libm.h"
  31 
  32 #if defined(__sparc)
  33 int
  34 isinfl(long double x) {
  35         int *px = (int *) &x;
  36         return ((px[0] & ~0x80000000) == 0x7fff0000 && px[1] == 0 &&
  37                 px[2] == 0 && px[3] == 0);
  38 }
  39 
  40 int
  41 isnormall(long double x) {
  42         int *px = (int *) &x;
  43         return ((unsigned) ((px[0] & 0x7fff0000) - 0x10000) < 0x7ffe0000);
  44 }
  45 
  46 int
  47 issubnormall(long double x) {
  48         int *px = (int *) &x;
  49         px[0] &= ~0x80000000;