gnulib.git
14 years ago-mautoupdate
Karl Berry [Sun, 26 Jul 2009 13:27:06 +0000 (06:27 -0700)]
-mautoupdate

14 years agoUndo last gnulib-tool commit: maintainer-makefile is fixed.
Bruno Haible [Sat, 25 Jul 2009 20:55:21 +0000 (22:55 +0200)]
Undo last gnulib-tool commit: maintainer-makefile is fixed.

14 years agomaint.mk: avoid warnings about missing files
Jim Meyering [Sat, 25 Jul 2009 13:43:11 +0000 (15:43 +0200)]
maint.mk: avoid warnings about missing files

* top/maint.mk (PREV_VERSION): Suppress stderr, to hide a
diagnostic when .prev-version does not exist.
(_cfg_mk): Define, so it can be empty when cfg.mk does not exist.
(syntax-check-rules): Use $(_cfg_mk) to avoid a diagnostic about
nonexistent cfg.mk.
Suggestions from Simon Josefsson.

14 years agoAvoid syntax error on QNX.
Bruno Haible [Sat, 25 Jul 2009 09:17:24 +0000 (11:17 +0200)]
Avoid syntax error on QNX.

14 years agoExclude the maintainer-makefile module from big testdir builds.
Bruno Haible [Sat, 25 Jul 2009 09:11:49 +0000 (11:11 +0200)]
Exclude the maintainer-makefile module from big testdir builds.

14 years agomaint.mk: invoke "make dist" with a working value of XZ_OPT
Jim Meyering [Thu, 23 Jul 2009 08:05:10 +0000 (10:05 +0200)]
maint.mk: invoke "make dist" with a working value of XZ_OPT

* top/maint.mk (vc-dist): Use no "-" in the value of XZ_OPT.

14 years agoMake fseeko.c compile on QNX.
Matt Kraai [Thu, 23 Jul 2009 05:25:46 +0000 (07:25 +0200)]
Make fseeko.c compile on QNX.

14 years agoC++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
Peter Simons [Tue, 21 Jul 2009 13:22:24 +0000 (15:22 +0200)]
C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope

* lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
* lib/md4.h: Likewise.
* lib/md5.h: Likewise.
* lib/sha1.h: Likewise.
* lib/sha256.h: Likewise.
* lib/sha512.h: Likewise.

14 years agotests-sha1: don't assign literal string to 'char *' variable
Peter Simons [Tue, 21 Jul 2009 13:23:55 +0000 (15:23 +0200)]
tests-sha1: don't assign literal string to 'char *' variable

* tests/test-sha1.c (main): Declare locals with "const" to match
attributes of the right hand side.

14 years agodup2: fix more mingw problems
Eric Blake [Tue, 21 Jul 2009 15:00:57 +0000 (09:00 -0600)]
dup2: fix more mingw problems

* lib/dup2.c (rpl_dup2) [_WIN32]: Avoid hanging when duplicating
fd to itself.
* doc/posix-functions/dup2.texi (dup2): Document the bug.
* lib/unistd.in.h (dup2) [REPLACE_FCHDIR]: Avoid name collision.
* lib/fchdir.c (dup2): Manage preprocessor macros correctly.
(rpl_dup2_fchdir): Rename from rpl_dup2, and let dup2 module take
care of mingw bugs.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agovc-list-files: avoid failure when /bin/sh is dash
Jim Meyering [Tue, 21 Jul 2009 16:24:22 +0000 (18:24 +0200)]
vc-list-files: avoid failure when /bin/sh is dash

* build-aux/vc-list-files: Avoid a shell portability problem with dash.
On some Debian based systems, /bin/sh is a symlink to dash, and running
this command would omit the "/" following each 'tests' prefix:
  dash -x build-aux/vc-list-files -C . tests
That is because bash and dash work differently:
  $ for i in bash dash; do $i -c 'a=odd; a=ok b=$a; echo '$i' $b'; done
  bash ok
  dash odd

14 years agodup2-tests: test previous patch
Eric Blake [Tue, 21 Jul 2009 12:48:56 +0000 (06:48 -0600)]
dup2-tests: test previous patch

* modules/dup2-tests: New file.
* tests/test-dup2.c: Likewise.
* tests/test-open.c (main): Avoid unspecified behavior.
* tests/test-pipe.c (child_main): Use dup2 semantics to simplify
test.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agodup2: work around mingw and cygwin 1.5 bug
Eric Blake [Tue, 21 Jul 2009 12:48:26 +0000 (06:48 -0600)]
dup2: work around mingw and cygwin 1.5 bug

* m4/dup2.m4 (gl_FUNC_DUP2): Detect mingw bug.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
* modules/unistd (Makefile.am): Substitute it.
* lib/unistd.in.h (dup2): Declare the replacement.
* lib/dup2.c (dup2) [REPLACE_DUP2]: Implement it.
* doc/posix-functions/dup2.texi (dup2): Document the bugs.
* lib/fchdir.c (rpl_dup2): Don't collide with mingw replacement.
* modules/execute (Depends-on): Add dup2.
* modules/fseterr (Depends-on): Likewise.
* modules/pipe (Depends-on): Likewise.
* modules/posix_spawn-internal (Depends-on): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoDon't let "git push" reject trailing blank lines in modules files.
Bruno Haible [Tue, 21 Jul 2009 08:13:16 +0000 (10:13 +0200)]
Don't let "git push" reject trailing blank lines in modules files.

14 years agoTweak for maintainability.
Bruno Haible [Mon, 20 Jul 2009 20:45:39 +0000 (22:45 +0200)]
Tweak for maintainability.

14 years agotest-pipe: make a bit more robust.
Eric Blake [Mon, 20 Jul 2009 12:41:01 +0000 (06:41 -0600)]
test-pipe: make a bit more robust.

* tests/test-pipe.c (myerr): Allow error messages regardless of
what we do to stderr.
(test_pipe): Rearrange to avoid deadlock.
(child_main): Try a larger read, to ensure we avoided deadlock.
* lib/pipe.c (create_pipe) [_WIN32]: Fix comment.
* lib/pipe.h (create_pipe_bidi): Document potential for deadlock
if misused.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agofts: avoid false-positive cycle-detection
Jim Meyering [Sun, 19 Jul 2009 20:33:09 +0000 (22:33 +0200)]
fts: avoid false-positive cycle-detection

* lib/fts.c (fts_read): Reinitialize cycle-detection data structures
for each new command line argument.

14 years agoFix build error on mingw with the modules sys_select and unistd.
Bruno Haible [Sun, 19 Jul 2009 15:16:51 +0000 (17:16 +0200)]
Fix build error on mingw with the modules sys_select and unistd.

14 years agoUnify conditionals.
Bruno Haible [Sun, 19 Jul 2009 11:13:43 +0000 (13:13 +0200)]
Unify conditionals.

14 years agoFix handling of closed stdin/stdout/stderr on mingw.
Bruno Haible [Sun, 19 Jul 2009 10:45:28 +0000 (12:45 +0200)]
Fix handling of closed stdin/stdout/stderr on mingw.

14 years agoRefactor test code.
Bruno Haible [Sun, 19 Jul 2009 09:06:58 +0000 (11:06 +0200)]
Refactor test code.

14 years agoPass slave_process argument consistently.
Bruno Haible [Sun, 19 Jul 2009 08:38:05 +0000 (10:38 +0200)]
Pass slave_process argument consistently.

14 years agotest-pipe: fix mingw build
Eric Blake [Sat, 18 Jul 2009 15:10:05 +0000 (09:10 -0600)]
test-pipe: fix mingw build

* tests/test-pipe.c (main): Avoid fcntl on mingw.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoFix typo.
Bruno Haible [Sat, 18 Jul 2009 15:13:00 +0000 (17:13 +0200)]
Fix typo.

14 years agoerror: fix mingw build
Eric Blake [Sat, 18 Jul 2009 13:58:57 +0000 (07:58 -0600)]
error: fix mingw build

* lib/error.c (error, error_at_line): Avoid fcntl on mingw.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoerror: avoid undefined use of stdout
Eric Blake [Sat, 18 Jul 2009 12:18:21 +0000 (06:18 -0600)]
error: avoid undefined use of stdout

* lib/error.c (error, error_at_line): Check that fd 1 is open
before flushing stdout.  Avoids a crash on cygwin when libsigsegv
is handling faults and the close_stdout module wants to report the
detection of closed stdout as an error.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agopipe: be robust in face of closed fds
Eric Blake [Fri, 17 Jul 2009 18:00:07 +0000 (12:00 -0600)]
pipe: be robust in face of closed fds

* lib/pipe.c (create_pipe): Closed standard descriptors in parent
should cause child to misbehave.
* modules/pipe-tests: New module.
* tests/test-pipe.c: New file.
* tests/test-pipe.sh: New file.
Reported by Akim Demaille.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoGuess that wcwidth works on glibc systems.
Bruno Haible [Tue, 14 Jul 2009 19:33:32 +0000 (21:33 +0200)]
Guess that wcwidth works on glibc systems.

14 years agomaint.mk: don't look for translatable strings in *.m4 or *.mk
Jim Meyering [Tue, 7 Jul 2009 16:35:23 +0000 (18:35 +0200)]
maint.mk: don't look for translatable strings in *.m4 or *.mk

* top/maint.mk (sc_po_check): Skip *.m4 and *.mk files,
when searching for translatable strings.

14 years agoremove superfluous parentheses in STREQ definition
Jim Meyering [Sun, 5 Jul 2009 15:45:56 +0000 (17:45 +0200)]
remove superfluous parentheses in STREQ definition

* tests/test-argv-iter.c (STREQ): Remove redundant parentheses.
* lib/getugroups.c (STREQ): Likewise.
* lib/fnmatch.c (STREQ): Likewise.
Spotted by Bruno Haible.

14 years agoargv-iter: new module
Jim Meyering [Sat, 4 Jul 2009 14:44:19 +0000 (16:44 +0200)]
argv-iter: new module

* MODULES.html.sh: Add argv-iter.
* lib/argv-iter.c, lib/argv-iter.h: New files.
* modules/argv-iter: New file.
* modules/argv-iter-tests: New file.
* tests/test-argv-iter.c: Test it.

14 years agoFix an assertion failure.
Bruno Haible [Sat, 4 Jul 2009 09:25:49 +0000 (11:25 +0200)]
Fix an assertion failure.

14 years agoSpeedup git-merge-changelog for git cherry-pick.
Bruno Haible [Thu, 2 Jul 2009 23:15:25 +0000 (01:15 +0200)]
Speedup git-merge-changelog for git cherry-pick.

14 years agoFix small mistake.
Bruno Haible [Thu, 2 Jul 2009 22:40:49 +0000 (00:40 +0200)]
Fix small mistake.

14 years agoSpeed up approximate search for matching ChangeLog entries.
Bruno Haible [Thu, 2 Jul 2009 21:33:11 +0000 (23:33 +0200)]
Speed up approximate search for matching ChangeLog entries.

14 years agoAdd comment.
Bruno Haible [Thu, 2 Jul 2009 09:31:33 +0000 (11:31 +0200)]
Add comment.

14 years agoReduce the number of uc_is_cased calls.
Bruno Haible [Tue, 30 Jun 2009 23:49:33 +0000 (01:49 +0200)]
Reduce the number of uc_is_cased calls.

14 years agoTests for module 'unicase/ignorable'.
Bruno Haible [Tue, 30 Jun 2009 23:11:25 +0000 (01:11 +0200)]
Tests for module 'unicase/ignorable'.

14 years agoTests for module 'unicase/cased'.
Bruno Haible [Tue, 30 Jun 2009 23:10:07 +0000 (01:10 +0200)]
Tests for module 'unicase/cased'.

14 years agoFix evaluation of "Before C" condition of FINAL_SIGMA.
Bruno Haible [Tue, 30 Jun 2009 23:06:50 +0000 (01:06 +0200)]
Fix evaluation of "Before C" condition of FINAL_SIGMA.

14 years agoRemove unused include.
Bruno Haible [Tue, 30 Jun 2009 23:01:00 +0000 (01:01 +0200)]
Remove unused include.

14 years agoDefine u32_casefold as a wrapper around u32_ct_casefold.
Bruno Haible [Mon, 29 Jun 2009 22:19:21 +0000 (00:19 +0200)]
Define u32_casefold as a wrapper around u32_ct_casefold.

14 years agoDefine u16_casefold as a wrapper around u16_ct_casefold.
Bruno Haible [Mon, 29 Jun 2009 22:18:49 +0000 (00:18 +0200)]
Define u16_casefold as a wrapper around u16_ct_casefold.

14 years agoDefine u8_casefold as a wrapper around u8_ct_casefold.
Bruno Haible [Mon, 29 Jun 2009 22:17:58 +0000 (00:17 +0200)]
Define u8_casefold as a wrapper around u8_ct_casefold.

14 years agoDefine u32_totitle as a wrapper around u32_ct_totitle.
Bruno Haible [Mon, 29 Jun 2009 22:15:28 +0000 (00:15 +0200)]
Define u32_totitle as a wrapper around u32_ct_totitle.

14 years agoDefine u16_totitle as a wrapper around u16_ct_totitle.
Bruno Haible [Mon, 29 Jun 2009 22:14:50 +0000 (00:14 +0200)]
Define u16_totitle as a wrapper around u16_ct_totitle.

14 years agoDefine u8_totitle as a wrapper around u8_ct_totitle.
Bruno Haible [Mon, 29 Jun 2009 22:13:55 +0000 (00:13 +0200)]
Define u8_totitle as a wrapper around u8_ct_totitle.

14 years agoUpdate u32_casemap invocation.
Bruno Haible [Mon, 29 Jun 2009 22:10:06 +0000 (00:10 +0200)]
Update u32_casemap invocation.

14 years agoUpdate u16_casemap invocation.
Bruno Haible [Mon, 29 Jun 2009 22:09:30 +0000 (00:09 +0200)]
Update u16_casemap invocation.

14 years agoUpdate u8_casemap invocation.
Bruno Haible [Mon, 29 Jun 2009 22:08:54 +0000 (00:08 +0200)]
Update u8_casemap invocation.

14 years agoUpdate u32_casemap invocation.
Bruno Haible [Mon, 29 Jun 2009 22:07:56 +0000 (00:07 +0200)]
Update u32_casemap invocation.

14 years agoUpdate u16_casemap invocation.
Bruno Haible [Mon, 29 Jun 2009 22:07:21 +0000 (00:07 +0200)]
Update u16_casemap invocation.

14 years agoUpdate u8_casemap invocation.
Bruno Haible [Mon, 29 Jun 2009 22:06:25 +0000 (00:06 +0200)]
Update u8_casemap invocation.

14 years agoNew module 'unicase/u32-ct-casefold'.
Bruno Haible [Mon, 29 Jun 2009 22:03:45 +0000 (00:03 +0200)]
New module 'unicase/u32-ct-casefold'.

14 years agoNew module 'unicase/u16-ct-casefold'.
Bruno Haible [Mon, 29 Jun 2009 22:03:16 +0000 (00:03 +0200)]
New module 'unicase/u16-ct-casefold'.

14 years agoNew module 'unicase/u8-ct-casefold'.
Bruno Haible [Mon, 29 Jun 2009 22:02:45 +0000 (00:02 +0200)]
New module 'unicase/u8-ct-casefold'.

14 years agoNew module 'unicase/u32-ct-totitle'.
Bruno Haible [Mon, 29 Jun 2009 22:00:18 +0000 (00:00 +0200)]
New module 'unicase/u32-ct-totitle'.

14 years agoNew module 'unicase/u16-ct-totitle'.
Bruno Haible [Mon, 29 Jun 2009 21:59:46 +0000 (23:59 +0200)]
New module 'unicase/u16-ct-totitle'.

14 years agoNew module 'unicase/u8-ct-totitle'.
Bruno Haible [Mon, 29 Jun 2009 21:59:08 +0000 (23:59 +0200)]
New module 'unicase/u8-ct-totitle'.

14 years agoNew module 'unicase/u32-ct-tolower'.
Bruno Haible [Mon, 29 Jun 2009 21:56:21 +0000 (23:56 +0200)]
New module 'unicase/u32-ct-tolower'.

14 years agoNew module 'unicase/u16-ct-tolower'.
Bruno Haible [Mon, 29 Jun 2009 21:55:47 +0000 (23:55 +0200)]
New module 'unicase/u16-ct-tolower'.

14 years agoNew module 'unicase/u8-ct-tolower'.
Bruno Haible [Mon, 29 Jun 2009 21:55:19 +0000 (23:55 +0200)]
New module 'unicase/u8-ct-tolower'.

14 years agoNew module 'unicase/u32-ct-toupper'.
Bruno Haible [Mon, 29 Jun 2009 21:54:13 +0000 (23:54 +0200)]
New module 'unicase/u32-ct-toupper'.

14 years agoNew module 'unicase/u16-ct-toupper'.
Bruno Haible [Mon, 29 Jun 2009 21:53:32 +0000 (23:53 +0200)]
New module 'unicase/u16-ct-toupper'.

14 years agoNew module 'unicase/u8-ct-toupper'.
Bruno Haible [Mon, 29 Jun 2009 21:52:48 +0000 (23:52 +0200)]
New module 'unicase/u8-ct-toupper'.

14 years agoAdd context arguments to u*_casemap functions.
Bruno Haible [Mon, 29 Jun 2009 21:51:02 +0000 (23:51 +0200)]
Add context arguments to u*_casemap functions.

14 years agoNew module 'unicase/u32-suffix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:43:54 +0000 (23:43 +0200)]
New module 'unicase/u32-suffix-context'.

14 years agoNew module 'unicase/u16-suffix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:42:24 +0000 (23:42 +0200)]
New module 'unicase/u16-suffix-context'.

14 years agoNew module 'unicase/u8-suffix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:41:33 +0000 (23:41 +0200)]
New module 'unicase/u8-suffix-context'.

14 years agoNew module 'unicase/empty-suffix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:40:23 +0000 (23:40 +0200)]
New module 'unicase/empty-suffix-context'.

14 years agoNew module 'unicase/u32-prefix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:39:38 +0000 (23:39 +0200)]
New module 'unicase/u32-prefix-context'.

14 years agoNew module 'unicase/u16-prefix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:38:52 +0000 (23:38 +0200)]
New module 'unicase/u16-prefix-context'.

14 years agoNew module 'unicase/u8-prefix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:38:05 +0000 (23:38 +0200)]
New module 'unicase/u8-prefix-context'.

14 years agoNew module 'unicase/empty-prefix-context'.
Bruno Haible [Mon, 29 Jun 2009 21:35:47 +0000 (23:35 +0200)]
New module 'unicase/empty-prefix-context'.

14 years agoNew module 'unicase/ignorable'.
Bruno Haible [Mon, 29 Jun 2009 21:34:18 +0000 (23:34 +0200)]
New module 'unicase/ignorable'.

14 years agoNew module 'unicase/cased'.
Bruno Haible [Mon, 29 Jun 2009 21:31:33 +0000 (23:31 +0200)]
New module 'unicase/cased'.

14 years agoNew functions for case mapping of substrings.
Bruno Haible [Mon, 29 Jun 2009 21:21:51 +0000 (23:21 +0200)]
New functions for case mapping of substrings.

14 years agoboostrap: indent only with spaces
Jim Meyering [Sun, 28 Jun 2009 09:28:22 +0000 (11:28 +0200)]
boostrap: indent only with spaces

* build-aux/bootstrap: Indent only with spaces, never TABs.

14 years agobootstrap: split long lines
Jim Meyering [Sun, 28 Jun 2009 09:25:25 +0000 (11:25 +0200)]
bootstrap: split long lines

* build-aux/bootstrap: Keep line length < 80.

14 years agobootstrap: sync from coreutils
Jim Meyering [Fri, 17 Apr 2009 20:03:48 +0000 (22:03 +0200)]
bootstrap: sync from coreutils

* build-aux/bootstrap: Honor variables like $ACLOCAL, etc.,
just as autoreconf does.  Verify a list of prerequisite
package-name,version-number pairs if defined in bootstrap.conf.
Refer to README-prereq, if prerequisites are not satisfied.

14 years agotests: add test for bogus NULL definition
Eric Blake [Fri, 26 Jun 2009 14:00:28 +0000 (08:00 -0600)]
tests: add test for bogus NULL definition

* tests/test-stdio.c: Ensure POSIX 2008 requirement on NULL.
* tests/test-stdlib.c: Likewise.
* tests/test-string.c: Likewise.
* tests/test-locale.c: Likewise.
* tests/test-unistd.c: Likewise.
* modules/stdio-tests (Depends-on): Add verify.
* modules/stdlib-tests (Depends-on): Likewise.
* modules/string-tests (Depends-on): Likewise.
* modules/locale-tests (Depends-on): Likewise.
* modules/unistd-tests (Depends-on): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoadd warnings to selinux-h module's configure macros
Paolo Bonzini [Sat, 27 Jun 2009 11:00:37 +0000 (13:00 +0200)]
add warnings to selinux-h module's configure macros

2009-06-27  Paolo Bonzini  <bonzini@gnu.org>

* m4/selinux-context-h (gl_HEADERS_SELINUX_CONTEXT_H): Remove
self-explaining comment.
* m4/selinux-selinux-h: Update serial.
 (gl_LIBSELINUX): Warn if SELinux is found but libselinux is absent;
extracted from...
(gl_HEADERS_SELINUX_SELINUX_H): ... this one.  Require gl_LIBSELINUX.
Add warning for missing development packages here, too.

14 years agoFix bootstrap for git 1.6.x
Paolo Bonzini [Sat, 27 Jun 2009 10:54:35 +0000 (12:54 +0200)]
Fix bootstrap for git 1.6.x

2009-06-26  Paolo Bonzini  <bonzini@gnu.org>

* build-aux/bootstrap: Do not use GIT_CONFIG_LOCAL.

14 years agoversion-etc: fix regression
Eric Blake [Thu, 25 Jun 2009 18:13:35 +0000 (12:13 -0600)]
version-etc: fix regression

* lib/version-etc.h (ATTRIBUTE_SENTINEL): Define for new enough
gcc.
(version_etc): Use it, to catch bugs with trailing NULL.
* lib/version-etc.c (version_etc_arn): Delete unused argument.
(version_etc_va): Fix logic bug.
* modules/version-etc-tests: Add test.
* tests/test-version-etc.c: New file.
* tests/test-version-etc.sh: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoMake the tests work with a C++ compiler.
Sam Steingold [Fri, 26 Jun 2009 00:58:34 +0000 (02:58 +0200)]
Make the tests work with a C++ compiler.

14 years agofpurge: migrate into <stdio.h>
Eric Blake [Wed, 24 Jun 2009 12:49:00 +0000 (06:49 -0600)]
fpurge: migrate into <stdio.h>

* lib/fpurge.h: Delete...
* lib/stdio.in.h (fpurge): ...and declare here, instead.
* lib/fpurge.c (fpurge): Change declaring header.
* modules/fpurge (Files): Drop deleted file.
(Depends-on): Add stdio.
(configure.ac): Set witness.
* modules/stdio (Makefile.am): Support fpurge macros.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Set appropriate variables.
* lib/fflush.c: Update client.
* tests/test-fpurge.c: Likewise.
* NEWS: Mention the change.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoFix inconsistencies in the previous commit.
Sergey Poznyakoff [Thu, 25 Jun 2009 11:05:03 +0000 (14:05 +0300)]
Fix inconsistencies in the previous commit.

* lib/argp-version-etc.c (program_authors): Add const
qualifier.
* lib/version-etc.c: Fix typos in the comments.
* modules/argp-version-etc: Depends on version-etc.

14 years agoargp-version-etc: new module.
Sergey Poznyakoff [Thu, 25 Jun 2009 07:42:21 +0000 (10:42 +0300)]
argp-version-etc: new module.

* lib/argp-version-etc.c: New file.
* lib/argp-version-etc.h: New file.
* modules/argp-version-etc: New file.
* modules/argp-version-etc-tests: New file.
* tests/test-argp-version-etc.c: New test.
* tests/test-argp-version-etc-1.sh: New test.

14 years agoProvide additional interfaces and documentation for version-etc module.
Sergey Poznyakoff [Thu, 25 Jun 2009 07:31:56 +0000 (10:31 +0300)]
Provide additional interfaces and documentation for version-etc module.

* lib/version-etc.c (version_etc_arn, version_etc_ar): New
interfaces.
* lib/version-etc.h (version_etc_arn, version_etc_ar): New
prototypes.

14 years agoFix a description string.
Bruno Haible [Wed, 24 Jun 2009 10:18:18 +0000 (12:18 +0200)]
Fix a description string.

14 years agohash-tests: Fix build error.
Simon Josefsson [Tue, 23 Jun 2009 09:29:11 +0000 (11:29 +0200)]
hash-tests: Fix build error.

14 years agoMake two consecutive identical invocations of AC_LIB_HAVE_LINKFLAGS work.
Bruno Haible [Sun, 21 Jun 2009 17:19:33 +0000 (19:19 +0200)]
Make two consecutive identical invocations of AC_LIB_HAVE_LINKFLAGS work.

14 years agotests: maint.mk: make sc_require_test_exit_idiom more generic
Jim Meyering [Fri, 19 Jun 2009 12:25:37 +0000 (14:25 +0200)]
tests: maint.mk: make sc_require_test_exit_idiom more generic

* top/maint.mk (Exit_witness_file): New overridable variable.
(sc_require_test_exit_idiom): Don't hard-code tests/test-lib.sh.
Relax test for /^Exit \$fail$$/ to just /^Exit ./.

14 years agohash: reverse order of src/dst parameters in an internal interface
Jim Meyering [Fri, 19 Jun 2009 16:49:24 +0000 (18:49 +0200)]
hash: reverse order of src/dst parameters in an internal interface

* lib/hash.c (transfer_entries): Reverse order of parameters to
put DST before SRC.  Adjust callers.

14 years agotests: test-hash: avoid wholesale duplication
Jim Meyering [Fri, 19 Jun 2009 16:15:28 +0000 (18:15 +0200)]
tests: test-hash: avoid wholesale duplication

* tests/test-hash.c (main): Don't copy/paste a 60-line loop.
Instead, use a loop and add a single conditional.

14 years agotests: test-hash: allow seed selection via a command line argument
Jim Meyering [Fri, 19 Jun 2009 14:56:48 +0000 (16:56 +0200)]
tests: test-hash: allow seed selection via a command line argument

* tests/test-hash.c (get_seed): New function.
(main): Use it.

14 years agohash: avoid memory leak on allocation failure
Eric Blake [Mon, 8 Jun 2009 11:56:37 +0000 (05:56 -0600)]
hash: avoid memory leak on allocation failure

* lib/hash.c: (hash_rehash): Avoid memory leak on allocation
failure.  Factor repeated algorithm...
(transfer_entries): ...into new helper routine.
(hash_delete): React to hash_rehash return value.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agohash: reduce memory pressure in hash_rehash no-op case
Eric Blake [Fri, 19 Jun 2009 12:35:11 +0000 (06:35 -0600)]
hash: reduce memory pressure in hash_rehash no-op case

* lib/hash.c (next_prime): Avoid overflow.
(hash_initialize): Factor bucket size computation...
(compute_bucket_size): ...into new helper function.
(hash_rehash): Use new function and open coding to reduce memory
pressure, and avoid a memory leak in USE_OBSTACK code.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agohash: make rotation more obvious
Eric Blake [Thu, 18 Jun 2009 19:31:11 +0000 (13:31 -0600)]
hash: make rotation more obvious

* modules/hash (Depends-on): Add bitrotate and stdint.
* lib/bitrotate.h (rotl_sz, rotr_sz): New functions.
* lib/hash.c (headers): Drop limits.h.  Add stdint.h.
(SIZE_MAX): Rely on headers for definition.
(hash_string) [USE_DIFF_HASH]: Use rotl_sz.
(raw_hasher): Use rotr_sz.
Suggested by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agohash: fix memory leak in last patch
Eric Blake [Thu, 18 Jun 2009 21:24:38 +0000 (15:24 -0600)]
hash: fix memory leak in last patch

* lib/hash.c (hash_rehash): Avoid memory leak.

Signed-off-by: Eric Blake <ebb9@byu.net>