* src/tgbatest/randtgba.cc (to_float): Use strtod() instead of
strtof() to please Solaris 9.
This commit is contained in:
parent
8b67d86e39
commit
896dc5afec
2 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
2004-11-28 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
2004-11-28 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/tgbatest/randtgba.cc (to_float): Use strtod() instead of
|
||||||
|
strtof() to please Solaris 9.
|
||||||
|
|
||||||
* configure.ac (AM_INIT_AUTOMAKE): Use option tar-ustar, we have
|
* configure.ac (AM_INIT_AUTOMAKE): Use option tar-ustar, we have
|
||||||
filenames longer than 99 bytes.
|
filenames longer than 99 bytes.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,8 @@ float
|
||||||
to_float(const char* s)
|
to_float(const char* s)
|
||||||
{
|
{
|
||||||
char* endptr;
|
char* endptr;
|
||||||
float res = strtof(s, &endptr);
|
// Do not use strtof(), it does not exist on Solaris 9.
|
||||||
|
float res = strtod(s, &endptr);
|
||||||
if (*endptr)
|
if (*endptr)
|
||||||
{
|
{
|
||||||
std::cerr << "Failed to parse `" << s << "' as a float." << std::endl;
|
std::cerr << "Failed to parse `" << s << "' as a float." << std::endl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue