1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-17 12:41:05 +03:00
Files
gnulib/modules/memcmp
Eric Blake fc068cf4eb Fix memmem to avoid O(n^2) worst-case complexity.
* lib/memmem.c (knuth_morris_pratt): New function.
(memmem): Use it if first few naive iterations fail.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Detect cygwin bug.
* modules/memcmp (License): Set to LGPLv2+, not LGPL.
* modules/memchr (License): Likewise.
* modules/memmem (Depends-on): Add memcmp, memchr, stdbool, and
malloca.
* tests/test-memmem.c: Rewrite, borrowing ideas from
test-mbsstr1.c; the old version wouldn't even compile!
* modules/memmem-tests: New file.
* lib/string.in.h (rpl_memmem): Add declaration.
* modules/string (Makefile.am): Substitute REPLACE_MEMMEM.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Default for
REPLACE_MEMMEM.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-12-20 06:02:01 -07:00

24 lines
218 B
Plaintext

Description:
memcmp() function: compare memory areas.
Files:
lib/memcmp.c
m4/memcmp.m4
Depends-on:
configure.ac:
gl_FUNC_MEMCMP
Makefile.am:
Include:
<string.h>
License:
LGPLv2+
Maintainer:
Jim Meyering, glibc