summaryrefslogtreecommitdiff
path: root/gnulib-m4/strstr.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:50:11 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:50:11 +0100
commit4cf52fc0bc3b80c0ef6c58c5db4413ebdafe661c (patch)
tree676b26b024117cf656080a011e3d17b8fb6889af /gnulib-m4/strstr.m4
parent1ecbfbb92248e67b564f5b144c4671ccaa86ee2f (diff)
parent44ff3127b1e57b703c2a73a24f7ab38e4aad8ae4 (diff)
Merge branch 'release/0.9.8-1'0.9.8-1
Diffstat (limited to 'gnulib-m4/strstr.m4')
-rw-r--r--gnulib-m4/strstr.m411
1 files changed, 7 insertions, 4 deletions
diff --git a/gnulib-m4/strstr.m4 b/gnulib-m4/strstr.m4
index bfe4c85..f48a6cd 100644
--- a/gnulib-m4/strstr.m4
+++ b/gnulib-m4/strstr.m4
@@ -1,5 +1,5 @@
-# strstr.m4 serial 17
-dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
+# strstr.m4 serial 19
+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,10 +9,10 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
[
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MEMCHR])
- if test "$gl_cv_func_memchr_works" != yes; then
+ if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
REPLACE_STRSTR=1
else
- dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092.
+ dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092.
AC_CACHE_CHECK([whether strstr works],
[gl_cv_func_strstr_works_always],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
@@ -99,6 +99,9 @@ static void quit (int sig) { _exit (sig + 128); }
if (!strstr (haystack, needle))
result |= 1;
}
+ /* Free allocated memory, in case some sanitizer is watching. */
+ free (haystack);
+ free (needle);
return result;
]])],
[gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no],