Author: sebor Date: Wed Apr 9 20:26:29 2008 New Revision: 646628 URL: http://svn.apache.org/viewvc?rev=646628&view=rev Log: 2008-04-09 Martin Sebor <[EMAIL PROTECTED]>
* src/num_put.cpp [_RWSTD_OS_SUNOS]: Removed the #inclusion of <sunmath.h> mistakenly introduced in rev 646597 as the functions declared in the header are defined in libsunmath that we don't link with and don't want to start. [_RWSTD_OS_SUNOS] (__rw_signbit): Reimplemented using simple integer arithmetic. Needed to complete the patch for STDCXX-51 initially committed in rev 646396. Modified: stdcxx/trunk/src/num_put.cpp Modified: stdcxx/trunk/src/num_put.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/num_put.cpp?rev=646628&r1=646627&r2=646628&view=diff ============================================================================== --- stdcxx/trunk/src/num_put.cpp (original) +++ stdcxx/trunk/src/num_put.cpp Wed Apr 9 20:26:29 2008 @@ -37,10 +37,6 @@ #include <float.h> // for _finite(), _fpclass(), _isnan(), _copysign() #include <math.h> // for isfinite(), isnan(), isinf(), signbit() -#ifdef _RWSTD_OS_SUNOS -# include <sunmath.h> // for signbit() on Solaris -#endif // Solaris - #ifndef _RWSTD_NO_IEEEFP_H # include <ieeefp.h> // for fpclass(), isnan() #endif // _RWSTD_NO_IEEEFP_H @@ -123,7 +119,11 @@ inline bool __rw_isfinite (double val) { return !!finite (val); } -inline bool __rw_signbit (double val) { return !!signbit (val); } +inline bool __rw_signbit (double val) +{ + // implement own signbit() to avoid dragging in libm or libsunmath + return _RWSTD_REINTERPRET_CAST (const _RWSTD_UINT64_T&, val) >> 63; +} inline bool __rw_isinf (double val) { const int fpc = fpclass (val);