c_locale.cc (__convert_to_v): Use _GLIBCXX_HAVE_STRTOF instead _GLIBCXX_USE_C99 to check for strtof.

* config/locale/generic/c_locale.cc (__convert_to_v): Use
	_GLIBCXX_HAVE_STRTOF instead _GLIBCXX_USE_C99 to check for strtof.
	Likewise, use _GLIBCXX_HAVE_STRTOLD instead of _GLIBCXX_USE_C99
	to check for presence of strtold.

From-SVN: r88472
This commit is contained in:
Roger Sayle 2004-10-04 00:19:57 +00:00 committed by Roger Sayle
parent 66cea67583
commit e6fecd0132
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2004-10-03 Roger Sayle <roger@eyesopen.com>
* config/locale/generic/c_locale.cc (__convert_to_v): Use
_GLIBCXX_HAVE_STRTOF instead _GLIBCXX_USE_C99 to check for strtof.
Likewise, use _GLIBCXX_HAVE_STRTOLD instead of _GLIBCXX_USE_C99
to check for presence of strtold.
2004-10-03 Paolo Carlini <pcarlini@suse.de> 2004-10-03 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_list.h: Trivial formatting fixes. * include/bits/stl_list.h: Trivial formatting fixes.

View File

@ -57,7 +57,7 @@ namespace std
setlocale(LC_ALL, "C"); setlocale(LC_ALL, "C");
char* __sanity; char* __sanity;
errno = 0; errno = 0;
#if defined(_GLIBCXX_USE_C99) #if defined(_GLIBCXX_HAVE_STRTOF)
float __f = strtof(__s, &__sanity); float __f = strtof(__s, &__sanity);
#else #else
double __d = strtod(__s, &__sanity); double __d = strtod(__s, &__sanity);
@ -117,7 +117,7 @@ namespace std
// Assumes __s formatted for "C" locale. // Assumes __s formatted for "C" locale.
char* __old = strdup(setlocale(LC_ALL, NULL)); char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, "C"); setlocale(LC_ALL, "C");
#if defined(_GLIBCXX_USE_C99) #if defined(_GLIBCXX_HAVE_STRTOLD)
char* __sanity; char* __sanity;
errno = 0; errno = 0;
long double __ld = strtold(__s, &__sanity); long double __ld = strtold(__s, &__sanity);