Bruno Haible [Fri, 11 Jan 2008 02:42:54 +0000 (03:42 +0100)]
Add documentation for the c-* modules.
Eric Blake [Thu, 10 Jan 2008 23:36:17 +0000 (00:36 +0100)]
Fix a comment.
Eric Blake [Thu, 10 Jan 2008 19:06:35 +0000 (12:06 -0700)]
Share two-way algorithm.
* lib/str-two-way.h: New file, merged from...
* lib/memmem.c: ...here...
* lib/strstr.c: ...and here.
* modules/memmem (Files): Use it.
* modules/strstr (Files): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Thu, 10 Jan 2008 14:38:11 +0000 (07:38 -0700)]
Avoid quadratic strstr implementations.
* lib/strstr.c: New file.
* m4/strstr.m4: Likewise.
* modules/strstr: Likewise.
* modules/strstr-tests: Likewise.
* tests/test-strstr.c: Likewise.
* lib/string.in.h (rpl_strstr): Declare.
(memmem) [GNULIB_POSIXCHECK]: Document speed issue.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Support strstr.
* modules/string (Makefile.am): Likewise.
* MODULES.html.sh (string handling): Mention new module.
* doc/functions/strstr.texi (strstr): Document the bug.
Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible [Thu, 10 Jan 2008 10:12:06 +0000 (11:12 +0100)]
Make it possible to avoid all memory leaks when calling relocate().
Bruno Haible [Thu, 10 Jan 2008 09:56:41 +0000 (10:56 +0100)]
Update copyright year.
Colin Watson [Thu, 10 Jan 2008 09:16:08 +0000 (10:16 +0100)]
* lib/canonicalize-lgpl.c [!_LIBC]: Fix typo in #if directive:
s/S_ISNLK/S_ISLNK/.
Bruno Haible [Thu, 10 Jan 2008 01:52:02 +0000 (02:52 +0100)]
Small tweaks to memmem module.
Bruno Haible [Thu, 10 Jan 2008 01:46:55 +0000 (02:46 +0100)]
Work around OpenBSD 4.0 tdelete() bug.
Bruno Haible [Thu, 10 Jan 2008 01:36:58 +0000 (02:36 +0100)]
Fix test failure on OpenBSD 4.0.
Bruno Haible [Thu, 10 Jan 2008 01:27:54 +0000 (02:27 +0100)]
Paul Eggert [Thu, 10 Jan 2008 01:22:52 +0000 (17:22 -0800)]
gl_FUNC_ALLOCA no longer defines HAVE_ALLOCA_H unconditionally.
See <http://lists.gnu.org/archive/html/bug-gnulib/2007-12/msg00149.html>.
* NEWS: announce this.
* m4/alloca.m4 (gl_FUNC_ALLOCA): Don't define HAVE_ALLOCA_H.
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Wed, 9 Jan 2008 00:15:27 +0000 (17:15 -0700)]
Give gcc some memmem optimization hints.
* lib/string.in.h (memmem, memrchr, strchrnul, strnlen, strpbrk)
(strcasestr): Declare as pure.
* modules/memmem (Maintainer): Claim my implementation.
Signed-off-by: Eric Blake <ebb9@byu.net>
Ralf Wildenhues [Wed, 9 Jan 2008 06:18:35 +0000 (07:18 +0100)]
Support AIX 6.1 and higher.
* build-aux/config.libpath: Likewise.
* build-aux/config.rpath: Likewise.
Bruno Haible [Wed, 9 Jan 2008 01:15:36 +0000 (02:15 +0100)]
Handle the particular PRIdMAX values on MacOS X and mingw.
Bruno Haible [Wed, 9 Jan 2008 00:17:12 +0000 (01:17 +0100)]
Add missing module dependencies.
Bruno Haible [Tue, 8 Jan 2008 22:54:30 +0000 (23:54 +0100)]
Document the knuth_morris_pratt calling convention better.
Bruno Haible [Tue, 8 Jan 2008 16:40:59 +0000 (17:40 +0100)]
Detect wcwidth bug on OpenBSD 4.0.
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible [Tue, 8 Jan 2008 10:43:00 +0000 (11:43 +0100)]
Remove unnecessary TESTS_ENVIRONMENT setting.
Mike Frysinger [Tue, 8 Jan 2008 08:53:53 +0000 (09:53 +0100)]
Add a configure time option: --disable-acl.
* m4/acl.m4 (gl_FUNC_ACL): Wrap all ACL logic in a call to
AC_ARG_ENABLE(acl).
Simon Josefsson [Tue, 8 Jan 2008 08:09:18 +0000 (09:09 +0100)]
Update localename-tests for setenv changes.
Ralf Wildenhues [Tue, 8 Jan 2008 07:15:44 +0000 (08:15 +0100)]
* DEPENDENCIES: Require Texinfo version 4.6 or newer.
Colin Watson [Tue, 8 Jan 2008 01:53:46 +0000 (02:53 +0100)]
Add man-db.
Bruno Haible [Tue, 8 Jan 2008 01:24:39 +0000 (02:24 +0100)]
No need to drop periods from section names.
Bruno Haible [Tue, 8 Jan 2008 01:16:21 +0000 (02:16 +0100)]
Don't strip off a leading "lt-" prefix outside a .libs directory.
Bruno Haible [Mon, 7 Jan 2008 23:28:30 +0000 (00:28 +0100)]
Improve memory cleanup in 'relocatable' module.
Bruno Haible [Mon, 7 Jan 2008 22:29:52 +0000 (23:29 +0100)]
Relax test, so that it passes on older glibc systems.
Ralf Wildenhues [Mon, 7 Jan 2008 21:44:38 +0000 (22:44 +0100)]
autoupdate.
Karl Berry [Sat, 5 Jan 2008 14:29:33 +0000 (06:29 -0800)]
autoupdate
Eric Blake [Sat, 5 Jan 2008 11:47:24 +0000 (04:47 -0700)]
Avoid quadratic system memmem.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Check for quadratic memmem.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible [Fri, 4 Jan 2008 23:29:12 +0000 (00:29 +0100)]
Fix bug introduced on 2007-12-02.
Eric Blake [Fri, 4 Jan 2008 22:19:34 +0000 (15:19 -0700)]
Shorten duration of memmem test.
* tests/test-memmem.c (main): Use alarm to declare failure if test
is taking too long.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
Simon Josefsson [Fri, 4 Jan 2008 14:44:57 +0000 (15:44 +0100)]
Modules intprops and string needed by relocatable-prog-wrapper.
Bruno Haible [Thu, 3 Jan 2008 23:57:29 +0000 (00:57 +0100)]
New section 'Localization'.
Bruno Haible [Thu, 3 Jan 2008 23:24:10 +0000 (00:24 +0100)]
Treat untyped memory as an 'unsigned char' array.
Bruno Haible [Thu, 3 Jan 2008 23:22:45 +0000 (00:22 +0100)]
Fix formatting of a ChangeLog entry.
Jim Meyering [Wed, 2 Jan 2008 09:00:47 +0000 (10:00 +0100)]
lib/version-etc.c (COPYRIGHT_YEAR): Increase for new year.
Karl Berry [Mon, 31 Dec 2007 23:34:15 +0000 (15:34 -0800)]
missed ChangeLog for doc change yesterday
Jim Meyering [Mon, 31 Dec 2007 13:00:17 +0000 (14:00 +0100)]
Avoid use of private FTS type name.
* lib/fts.c (fts_sort): Use FTSENT rather than "struct _ftsent".
Bruno Haible [Mon, 31 Dec 2007 10:57:16 +0000 (11:57 +0100)]
Unify 5 copies of the KMP code.
Bruno Haible [Mon, 31 Dec 2007 10:55:46 +0000 (11:55 +0100)]
Don't define xmmalloca if not needed.
Bruno Haible [Mon, 31 Dec 2007 10:54:37 +0000 (11:54 +0100)]
New macro xnmalloca.
Bruno Haible [Mon, 31 Dec 2007 10:53:40 +0000 (11:53 +0100)]
Protect against integer overflow in malloca() calls.
Bruno Haible [Mon, 31 Dec 2007 10:51:57 +0000 (11:51 +0100)]
Ensure that 'glob' stays under LGPLv2+.
Bruno Haible [Mon, 31 Dec 2007 10:51:15 +0000 (11:51 +0100)]
Change license to LGPLv2+.
Karl Berry [Sun, 30 Dec 2007 17:50:08 +0000 (09:50 -0800)]
no period in node name
Karl Berry [Sun, 30 Dec 2007 17:49:38 +0000 (09:49 -0800)]
update maintain.texi
Paul Eggert [Sat, 29 Dec 2007 09:17:08 +0000 (01:17 -0800)]
* lib/memmem.c (knuth_morris_pratt): Check for size_t overflow
when multiplying M by sizeof (size_t).
Martin Lambers [Wed, 26 Dec 2007 15:37:29 +0000 (16:37 +0100)]
Override getpagesize on mingw.
Bruno Haible [Wed, 26 Dec 2007 15:33:48 +0000 (16:33 +0100)]
The localcharset module requires a modified TESTS_ENVIRONMENT; tell the user.
Bruno Haible [Wed, 26 Dec 2007 15:31:08 +0000 (16:31 +0100)]
Avoid using the syntax symbol() in formatted documentation.
Bruno Haible [Wed, 26 Dec 2007 15:28:08 +0000 (16:28 +0100)]
Use plain ANSI C syntax.
Bruno Haible [Wed, 26 Dec 2007 15:26:26 +0000 (16:26 +0100)]
Make --enable-relocatable work with DESTDIR.
Bruno Haible [Wed, 26 Dec 2007 15:25:28 +0000 (16:25 +0100)]
Fix link error in relocatability wrappers, due to xalloc_die().
Bruno Haible [Wed, 26 Dec 2007 15:23:54 +0000 (16:23 +0100)]
Split setenv module into setenv and unsetenv. Get rid of setenv.h.
Bruno Haible [Wed, 26 Dec 2007 15:20:10 +0000 (16:20 +0100)]
Split setenv module into setenv and unsetenv. Get rid of setenv.h.
Bruno Haible [Wed, 26 Dec 2007 15:13:28 +0000 (16:13 +0100)]
Use GNU style coding conventions.
Bruno Haible [Wed, 26 Dec 2007 15:10:15 +0000 (16:10 +0100)]
Add more comments about Knuth-Morris-Pratt algorithm.
Bruno Haible [Wed, 26 Dec 2007 15:02:46 +0000 (16:02 +0100)]
Use standard idioms.
Bruno Haible [Wed, 26 Dec 2007 15:01:15 +0000 (16:01 +0100)]
Fix the value of $auxdir used when generating the tests directory.
Bruno Haible [Wed, 26 Dec 2007 14:59:53 +0000 (15:59 +0100)]
Remove unnecessary -l options from LDFLAGS.
Eric Blake [Thu, 20 Dec 2007 20:15:27 +0000 (13:15 -0700)]
Work around circular library issue when cross-compiling.
* lib/progname.c (set_program_name): Use strncmp, not memcmp, so
that progname.o does not need to pull in rpl_memcmp.
Signed-off-by: Eric Blake <ebb9@byu.net>
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
Petr Salinger [Mon, 17 Dec 2007 12:30:09 +0000 (13:30 +0100)]
getcwd.c: Use a more readable witness: HAVE_OPENAT_SUPPORT
* lib/getcwd.c: Define and use HAVE_OPENAT_SUPPORT, in place of AT_FDCWD.
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.
Bruno Haible [Mon, 17 Dec 2007 11:21:10 +0000 (12:21 +0100)]
Avoid a crash of a configure test on some x86_64 systems.
Karl Berry [Sat, 15 Dec 2007 14:41:32 +0000 (06:41 -0800)]
Merge branch 'master' of ssh://karl@git.sv.gnu.org/srv/git/gnulib
Karl Berry [Sat, 15 Dec 2007 14:39:03 +0000 (06:39 -0800)]
update from texinfo
Jim Meyering [Sat, 15 Dec 2007 14:31:00 +0000 (15:31 +0100)]
Fix typo in previous ChangeLog entry.
Jim Meyering [Sat, 15 Dec 2007 09:21:05 +0000 (10:21 +0100)]
* build-aux/gnupload (GPG): Don't hard-code patch to gpg binary.
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Thu, 13 Dec 2007 19:09:31 +0000 (12:09 -0700)]
Fix fseeko on mingw.
* lib/fseeko.c (rpl_fseeko) [_IOERR]: Reset EOF flag on successful
seek.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Thu, 13 Dec 2007 18:25:42 +0000 (11:25 -0700)]
Beef up fseek tests.
* tests/test-fseek.c (main): Also test eof handling.
* tests/test-fseeko.c (main): Likewise.
Reported by Larry Jones.
Signed-off-by: Eric Blake <ebb9@byu.net>
Larry Jones [Thu, 13 Dec 2007 18:11:53 +0000 (11:11 -0700)]
Fix fseeko on BSD-based platforms.
* lib/fseeko.c (rpl_fseeko) [__sferror]: Reset EOF flag on
successful seek.
Karl Berry [Thu, 13 Dec 2007 14:23:06 +0000 (06:23 -0800)]
autoupdate
Eric Blake [Wed, 12 Dec 2007 17:29:17 +0000 (10:29 -0700)]
Allow circular dependency of separate libtests.a
* gnulib-tool (func_emit_tests_Makefile_am): Add AM_LIBTOOLFLAGS
when use_libtests.
Signed-off-by: Eric Blake <ebb9@byu.net>
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Tue, 11 Dec 2007 18:35:55 +0000 (11:35 -0700)]
Detect pseudo-denormals on x86 even when cross-compiling.
* lib/isnan.c (rpl_isnanl) [!KNOWN_EXPBIT0_LOCATION
&& USE_LONG_DOUBLE && x86]: Add one more check to filter out
invalid bit patterns that happen to satisfy ==.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Mon, 10 Dec 2007 16:54:54 +0000 (09:54 -0700)]
Avoid link failures with separate libtests.a.
* gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd
last, to satisfy circular dependencies.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Tue, 11 Dec 2007 15:17:24 +0000 (08:17 -0700)]
Fix OpenBSD 4.0 <float.h> handling of long double.
* m4/float_h.m4 (gl_FLOAT_H): Also claim OpenBSD is broken.
* lib/float.in.h [__OpenBSD__]: Add fixes for OpenBSD.
* doc/headers/float.texi (float.h): Document OpenBSD bug.
Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering [Tue, 11 Dec 2007 12:42:58 +0000 (13:42 +0100)]
* users.txt: Add libvirt.
Jim Meyering [Thu, 6 Dec 2007 20:00:24 +0000 (21:00 +0100)]
Support versions of autoconf prior to 2.59c.
* gnulib-tool (func_emit_initmacro_done): Define m4_foreach_w
if it is not already defined.
Bruno Haible [Mon, 10 Dec 2007 11:13:34 +0000 (12:13 +0100)]
Collect sources for tests-related modules in tests/, compile them to libtests.a.
Bruno Haible [Mon, 10 Dec 2007 11:06:35 +0000 (12:06 +0100)]
Fix references to the build-aux directory in the generated tests/Makefile.am.
Bruno Haible [Mon, 10 Dec 2007 11:03:15 +0000 (12:03 +0100)]
Remove redundant code.
Eric Blake [Sat, 8 Dec 2007 00:01:25 +0000 (17:01 -0700)]
Again, remake scripts executable.
* build-aux/config.guess: Autoupdates are killing the mode.
* build-aux/config.sub: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Karl Berry [Fri, 7 Dec 2007 17:53:27 +0000 (09:53 -0800)]
Merge branch 'master' of ssh://karl@git.sv.gnu.org/srv/git/gnulib
Karl Berry [Fri, 7 Dec 2007 17:46:02 +0000 (09:46 -0800)]
autoupdate
Jim Meyering [Fri, 7 Dec 2007 15:20:57 +0000 (16:20 +0100)]
Let these macros work also with autoconf-2.59.
* m4/getline.m4 (gl_FUNC_GETLINE): Require only autoconf-2.59. 2.60
is not needed, since gnulib now permits use of AC_CHECK_DECLS_ONCE.
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
Jim Meyering [Thu, 6 Dec 2007 15:49:19 +0000 (16:49 +0100)]
Avoid a configure-time syntax error in gl_FUNC_ACL.
* m4/acl.m4 (gl_FUNC_ACL): Be careful to check for the acl_trivial
function in each branch, before testing the cache variable.
Bruno Haible [Wed, 5 Dec 2007 21:38:39 +0000 (22:38 +0100)]
Update comments after last change.
Eric Blake [Tue, 4 Dec 2007 21:45:04 +0000 (14:45 -0700)]
Make scripts executable.
* build-aux/config.guess: Add execute permissions.
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Tue, 4 Dec 2007 15:40:17 +0000 (08:40 -0700)]
Fix frexp on mingw.
* m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Detect mingw bug when
cross-compiling.
* doc/functions/frexp.texi (frexp): Document the bug.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Tue, 4 Dec 2007 15:38:22 +0000 (08:38 -0700)]
Make cygwin fseeko check more reliable.
* m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Use cygwin
version numbers, rather than unrelated feature check.
* doc/functions/fseeko.texi (fseeko): Tweak failure report.
* doc/functions/ftello.texi (ftello): Likewise.
Reported by Bruno Haible.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Tue, 4 Dec 2007 15:35:02 +0000 (08:35 -0700)]
* m4/strerror.m4: Bump version number.
Signed-off-by: Eric Blake <ebb9@byu.net>