[pulseaudio-commits] r1853 - in /branches/lennart: configure.ac src/pulsecore/core-util.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Sep 18 03:47:04 PDT 2007


Author: ossman
Date: Tue Sep 18 12:47:03 2007
New Revision: 1853

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1853&root=pulseaudio&view=rev
Log:
strtof() is a rather recent addition to C. Fall back to strtod() if it isn't
available.

Modified:
    branches/lennart/configure.ac
    branches/lennart/src/pulsecore/core-util.c

Modified: branches/lennart/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/configure.ac?rev=1853&root=pulseaudio&r1=1852&r2=1853&view=diff
==============================================================================
--- branches/lennart/configure.ac (original)
+++ branches/lennart/configure.ac Tue Sep 18 12:47:03 2007
@@ -267,7 +267,7 @@
 #### Check for functions ####
 
 # ISO
-AC_CHECK_FUNCS([lrintf])
+AC_CHECK_FUNCS([lrintf strtof])
 
 # POSIX
 AC_FUNC_FORK

Modified: branches/lennart/src/pulsecore/core-util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/core-util.c?rev=1853&root=pulseaudio&r1=1852&r2=1853&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/core-util.c (original)
+++ branches/lennart/src/pulsecore/core-util.c Tue Sep 18 12:47:03 2007
@@ -1300,7 +1300,11 @@
 #endif
     {
         errno = 0;
+#ifdef HAVE_STRTOF
         f = strtof(s, &x);
+#else
+        f = strtod(s, &x);
+#endif
     }
 
     if (!x || *x || errno != 0)




More information about the pulseaudio-commits mailing list