Commit fa2921ea authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* strtof is C99 and not present on pre BSD 5 (including older Mac OSX).

  added configure.ac check and use strtod with cast as backup since it is ANSI C
parent f7f0f42f
...@@ -120,7 +120,7 @@ case "${target_os}" in ...@@ -120,7 +120,7 @@ case "${target_os}" in
OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}" OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
VLC_ADD_LDFLAGS([vlc ffmpeg],[-all_load]) VLC_ADD_LDFLAGS([vlc ffmpeg],[-all_load])
VLC_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation]) VLC_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
VLC_ADD_CFLAGS([vlc],[-x objective-c]) VLC_ADD_CFLAGS([libvlc],[-x objective-c])
VLC_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress]) VLC_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress])
;; ;;
*mingw32* | *cygwin*) *mingw32* | *cygwin*)
...@@ -285,7 +285,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd ...@@ -285,7 +285,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd
dnl Check for system libs needed dnl Check for system libs needed
need_libc=false need_libc=false
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf) AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol strtof isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf)
dnl Check for usual libc functions dnl Check for usual libc functions
AC_CHECK_FUNCS(strdup strndup atof lseek) AC_CHECK_FUNCS(strdup strndup atof lseek)
......
...@@ -658,7 +658,11 @@ static int BandsCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -658,7 +658,11 @@ static int BandsCallback( vlc_object_t *p_this, char const *psz_cmd,
for( i = 0; i < p_sys->i_band; i++ ) for( i = 0; i < p_sys->i_band; i++ )
{ {
/* Read dB -20/20 */ /* Read dB -20/20 */
#ifdef HAVE_STRTOF
float f = strtof( p, &p_next ); float f = strtof( p, &p_next );
#else
float f = (float) strtod( p, &p_next );
#endif
if( !p_next || p_next == p ) break; /* strtof() failed */ if( !p_next || p_next == p ) break; /* strtof() failed */
p_sys->f_amp[i] = EqzConvertdB( f ); p_sys->f_amp[i] = EqzConvertdB( f );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment