2009-08-26 Pádraig Brady
ignore-value: handle pointer types, too
* lib/ignore-value.h (__attribute__): Remove definition.
(ignore_value): Remove use of "__attribute__ ((unused))" in favor
of a more concise and more-often effective "(void) i" statement.
(ignore_ptr): New function to suppress warnings from functions that
return pointers, and to make it explicit that one function doesn't
handle all cases.
2009-08-25 Bruno Haible
dup2: work around a Linux bug.
* m4/dup2.m4 (gl_FUNC_DUP2): Test for the Linux bug.
* lib/dup2.c (rpl_dup2): Correct the return value if it is -EBADF.
* doc/posix-functions/dup2.texi: Mention the Linux bug.
Reported by Simon Josefsson.
2009-08-25 Jim Meyering
libguestfs uses gnulib
* users.txt: Add libguestfs.
2009-08-24 Eric Blake
dup2, pipe2: fix some recent test failures on cygwin 1.5.x
* lib/pipe2.c (includes): Add binary-io.h.
* lib/dup2.c (rpl_dup2): Correct buggy errno value.
2009-08-24 Bruno Haible
Tolerate declared but missing accept4 syscall.
* lib/accept4.c (accept4): Invoke original accept4 function first, if
available.
* lib/sys_socket.in.h (accept4): If the function is already present,
override it.
* m4/accept4.m4 (gl_FUNC_ACCEPT4): Remove AC_LIBOBJ invocation.
* modules/accept4 (Makefile.am): Compile accept4.c always.
Reported by Paolo Bonzini and Eric Blake.
2009-08-23 Bruno Haible
New module 'accept4'.
* lib/sys_socket.in.h (accept4): New declaration.
* lib/accept4.c: New file.
* m4/accept4.m4: New file.
* m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
GNULIB_ACCEPT4, HAVE_ACCEPT4.
* modules/sys_socket (Makefile.am): Substitute GNULIB_ACCEPT4,
HAVE_ACCEPT4.
* modules/accept4: New file.
* doc/glibc-functions/accept4.texi: Mention the new module.
2009-08-24 Jim Meyering
progname: also set global program_invocation_name, when possible
Before this change, a libtool-enabled program that calls glibc's
error function would report the program name as
"/abs/dir/.libs/lt-program_name" rather than the desired program_name.
* modules/progname (configure.ac): Check for a declaration of
program_invocation_name.
* lib/progname.c: Include .
(set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]:
Set program_invocation_name.
2009-08-23 Bruno Haible
* lib/dup3.c: Include .
2009-08-23 Bruno Haible
* lib/dup3.c (dup3): Test only once whether the system actually exists.
* lib/pipe2.c (pipe2): Likewise.
Suggested by Eric Blake.
2009-08-23 Bruno Haible
Tolerate declared but missing dup3 syscall.
* lib/dup3.c (dup3): Invoke original dup3 function first, if available.
* lib/unistd.in.h (dup3): If the function is already present,
override it.
* m4/dup3.m4 (gl_FUNC_DUP3): Remove AC_LIBOBJ invocation.
* modules/dup3 (Makefile.am): Compile dup3.c always.
Reported by Paolo Bonzini.
2009-08-23 Bruno Haible
Tolerate declared but missing pipe2 syscall.
* lib/pipe2.c (pipe2): Invoke original pipe2 function first, if
available.
* lib/unistd.in.h (pipe2): If the function is already present,
override it.
* m4/pipe2.m4 (gl_FUNC_PIPE2): Remove AC_LIBOBJ invocation.
* modules/pipe2 (Makefile.am): Compile pipe2.c always.
Reported by Paolo Bonzini.
2009-08-23 Bruno Haible
* lib/pipe2.c (pipe2): Move #ifs inside function.
2009-08-22 Joel E. Denny
quotearg: document limitations of quote_these_too
* lib/quotearg.c (quotearg_buffer_restyled): Add comments where
those limitations are created.
* lib/quotearg.h (set_char_quoting): Document that digits and
letters that are special after backslash are not permitted.
(quotearg_char): Cross-reference set_char_quoting documentation.
2009-08-23 Joel E. Denny
quotearg: implement custom_quoting_style
* lib/quotearg.c: (struct quoting_options): Add left_quote and
right_quote fields.
(set_custom_quoting): New public function.
(quotearg_buffer_restyled): Add left_quote and right_quote
arguments, handle them very much like locale quoting, and update
all uses.
(quotearg_n_custom): New public function.
(quotearg_n_custom_mem): New public function.
(quotearg_custom): New public function.
(quotearg_custom_mem): New public function.
* lib/quotearg.h: Prototype and document new public functions.
(enum quoting_style): For escape_quoting_style and
clocale_quoting_style, comment that QA_SPLIT_TRIGRAPHS is
ignored even though they're otherwise like c_quoting_style.
Add custom_quoting_style member and document with comparison to
clocale_quoting_style.
* tests/test-quotearg.c (custom_quotes): New array.
(custom_results): New array.
(main): Extend to test custom quoting.
2009-08-22 Joel E. Denny
quotearg: fix right quote escaping when it's in quote_these_too
* lib/quotearg.c (quotearg_buffer_restyled): Upon seeing a right
quote, be sure to prepend only one backslash.
* tests/test-quotearg.c (use_quote_double_quotes): New function.
(main): Test it.
2009-08-22 Joel E. Denny
quotearg-tests: test escaping of embedded locale quotes
* tests/test-quotearg.c (struct result_strings): Add member for
new input.
(LQ_ENC, RQ_ENC, RQ_ESC): New macros.
(inputs): Add new input.
(results_g): Add expected results.
(flag_results): Likewise.
(locale_results): Likewise.
(compare_strings): Check those.
2009-08-23 Bruno Haible
Tests for module 'dup3'.
* modules/dup3-tests: New file.
* tests/test-dup3.c: New file.
New module 'dup3'.
* lib/unistd.in.h (dup3): New declaration.
* lib/dup3.c: New file.
* m4/dup3.m4: New file.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP3 and
HAVE_DUP3.
* modules/unistd (Makefile.am): Substitute GNULIB_DUP3 and HAVE_DUP3.
* modules/dup3: New file.
* doc/glibc-functions/dup3.texi: Mention the new module.
2009-08-23 Bruno Haible
Tweak the dup2 test.
* tests/test-dup2.c (main): Create the test file empty. Verify that an
out-of-range fd yields EBADF. Verify that after writing to /dev/null,
the test file is still empty. Fix argument order of lseek.
2009-08-23 Bruno Haible
Avoid test link errors when the modules getopt-gnu, gettext are used.
* modules/getopt-posix-tests (Makefile.am): Define test_getopt_LDADD.
Reported by Tom G. Christensen .
2009-08-23 Bruno Haible
Fix getdtablesize() on mingw.
* lib/getdtablesize.c (getdtablesize): Implement differently.
* lib/unistd.in.h (getdtablesize): Improve comment.
2009-08-23 Bruno Haible
New module 'mkostemp'.
Based on Ulrich Drepper's 2007-08-10 change in glibc.
* lib/stdlib.in.h (mksotemp): New declaration.
* lib/mkostemp.c: New file, from glibc with modifications.
* lib/tempname.h (GT_FILE): Remove outdated comment.
(gen_tempname): Add flags argument.
* lib/tempname.c (__GT_BIGFILE): Remove macro.
(__GT_FILE): Map to 1.
(small_open, large_open): Remove macros.
(__gen_tempname): Add flags argument. Remove code for __GT_BIGFILE.
* lib/mkstemp.c (mkstemp): Update.
* lib/mkdtemp.c (mkdtemp): Likewise.
* m4/mkostemp.m4: New file.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MKOSTEMP,
HAVE_MKOSTEMP.
* modules/stdlib (Makefile.am): Substitute GNULIB_MKOSTEMP,
HAVE_MKOSTEMP.
* modules/mkostemp: New file, based on modules/mkstemp.
* doc/glibc-functions/mkostemp.texi: Mention the new module.
* NEWS: Mention the change.
2009-08-23 Bruno Haible
* lib/pipe2.c (pipe2): Support O_TEXT, O_BINARY on all platforms.
Reported by Eric Blake.
2009-08-23 Bruno Haible
* lib/pipe2.c (pipe2): Fix test of fcntl's return value.
Reported by Eric Blake.
2009-08-23 Bruno Haible
* modules/fchdir (Depends-on): Use fcntl-h instead of fcntl.
* modules/pipe2 (Depends-on): Likewise.
2009-08-23 Eric Blake
fcntl-h: add O_TTY_INIT support
* lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro.
* tests/test-fcntl-h.c (o): Test it.
* doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
fcntl-h: rename from fcntl, in preparation for fcntl(2)
* modules/fcntl: Move header replacement...
* modules/fcntl-h: ...to new name, so as not to collide with
like-named function.
* tests/test-fcntl.c: Rename...
* tests/test-fcntl-h.c: ...to this. Test FD_CLOEXEC.
* modules/fcntl-tests: Rename...
* modules/fcntl-h-tests: ...to this. Update test file name.
* modules/chdir-long (Depends-on): Update clients.
* modules/chdir-safer (Depends-on): Likewise.
* modules/fcntl-safer (Depends-on): Likewise.
* modules/fts (Depends-on): Likewise.
* modules/mkancesdirs (Depends-on): Likewise.
* modules/mkdir-p (Depends-on): Likewise.
* modules/open (Depends-on): Likewise.
* modules/savewd (Depends-on): Likewise.
* MODULES.html.sh (systems lacking POSIX:2008): Update name.
* doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
2009-08-22 Bruno Haible
* modules/binary-io (License): Relicense under LGPL.
* modules/pipe2 (License): Likewise.
2009-08-22 Bruno Haible
* lib/pipe-filter-ii.c (pipe_filter_ii_execute): Fix test of fcntl's
return value.
* lib/pipe-filter-gi.c (filter_init): Likewise.
Reported by Eric Blake.
2009-08-22 Bruno Haible
* lib/pipe.c (create_pipe): Use pipe2 instead of _pipe.
* modules/pipe (Depends-on): Add pipe2.
2009-08-22 Bruno Haible
Tests for module 'pipe2'.
* modules/pipe2-tests: New file.
* tests/test-pipe2.c: New file.
New module 'pipe2'.
* lib/unistd.in.h (pipe2): New declaration.
* lib/pipe2.c: New file.
* m4/pipe2.m4: New file.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PIPE2 and
HAVE_PIPE2.
* modules/unistd (Makefile.am): Substitute GNULIB_PIPE2 and HAVE_PIPE2.
* modules/pipe2: New file.
* doc/glibc-functions/pipe2.texi: Mention the new module.
2009-08-22 Bruno Haible
Reference some new glibc functions.
* doc/glibc-functions/accept4.texi: New file.
* doc/glibc-functions/dup3.texi: New file.
* doc/glibc-functions/mkostemp.texi: New file.
* doc/glibc-functions/pipe2.texi: New file.
* doc/gnulib.texi (Glibc stdlib.h): Refer to mkostemp.
(Glibc sys/socket.h): Refer to accept4.
(Glibc unistd.h): Refer to dup3, pipe2.
Reported by Eric Blake.
2009-08-22 Jim Meyering
Bruno Haible
annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
This makes it so packages using automake-1.11's silent-rules option
can print e.g., a single "GEN configmake.h" line, rather than
the 30+ statements that perform the job. If you want to see the
actual commands, you can still run "make V=1".
* modules/alloca-opt: Add $(AM_V_GEN) and $(AM_V_at) prefixes
so that make output is abbreviated when those variables are defined
appropriately.
* modules/argz: Likewise.
* modules/arpa_inet: Likewise.
* modules/byteswap: Likewise.
* modules/configmake: Likewise.
* modules/dirent: Likewise.
* modules/errno: Likewise.
* modules/fcntl: Likewise.
* modules/float: Likewise.
* modules/fnmatch: Likewise.
* modules/getopt-posix: Likewise.
* modules/glob: Likewise.
* modules/iconv_open: Likewise.
* modules/inttypes: Likewise.
* modules/localcharset: Likewise.
* modules/locale: Likewise.
* modules/math: Likewise.
* modules/netdb: Likewise.
* modules/netinet_in: Likewise.
* modules/poll: Likewise.
* modules/posix_spawnp-tests: Likewise.
* modules/sched: Likewise.
* modules/search: Likewise.
* modules/selinux-h: Likewise.
* modules/signal: Likewise.
* modules/spawn: Likewise.
* modules/stdarg: Likewise.
* modules/stdbool: Likewise.
* modules/stddef: Likewise.
* modules/stdint: Likewise.
* modules/stdio: Likewise.
* modules/stdlib: Likewise.
* modules/string: Likewise.
* modules/strings: Likewise.
* modules/sys_file: Likewise.
* modules/sys_ioctl: Likewise.
* modules/sys_select: Likewise.
* modules/sys_socket: Likewise.
* modules/sys_stat: Likewise.
* modules/sys_time: Likewise.
* modules/sys_times: Likewise.
* modules/sys_utsname: Likewise.
* modules/sys_wait: Likewise.
* modules/sysexits: Likewise.
* modules/time: Likewise.
* modules/unistd: Likewise.
* modules/wchar: Likewise.
* modules/wctype: Likewise.
2009-08-22 Jim Meyering
announce-gen: detect write failure
* build-aux/announce-gen: Add Coda at end.
Remove equivalent-but-more-verbose block at top.
2009-08-19 Akim Demaille
bootstrap: --help to stdout.
* bootstrap (usage): Don't send --help to stderr.
Use a here doc instead of a long string.
2009-08-21 Eric Blake
test-popen-safer: split from test-popen
* tests/test-popen.c (main): Move...
* tests/test-popen.h: ...into new file.
* tests/test-popen-safer2.c: New file.
* modules/popen-tests (Files): Add test-popen.h.
* modules/popen-safer-tests (Files): Add test-popen-safer2.c.
Suggested by Bruno Haible.
test-fcntl-safer: split from test-open
* tests/test-open.c (main): Move...
* tests/test-open.h: ...into new file.
* tests/test-fcntl-safer.c: New file.
* modules/open-tests (Files): Add test-open.h.
* modules/fcntl-safer-tests: New file.
Suggested by Bruno Haible.
test-fopen-safer: split from test-fopen
* tests/test-fopen.c (main): Move...
* tests/test-fopen.h: ...into new file.
* tests/test-fopen-safer.c: New file.
* modules/fopen-tests (Files): Add test-fopen.h.
* modules/fopen-safer-tests: New file.
Suggested by Bruno Haible.
2009-08-21 Paolo Bonzini
popen-safer: test O_CLOEXEC at run-time.
* lib/popen-safer.c: Test O_CLOEXEC at run-time.
2009-08-21 Paolo Bonzini
fcntl: move more flags to the header
* lib/cloexec.c: Do not define FD_CLOEXEC here.
* lib/popen-safer.c: Do not alias O_NOINHERIT to O_CLOEXEC here.
* lib/fcntl.in.h: Do both things here.
2009-08-21 Jim Meyering
consistently remove $@-t before redirecting to it
* modules/argz: Remove $@-t and $@ before redirecting to the former.
* modules/alloca-opt: Likewise.
* modules/byteswap: Likewise.
* modules/fnmatch: Likewise.
* modules/getopt-posix: Likewise.
* modules/glob: Likewise.
* modules/poll: Likewise.
* modules/posix_spawnp-tests: Likewise.
* modules/sys_socket: Likewise.
* modules/sysexits: Likewise.
2009-08-21 Eric Blake
popen: simplify access to original popen
* lib/popen.c (rpl_popen): No need to worry about popen being a
macro.
Reported by Bruno Haible.
2009-08-20 Eric Blake
build: avoid some compiler warnings
* lib/selinux-at.h: Use dir_fd, not dirfd, to avoid shadowing.
* lib/exclude.c (fnmatch_pattern_has_wildcards): Use correct
type.
(new_exclude_segment, excluded_file_pattern_p)
(excluded_file_name_p): Reduce scope.
* lib/vasnprintf.c (decimal_point_char): Avoid warning on
old-style declaration.
2009-08-20 Simon Josefsson
* tests/test-exclude1.sh: Handle Windows EOL.
* tests/test-exclude2.sh: Likewise.
* tests/test-exclude3.sh: Likewise.
* tests/test-exclude4.sh: Likewise.
* tests/test-exclude5.sh: Likewise.
* tests/test-exclude6.sh: Likewise.
* tests/test-exclude7.sh: Likewise.
2009-08-19 Akim Demaille
bootstrap: find sha1sum when named gsha1sum.
* bootstrap (find_tool): New.
($SHA1SUM): New.
Use it.
2009-08-20 Jim Meyering
maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
* top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
expression that converts "." in a file name to "\." in the resulting
regexp. Start with a dummy statement, so that prior shell variable
definitions are expanded portably. Reported by Simon Josefsson.
2009-08-20 Paolo Bonzini
Fix polling for writeability of a screen buffer.
* lib/poll.c: Distinguish input and screen buffers for the
Win32 implementation.
* lib/select.c: Likewise.
2009-08-19 Eric Blake
popen-safer: prevent popen from clobbering std descriptors
* modules/popen-safer: New file.
* lib/popen-safer.c: Likewise.
* m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro.
* lib/stdio--.h (popen): Provide override.
* lib/stdio-safer.h (popen_safer): Provide declaration.
* tests/test-popen.c (includes): Partially test this.
* modules/popen-safer-tests: New file, for more tests.
* tests/test-popen-safer.c: Likewise.
* MODULES.html.sh (file stream based Input/Output): Mention it.
tests: test some of the *-safer modules
* modules/fopen-safer (Depends-on): Add fopen.
* modules/fcntl-safer (Depends-on): Add fcntl.
* modules/stdlib-safer (Depends-on): Add stdlib.
(configure.ac): Set indicator.
* modules/unistd-safer (configure.ac): Likewise.
* modules/tmpfile-safer (configure.ac): Likewise.
(Depends-on): Add tmpfile.
* lib/stdio--.h (fopen, tmpfile): Don't override unless module is
active.
* tests/test-fopen.c (includes): Test safer versions when they are
in use.
* tests/test-open.c (includes): Likewise.
popen: fix cygwin 1.5 bug when stdin closed
* doc/posix-functions/popen.texi (popen): Document cygwin bugs.
* modules/popen: New file.
* modules/popen-tests: Likewise.
* tests/test-popen.c: Likewise.
* m4/popen.m4: Likewise.
* lib/popen.c: Likewise.
* lib/stdio.in.h (popen): New declaration.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add popen.
* modules/stdio (Makefile.am): Likewise.
* MODULES.html.sh (systems lacking POSIX:2008): Mention it.
2009-08-17 Joel E. Denny
maint.mk: give full control over update-copyright exclusions
* top/maint.mk (VC_LIST_EXCEPT): Instead of ChangeLog, use
${VC_LIST_EXCEPT_DEFAULT-ChangeLog} as the default exclusion.
(update-copyright): Don't force inclusion of top-level
ChangeLog. Don't force exclusion of all COPYING files, but make
them the default exclusion instead.
2009-08-16 Bruno Haible
Fix test failures on Solaris 10.
* tests/uniconv/test-u8-conv-from-enc.c (main): Disable autodetect_jp
tests when Solaris iconv() is used.
* tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
2009-08-16 Bruno Haible
Fix test failures on Solaris 10.
* tests/test-pipe-filter-ii1.sh: Determine the filename of a working
'tr' program and pass it as first argument.
* tests/test-pipe-filter-gi1.sh: Likewise.
* tests/test-pipe-filter-ii1.c (main): Except the filename of a 'tr'
program as first argument.
* tests/test-pipe-filter-gi1.c (main): Likewise.
2009-08-16 Eric Blake
fpurge: fix previous commits
* modules/fpurge (Makefile.am): Make replacement conditional,
partially reverting 2007-04-29 change; missed in previous
attempt.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Also compile fpurge.c when fpurge
is missing.
2009-08-16 Bruno Haible
Clarify fpurge's effect on the file position.
* lib/stdio.in.h (fpurge): Specify the file position after fpurge.
* tests/test-fpurge.c (main): Make a second pass for checking the file
position.
2009-08-16 Bruno Haible
* m4/fpurge.m4 (gl_FUNC_FPURGE): Don't compile fpurge.c if only the
declaration of fpurge is missing.
* tests/test-fpurge.c (main): Check that the file has not more contents
than expected. Close the file before removing it.
2009-08-15 Eric Blake
fpurge: don't wrap working cygwin implementation
* lib/fpurge.c (fpurge): Fix comment typo.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Detect BSD bug, allowing cygwin
1.7 to avoid replacement.
* tests/test-fpurge.c (main): Enhance test.
2009-08-15 Eric Blake
and Jim Meyering
test-update-copyright: skip if perl is insufficient
* tests/test-update-copyright.sh: Failure to run maintainer tool
should not cause testsuite failure on cygwin 1.5.
2009-08-14 Eric Blake
doc: mention more functions added in cygwin 1.7.0
* doc/posix-headers/limits.texi (limits.h): Update for recent
cygwin additions.
* doc/posix-headers/wordexp.texi (wordexp.h): Likewise.
* doc/posix-functions/wordexp.texi (wordexp): Likewise.
* doc/posix-functions/wordfree.texi (wordfree): Likewise.
* doc/posix-functions/setlocale.texi (setlocale): Likewise.
* doc/posix-functions/nl_langinfo.texi (nl_langinfo): Likewise.
2009-08-14 Eric Blake
maint.mk: simplify update-copyright rule
* top/maint.mk (update-copyright-local): Delete, and document how
to do it in cfg.mk instead.
(update-copyright-exclude-regexp): Delete, and document how to do
it in .x-update-copyright instead.
(update-copyright): Simplify, thanks to VC_LIST_EXCEPT. Don't
exclude ChangeLog.
2009-08-14 Bruno Haible
* m4/wchar.m4 (gl_WCHAR_H): Undo invalid optimization in last commit.
2009-08-14 Joel E. Denny
maint.mk: support update-copyright-env
* top/maint.mk (update-copyright-env): Define place-holder.
(update-copyright): Expand $(update-copyright-env) before
invoking update-copyright.
2009-08-14 Joel E. Denny
update-copyright: implement forced reformatting
* build-aux/update-copyright: Implement and document
UPDATE_COPYRIGHT_FORCE.
* tests/test-update-copyright.sh: Test it.
2009-08-14 Eric Blake
and Bruno Haible
stddef: fix NetBSD 5.0 NULL bug, rather than working around it
* tests/test-locale.c: Revert previous patch related to NULL.
* tests/test-stdio.c: Likewise.
* tests/test-stdlib.c: Likewise.
* tests/test-string.c: Likewise.
* tests/test-unistd.c: Likewise.
* modules/time-tests (Depends-on): Add verify.
* modules/wchar-tests (Depends-on): Likewise.
* tests/test-time.c: Test for NULL compliance.
* tests/test-wchar.c: Likewise.
* modules/locale (Depends-on): Add stddef.
* modules/stdio (Depends-on): Likewise.
* modules/stdlib (Depends-on): Likewise.
* modules/string (Depends-on): Likewise.
* modules/time (Depends-on): Likewise.
* modules/unistd (Depends-on): Likewise.
* modules/wchar (Depends-on): Likewise.
* lib/locale.in.h (includes): Use to fix NULL.
* lib/stdlib.in.h (includes): Likewise.
* lib/string.in.h (includes): Likewise.
* lib/time.in.h (includes): Likewise.
* lib/unistd.in.h (includes): Likewise.
* m4/locale_h.m4 (gl_LOCALE_H): Replace locale.h if stddef.h was
replaced.
* m4/wchar.m4 (gl_WCHAR_H): Likewise.
* m4/stddef_h.m4: New file.
* modules/stddef: Likewise.
* lib/stddef.in.h: Likewise.
* modules/stddef-tests: Likewise.
* tests/test-stddef.c: Likewise.
* MODULES.html.sh (Basic types ): Mention new module.
* doc/posix-headers/stddef.texi (stddef.h): Document the bug.
* doc/posix-headers/locale.texi (locale.h): Likewise.
* doc/posix-headers/stdio.texi (stdio.h): Likewise.
* doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
* doc/posix-headers/string.texi (string.h): Likewise.
* doc/posix-headers/time.texi (time.h): Likewise.
* doc/posix-headers/unistd.texi (unistd.h): Likewise.
* doc/posix-headers/wchar.texi (wchar.h): Likewise.
2009-08-14 Eric Blake
doc: improve git diff of texinfo files
* .gitattributes: Add rule for *.texi files, with hint on how to
use it.
Copied from m4, and based on a report by Bruno Haible.
2009-08-14 Bruno Haible
Disable multithread support by default on Cygwin 1.5.x for real.
* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Fix last commit.
2009-08-14 Joel E. Denny
update-copyright: much ado about intervals
* build-aux/update-copyright: Implement and document
UPDATE_COPYRIGHT_USE_INTERVALS to control expansion and collapse
of copyright year intervals.
Also, document UPDATE_COPYRIGHT_YEAR.
* tests/test-update-copyright.sh: Test it.
update-copyright: convert 2-digit to 4-digit years
* build-aux/update-copyright: Implement and document.
* tests/test-update-copyright.sh: Update.
2009-08-14 Jim Meyering
test-exclude: avoid coreutils "make check" failure
* tests/test-exclude.c (ARGMATCH_DIE_DECL) [ARGMATCH_DIE_DECL]: Define,
just as in test-argmatch.c.
2009-08-13 Eric Blake
test-dup2: fix bad assumption
* tests/test-dup2.c (main): Tolerate leaked fds from environment.
Reported by Peter Breitenlohner .
test-version-etc: fix CRLF portability issue
* tests/test-version-etc.sh: Use tr, not sed, as not all sed
recognize \r.
* tests/test-argp-version-etc-1.sh: Likewise.
getopt: update client modules
* modules/argp (Depends-on): Use getopt-gnu.
* modules/git-merge-changelog (Depends-on): Likewise.
* modules/long-options (Depends-on): Likewise.
* modules/xstrtol (Depends-on): Likewise.
2009-08-13 Simon Josefsson
* tests/test-version-etc.sh: Don't fail on different
project/version. Don't fail on CRLF differences. Rewrite to use
multiple -e instead of multiple sed forks, suggested by Eric Blake
.
* tests/test-argp-version-etc-1.sh: Likewise.
2009-08-13 Simon Josefsson
* tests/test-version-etc.sh: Don't fail on different
project/version.
2009-08-12 Bruno Haible
Tests for modules 'getopt-posix', 'getopt-gnu'.
* modules/getopt-posix-tests: New file.
* tests/test-getopt.c: New file.
* tests/test-getopt.h: New file.
* tests/test-getopt_long.h: New file.
New modules 'getopt-posix', 'getopt-gnu'.
* modules/getopt-gnu: New file, renamed from modules/getopt.
* modules/getopt-posix: New file.
* modules/getopt: Turn into an obsolete alias for getopt-gnu.
* m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_FUNC_GETOPT_GNU): New macros.
(gl_GETOPT): Remove macro.
(gl_GETOPT_CHECK_HEADERS): Do some checks only for gl_FUNC_GETOPT_GNU.
Disable the test against BSD systems that declare optreset. Test
against mingw bug. Test against lack of support of optional arguments
on many platforms.
* doc/glibc-headers/getopt.texi: Update module name and list of
relevant platforms.
* doc/posix-functions/getopt.texi: Mention modules 'getopt-posix' and
'getopt-gnu' and more portability problems.
* NEWS: Mention the changes.
2009-08-12 Bruno Haible
Ensure that optarg etc. get declared by .
* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require
AC_USE_SYSTEM_EXTENSIONS.
* modules/getopt (Depends-on): Add 'extensions'.
2009-08-12 Bruno Haible
Avoid test link errors.
* modules/pipe-filter-ii-tests (Makefile.am): Define
test_pipe_filter_ii1_LDADD and test_pipe_filter_ii2_main_LDADD.
* modules/pipe-filter-gi-tests (Makefile.am): Define
test_pipe_filter_gi1_LDADD and test_pipe_filter_gi2_main_LDADD.
Reported by Tom G. Christensen .
2009-08-12 Bruno Haible
* m4/getopt.m4 (gl_REPLACE_GETOPT): New macro, was called
gl_GETOPT_SUBSTITUTE before.
(gl_GETOPT): Use it.
* m4/argp.m4 (gl_ARGP): Update.
Reported by Sergey Poznyakoff.
* m4/getopt.m4: Reorder macros.
(gl_GETOPT): Inline gl_GETOPT_SUBSTITUTE.
(gl_GETOPT_SUBSTITUTE): Remove macro.
2009-08-12 Sergey Poznyakoff
Minor improvement in gitlog-to-changelog
* build-aux/gitlog-to-changelog: New option `--format' makes
output format string configurable.
2009-08-12 Sergey Poznyakoff
Optimize exclude: use hash tables for non-wildcard patterns.
* lib/exclude.c: Include hash.h and mbuiter.h
(struct exclude_pattern, exclude_segment): New data types.
(struct exclude): Rewrite.
(fnmatch_pattern_has_wildcards): New function.
(new_exclude_segment, free_exclude_segment): New functions.
(excluded_file_pattern_p, excluded_file_name_p): New functions.
(excluded_file_name, add_exclude): Rewrite using new struct exclude.
* lib/exclude.h (is_fnmatch_pattern): New prototype.
* modules/exclude: Depend on hash and mbuiter.
* modules/exclude-tests: New file.
* tests/test-exclude.c: New file.
* tests/test-exclude1.sh: New file.
* tests/test-exclude2.sh: New file.
* tests/test-exclude3.sh: New file.
* tests/test-exclude4.sh: New file.
* tests/test-exclude5.sh: New file.
* tests/test-exclude6.sh: New file.
* tests/test-exclude7.sh: New file.
2009-08-12 Bruno Haible
Ensure that getopt() gets declared by .
* lib/unistd.in.h: Conditionally include getopt.h.
* m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Require gl_UNISTD_H_DEFAULTS.
Set GNULIB_UNISTD_H_GETOPT.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
GNULIB_UNISTD_H_GETOPT.
* modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_GETOPT.
2009-08-12 Bruno Haible
Clarify logic.
* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS, gl_GETOPT_IFELSE): Use
gl_replace_getopt instead of GETOPT_H.
2009-08-12 Bruno Haible
* m4/getopt.m4: Add comments.
2009-08-12 Bruno Haible
Disable multithread support by default on Cygwin 1.5.x.
* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): On Cygwin 1.5.x and older,
set gl_use_threads=no if not specified otherwise.
2009-08-11 Bruno Haible
Avoid compilation error on NetBSD 5.0.
* tests/test-locale.c: Write sizeof (NULL) instead of sizeof NULL.
* tests/test-stdio.c: Likewise.
* tests/test-stdlib.c: Likewise.
* tests/test-string.c: Likewise.
* tests/test-unistd.c: Likewise.
Reported by Greg Troxel
at .
2009-08-11 Bruno Haible
* modules/dup2-tests (Depends-on): Remove close.
Undo 2009-07-19 commit.
* modules/acl-tests (Depends-on): Remove close.
* modules/binary-io-tests (Depends-on): Likewise.
* modules/closein-tests (Depends-on): Likewise.
* modules/flock-tests (Depends-on): Likewise.
* modules/fsync-tests (Depends-on): Likewise.
* modules/lseek-tests (Depends-on): Likewise.
* modules/pipe-tests (Depends-on): Likewise.
* modules/posix_spawn-tests (Depends-on): Likewise.
* modules/posix_spawnp-tests (Depends-on): Likewise.
* modules/stat-time-tests (Depends-on): Likewise.
* modules/yesno-tests (Depends-on): Likewise.
2009-08-10 Bruno Haible
* lib/vasnprintf.c (DCHAR_SET): Undefine at the end.
2009-08-10 Bruno Haible
Fix a gcc warning.
* lib/write.c (rpl_write): Cast result of _get_osfhandle.
2009-08-10 Bruno Haible
Don't optimize AC_LIBOBJs, as they may appear in different contexts.
* m4/close.m4 (gl_REPLACE_CLOSE): Execute AC_LIBOBJ unconditionally,
not only the first time.
* m4/fclose.m4 (gl_REPLACE_FCLOSE): Likewise.
* m4/open.m4 (gl_REPLACE_OPEN): Likewise.
* m4/strstr.m4 (gl_FUNC_STRSTR): Execute AC_LIBOBJ when REPLACE_STRSTR
is 1, not only the the first time.
2009-08-10 Bruno Haible
Make it possible to use module 'gethostname' without module 'close'.
* lib/unistd.in.h (close): Evoke a link error only if
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
* modules/unistd (Makefile.am): Substitute
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
* lib/sys_ioctl.in.h (ioctl): Evoke a link error only if
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
* m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
* modules/sys_ioctl (Makefile.am): Substitute
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
* modules/socket (configure.ac): On native Windows, set
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS and
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
Reported by Sam Steingold .
2009-08-10 Bruno Haible
* m4/close.m4 (gl_FUNC_CLOSE): Add comment.
* modules/ioctl (configure.ac): Likewise.
2009-08-10 Bruno Haible
Avoid collision between gnulib wrapper and libintl wrapper.
* lib/stdio-write.c (printf): Don't define if a printf wrapper is
already defined in intl/printf.c.
(vprintf): Test REPLACE_VPRINTF_POSIX, not REPLACE_VFPRINTF_POSIX.
(vfprintf): Test REPLACE_VFPRINTF_POSIX, not REPLACE_VPRINTF_POSIX.
2009-08-09 Bruno Haible
Make really self-contained, also on Solaris 10.
* lib/sys_select.in.h: Include .
* m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Test also against
Solaris 10 problem.
* tests/test-sys_select.c (main): Add check that FD_ZERO can be used.
* doc/posix-headers/sys_select.texi: Mention the Solaris 10 problem.
Reported by Jim Meyering.
2009-08-09 Bruno Haible
Avoid warnings from 'aclocal' that are due to a use of macro name
AM_XGETTEXT_OPTION that is not defined in automake.
* modules/argp (configure.ac): Hide use of AM_XGETTEXT_OPTION from
automake.
* modules/error (configure.ac): Likewise.
* modules/propername (configure.ac): Likewise.
* modules/vasprintf (configure.ac): Likewise.
* modules/verror (configure.ac): Likewise.
* modules/xprintf (configure.ac): Likewise.
* modules/xvasprintf (configure.ac): Likewise.
2009-08-08 Bruno Haible
Avoid compilation error in C++ mode.
* lib/gettimeofday.c (rpl_gettimeofday): Cast timezone argument.
Reported by Sam Steingold .
2009-08-08 Bruno Haible
* m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Define HOST_NAME_MAX also
for the various Unix platforms.
* doc/posix-headers/limits.texi: Update platforms list regarding
HOST_NAME_MAX.
Reported by Tom G. Christensen .
2009-08-07 Jim Meyering
selinux-at: fix typo in a comment
* lib/selinux-at.h: s/getfileconat/getfilecon/ in a comment.
Spotted by Paolo Bonzini.
selinux-at: remove redundant m4 code, add documentation
* modules/selinux-at (configure.ac): Remove redundant code.
LIB_SELINUX is already set via the dependent module, selinux-h.
(Include): Add quotes around selinux-at.h.
* lib/selinux-at.h: Add documentation.
Reported by Bruno Haible in
http://marc.info/?l=gnulib-bug&m=124958988300749
2009-08-07 Bruno Haible
Avoid link error on MacOS X 10.3 and 10.4.
* lib/argp-ba.c (argp_program_bug_address): Explicitly zero-initialize
on non-ELF systems.
* lib/argp-pv.c (argp_program_version): Likewise.
Reported by Simon Josefsson.
2009-08-07 Simon Josefsson
* tests/test-version-etc.sh: Use $EXEEXT.
2009-08-06 Joel E. Denny
update-copyright: update documentation to point to maint.mk
* build-aux/update-copyright: Here.
2009-08-06 Jim Meyering
maint.mk: support update-copyright-local
* top/maint.mk (update-copyright-local): Define place-holder.
(update-copyright): Depend on $(update-copyright-local).
2009-08-06 Jim Meyering
selinux-at: new module
Initially written for coreutils, this module will soon be
used by findutils, too.
* MODULES.html.sh [Misc]: Add selinux-at.
* lib/selinux-at.h: New file, from coreutils.
* lib/selinux-at.c: Likewise.
* modules/selinux-at: Likewise.
(License): Change from LGPL to GPL, since it depends
on the GPL'd openat module.
doc: update README
* README: Remove references to cogito.
Remove cvs-repo-updating instructions from 2007.
Don't imply that CVS is better if you have limited disk space.
2009-08-05 Joel E. Denny
update-copyright: support C-style comments
* build-aux/update-copyright: Implement and document.
* tests/test-update-copyright.sh: Test.
2009-08-05 Joel E. Denny
update-copyright: support omitted "(C)"
* build-aux/update-copyright: Implement and document. Also,
allow variable whitespace before "(C)".
* tests/test-update-copyright.sh: Test.
2009-08-05 Joel E. Denny
update-copyright: don't trip on non-FSF copyright statements
* build-aux/update-copyright: Fix so that the first correctly
formatted FSF copyright statement is recognized no matter what
appears before it. Update documentation.
* tests/test-update-copyright.sh: Test that.
2009-08-05 Joel E. Denny
update-copyright: clean up code a little
* build-aux/update-copyright: Append "_re" to the name of any
variable holding a regular expression.
Replace "old" and "new" with "stmt" in variable names.
Do not accept 2-digit UPDATE_COPYRIGHT_YEAR, which was not
handled correctly.
Format code more consistently.
2009-08-05 Joel E. Denny
update-copyright-tests: improve portability
* tests/test-update-copyright.sh: Use cmp if diff cannot handle
-u or /dev/null. Suggested by Jim Meyering and Eric Blake.
2009-08-03 Joel E. Denny
update-copyright: support @copyright{} and ©
* build-aux/update-copyright: Implement and document.
* tests/test-update-copyright.sh: Test.
2009-08-04 Jim Meyering
update-copyright-tests: correctly test EOL=\r\n handling
* tests/test-update-copyright.sh: Put \r at the end of some lines
for the dos-eol tests. Based on a patch by Joel E. Denny.
maint.mk: make update-copyright exclusion list more configurable
* top/maint.mk (update-copyright): Default to excluding COPYING,
but allow an override, in case someone does want to update that file.
maint.mk: don't update copyright date in COPYING
* top/maint.mk (update-copyright): Exclude COPYING.
maint.mk: add a copyright-updating rule
* top/maint.mk (update-copyright): New rule.
Derived from coreutils/Makefile.am.
update-copyright: rename some variables
* build-aux/update-copyright: Rename a few variables for clarity.
Tweak syntax. List Joel E. Denny as coauthor.
2009-08-03 Joel E. Denny
update-copyright: fix bug for 2-digit last year and add tests
* build-aux/update-copyright: Fix bug.
Use UPDATE_COPYRIGHT_YEAR from environment as current year if
specified.
* modules/update-copyright-tests: New
* tests/test-update-copyright.sh: New.
2009-07-31 Joel E. Denny
update-copyright: handle leading tabs in line prefix
* build-aux/update-copyright: Count leading tabs as 8 spaces
when computing margin. This helps with the formatting of
ChangeLogs, for example.
Fix documentation a little.
2009-07-31 Joel E. Denny
update-copyright: support EOL=\r\n
* build-aux/update-copyright: Implement that.
2009-07-31 Joel E. Denny
update-copyright: automatically format copyright statements
* build-aux/update-copyright: Implement that.
Also, be a little more predictable and safer by always failing
when the full copyright format is not perfectly recognized as an
unbroken whole. Discussed at
.
Rewrite documentation.
2009-08-03 Bruno Haible
* m4/iconv.m4 (AM_ICONV): Fix displayed message with autoconf-2.64.
2009-08-02 Bruno Haible
Tests for module 'uname'.
* modules/uname-tests: New file.
* tests/test-uname.c: New file.
New module 'uname'.
* lib/uname.c: New file.
* m4/uname.m4: New file.
* modules/uname: New file.
* doc/posix-functions/uname.texi: Mention the new module.
2009-08-02 Bruno Haible
Tests for module 'sys_utsname'.
* modules/sys_utsname-tests: New file.
* tests/test-sys_utsname.c: New file.
New module 'sys_utsname'.
* lib/sys_utsname.in.h: New file, based on glibc's .
* m4/sys_utsname_h.m4: New file.
* modules/sys_utsname: New file.
* doc/posix-headers/sys_utsname.texi: Mention the new module.
2009-08-02 Bruno Haible
Implicitly initialize the sockets library.
* lib/gethostname.c: Include sockets.h.
(rpl_gethostname): Invoke gl_sockets_startup.
* lib/socket.c: Include sockets.h.
(rpl_socket): Invoke gl_sockets_startup.
* modules/gethostname (Depends-on): Add sockets.
* modules/socket (Depends-on): Likewise.
* tests/test-poll.c: Don't include sockets.h.
(main): Don't invoke gl_sockets_startup.
* tests/test-select.c: Don't include sockets.h.
(main): Don't invoke gl_sockets_startup.
2009-08-02 Bruno Haible
Allow multiple calls to gl_sockets_startup.
* lib/sockets.c (initialized_sockets_version): New variable.
(gl_sockets_startup): Do nothing if already called for this or a higher
version.
(gl_sockets_cleanup): Reset initialized_sockets_version.
2009-08-03 Simon Josefsson
* tests/test-argp-version-etc-1.sh: Use EXEEXT. Don't fail on
different project/version.
2009-08-02 Paolo Bonzini
Bruno Haible
Tests for module 'pipe-filter-gi'.
* modules/pipe-filter-gi-tests: New file.
* tests/test-pipe-filter-gi1.sh: New file.
* tests/test-pipe-filter-gi1.c: New file.
* tests/test-pipe-filter-gi2.sh: New file.
* tests/test-pipe-filter-gi2-main.c: New file.
* tests/test-pipe-filter-gi2-child.c: New file.
New module 'pipe-filter-gi'.
* lib/pipe-filter-gi.c: New file.
* modules/pipe-filter-gi: New file.
2009-08-02 Bruno Haible
Paolo Bonzini
Tests for module 'pipe-filter-ii'.
* modules/pipe-filter-ii-tests: New file.
* tests/test-pipe-filter-ii1.sh: New file.
* tests/test-pipe-filter-ii1.c: New file.
* tests/test-pipe-filter-ii2.sh: New file.
* tests/test-pipe-filter-ii2-main.c: New file.
* tests/test-pipe-filter-ii2-child.c: New file.
New module 'pipe-filter-ii'.
* lib/pipe-filter.h: New file.
* lib/pipe-filter-ii.c: New file.
* lib/pipe-filter-aux.h: New file.
* modules/pipe-filter-ii: New file.
2009-08-02 Simon Josefsson
* lib/gc-libgcrypt.c: Change copyright to FSF.
* lib/gc-gnulib.c: Likewise.
2009-08-02 Martin Lambers (tiny change)
* lib/gethostname.c: Include limits.h.
2009-08-02 Simon Josefsson
Bruno Haible
Ensure HOST_NAME_MAX as part of the gethostname module.
* m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,
define also HOST_NAME_MAX.
* tests/test-gethostname.c: Include .
(main): Check also HOST_NAME_MAX.
* doc/posix-headers/limits.texi: Document the mingw problem.
2009-08-02 Bruno Haible
* lib/gethostname.c (gethostname): Fix handling of large len argument.
Add comments.
2009-03-31 Simon Josefsson
* lib/gethostname.c: Add Windows wrapper.
* m4/gethostname.m4: Look for gethostname in -lws2_32.
* modules/gethostname: Depend on sys_socket & errno, for also
added lib/w32sock.h. Add GETHOSTNAME_LIB link directive.
* modules/gethostname-tests: Link to @GETHOSTNAME_LIB@.
2009-07-31 Jim Meyering
getloadavg: fix symbol name in comment
* lib/getloadavg.c: Correct a typo I introduced when adding
comments to Matt's change: s/NLIST_POINTER/N_NAME_POINTER/.
Matt Kraai spotted the problem.
2009-07-29 Matt Kraai
getloadavg: check whether n_name is a pointer, for QNX 6.4.1
* lib/getloadavg.c (getloadavg): Use the strcpy-into-nlist.n_name
code also if ! defined N_NAME_POINTER.
* m4/getloadavg.m4 (gl_GETLOADAVG): Add a link-test for N_NAME_POINTER.
This is required on QNX 6.4.1, where /usr/include/nlist.h exists,
but the n_name member is a 12-byte array.
2009-07-29 Joel E. Denny
update-copyright: generalize comment handling
* build-aux/update-copyright: Handle copyright statements
within more comment styles.
Document usage.
Report any file with an external copyright holder or parse failure.
2009-07-29 Jim Meyering
mktime: correct setting of REPLACE_MKTIME
* m4/mktime.m4 (gl_FUNC_MKTIME): Set REPLACE_MKTIME=0, when required.
update-copyright: new module
* modules/update-copyright: New file.
* build-aux/update-copyright: New file.
* MODULES.html.sh (maint+release support): Add update-copyright.
2009-07-27 Bruno Haible
Fix compilation error when is used and mktime is replaced.
* lib/time.in.h (mktime): New declaration.
* m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set
REPLACE_MKTIME instead of defining mktime in config.h.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME.
* modules/time (Makefile.am): Substitute REPLACE_MKTIME.
Reported by Ross McFarland .
2009-07-27 Bruno Haible
* lib/math.in.h (cosl, logl, sinl): Undefine before declaring it.
Reported by Matt Kraai .
2009-07-25 Jim Meyering
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.
2009-07-25 Bruno Haible
* lib/math.in.h (cosl, logl, sinl): Don't declare if they are already
defined as macros. Needed on QNX 6.4.1.
Reported by Matt Kraai .
2009-07-23 Jim Meyering
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.
2009-07-22 Matt Kraai (tiny change)
Make fseeko.c compile on QNX.
* lib/fseeko.c (rpl_fseeko): Use the numerical value of _MWRITE.
2009-07-22 Peter Simons
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.
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.
2009-07-21 Eric Blake
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.
2009-07-21 Jim Meyering
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
2009-07-21 Eric Blake
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.
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.
2009-07-21 Bruno Haible
* modules/.gitattributes: New file.
2009-07-20 Bruno Haible
* tests/test-pipe.c (BACKUP_STDERR_FILENO): New macro.
(main): Use it.
2009-07-20 Eric Blake
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.
2009-07-19 Jim Meyering
fts: avoid false-positive cycle-detection
* lib/fts.c (fts_read): Reinitialize cycle-detection data structures
for each new command line argument.
2009-07-19 Bruno Haible
Fix build error on mingw with the modules sys_select and unistd.
* modules/acl-tests (Depends-on): Add close.
* modules/binary-io-tests (Depends-on): Likewise.
* modules/closein-tests (Depends-on): Likewise.
* modules/flock-tests (Depends-on): Likewise.
* modules/fsync-tests (Depends-on): Likewise.
* modules/lseek-tests (Depends-on): Likewise.
* modules/pipe-tests (Depends-on): Likewise.
* modules/posix_spawn-tests (Depends-on): Likewise.
* modules/posix_spawnp-tests (Depends-on): Likewise.
* modules/stat-time-tests (Depends-on): Likewise.
* modules/yesno-tests (Depends-on): Likewise.
2009-07-19 Bruno Haible
Unify conditionals.
* lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__
macros, not at the compiler macros.
* lib/pipe.c: Likewise.
* lib/execute.c: Likewise.
* lib/spawni.c: Likewise.
2009-07-19 Bruno Haible
Fix handling of closed stdin/stdout/stderr on mingw.
* lib/w32spawn.h: Include unistd.h.
(dup_noinherit): Return -1 if the old handle is invalid. Allocate new
file descriptor with O_NOINHERIT flag.
(fd_safer_noinherit): New function, based on fd-safer.c.
(dup_safer_noinherit): New function, based on dup-safer.c.
(undup_safer_noinherit): New function.
* lib/execute.c (execute) [WIN32]: Use dup_safer_noinherit instead of
dup_noinherit. Use undup_safer_noinherit instead of dup2 and close.
* lib/pipe.c (create_pipe) [WIN32]: Likewise. Use fd_safer_noinherit
instead of fd_safer.
* tests/test-pipe.c: Include .
(child_main) [WIN32]: Test the handle of STDERR_FILENO, not its close() result.
* tests/test-pipe.c (child_main, parent_main): New functions, extracted
from main.
(test_pipe): Pass an extra argument for disambiguation.
(main): Invoke parent_main or child_main.
* tests/test-pipe.c (test_pipe): Pass slave_process = true argument
consistently.
2009-07-18 Eric Blake
test-pipe: fix mingw build
* tests/test-pipe.c (main): Avoid fcntl on mingw.
2009-07-18 Bruno Haible
* modules/pipe-tests (Makefile.am): Fix typo.
2009-07-18 Eric Blake
error: fix mingw build
* lib/error.c (error, error_at_line): Avoid fcntl on mingw.
Reported by Bruno Haible.
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.
2009-07-17 Eric Blake
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.
2009-07-14 Bruno Haible
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Guess it works on glibc systems.
Reported by anonymous kc.
2009-07-07 Jim Meyering
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.
2009-07-05 Jim Meyering
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.
2009-07-04 Jim Meyering
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.
2009-07-04 Bruno Haible
Fix assertion.
* lib/git-merge-changelog.c (compute_mapping): In the case where file1
contains more exact copies of a given entry than file2, leave the extra
copies unpaired rather than aborting.
Reported by Eric Blake.
2009-07-02 Bruno Haible
Speedup git-merge-changelog for git cherry-pick.
* lib/git-merge-changelog.c (struct entries_mapping): New type.
(entries_mapping_get): New function, extracted from compute_mapping.
(entries_mapping_reverse_get): New function.
(compute_mapping): Add a 'full' argument. Return the result in a
'struct entries_mapping'.
(main): Update. Access the mappings through entries_mapping_get.
Reported by Eric Blake.
2009-07-02 Bruno Haible
* lib/git-merge-changelog.c (compute_mapping): Fix determination of
best_i.
2009-07-02 Bruno Haible
Speed up approximate search for matching ChangeLog entries.
* lib/git-merge-changelog.c (entry_fstrcmp): Add a lower_bound
argument. Call fstrcmp_bounded instead of fstrcmp.
(compute_mapping, try_split_merged_entry, main): Update callers.
2009-07-02 Bruno Haible
* lib/git-merge-changelog.c (main): Add comment about git cherry-pick.
2009-06-30 Bruno Haible
Reduce the number of uc_is_cased calls.
* lib/unicase.h (casing_suffix_context_t): Add
'first_char_except_ignorable' field.
* lib/unicase/context.h (SCC_FINAL_SIGMA_MASK): Remove macro.
(SCC_MORE_ABOVE_MASK, SCC_BEFORE_DOT_MASK): Update.
* lib/unicase/empty-suffix-context.c (unicase_empty_suffix_context):
Update initializer.
* lib/unicase/u-casemap.h (FUNC): Don't invoke uc_is_cased on
case-ignorable characters.
* lib/unicase/u-ct-totitle.h (FUNC): Likewise.
* lib/unicase/u-suffix-context.h (FUNC2): Don't call uc_is_cased here.
* modules/unicase/u8-suffix-context (Depends-on): Remove unicase/cased.
* modules/unicase/u16-suffix-context (Depends-on): Likewise.
* modules/unicase/u32-suffix-context (Depends-on): Likewise.
2009-06-30 Bruno Haible
Tests for module 'unicase/ignorable'.
* modules/unicase/ignorable-tests: New file.
* tests/unicase/test-ignorable.c: New file, generated by
gen-uni-tables.
Tests for module 'unicase/cased'.
* modules/unicase/cased-tests: New file.
* tests/unicase/test-cased.c: New file, generated by gen-uni-tables.
* tests/unicase/test-predicate-part1.h: New file, derived from
tests/unictype/test-predicate-part1.h.
* tests/unicase/test-predicate-part2.h: New file, same as
tests/unictype/test-predicate-part2.h.
Fix evaluation of "Before C" condition of FINAL_SIGMA.
* lib/gen-uni-tables.c (is_cased, is_case_ignorable): New functions.
(output_casing_properties): New function.
(main): Call it.
* lib/unicase/cased.h: New file, generated by gen-uni-tables.
* lib/unicase/cased.c: Include unictype/bitmap.h.
(uc_is_cased): Define through a bitmap lookup.
* lib/unicase/ignorable.h: New file, generated by gen-uni-tables.
* lib/unicase/ignorable.c: Include unictype/bitmap.h.
(uc_is_case_ignorable): Define through a bitmap lookup.
* modules/unicase/cased (Files): Add lib/unicase/cased.h,
lib/unictype/bitmap.h.
(Depends-on): Add inline. Clean up.
* modules/unicase/ignorable (Files): Add lib/unicase/ignorable.h,
lib/unictype/bitmap.h.
(Depends-on): Add inline. Clean up.
* tests/unicase/test-u8-tolower.c (main): Add more tests of FINAL_SIGMA
recognition.
* tests/unicase/test-u16-tolower.c (main): Likewise.
* tests/unicase/test-u32-tolower.c (main): Likewise.
2009-06-30 Bruno Haible
* lib/unicase/u8-casemap.c: Don't include uniwbrk.h.
* lib/unicase/u16-casemap.c: Likewise.
* lib/unicase/u32-casemap.c: Likewise.
2009-06-29 Bruno Haible
Define u32_casefold as a wrapper around u32_ct_casefold.
* lib/unicase/u32-casefold.c: Update.
* modules/unicase/u32-casefold (Depends-on): Add
unicase/u32-ct-casefold, unicase/empty-prefix-context,
unicase/empty-suffix-context. Clean up.
Define u16_casefold as a wrapper around u16_ct_casefold.
* lib/unicase/u16-casefold.c: Update.
* modules/unicase/u16-casefold (Depends-on): Add
unicase/u16-ct-casefold, unicase/empty-prefix-context,
unicase/empty-suffix-context. Clean up.
Define u8_casefold as a wrapper around u8_ct_casefold.
* lib/unicase/u-casefold.h (FUNC): Delegate to U_CT_CASEFOLD.
* lib/unicase/u8-casefold.c: Update.
* modules/unicase/u8-casefold (Depends-on): Add unicase/u8-ct-casefold,
unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
Define u32_totitle as a wrapper around u32_ct_totitle.
* lib/unicase/u32-totitle.c: Update.
* modules/unicase/u32-totitle (Depends-on): Add unicase/u32-ct-totitle,
unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
Define u16_totitle as a wrapper around u16_ct_totitle.
* lib/unicase/u16-totitle.c: Update.
* modules/unicase/u16-totitle (Depends-on): Add unicase/u16-ct-totitle,
unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
Define u8_totitle as a wrapper around u8_ct_totitle.
* lib/unicase/u-totitle.h (is_cased, is_case_ignorable): Remove
functions.
(FUNC): Delegate to U_CT_TOTITLE.
* lib/unicase/u8-totitle.c: Update.
* modules/unicase/u8-totitle (Depends-on): Add unicase/u8-ct-totitle,
unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
* lib/unicase/u32-tolower.c (u32_tolower): Update u32_casemap
invocation.
* modules/unicase/u32-tolower (Depends-on): Add
unicase/empty-prefix-context, unicase/empty-suffix-context.
* lib/unicase/u16-tolower.c (u16_tolower): Update u16_casemap
invocation.
* modules/unicase/u16-tolower (Depends-on): Add
unicase/empty-prefix-context, unicase/empty-suffix-context.
* lib/unicase/u8-tolower.c (u8_tolower): Update u8_casemap invocation.
* modules/unicase/u8-tolower (Depends-on): Add
unicase/empty-prefix-context, unicase/empty-suffix-context.
* lib/unicase/u32-toupper.c (u32_toupper): Update u32_casemap
invocation.
* modules/unicase/u32-toupper (Depends-on): Add
unicase/empty-prefix-context, unicase/empty-suffix-context.
* lib/unicase/u16-toupper.c (u16_toupper): Update u16_casemap
invocation.
* modules/unicase/u16-toupper (Depends-on): Add
unicase/empty-prefix-context, unicase/empty-suffix-context.
* lib/unicase/u8-toupper.c (u8_toupper): Update u8_casemap invocation.
* modules/unicase/u8-toupper (Depends-on): Add
unicase/empty-prefix-context, unicase/empty-suffix-context.
New module 'unicase/u32-ct-casefold'.
* lib/unicase/u32-ct-casefold.c: New file.
* modules/unicase/u32-ct-casefold: New file.
New module 'unicase/u16-ct-casefold'.
* lib/unicase/u16-ct-casefold.c: New file.
* modules/unicase/u16-ct-casefold: New file.
New module 'unicase/u8-ct-casefold'.
* lib/unicase/u8-ct-casefold.c: New file.
* lib/unicase/u-ct-casefold.h: New file, derived from
lib/unicase/u-casefold.h.
* modules/unicase/u8-ct-casefold: New file.
New module 'unicase/u32-ct-totitle'.
* lib/unicase/u32-ct-totitle.c: New file.
* modules/unicase/u32-ct-totitle: New file.
New module 'unicase/u16-ct-totitle'.
* lib/unicase/u16-ct-totitle.c: New file.
* modules/unicase/u16-ct-totitle: New file.
New module 'unicase/u8-ct-totitle'.
* lib/unicase/u8-ct-totitle.c: New file.
* lib/unicase/u-ct-totitle.h: New file, derived from
lib/unicase/u-totitle.h.
* modules/unicase/u8-ct-totitle: New file.
New module 'unicase/u32-ct-tolower'.
* lib/unicase/u32-ct-tolower.c: New file.
* modules/unicase/u32-ct-tolower: New file.
New module 'unicase/u16-ct-tolower'.
* lib/unicase/u16-ct-tolower.c: New file.
* modules/unicase/u16-ct-tolower: New file.
New module 'unicase/u8-ct-tolower'.
* lib/unicase/u8-ct-tolower.c: New file.
* modules/unicase/u8-ct-tolower: New file.
New module 'unicase/u32-ct-toupper'.
* lib/unicase/u32-ct-toupper.c: New file.
* modules/unicase/u32-ct-toupper: New file.
New module 'unicase/u16-ct-toupper'.
* lib/unicase/u16-ct-toupper.c: New file.
* modules/unicase/u16-ct-toupper: New file.
New module 'unicase/u8-ct-toupper'.
* lib/unicase/u8-ct-toupper.c: New file.
* modules/unicase/u8-ct-toupper: New file.
Add context arguments to u*_casemap functions.
* lib/unicase/unicasemap.h: Include unicase.h.
(u8_casemap, u16_casemap, u32_casemap): Add prefix_context and
suffix_context arguments.
* lib/unicase/u-casemap.h (is_cased, is_case_ignorable): Remove
functions.
(FUNC): Add prefix_context and suffix_context arguments. Use
uc_is_cased and uc_is_case_ignorable.
* lib/unicase/u8-casemap.c: Include caseprop.h and context.h.
* lib/unicase/u16-casemap.c: Likewise.
* lib/unicase/u32-casemap.c: Likewise.
* modules/unicase/u8-casemap (Files): Add lib/unicase/context.h.
(Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
* modules/unicase/u16-casemap (Files): Add lib/unicase/context.h.
(Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
* modules/unicase/u32-casemap (Files): Add lib/unicase/context.h.
(Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
New module 'unicase/u32-suffix-context'.
* lib/unicase/u32-suffix-context.c: New file.
* modules/unicase/u32-suffix-context: New file.
New module 'unicase/u16-suffix-context'.
* lib/unicase/u16-suffix-context.c: New file.
* modules/unicase/u16-suffix-context: New file.
New module 'unicase/u8-suffix-context'.
* lib/unicase/u8-suffix-context.c: New file.
* lib/unicase/u-suffix-context.h: New file.
* modules/unicase/u8-suffix-context: New file.
New module 'unicase/empty-suffix-context'.
* lib/unicase/empty-suffix-context.c: New file.
* modules/unicase/empty-suffix-context: New file.
New module 'unicase/u32-prefix-context'.
* lib/unicase/u32-prefix-context.c: New file.
* modules/unicase/u32-prefix-context: New file.
New module 'unicase/u16-prefix-context'.
* lib/unicase/u16-prefix-context.c: New file.
* modules/unicase/u16-prefix-context: New file.
New module 'unicase/u8-prefix-context'.
* lib/unicase/u8-prefix-context.c: New file.
* lib/unicase/u-prefix-context.h: New file.
* lib/unicase/context.h: New file.
* modules/unicase/u8-prefix-context: New file.
New module 'unicase/empty-prefix-context'.
* lib/unicase/empty-prefix-context.c: New file.
* modules/unicase/empty-prefix-context: New file.
New module 'unicase/ignorable'.
* lib/unicase/ignorable.c: New file.
* modules/unicase/ignorable: New file.
New module 'unicase/cased'.
* lib/unicase/caseprop.h: New file.
* lib/unicase/cased.c: New file.
* modules/unicase/cased: New file.
New functions for case mapping of substrings.
* lib/unicase.h (casing_prefix_context_t): New type.
(unicase_empty_prefix_context): New variable.
(u8_casing_prefix_context, u16_casing_prefix_context,
u32_casing_prefix_context, u8_casing_prefixes_context,
u16_casing_prefixes_context, u32_casing_prefixes_context): New
declarations.
(casing_suffix_context_t): New type.
(unicase_empty_suffix_context): New variable.
(u8_casing_suffix_context, u16_casing_suffix_context,
u32_casing_suffix_context, u8_casing_suffixes_context,
u16_casing_suffixes_context, u32_casing_suffixes_context,
u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
u32_ct_totitle, u8_ct_casefold, u16_ct_casefold, u32_ct_casefold): New
declarations.
2009-06-28 Jim Meyering
boostrap: indent only with spaces
* build-aux/bootstrap: Indent only with spaces, never TABs.
bootstrap: split long lines
* build-aux/bootstrap: Keep line length < 80.
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.
2009-06-27 Eric Blake
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.
2009-06-27 Paolo Bonzini
* m4/selinux-context-h (gl_HEADERS_SELINUX_CONTEXT_H): Remove
self-explaining comment.
* m4/selinux-selinux-h: Update serial.
(gl_LIBSELINUX): New macro, adding a warning for missing development
packages to code extracted from...
(gl_HEADERS_SELINUX_SELINUX_H): ... this one. Require gl_LIBSELINUX.
Add warning for missing development packages here, too.
2009-06-26 Paolo Bonzini
* build-aux/bootstrap: Do not use GIT_CONFIG_LOCAL.
2009-06-25 Eric Blake
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.
2009-06-25 Sam Steingold
* mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): Include , for the
mbtowc declaration.
2009-06-25 Eric Blake
fpurge: migrate into
* 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.
2009-06-25 Sergey Poznyakoff
* 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.
2009-06-25 Sergey Poznyakoff
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.
2009-06-25 Sergey Poznyakoff
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.
2009-06-24 Bruno Haible
* m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Fix description of
HAVE_LIB${NAME} macro.
Reported by Sam Steingold .
2009-06-23 Simon Josefsson
* modules/hash-tests (test_hash_LDADD): Link to libintl when
needed.
2009-06-21 Bruno Haible
Make two consecutive identical invocations of AC_LIB_HAVE_LINKFLAGS
work.
* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Reset HAVE_LIB${NAME}
together with LIB${NAME}, LTLIB${NAME}.
Reported by Sam Steingold .
2009-06-20 Jim Meyering
tests: 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 ./.
2009-06-19 Jim Meyering
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.
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.
tests: test-hash: allow seed selection via a command line argument
* tests/test-hash.c (get_seed): New function.
(main): Use it.
2009-06-19 Eric Blake
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.
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.
2009-06-18 Eric Blake
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.
hash: fix memory leak in last patch
* lib/hash.c (hash_rehash): Avoid memory leak.
hash: avoid no-op rehashing
* lib/hash.c (hash_rehash): Recognize useless rehash attempts.
hash: provide default callback functions
* lib/hash.c (raw_hasher, raw_comparator): New functions.
(hash_initialize): Use them as defaults.
* tests/test-hash.c (main): Test this.
hash: minor optimization
* lib/hash.c (hash_lookup, hash_find_entry): Avoid function call
when possible.
(hash_initialize): Document this promise.
(hash_do_for_each, hash_clear, hash_free): Use C89 syntax.
* tests/test-hash.c (hash_compare_strings): Test this.
2009-06-18 Bruno Haible
* m4/strstr.m4 (gl_FUNC_STRSTR): Skip linear time test if strstr is
going to be replaced anyway.
2009-06-18 Bruno Haible
* m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Invoke AC_LIBOBJ only
in one place.
(gl_FUNC_STRCASESTR): Skip linear time test if strcasestr is going to
be replaced anyway.
2009-06-18 Eric Blake
hash: check for resize before insertion
* lib/hash.c (hash_insert): Check whether bucket usage exceeds
threshold before insertion, so that a pathological hash_rehash
that fills every bucket can still trigger another rehash.
2009-06-18 Jim Meyering
hash-tests: add a loop around the small tests
* tests/test-hash.c (main): Repeat small tests with selected
small initial table sizes.
2009-06-17 Eric Blake
hash: minor cleanups
* lib/hash.h (hash_entry): Make opaque, by moving...
* lib/hash.c (hash_entry): ...here.
(hash_insert): Clarify restrictions on what can be inserted.
(hash_get_next): Clarify when it is safe to remove an element
during traversal.
(check_tuning): Skip verification when tuning is known safe.
(hash_initialize): Clarify restrictions on tuning.
2009-06-17 Jim Meyering
and Eric Blake
hash-tests: new module
* modules/hash-tests: New file.
* tests/test-hash.c: New file.
2009-06-17 Eric Blake
strstr-simple: document new module
* MODULES.html.sh: Document new module.
strstr, strcasestr: replace on platforms with broken memchr
* modules/strstr: Split into...
* modules/strstr-simple: ...new module that does not care about
performance, but does care about glibc bug.
* m4/strstr.m4 (gl_FUNC_STRSTR): Split...
(gl_FUNC_STRSTR_SIMPLE): ...into new macro, which replaces strstr
if platform memchr is broken, per Debian bug 521737.
* m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): React to broken
memchr.
* m4/memchr.m4 (gl_FUNC_MEMCHR): Only expand once.
* doc/posix-functions/strstr.texi (strstr): Document the fix.
* doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
* modules/mountlist (Depends-on): Add strstr-simple.
* modules/gen-uni-tables (Depends-on): Likewise.
* modules/argz (Depends-on): Add strstr.
2009-06-17 Bruno Haible
* modules/posix_spawn-internal (Depends-on): Add errno.
2009-06-17 Bruno Haible
Define missing ESTALE on Interix 3.5.
* lib/errno.in.h (ESTALE): Assign a value if missing.
* lib/strerror.c (rpl_strerror): Handle missing ESTALE and ECANCELED.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether ESTALE is
missing.
* doc/posix-headers/errno.texi: Mention the Interix bug.
Reported by Jay Krell via Eric Blake.
2009-06-15 Eric Blake
memchr, memchr2: add valgrind exception
* lib/memchr.valgrind: New file.
* lib/memchr2.valgrind: New file.
* modules/memchr (Files): Distribute valgrind file.
* modules/memchr2 (Files): Likewise.
docs: memchr is no longer obsolete
* MODULES.html.sh: Move memchr from obsolete to string.h section.
* lib/string.in.h (memchr): Simplify logic.
2009-06-14 Jim Meyering
link-follow: fix the "checking..." message to not mention trailing slash
* m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): This test has
never considered trailing slashes.
2009-06-14 Bruno Haible
* m4/memchr.m4: Mention also the bug on IA-64.
* doc/posix-functions/memchr.texi: Likewise.
2009-06-12 Eric Blake
memchr: detect broken x86_64 and alpha implementations
* modules/memchr-tests (Depends-on): Move mmap detection...
* modules/memchr (Depends-on): ...here.
(configure.ac): Set indicator.
* lib/string.in.h (memchr): Declare replacement.
* modules/string (Makefile.am): Trigger replacement.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
* m4/memchr.m4 (gl_FUNC_MEMCHR): Use mmap to detect platform
bugs.
* doc/posix-functions/memchr.texi (memchr): Document the bug.
* modules/getpagesize (License): Relax license.
2009-06-11 Bruno Haible
* lib/idpriv.h: Add more references.
2009-06-08 Bruno Haible
Tests for module 'idpriv-droptemp'.
* modules/idpriv-droptemp-tests: New file.
* tests/test-idpriv-droptemp.sh: New file.
* tests/test-idpriv-droptemp.su.sh: New file.
* tests/test-idpriv-droptemp.c: New file.
New module 'idpriv-droptemp'.
* lib/idpriv-droptemp.c: New file.
* modules/idpriv-droptemp: New file.
2009-06-08 Bruno Haible
Tests for module 'idpriv-drop'.
* modules/idpriv-drop-tests: New file.
* tests/test-idpriv-drop.sh: New file.
* tests/test-idpriv-drop.su.sh: New file.
* tests/test-idpriv-drop.c: New file.
New module 'idpriv-drop'.
* lib/idpriv.h: New file.
* lib-idpriv-drop.c: New file.
* m4/idpriv.m4: New file.
* modules/idpriv-drop: New file.
2009-06-08 Bruno Haible
* modules/unistdio/u8-vasnprintf (Depends-on): Add memchr.
* modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
2009-06-08 Eric Blake
test-strstr: use memory fence, when possible
* tests/test-strstr.c (main): Use memory fence, in order to be
more likely to trigger Debian bug 521737.
* modules/strstr-tests (Files): Pull in additional files.
memchr: no longer obsolete, for wider field testing
* modules/memchr (Status, Notice): Delete, this module is no
longer obsolete.
* modules/vasnprintf (Depends-on): Add memchr.
2009-06-07 Jim Meyering
hash: declare some functions with the warn_unused_result attribute
* lib/hash.h (__attribute__, ATTRIBUTE_WUR): Define.
2009-06-07 Bruno Haible
* tests/test-alignof.c: Don't test int64_t if it does not exist.
Reported by Eric Blake.
2009-06-06 Eric Blake
test-alignof: fix typo with long double
* tests/test-alignof.c (CHECK): Use longdouble typedef to avoid
compiler error.
2009-06-06 Neil Jerram (tiny change)
Escape non-texinfo { and }s.
* doc/ld-output-def.texi (Visual Studio Compatibility): Fix
markup error.
2009-06-04 Jim Meyering
gitlog-to-changelog: don't infloop on an empty commit log
* build-aux/gitlog-to-changelog: Warn about an empty log message.
Reported by Boris Petersen .
2009-06-03 Mike Frysinger
version-etc: extend for packagers
Add three new configure options, intended for packagers:
--with-packager="packager name"
--with-packager-version="packager-specific version"
--with-packager-bug-reports="packager bug reporting"
An example with coreutils:
$ ./configure \
--with-packager=Gentoo \
--with-packager-bug-report=http://bugs.gentoo.org/ \
--with-packager-version="patchset 1.6"
$ ./src/ls --version | head -n3
ls (GNU coreutils) 7.1-dirty
Packaged by Gentoo (patchset 1.6)
Copyright (C) 2009 Free Software Foundation, Inc.
Note that the bug reporting info via --help doesn't show up because
coreutils uses its own custom emit_bug_reporting_address() implementation
in src/system.h. If it didn't, it'd look like:
$ ./src/ls --help | tail -n4
Report bugs to .
Report Gentoo bugs to .
GNU coreutils home page: .
General help using GNU software: .
* lib/version-etc.c: Print new information, if provided.
* m4/version-etc.m4: New file.
* modules/version-etc (Files): Add m4/version-etc.m4.
(configure.ac): Add gl_VERSION_ETC.
2009-05-31 Bruno Haible
* tests/test-alignof.c: Include . Check also 'long double'
and 'int64_t'.
* modules/alignof-tests (Dependencies): Add stdint.
Reported by Eric Blake.
2009-05-31 Bruno Haible
* lib/alignof.h (alignof_slot, alignof_type, alignof): Document
restriction due to compiler bugs.
Reported by Eric Blake.
2009-05-31 Simon Josefsson
Bruno Haible
Fix test-alignof failure.
* lib/alignof.h (alignof_slot): New macro.
(alignof_type): New macro, with the same semantics as the previous
'alignof'.
(alignof): Alias to alignof_slot.
* tests/test-alignof.c (CHECK): Check alignof_slot, not alignof. Also
check that the results are usable as constant expressions.
2009-05-31 Bruno Haible
* tests/zerosize-ptr.h (zerosize_ptr): Specify more details.
* tests/test-memchr.c (main): Check that memchr does not read past the
first occurrence of the byte.
* tests/test-strstr.c (main): Update comment.
Suggested by Eric Blake.
2009-05-30 Bruno Haible
* doc/ld-output-def.texi (Visual Studio Compatibility): Explain in more
detail how to use dumpbin.
Reported by David Byron .
2009-06-02 Simon Josefsson
* tests/test-parse-duration.sh: Don't use non-portable 'read -u3'.
2009-06-02 Simon Josefsson
* m4/manywarnings.m4: Add GCC 4.4 warnings.
2009-05-28 Bruno Haible
* gnulib-tool (func_import): Don't do HAVE_CONFIG_H replacements on
build-aux/ files.
2009-05-28 Simon Josefsson
* gnulib-tool (func_import): Transform license on build-aux/ files too.
2009-05-27 Simon Josefsson
* gnulib-tool (sed_transform_main_lib_file)
(sed_transform_testsrelated_lib_file): : Don't use non-POSIX
regexps.
2009-05-26 Simon Josefsson
* tests/test-strstr.c: Add another self-test.
* tests/test-strstr.c: Rewrite to use malloc/strcpy instead of
strdup. Suggested by Eric Blake .
2009-05-23 Bruno Haible
* doc/havelib.texi (AC_LIB_HAVE_LINKFLAGS): Update for 2009-04-26
change.
2009-05-21 Bruno Haible
Simplify use of mode_t varargs.
* lib/open.c (open): Use PROMOTED_MODE_T instead of a conditional that
uses 'mode_t' or 'int'.
* lib/openat.c (openat): Likewise.
* lib/open-safer.c (open_safer): Likewise.
* m4/mode_t.m4: New file.
* m4/open.m4 (gl_PREREQ_OPEN): Require gl_PROMOTED_TYPE_MODE_T.
* m4/openat.m4 (gl_PREREQ_OPENAT): Likewise.
* m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Likewise.
* modules/open (Files): Add m4/mode_t.m4.
* modules/openat (Files): Likewise.
* modules/fcntl-safer (Files): Likewise.
Suggested by Eric Blake.
2009-05-21 Pádraig Brady