History

Use HAVE_SIGGALRM and add empty main function if it doesn't exist.

Erik de Castro Lopo committed 19 years ago

Commit a0ea6cb1 parent 15fa60f2 files · +24 −3Browse files

Unified · Split

2 files
  1. ChangeLog +11 −0
  2. tests/callback_hang_test.c +13 −3
ChangeLog+11−0
@@ -1,3 +1,14 @@
1+2007-07-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
2+
3+ * acinclude.m4
4+ Add AC_CHECK_SIGNAL macro.
5+
6+ * confiure.ac
7+ Use AC_CHECK_SIGNAL to check for SIGALRM.
8+
9+ * tests/callback_hang_test.c
10+ Use HAVE_SIGGALRM and add empty main function if it doesn't exist.
11+
112 2007-06-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
213
314 * src/*_coeffs.h
tests/callback_hang_test.c+13−3
@@ -21,6 +21,8 @@ · 20 unmodified lines
2121 #include <unistd.h>
2222 #include <math.h>
2323
24+#if HAVE_ALARM && HAVE_SIGNAL && HAVE_SIGALRM
25+
2426 #include <signal.h>
2527
2628 #include <samplerate.h>
@@ -44,7 +46,6 @@ static long input_callback (void *cb_data, float **data) ; · 17 unmodified lines
4446 int
4547 main (void)
4648 {
47−#if defined (HAVE_ALARM) && defined (HAVE_SIGNAL) && HAVE_ALARM && HAVE_SIGNAL
4849 /* Set up SIGALRM handler. */
4950 signal (SIGALRM, alarm_handler) ;
5051
@@ -53,7 +54,6 @@ main (void) · 2 unmodified lines
5354 callback_hang_test (SRC_LINEAR) ;
5455 callback_hang_test (SRC_SINC_FASTEST) ;
5556 puts ("") ;
56−#endif
5757
5858 return 0 ;
5959 } /* main */
@@ -106,7 +106,7 @@ static void · 46 unmodified lines
106106 alarm_handler (int number)
107107 {
108108 number = 0 ;
109− printf ("\n\n Error : Hang inside src_callback_read() detected. Exiting!\n\n");
109+ printf ("\n\n Error : Hang inside src_callback_read() detected. Exiting!\n\n") ;
110110 exit (1) ;
111111 } /* alarm_handler */
112112
@@ -121,3 +121,13 @@ input_callback (void *cb_data, float **data) · 8 unmodified lines
121121 return ARRAY_LEN (buffer) ;
122122 } /* input_callback */
123123
124+#else
125+
126+int
127+main (void)
128+{
129+ puts ("\tCan't run this test on this platform.") ;
130+ return 0 ;
131+} /* main */
132+
133+#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t