X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-strcasestr.c;h=4abf49a0520eef7baa6f278649d72e20f5d65ba3;hb=8df2459e40ab2ee726f4532c0699d4f7a40717d0;hp=a674719916f05e914bf133af57db69d9ac946ccb;hpb=7dd49d2811431dceac40473f3d65d13f6552cce4;p=gnulib.git diff --git a/tests/test-strcasestr.c b/tests/test-strcasestr.c index a67471991..4abf49a05 100644 --- a/tests/test-strcasestr.c +++ b/tests/test-strcasestr.c @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -30,6 +31,7 @@ if (!(expr)) \ { \ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + fflush (stderr); \ abort (); \ } \ } \ @@ -41,8 +43,9 @@ main () #if HAVE_DECL_ALARM /* Declare failure if test takes too long, by using default abort caused by SIGALRM. All known platforms that lack alarm also lack - memmem, and the replacement memmem is known to not take too + strcasestr, and the replacement strcasestr is known to not take too long. */ + signal (SIGALRM, SIG_DFL); alarm (50); #endif