2010-08-30 Eric Blake <eblake@redhat.com>
+ strstr, memmem, strcasestr: avoid leaked shell message
+ * m4/strstr.m4 (gl_FUNC_STRSTR): Avoid "Alarm clock" message from
+ FreeBSD.
+ * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
+ * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
+
tests: silence clang warning
* tests/test-malloca.c (do_allocation): Avoid dead store.
-# memmem.m4 serial 14
+# memmem.m4 serial 15
dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
#include <string.h> /* for memmem */
#include <stdlib.h> /* for malloc */
#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
]], [[size_t m = 1000000;
char *haystack = (char *) malloc (2 * m + 1);
char *needle = (char *) malloc (m + 1);
void *result = 0;
/* Failure to compile this test due to missing alarm is okay,
since all such platforms (mingw) also lack memmem. */
- signal (SIGALRM, SIG_DFL);
+ signal (SIGALRM, quit);
alarm (5);
/* Check for quadratic performance. */
if (haystack && needle)
-# strcasestr.m4 serial 13
+# strcasestr.m4 serial 14
dnl Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
#include <string.h> /* for memmem */
#include <stdlib.h> /* for malloc */
#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
]], [[size_t m = 1000000;
char *haystack = (char *) malloc (2 * m + 2);
char *needle = (char *) malloc (m + 2);
void *result = 0;
/* Failure to compile this test due to missing alarm is okay,
since all such platforms (mingw) also lack strcasestr. */
- signal (SIGALRM, SIG_DFL);
+ signal (SIGALRM, quit);
alarm (5);
/* Check for quadratic performance. */
if (haystack && needle)
-# strstr.m4 serial 7
+# strstr.m4 serial 8
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
#include <string.h> /* for memmem */
#include <stdlib.h> /* for malloc */
#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
]], [[size_t m = 1000000;
char *haystack = (char *) malloc (2 * m + 2);
char *needle = (char *) malloc (m + 2);
void *result = 0;
/* Failure to compile this test due to missing alarm is okay,
since all such platforms (mingw) also have quadratic strstr. */
- signal (SIGALRM, SIG_DFL);
+ signal (SIGALRM, quit);
alarm (5);
/* Check for quadratic performance. */
if (haystack && needle)