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>

@@ -24,21 +24,21 @@
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma weak scalbn = __scalbn
+#pragma weak __scalbn = scalbn
 
 #include "libm.h"
 
 static const double
         one     = 1.0,
         huge    = 1.0e300,
         tiny    = 1.0e-300,
         twom54  = 5.5511151231257827021181583404541015625e-17;
 
-#if defined(USE_FPSCALE) || defined(__x86)
+#if defined(__x86)
 static const double two52 = 4503599627370496.0;
 #else
 /*
  * Normalize non-zero subnormal x and return biased exponent of x in [-51,0]
  */

@@ -68,11 +68,11 @@
         }
         px[HIWORD] = (px[HIWORD] & 0x80000000) | v;
         px[LOWORD] = w;
         return (1 - s);
 }
-#endif  /* defined(USE_FPSCALE) */
+#endif  /* defined(__x86) */
 
 double
 scalbn(double x, int n) {
         int     *px, ix, hx, k;
 

@@ -85,11 +85,11 @@
                 return (x * one);
 
         if (k == 0) {
                 if ((hx | px[LOWORD]) == 0 || n == 0)
                         return (x);
-#if defined(USE_FPSCALE) || defined(__x86)
+#if defined(__x86)
                 x *= two52;
                 ix = px[HIWORD];
                 k = ((ix & ~0x80000000) >> 20) - 52;
 #else
                 k = ilogb_biased((unsigned *)px);