summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-01-10 02:52:02 +0100
committerBruno Haible <bruno@clisp.org>2008-01-10 02:52:02 +0100
commit1e678e693dbf8abbc35d8d770ebefeb326cf76a3 (patch)
tree3a8dcc873d8b457879c17ca16ba22d6ada765c89
parent06cd74c141f523c2997cf5a13243ef68b6a2ae81 (diff)
downloadgnulib-1e678e693dbf8abbc35d8d770ebefeb326cf76a3.tar.gz
Small tweaks to memmem module.
-rw-r--r--ChangeLog8
-rw-r--r--doc/functions/memmem.texi20
-rw-r--r--m4/memmem.m46
-rw-r--r--modules/memmem9
4 files changed, 24 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 606e4e46eb..b1dc59d995 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2008-01-09 Bruno Haible <bruno@clisp.org>
+ * doc/functions/memmem.texi: Use the same structure as snprintf.texi
+ and other files.
+ * m4/memmem.m4 (gl_FUNC_MEMMEM): Say "guessing no" instead of "no"
+ if it's only a guess.
+ * modules/memmem: Simplify by depending on memmem-simple.
+
+2008-01-09 Bruno Haible <bruno@clisp.org>
+
Work around OpenBSD 4.0 tdelete() bug.
* m4/tsearch.m4 (gl_FUNC_TSEARCH): Also check tdelete's return value.
* lib/search.in.h: If REPLACE_TSEARCH is 1, define tsearch etc. as
diff --git a/doc/functions/memmem.texi b/doc/functions/memmem.texi
index 4925ac8053..b1a7b22e65 100644
--- a/doc/functions/memmem.texi
+++ b/doc/functions/memmem.texi
@@ -4,27 +4,31 @@
Unspecified by POSIX, but comparable to @code{strstr}.
-Gnulib module: memmem, memmem-simple
+Gnulib module: memmem or memmem-simple
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{memmem-simple}
+or @code{memmem}:
@itemize
@item
+This function is missing on some platforms:
+Mingw, OpenBSD 4.0
+
+@item
This function has reversed arguments on some older platforms:
Linux libc 5.0.9
+@end itemize
+Portability problems fixed by Gnulib module @code{memmem}:
+@itemize
@item
This function returns incorrect values in some cases, such as when
-given an empty needle (not fixed in memmem-simple):
+given an empty needle:
glibc <= 2.0, cygwin 1.5.x
@item
This function has quadratic instead of linear complexity on some
-platforms (not fixed in memmem-simple):
+platforms:
glibc <= 2.6.1, cygwin 1.5.x
-
-@item
-This function is missing on some platforms:
-Mingw, OpenBSD 4.0
@end itemize
Portability problems not fixed by Gnulib:
diff --git a/m4/memmem.m4 b/m4/memmem.m4
index 4deca48992..7f3aa3c70f 100644
--- a/m4/memmem.m4
+++ b/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 8
+# memmem.m4 serial 9
dnl Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -51,8 +51,8 @@ AC_DEFUN([gl_FUNC_MEMMEM],
[gl_cv_func_memmem_works=yes], [gl_cv_func_memmem_works=no],
[dnl pessimistically assume the worst, since even glibc 2.6.1
dnl has quadratic complexity in its memmem
- gl_cv_func_memmem_works=no])])
- if test $gl_cv_func_memmem_works = no; then
+ gl_cv_func_memmem_works="guessing no"])])
+ if test "$gl_cv_func_memmem_works" != yes; then
REPLACE_MEMMEM=1
AC_LIBOBJ([memmem])
fi
diff --git a/modules/memmem b/modules/memmem
index 28e386dd7e..8dea8932ae 100644
--- a/modules/memmem
+++ b/modules/memmem
@@ -2,19 +2,12 @@ Description:
memmem() function: efficiently locate first substring in a buffer.
Files:
-lib/memmem.c
-m4/memmem.m4
Depends-on:
-extensions
-string
-stdint
-memchr
-memcmp
+memmem-simple
configure.ac:
gl_FUNC_MEMMEM
-gl_STRING_MODULE_INDICATOR([memmem])
Makefile.am: