shithub: libsamplerate

Download patch

ref: 84f52726c890739d6968844e05f7040fb9a58b05
parent: 1b63f407f2939b3dacd4b5fca93b35f2274509cc
author: Erik de Castro Lopo <[email protected]>
date: Fri Apr 20 09:25:47 EDT 2007

Test for functions alarm and signal and only compile test if both are available.

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-04-20  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
+
+    * tests/snr_bw_test.c
+    Remove cruft.
+
+    * doc/index.html
+    Add link to Foobar 2000 plugin.
+
+    * configure.ac tests/callback_hang_test.c
+    Test for functions alarm and signal and only compile test if both are
+    available.
+
 2007-01-27  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * src/samplerate.c
--- a/configure.ac
+++ b/configure.ac
@@ -104,7 +104,7 @@
 #====================================================================================
 # Check for functions.
 
-AC_CHECK_FUNCS(malloc calloc free memcpy memmove)
+AC_CHECK_FUNCS(malloc calloc free memcpy memmove alarm signal)
 
 AC_CHECK_LIB([m],floor)
 AC_CHECK_FUNCS(floor ceil fmod)
--- a/tests/callback_hang_test.c
+++ b/tests/callback_hang_test.c
@@ -44,6 +44,7 @@
 int
 main (void)
 {
+#if defined (HAVE_ALARM) && defined (HAVE_SIGNAL) && HAVE_ALARM && HAVE_SIGNAL
 	/* Set up SIGALRM handler. */
 	signal (SIGALRM, alarm_handler) ;
 
@@ -52,6 +53,7 @@
 	callback_hang_test (SRC_LINEAR) ;
 	callback_hang_test (SRC_SINC_FASTEST) ;
 	puts ("") ;
+#endif
 
 	return 0 ;
 } /* main */