[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] memmem, strstr, strcasestr: fix bug with long periodic needl
From: |
Bruno Haible |
Subject: |
Re: [PATCH] memmem, strstr, strcasestr: fix bug with long periodic needle |
Date: |
Sat, 20 Nov 2010 19:46:09 +0100 |
User-agent: |
KMail/1.9.9 |
Eric Blake wrote on 2010-10-05:
> @@ -24,9 +63,9 @@ dnl Additionally, check that memmem is efficient and
> handles empty needles.
> AC_DEFUN([gl_FUNC_MEMMEM],
> [
> AC_REQUIRE([gl_FUNC_MEMMEM_SIMPLE])
> - if test $ac_cv_have_decl_memmem = yes; then
> + if test $HAVE_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
> AC_CACHE_CHECK([whether memmem works in linear time],
>
I'm getting this output from a testdir's configure on a Linux/x86 system:
./configure: line 19790: test: =: unary operator expected
checking for memmem... (cached) yes
Later on, the test-memmem program eats a lot of CPU time because REPLACE_MEMMEM
has been set to 0 where 1 would have been appropriate.
This fixes it.
2010-11-20 Bruno Haible <address@hidden>
memmem: Fix autoconf test.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Test HAVE_DECL_MEMMEM, not HAVE_MEMMEM.
--- m4/memmem.m4.orig Sat Nov 20 19:41:12 2010
+++ m4/memmem.m4 Sat Nov 20 19:37:47 2010
@@ -1,4 +1,4 @@
-# memmem.m4 serial 18
+# memmem.m4 serial 19
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
@@ -64,7 +64,7 @@
AC_DEFUN([gl_FUNC_MEMMEM],
[
AC_REQUIRE([gl_FUNC_MEMMEM_SIMPLE])
- if test $HAVE_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
+ if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
AC_CACHE_CHECK([whether memmem works in linear time],
[gl_cv_func_memmem_works_fast],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] memmem, strstr, strcasestr: fix bug with long periodic needle,
Bruno Haible <=