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>

*** 25,43 **** /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! #if defined(ELFOBJ) ! #pragma weak logbf = __logbf ! #endif #include "libm.h" #include "xpg6.h" /* __xpg6 */ #define _C99SUSv3_logb _C99SUSv3_logb_subnormal_is_like_ilogb ! #if defined(USE_FPSCALE) || defined(__x86) static const float two25 = 33554432.0F; #else /* * v: a non-zero subnormal |x| */ --- 25,41 ---- /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! #pragma weak __logbf = logbf #include "libm.h" #include "xpg6.h" /* __xpg6 */ #define _C99SUSv3_logb _C99SUSv3_logb_subnormal_is_like_ilogb ! #if defined(__x86) static const float two25 = 33554432.0F; #else /* * v: a non-zero subnormal |x| */
*** 52,62 **** if (v & 0xf0) r += 4, v >>= 4; v <<= 1; return (r + ((0xffffaa50 >> v) & 0x3)); } ! #endif /* defined(USE_FPSCALE) */ static float raise_division(float t) { #pragma STDC FENV_ACCESS ON static const float zero = 0.0F; --- 50,60 ---- if (v & 0xf0) r += 4, v >>= 4; v <<= 1; return (r + ((0xffffaa50 >> v) & 0x3)); } ! #endif /* defined(__x86) */ static float raise_division(float t) { #pragma STDC FENV_ACCESS ON static const float zero = 0.0F;
*** 69,79 **** if (k < 0x00800000) { if (k == 0) return (raise_division(-1.0F)); else if ((__xpg6 & _C99SUSv3_logb) != 0) { ! #if defined(USE_FPSCALE) || defined(__x86) x *= two25; return ((float) (((*((int *) &x) & 0x7f800000) >> 23) - 152)); #else return ((float) ilogbf_subnormal(k)); --- 67,77 ---- if (k < 0x00800000) { if (k == 0) return (raise_division(-1.0F)); else if ((__xpg6 & _C99SUSv3_logb) != 0) { ! #if defined(__x86) x *= two25; return ((float) (((*((int *) &x) & 0x7f800000) >> 23) - 152)); #else return ((float) ilogbf_subnormal(k));