summaryrefslogtreecommitdiff
path: root/usr/src/lib/libm/common/C/logb.c
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2014-10-24 20:13:19 -0400
committerRichard Lowe <richlowe@richlowe.net>2014-11-26 17:05:42 -0500
commit1ec68d336ba97cd53f46053ac10401d16014d075 (patch)
tree2282af60548cda6c7a8c1d7b49ac6f6e25d39148 /usr/src/lib/libm/common/C/logb.c
parent0b51021a5ac604aec4fe23e2cdcf97e3e886b9ec (diff)
downloadillumos-gate-1ec68d336ba97cd53f46053ac10401d16014d075.tar.gz
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>
Diffstat (limited to 'usr/src/lib/libm/common/C/logb.c')
-rw-r--r--usr/src/lib/libm/common/C/logb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/src/lib/libm/common/C/logb.c b/usr/src/lib/libm/common/C/logb.c
index 71c31e069c..11e0562643 100644
--- a/usr/src/lib/libm/common/C/logb.c
+++ b/usr/src/lib/libm/common/C/logb.c
@@ -27,16 +27,14 @@
* Use is subject to license terms.
*/
-#if defined(ELFOBJ)
#pragma weak logb = __logb
#pragma weak _logb = __logb
-#endif
#include "libm.h"
#include "xpg6.h" /* __xpg6 */
#define _C99SUSv3_logb _C99SUSv3_logb_subnormal_is_like_ilogb
-#if defined(USE_FPSCALE) || defined(__x86)
+#if defined(__x86)
static const double two52 = 4503599627370496.0;
#else
/*
@@ -59,7 +57,7 @@ ilogb_subnormal(unsigned v, unsigned w) {
v <<= 1;
return (r + ((0xffffaa50 >> v) & 0x3));
}
-#endif /* defined(USE_FPSCALE) */
+#endif /* defined(__x86) */
double
logb(double x) {
@@ -69,7 +67,7 @@ logb(double x) {
if ((px[LOWORD] | k) == 0)
return (_SVID_libm_err(x, x, 45));
else if ((__xpg6 & _C99SUSv3_logb) != 0) {
-#if defined(USE_FPSCALE) || defined(__x86)
+#if defined(__x86)
x *= two52;
return ((double) (((px[HIWORD] & 0x7ff00000) >> 20)
- 1075));