mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
strtof() is a rather recent addition to C. Fall back to strtod() if it isn't
available. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1853 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
aff22cfc62
commit
4ed41f3dab
2 changed files with 5 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
|
|||
#### Check for functions ####
|
||||
|
||||
# ISO
|
||||
AC_CHECK_FUNCS([lrintf])
|
||||
AC_CHECK_FUNCS([lrintf strtof])
|
||||
|
||||
# POSIX
|
||||
AC_FUNC_FORK
|
||||
|
|
|
|||
|
|
@ -1300,7 +1300,11 @@ int pa_atof(const char *s, float *ret_f) {
|
|||
#endif
|
||||
{
|
||||
errno = 0;
|
||||
#ifdef HAVE_STRTOF
|
||||
f = strtof(s, &x);
|
||||
#else
|
||||
f = strtod(s, &x);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!x || *x || errno != 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue