Jim Meyering [Sat, 12 Jan 2008 08:52:42 +0000 (09:52 +0100)]
announce-gen: emit Gnulib's git-based version string.
* build-aux/announce-gen: Remove option: --gnulib-snapshot-time-stamp=S.
New option --gnulib-version=V, where V is expected to be
the output of running git describe in the gnulib directory.
(get_tool_versions): Request feedback on xdelta. I suspect it's
not useful, and plan to stop publishing an xdelta file with each
coreutils release.
Eric Blake [Wed, 9 Jan 2008 17:19:13 +0000 (10:19 -0700)]
Add memmem-simple module.
* m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): New macro.
(gl_FUNC_MEMMEM): Separate performance from presence checks.
* modules/memmem-simple: New file.
* modules/memmem (Description): Tweak.
* MODULES.html.sh (string handling): Mention it.
* doc/functions/memmem.texi (memmem): Distinguish which flaws are
addressed by memmem-simple.
* NEWS: Document the difference.
Eric Blake [Sat, 5 Jan 2008 21:09:11 +0000 (14:09 -0700)]
Rewrite memmem to guarantee linear complexity without malloc.
* lib/memmem.c (memmem): Use Two-Way rather than
Knuth-Morris-Pratt, to allow O(1) space usage.
(critical_factorization, two_way_short_needle)
(two_way_long_needle): New functions.
(knuth_morris_pratt): Delete.
* modules/memmem (Depends-on): No longer need malloca or stdbool.
Add stdint.
* tests/test-memmem.c (main): Add tests for periodic needle and
sublinear performance.
* doc/functions/memmem.texi (memmem): Document other deficiencies
in cygwin and older glibc.
Eric Blake [Sat, 5 Jan 2008 11:47:05 +0000 (04:47 -0700)]
Fix memmem test for mingw.
* modules/memmem-tests (configure.ac): Check for alarm.
* tests/test-memmem.c (main): Avoid alarm on platforms that lack
it.
* doc/functions/memmem.texi: New file.
* doc/gnulib.texi (Function Substitutes): Add memmem.
Reported by Bruno Haible.
Eric Blake [Wed, 19 Dec 2007 23:09:03 +0000 (16:09 -0700)]
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.
Paul Eggert [Wed, 19 Dec 2007 00:11:25 +0000 (16:11 -0800)]
Fix problem with _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H on VMS.
* lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H): Define
before any system include files, and undef after them all. This
should fix a problem on VMS reported by John E. Malmberg in
<http://lists.gnu.org/archive/html/bug-gnulib/2007-12/msg00118.html>.
Eric Blake [Tue, 18 Dec 2007 04:50:40 +0000 (21:50 -0700)]
Revert addition of verify, for BSD/OS.
* lib/fseeko.c [!HAVE_FSEEKO]: Allow off_t > long, even though it
can't handle large files, for the sake of obsolete platforms.
* modules/fseeko (Depends-on): Remove verify.
* doc/functions/fseeko.texi (fseeko): Document BSD/OS limitation.
* doc/functions/ftello.texi (ftello): Likewise.
* doc/functions/fgetpos.texi (fgetpos): Likewise.
Reported by Larry Jones.
Jim Meyering [Fri, 14 Dec 2007 18:46:26 +0000 (19:46 +0100)]
Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc,
which has no openat syscall, yet <fcntl.h> does define AT_FDCWD.
* lib/getcwd.c: Undef AT_FDCWD if there is no openat function.
* modules/getcwd (Depends-on): Add openat.
Reported by Petr Salinger.
Eric Blake [Thu, 13 Dec 2007 21:58:44 +0000 (14:58 -0700)]
Another fseek test.
* tests/test-fseek.c (main): Also test ungetc handling.
* tests/test-fseeko.c (main): Likewise.
* modules/fseeko (Depends-on): Add verify.
* lib/fseeko.c [!HAVE_FSEEKO]: Verify that off_t is not too
large.
Reported by Larry Jones.
Eric Blake [Tue, 11 Dec 2007 21:00:26 +0000 (14:00 -0700)]
Fix bug with -0.0L in previous patch.
* lib/isnan.c (rpl_isnanl): Make robust to -0.0L and pad bits.
* tests/test-isnan.c (main): Also test on zeroes.
* tests/test-isnanf.c (main): Likewise.
* tests/test-isnanl.h (main): Likewise.