summaryrefslogtreecommitdiff
path: root/gnulib-m4/strstr.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 10:30:25 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 10:30:25 +0100
commit44a3eaeba04ef78835ca741592c376428ada5f71 (patch)
tree29cc935fd475678dcbe38972bfa77fdc68ffb10d /gnulib-m4/strstr.m4
parent6b73edd95d603e27d55d4905134ac1327d426534 (diff)
New upstream version 0.9.8upstream/0.9.8
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 bfe4c859..f48a6cd8 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],