This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Patch for typos in bits/std_cmath.h
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Patch for typos in bits/std_cmath.h
- From: Branko Čibej <branko dot cibej at hermes dot si>
- Date: Tue, 13 Jun 2000 15:03:15 +0200
- Organization: HERMES SoftLab
This patch fixes several typos in bits/std_cmath.h.
The MODF stuff breaks the build on hppa1.1-hp-hpux10.20.
2000-06-13 Branko Cibej <branko.cibej@hermes.si>
* bits/std_cmath.h: Fix typos in tests (*_FMODFF -> *_FMODF).
Test *_MODFF not *_MODF for modf(float, float*).
(modf(float, float*)): Remove reference to _C_legacy.
--
Branko Čibej <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 1) 586 53 49 fax: (+386 1) 586 52 70
Index: bits/std_cmath.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/bits/std_cmath.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cmath.h
*** std_cmath.h 2000/06/06 20:26:13 1.4
--- std_cmath.h 2000/06/13 12:45:51
*************** namespace std {
*** 168,177 ****
{ return ::floor(static_cast<double>(__x)); }
#endif
! #if _GLIBCPP_HAVE_BUILTIN_FMODFF
inline float fmod(float __x, float __y)
{ return __builtin_fmodf(__x, __y); }
! #elif _GLIBCPP_HAVE_FMODFF
inline float fmod(float __x, float __y)
{ return ::fmodf(__x, __y); }
#else
--- 168,177 ----
{ return ::floor(static_cast<double>(__x)); }
#endif
! #if _GLIBCPP_HAVE_BUILTIN_FMODF
inline float fmod(float __x, float __y)
{ return __builtin_fmodf(__x, __y); }
! #elif _GLIBCPP_HAVE_FMODF
inline float fmod(float __x, float __y)
{ return ::fmodf(__x, __y); }
#else
*************** namespace std {
*** 223,239 ****
{ return ::log10(static_cast<double>(__x)); }
#endif
! #if _GLIBCPP_HAVE_BUILTIN_MODF
inline float modf(float __x, float* __iptr)
{ return __builtin_modff(__x, __iptr); }
! #elif _GLIBCPP_HAVE_MODF
inline float modf(float __x, float* __iptr)
{ return ::modff(__x, __iptr); }
#else
inline float modf(float __x, float* __iptr)
{
double __tmp;
! double __res = _C_legacy::modf(static_cast<double>(__x), &__tmp);
*__iptr = static_cast<float> (__tmp);
return __res;
}
--- 223,239 ----
{ return ::log10(static_cast<double>(__x)); }
#endif
! #if _GLIBCPP_HAVE_BUILTIN_MODFF
inline float modf(float __x, float* __iptr)
{ return __builtin_modff(__x, __iptr); }
! #elif _GLIBCPP_HAVE_MODFF
inline float modf(float __x, float* __iptr)
{ return ::modff(__x, __iptr); }
#else
inline float modf(float __x, float* __iptr)
{
double __tmp;
! double __res = ::modf(static_cast<double>(__x), &__tmp);
*__iptr = static_cast<float> (__tmp);
return __res;
}