diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index cb0c9a384d6..d8242e94701 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-11-03 Anthony Green + + * libmath/stubs.c (sqrtf, sqrtl): Reorder so they appear before + they're used. + 2003-11-03 Benjamin Kosnik * include/bits/locale_facets.h (time_get::_M_extract_name): Add diff --git a/libstdc++-v3/libmath/stubs.c b/libstdc++-v3/libmath/stubs.c index 1968bffe7f9..757af6df841 100644 --- a/libstdc++-v3/libmath/stubs.c +++ b/libstdc++-v3/libmath/stubs.c @@ -102,6 +102,23 @@ expl(long double x) #endif +#ifndef HAVE_SQRTF +float +sqrtf(float x) +{ + return (float) sqrt(x); +} +#endif + +#ifndef HAVE_SQRTL +long double +sqrtl(long double x) +{ + return sqrt((double) x); +} +#endif + + /* Compute the hypothenuse of a right triangle with side x and y. */ #ifndef HAVE_HYPOTF float @@ -226,23 +243,6 @@ sinhl(long double x) #endif -#ifndef HAVE_SQRTF -float -sqrtf(float x) -{ - return (float) sqrt(x); -} -#endif - -#ifndef HAVE_SQRTL -long double -sqrtl(long double x) -{ - return sqrt((double) x); -} -#endif - - #ifndef HAVE_TANF float tanf(float x)