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 @@
12007-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
12007-06-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>122007-06-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
2 13
3 * src/*_coeffs.h14 * src/*_coeffs.h
tests/callback_hang_test.c+13−3
@@ -21,6 +21,8 @@ · 20 unmodified lines
21#include <unistd.h>21#include <unistd.h>
22#include <math.h>22#include <math.h>
23 23
24#if HAVE_ALARM && HAVE_SIGNAL && HAVE_SIGALRM
25
24#include <signal.h>26#include <signal.h>
25 27
26#include <samplerate.h>28#include <samplerate.h>
@@ -44,7 +46,6 @@ static long input_callback (void *cb_data, float **data) ; · 17 unmodified lines
44int46int
45main (void)47main (void)
46{48{
47#if defined (HAVE_ALARM) && defined (HAVE_SIGNAL) && HAVE_ALARM && HAVE_SIGNAL
48 /* Set up SIGALRM handler. */49 /* Set up SIGALRM handler. */
49 signal (SIGALRM, alarm_handler) ;50 signal (SIGALRM, alarm_handler) ;
50 51
@@ -53,7 +54,6 @@ main (void) · 2 unmodified lines
53 callback_hang_test (SRC_LINEAR) ;54 callback_hang_test (SRC_LINEAR) ;
54 callback_hang_test (SRC_SINC_FASTEST) ;55 callback_hang_test (SRC_SINC_FASTEST) ;
55 puts ("") ;56 puts ("") ;
56#endif
57 57
58 return 0 ;58 return 0 ;
59} /* main */59} /* main */
@@ -106,7 +106,7 @@ static void · 46 unmodified lines
106alarm_handler (int number)106alarm_handler (int number)
107{107{
108 number = 0 ;108 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") ;
110 exit (1) ;110 exit (1) ;
111} /* alarm_handler */111} /* alarm_handler */
112 112
@@ -121,3 +121,13 @@ input_callback (void *cb_data, float **data) · 8 unmodified lines
121 return ARRAY_LEN (buffer) ;121 return ARRAY_LEN (buffer) ;
122} /* input_callback */122} /* input_callback */
123 123
124#else
125
126int
127main (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