changeset 14517:8636d98120a9

merge to current master
author Bruce Korb <bkorb@gnu.org>
date Fri, 01 Apr 2011 08:10:58 -0700
parents f4f244f523bd (current diff) 8b5a7d072ac7 (diff)
children 04ce36b456cc
files .gitignore ChangeLog build-aux/git-version-gen gnulib-tool lib/openat-die.c lib/unictype/combining.c lib/unictype/combining.h lib/xalloc-die.c m4/dos.m4 modules/alloca-opt modules/arg-nonnull modules/argz modules/arpa_inet modules/byteswap modules/c++defs modules/ctype modules/dirent modules/errno modules/fcntl-h modules/float modules/fnmatch modules/getopt-posix modules/glob modules/iconv-h modules/iconv_open modules/inttypes modules/langinfo modules/link-warning modules/locale modules/math modules/netdb modules/netinet_in modules/poll-h modules/pthread modules/pty modules/sched modules/search modules/selinux-h modules/signal modules/spawn modules/stdarg modules/stdbool modules/stddef modules/stdint modules/stdio modules/stdlib modules/string modules/strings modules/sys_file modules/sys_ioctl modules/sys_select modules/sys_socket modules/sys_stat modules/sys_time modules/sys_times modules/sys_utsname modules/sys_wait modules/sysexits modules/termios modules/time modules/unictype/bidicategory-byname-tests modules/unictype/bidicategory-name-tests modules/unictype/bidicategory-of-tests modules/unictype/bidicategory-test-tests modules/unistd modules/unitypes modules/unused-parameter modules/warn-on-use modules/wchar modules/wctype modules/wctype-c++-tests modules/wctype-tests tests/test-wctype-c++.cc tests/test-wctype.c tests/unictype/test-combining.c
diffstat 684 files changed, 22502 insertions(+), 4273 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,2429 @@
+2011-03-31  Eric Blake  <eblake@redhat.com>
+
+	nonblocking: fix mingw test failures
+	* lib/nonblocking.c (set_nonblocking_flag): Succeed when clearing
+	non-blocking flag on regular file.
+	(get_nonblocking_flag): Set errno on invalid fd.
+	* tests/test-nonblocking.c (main): Avoid test failure on
+	directories if fchdir is not active.
+	* modules/nonblocking-tests (Depends-on): Drop unused dependency.
+
+2011-03-31  Bruno Haible  <bruno@clisp.org>
+
+	Fix bug with gl_WARN_ON_USE_PREPARE, introduced on 2011-01-23.
+	* m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): Hide the
+	gl_WARN_ON_USE_PREPARE definition from 'aclocal'.
+	Reported by Simon Josefsson <simon@josefsson.org>.
+
+2011-03-31  Bruno Haible  <bruno@clisp.org>
+	and Eric Blake  <eblake@redhat.com>
+
+	nonblocking: new module
+	* modules/nonblocking: New module.
+	* modules/nonblocking-tests: Likewise.
+	* lib/nonblocking.h: New file.
+	* lib/nonblocking.c: Likewise.
+	* tests/test-nonblocking.c: New test.
+	* lib/ioctl.c (ioctl) [mingw]: Update comment.
+
+2011-03-30  Bruno Haible  <bruno@clisp.org>
+
+	stdio: Avoid GCC >= 4.4 warnings when using %lld and similar on mingw.
+	* lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF): Use 'gnu_printf' format
+	instead of 'printf' format for GCC >= 4.4.
+	(_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): New macro.
+	(fprintf, printf, vfprintf, vprintf): Declare with
+	_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM when the function ends up calling
+	the system's vfprintf() function.
+	Reported by Daniel P. Berrange <berrange@redhat.com> via Eric Blake.
+
+2011-03-30  Eric Blake  <eblake@redhat.com>
+
+	passfd: fix scoping bug
+	* lib/passfd.c (sendfd, recvfd): Don't let buf go out of scope
+	before sendmsg/recvmsg.
+
+	passfd: standardize coding conventions
+	* m4/afunix.m4 (gl_SOCKET_AFUNIX): Drop check for something that
+	can be learned at compile time.
+	* lib/passfd.c (MSG_CMSG_CLOEXEC): Reduce number of in-function
+	ifdefs.
+	(sendfd, recvfd): Follow gnulib code conventions.
+
+	passfd: fix incorrect sendmsg arguments
+	* lib/passfd.c (sendfd): Avoid uninitialized msg_flags field, and
+	incorrect msg_controllen value.
+	* modules/passfd-tests (Depends-on): Check for alarm.
+	* tests/test-passfd.c (main) [HAVE_DECL_ALARM]: Avoid hanging test.
+	Reported by Bastien ROUCARIES.
+
+2011-03-30  Bruno Haible  <bruno@clisp.org>
+
+	c-strcasestr: Relicense under LGPLv2+.
+	* modules/c-strcasestr (License): Change to LGPLv2+.
+	Requested by Eric Blake, for libvirt.
+
+2011-03-30  Simon Josefsson  <simon@josefsson.org>
+
+	* users.txt: Add libidn2.  Fix libtasn1 link.
+
+2011-03-30  Jim Meyering  <meyering@redhat.com>
+
+	tests: readlink* ("",... fails with EINVAL on newer kernels
+	readlink and readlinkat have typically failed with ENOENT for
+	the invalid, empty file name,  "".  However, with the advent
+	of linux-2.6.39, they fail with EINVAL.
+	* tests/test-areadlink.h (test_areadlink): Also accept EINVAL
+	when operating on the empty file name.
+	* tests/test-readlink.h (test_readlink): Likewise.
+
+2011-03-29  Bruno Haible  <bruno@clisp.org>
+
+	Relicense some modules under LGPLv2+, for libidn2.
+	* modules/array-mergesort (License): Change to LGPLv2+.
+	* modules/c-strcaseeq (License): Likewise.
+	* modules/striconveh (License): Likewise.
+	* modules/striconveha (License): Likewise.
+	* modules/uniconv/base (License): Likewise.
+	* modules/uniconv/u8-conv-from-enc (License): Likewise.
+	* modules/uniconv/u8-strconv-from-enc (License): Likewise.
+	* modules/uniconv/u8-strconv-from-locale (License): Likewise.
+	* modules/unictype/base (License): Likewise.
+	* modules/unictype/bidiclass-of (License): Likewise.
+	* modules/unictype/category-M (License): Likewise.
+	* modules/unictype/category-none (License): Likewise.
+	* modules/unictype/category-of (License): Likewise.
+	* modules/unictype/category-test (License): Likewise.
+	* modules/unictype/category-test-withtable (License): Likewise.
+	* modules/unictype/combining-class (License): Likewise.
+	* modules/unictype/joiningtype-of (License): Likewise.
+	* modules/unictype/scripts (License): Likewise.
+	* modules/uninorm/base (License): Likewise.
+	* modules/uninorm/canonical-decomposition (License): Likewise.
+	* modules/uninorm/composition (License): Likewise.
+	* modules/uninorm/decompose-internal (License): Likewise.
+	* modules/uninorm/decomposition-table (License): Likewise.
+	* modules/uninorm/nfc (License): Likewise.
+	* modules/uninorm/nfd (License): Likewise.
+	* modules/uninorm/u32-normalize (License): Likewise.
+	* modules/unistr/base (License): Likewise.
+	* modules/unistr/u32-cpy (License): Likewise.
+	* modules/unistr/u32-mbtouc-unsafe (License): Likewise.
+	* modules/unistr/u32-to-u8 (License): Likewise.
+	* modules/unistr/u32-uctomb (License): Likewise.
+	* modules/unistr/u8-check (License): Likewise.
+	* modules/unistr/u8-mblen (License): Likewise.
+	* modules/unistr/u8-mbtouc (License): Likewise.
+	* modules/unistr/u8-mbtouc-unsafe (License): Likewise.
+	* modules/unistr/u8-mbtoucr (License): Likewise.
+	* modules/unistr/u8-prev (License): Likewise.
+	* modules/unistr/u8-strlen (License): Likewise.
+	* modules/unistr/u8-to-u32 (License): Likewise.
+	* modules/unistr/u8-uctomb (License): Likewise.
+	* modules/unitypes (License): Likewise.
+	Requested by Simon Josefsson.
+
+2011-03-29  Simon Josefsson  <simon@josefsson.org>
+
+	lib-symbol-visibility: Add a notice.
+	* modules/lib-symbol-visibility (Notice): New field.
+
+2011-03-29  Bruno Haible  <bruno@clisp.org>
+
+	getaddrinfo: Doc fix.
+	* doc/posix-functions/getaddrinfo.texi: Mention Windows problem in the
+	section "fixed in Gnulib".
+
+2011-03-28  Simon Josefsson  <simon@josefsson.org>
+
+	* doc/posix-functions/getaddrinfo.texi: Drop netdb.h discussion.
+	Reported by Bastien ROUCARIES <roucaries.bastien@gmail.com>.
+
+2011-03-26  Bruno Haible  <bruno@clisp.org>
+
+	unictype/property-byname: Reduce the number of load-time relocations.
+	* lib/unictype/pr_byname.c: Include <stdlib.h>.
+	(UC_PROPERTY_INDEX_*): New enumeration values.
+	(uc_property_byname): Convert an index from the lookup table to an
+	uc_property_t.
+	* lib/unictype/pr_byname.gperf: Store indices instead of uc_property_t
+	values.
+
+2011-03-26  Bruno Haible  <bruno@clisp.org>
+
+	unictype/property-byname: Allow omitted word separators and aliases.
+	* lib/unictype/pr_byname.gperf: Add property names without word
+	separators. Add aliases from Unicode 6.0 PropertyAliases.txt, except
+	for 'space'.
+
+2011-03-26  Bruno Haible  <bruno@clisp.org>
+
+	unictype/joininggroup-byname: Allow hyphens, omitted word separators.
+	* lib/unictype/joininggroup_byname.c (uc_joining_group_byname): Convert
+	also hyphens to space.
+	* lib/unictype/joininggroup_byname.gperf: Recognize the names also
+	without spaces.
+	* tests/unictype/test-joininggroup_byname.c (main): Add more tests.
+
+2011-03-26  Bruno Haible  <bruno@clisp.org>
+
+	unictype/joiningtype-byname: Recognize long names as well.
+	* lib/unictype.in.h (uc_joiningtype_class_byname): Allow argument to be
+	a long name.
+	* lib/unictype/joiningtype_byname.c: Include <string.h>,
+	unictype/joiningtype_byname.h.
+	(uc_joiningtype_class_byname): Use uc_joining_type_lookup.
+	* lib/unictype/joiningtype_byname.gperf: New file.
+	* modules/unictype/joiningtype-byname (Files): Add
+	lib/unictype/joiningtype_byname.gperf.
+	(Depends-on): Add gperf.
+	(Makefile.am): Add rule for generating unictype/joiningtype_byname.h.
+	* tests/unictype/test-joiningtype_byname.c (main): Test the recognition of
+	long names.
+
+	Tests for module 'unictype/joiningtype-longname'.
+	* modules/unictype/joiningtype-longname-tests: New file.
+	* tests/unictype/test-joiningtype_longname.c: New file.
+
+	New module 'unictype/joiningtype-longname'.
+	* lib/unictype.in.h (uc_joiningtype_class_long_name): New declaration.
+	* lib/unictype/joiningtype_longname.c: New file.
+	* modules/unictype/joiningtype-longname: New file.
+	* modules/unictype/joiningtype-all (Depends-on): Add
+	unictype/joiningtype-longname.
+
+2011-03-26  Bruno Haible  <bruno@clisp.org>
+
+	unictype/bidiclass-byname: Recognize long names as well.
+	* lib/unictype.in.h (uc_bidi_class_byname): Allow argument to be a long
+	name.
+	* lib/unictype/bidi_byname.c: Include <string.h>,
+	unictype/bidi_byname.h.
+	(uc_bidi_class_byname): Use uc_bidi_class_lookup.
+	* lib/unictype/bidi_byname.gperf: New file.
+	* modules/unictype/bidiclass-byname (Files): Add
+	lib/unictype/bidi_byname.gperf.
+	(Depends-on): Add gperf.
+	(Makefile.am): Add rule for generating unictype/bidi_byname.h.
+	* tests/unictype/test-bidi_byname.c (main): Test the recognition of
+	long names.
+
+	Tests for module 'unictype/bidiclass-longname'.
+	* modules/unictype/bidiclass-longname-tests: New file.
+	* tests/unictype/test-bidi_longname.c: New file.
+
+	New module 'unictype/bidiclass-longname'.
+	* lib/unictype.in.h (uc_bidi_class_long_name): New declaration.
+	* lib/unictype/bidi_longname.c: New file.
+	* modules/unictype/bidiclass-longname: New file.
+	* modules/unictype/bidiclass-all (Depends-on): Add
+	unictype/bidiclass-longname.
+
+2011-03-26  Bruno Haible  <bruno@clisp.org>
+
+	unictype/bidi*: Rename modules.
+	* modules/unictype/bidiclass-all: Renamed from
+	modules/unictype/bidicategory-all.
+	* modules/unictype/bidiclass-name: Renamed from
+	modules/unictype/bidiclass-name.
+	(Description): Update.
+	* modules/unictype/bidiclass-name-tests: Renamed from
+	modules/unictype/bidicategory-name-tests.
+	* modules/unictype/bidiclass-byname: Renamed from
+	modules/unictype/bidicategory-byname.
+	(Description): Update.
+	* modules/unictype/bidiclass-byname-tests: Renamed from
+	modules/unictype/bidicategory-byname-tests.
+	* modules/unictype/bidiclass-of: Renamed from
+	modules/unictype/bidicategory-of.
+	(Description): Update.
+	* modules/unictype/bidiclass-of-tests: Renamed from
+	modules/unictype/bidicategory-of-tests.
+	* modules/unictype/bidiclass-test: Renamed from
+	modules/unictype/bidicategory-test.
+	(Description): Update.
+	* modules/unictype/bidiclass-test-tests: Renamed from
+	modules/unictype/bidicategory-test-tests.
+	* modules/unictype/bidicategory-all: New file, a simple redirection.
+	* modules/unictype/bidicategory-name: Likewise.
+	* modules/unictype/bidicategory-byname: Likewise.
+	* modules/unictype/bidicategory-of: Likewise.
+	* modules/unictype/bidicategory-test: Likewise.
+	* modules/unictype/property-bidi-* (Dependencies): Update.
+	* lib/unictype/bidi_*.c: Update comment.
+
+2011-03-26  Bruno Haible  <bruno@clisp.org>
+
+	unictype/bidi*: Rename functions, part 2.
+	* modules/unictype/bidicategory-name (configure.ac): Update required
+	libunistring version.
+	* modules/unictype/bidicategory-byname (configure.ac): Likewise.
+
+2011-03-25  Bruno Haible  <bruno@clisp.org>
+
+	New module 'unictype/combining-class-all'.
+	* modules/unictype/combining-class-all: New file.
+
+	Tests for module 'unictype/combining-class-byname'.
+	* modules/unictype/combining-class-byname-tests: New file.
+	* tests/unictype/test-combiningclass_byname.c: New file.
+
+	New module 'unictype/combining-class-byname'.
+	* lib/unictype.in.h (uc_combining_class_byname): New declaration.
+	* lib/unictype/combiningclass_byname.c: New file.
+	* lib/unictype/combiningclass_byname.gperf: New file.
+	* modules/unictype/combining-class-byname: New file.
+
+	Tests for module 'unictype/combining-class-longname'.
+	* modules/unictype/combining-class-longname-tests: New file.
+	* tests/unictype/test-combiningclass_longname.c: New file.
+
+	New module 'unictype/combining-class-longname'.
+	* lib/unictype.in.h (uc_combining_class_long_name): New declaration.
+	* lib/unictype/combiningclass_longname.c: New file.
+	* modules/unictype/combining-class-longname: New file.
+
+	Tests for module 'unictype/combining-class-name'.
+	* modules/unictype/combining-class-name-tests: New file.
+	* tests/unictype/test-combiningclass_name.c: New file.
+
+	New module 'unictype/combining-class-name'.
+	* lib/unictype.in.h (uc_combining_class_name): New declaration.
+	* lib/unictype/combiningclass_name.c: New file.
+	* modules/unictype/combining-class-name: New file.
+
+2011-03-25  Bruno Haible  <bruno@clisp.org>
+
+	unictype/combining-class: Rename source files.
+	* lib/gen-uni-tables.c (main): Emit unictype/combiningclass.h instead
+	of unictype/combining.h.
+	* lib/unictype/combiningclass.c: Renamed from lib/unictype/combining.c.
+	Update.
+	* lib/unictype/combiningclass.h: Renamed from lib/unictype/combining.h.
+	* modules/unictype/combining-class (Description): Fix.
+	(Files, Makefile.am): Update.
+	* tests/unictype/test-combiningclass.c: Renamed from
+	tests/unictype/test-combining.c.
+	* modules/unictype/combining-class-tests (Files, Makefile.am): Update.
+
+2011-03-25  Bruno Haible  <bruno@clisp.org>
+
+	unictype: Update list of canonical combining classes.
+	* lib/unictype.in.h (UC_CCC_ATA): New enumeration value.
+
+2011-03-25  Bruno Haible  <bruno@clisp.org>
+
+	unictype/category-byname: Recognize long names as well.
+	* lib/unictype.in.h (uc_general_category_byname): Allow argument to be
+	a long name.
+	* lib/unictype/categ_byname.c: Include <stdlib.h>, <string.h>,
+	unictype/categ_byname.h.
+	(UC_CATEGORY_INDEX_*): New enumeration values.
+	(uc_general_category_byname): Use uc_general_category_lookup and
+	convert from index to value.
+	* lib/unictype/categ_byname.gperf: New file.
+	* modules/unictype/category-byname (Files): Add
+	lib/unictype/categ_byname.gperf.
+	(Depends-on): Add gperf.
+	(Makefile.am): Add rule for generating unictype/categ_byname.h.
+	* tests/unictype/test-categ_byname.c (main): Test the recognition of
+	long names.
+
+	Tests for module 'unictype/category-longname'.
+	* modules/unictype/category-longname-tests: New file.
+	* tests/unictype/test-categ_longname.c: New file.
+
+	New module 'unictype/category-longname'.
+	* lib/unictype.in.h (uc_general_category_long_name): New declaration.
+	* lib/unictype/categ_longname.c: New file.
+	* modules/unictype/category-longname: New file.
+	* modules/unictype/category-all (Depends-on): Add it.
+
+2011-03-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'unictype/category-LC'.
+	* modules/unictype/category-LC-tests: New file.
+	* tests/unictype/test-categ_LC.c: New file, automatically generated.
+
+	New module 'unictype/category-LC'.
+	* lib/unictype.in.h (UC_CATEGORY_MASK_LC): New enumeration value.
+	(UC_CATEGORY_LC): New declaration.
+	(UC_CASED_LETTER): New macro.
+	* lib/gen-uni-tables.c (is_category_LC): New function.
+	(output_categories): Also handle category LC.
+	(UC_CATEGORY_MASK_LC): New enumeration value.
+	(general_category_byname): Also handle category LC.
+	* lib/unictype/categ_LC.c: New file.
+	* lib/unictype/categ_LC.h: New file, automatically generated.
+	* lib/unictype/categ_name.c (uc_general_category_name): Also handle
+	category LC.
+	* lib/unictype/categ_byname.c (uc_general_category_byname): Likewise.
+	* modules/unictype/category-LC: New file.
+	* modules/unictype/category-byname (Depends-on): Add
+	unictype/category-LC.
+	* modules/unictype/category-all (Depends-on): Likewise.
+
+2011-03-25  Eric Blake  <eblake@redhat.com>
+
+	xmalloc: revert yesterday's regression
+	* lib/xmalloc.c (xrealloc): Once again forward xrealloc(NULL,0) to
+	realloc's underlying behavior (allowing allocation of zero-size
+	objects, especially if malloc-gnu is also in use).
+
+2011-03-25  Reuben Thomas  <rrt@sc3d.org>
+
+	maint.mk: add missing version to VC-tag
+	* top/maint.mk: git tag was missing actual tag name; add it.
+
+	valgrind: do leak checking, and exit with code 1 on error (not 0)
+	* m4/valgrind-tests.m4: Add `--error-exitcode=1 --leak-check=full'
+	to VALGRIND.
+
+2010-11-30  Reuben Thomas  <rrt@sc3d.org>
+
+	posix-modules: say what it does.
+	* posix-modules: Add a line to the --help output saying what it does.
+
+2011-03-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+	xmalloc: Do not leak if underlying realloc is C99 compatible.
+	* lib/xmalloc.c (xrealloc): If N is zero, call 'free' directly.
+	This avoids a leak on C99-based systems.  See
+	<http://lists.gnu.org/archive/html/bug-gnulib/2011-03/msg00243.html>.
+
+2011-03-24  Eric Blake  <eblake@redhat.com>
+
+	realloc: document portability problem
+	* doc/posix-functions/realloc.texi (realloc): Mention pitfalls of
+	passing 0 size to realloc.
+
+2011-03-23  Ben Walton  <bwalton@artsci.utoronto.ca>
+
+	doc: update users.txt
+	* users.txt: Add cvsps, tmpwatch
+
+2011-03-23  Matt Rice  <ratmice@gmail.com>
+
+	doc: update users.txt
+	* users.txt: Add gdb.
+
+2011-03-23  Jim Meyering  <meyering@redhat.com>
+
+	doc: update users.txt
+	Looking through matches up to the following URL (there are still
+	several more pages), I found several projects that use gnulib:
+	http://codesearch.google.com/codesearch?start=50&q=gnulib-cache\.m4
+	* users.txt: Add nagios plugins (nagiosplug), acct, gengetopt,
+	gmediaserver, gtkreindeer, jugtail, libunistring, mini-httpd, reindeer.
+
+2011-03-22  Bruno Haible  <bruno@clisp.org>
+
+	unictype/bidi*: Rename functions.
+	* lib/unictype.in.h (uc_bidi_class_name, uc_bidi_class_byname,
+	uc_bidi_class, uc_is_bidi_class): New declarations.
+	* lib/unictype/bidi_byname.c (uc_bidi_class_byname): Renamed from
+	uc_bidi_category_byname.
+	(uc_bidi_category_byname): New function.
+	* lib/unictype/bidi_name.c (u_bidi_class_name): Renamed from
+	u_bidi_category_name.
+	(uc_bidi_class_name): Renamed from uc_bidi_category_name.
+	(uc_bidi_category_name): New function.
+	* lib/unictype/bidi_of.c (uc_bidi_class): Renamed from
+	uc_bidi_category.
+	(uc_bidi_category): New function.
+	* lib/unictype/bidi_test.c (uc_is_bidi_class): Renamed from
+	uc_is_bidi_category. Invoke uc_bidi_class.
+	(uc_is_bidi_category): New function.
+	* tests/unictype/test-bidi_byname.c (main): Test uc_bidi_class_byname
+	instead of uc_bidi_category_byname.
+	* tests/unictype/test-bidi_name.c (main): Test uc_bidi_class_name
+	instead of uc_bidi_category_name.
+	* tests/unictype/test-bidi_of.c (main): Test uc_bidi_class instead of
+	uc_bidi_category.
+	* tests/unictype/test-bidi_test.c (main): Test uc_is_bidi_class
+	instead of uc_is_bidi_category.
+
+2011-03-21  Bruno Haible  <bruno@clisp.org>
+
+	New module 'unictype/joininggroup-all'.
+	* modules/unictype/joininggroup-all: New file.
+
+	Tests for module 'unictype/joininggroup-of'.
+	* modules/unictype/joininggroup-of-tests: New file.
+	* tests/unictype/test-joininggroup_of.c: New file.
+	* tests/unictype/test-joininggroup_of.h: New file, automatically
+	generated by gen-uni-tables.
+
+	New module 'unictype/joininggroup-of'.
+	* modules/unictype/joininggroup-of: New file.
+	* lib/unictype/joininggroup_of.c: New file.
+	* lib/unictype/joininggroup_of.h: New file, automatically generated by
+	gen-uni-tables.
+
+	Tests for module 'unictype/joininggroup-byname'.
+	* modules/unictype/joininggroup-byname-tests: New file.
+	* tests/unictype/test-joininggroup_byname.c: New file.
+
+	New module 'unictype/joininggroup-byname'.
+	* modules/unictype/joininggroup-byname: New file.
+	* lib/unictype/joininggroup_byname.c: New file.
+	* lib/unictype/joininggroup_byname.gperf: New file.
+
+	Tests for module 'unictype/joininggroup-name'.
+	* modules/unictype/joininggroup-name-tests: New file.
+	* tests/unictype/test-joininggroup_name.c: New file.
+
+	New module 'unictype/joininggroup-name'.
+	* modules/unictype/joininggroup-name: New file.
+	* lib/unictype/joininggroup_name.c: New file.
+	* lib/unictype/joininggroup_name.h: New file.
+
+	New module 'unictype/joiningtype-all'.
+	* modules/unictype/joiningtype-all: New file.
+
+	Tests for module 'unictype/joiningtype-of'.
+	* modules/unictype/joiningtype-of-tests: New file.
+	* tests/unictype/test-joiningtype_of.c: New file.
+	* tests/unictype/test-joiningtype_of.h: New file, automatically
+	generated by gen-uni-tables.
+
+	New module 'unictype/joiningtype-of'.
+	* modules/unictype/joiningtype-of: New file.
+	* lib/unictype/joiningtype_of.c: New file.
+	* lib/unictype/joiningtype_of.h: New file, automatically generated by
+	gen-uni-tables.
+
+	Tests for module 'unictype/joiningtype-byname'.
+	* modules/unictype/joiningtype-byname-tests: New file.
+	* tests/unictype/test-joiningtype_byname.c: New file.
+
+	New module 'unictype/joiningtype-byname'.
+	* modules/unictype/joiningtype-byname: New file.
+	* lib/unictype/joiningtype_byname.c: New file.
+
+	Tests for module 'unictype/joiningtype-name'.
+	* modules/unictype/joiningtype-name-tests: New file.
+	* tests/unictype/test-joiningtype_name.c: New file.
+
+	New module 'unictype/joiningtype-name'.
+	* modules/unictype/joiningtype-name: New file.
+	* lib/unictype/joiningtype_name.c: New file.
+
+	unictype: Add support for Arabic shaping properties.
+	* lib/unictype.in.h (UC_JOINING_TYPE_*): New enumeration values.
+	(uc_joining_type_name, uc_joining_type_byname, uc_joining_type): New
+	declarations.
+	(UC_JOINING_GROUP_*): New enumeration values.
+	(uc_joining_group_name, uc_joining_group_byname, uc_joining_group): New
+	declarations.
+	* lib/gen-uni-tables.c (UC_JOINING_TYPE_*): New enumeration values.
+	(unicode_joining_type): New variable.
+	(UC_JOINING_GROUP_*): New enumeration values.
+	(unicode_joining_group): New variable.
+	(fill_arabicshaping, joining_type_as_c_identifier,
+	output_joining_type_test, output_joining_type,
+	joining_group_as_c_identifier, output_joining_group_test,
+	output_joining_group): New functions.
+	(main); Add an argument denoting the ArabicShaping.txt file. Invoke
+	fill_arabicshaping and output_joining_type_test, output_joining_type,
+	output_joining_group_test, output_joining_group.
+	Reported by Simon Josefsson.
+
+2011-03-21  Jim Meyering  <meyering@redhat.com>
+
+	strftime: fix a bug in yesterday's change
+	* lib/strftime.c (add): Accommodate width's initial value of -1.
+	Otherwise, nstrftime would copy uninitialized data into
+	the result buffer.
+
+2011-03-21  Jim Meyering  <meyering@redhat.com>
+
+	tests: add strftime-tests module
+	* tests/test-strftime.c: New file.
+	* modules/strftime-tests: New module.
+
+2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	strftime: don't assume a byte count fits in 'int'
+	* lib/strftime.c (add): Don't assume first arg fits in 'int'.  I
+	found this problem by static analysis, using gcc -Wstrict-overflow
+	(GCC 4.5.2, x86-64).  This reported an optimization that depended
+	on an integer overflow having undefined behavior, but it turns out
+	that the argument is a size, which might not fit in 'int' anyway,
+
+2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdio: don't require ignore_value around fwrite
+
+	This patch works around libc bug 11959
+	<http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>.
+	Without this patch, applications must often write
+	ignore_value (fwrite (...)) even though the ignore_value is
+	not helpful here.  It's common to write many objects, using
+	fwrite/printf/etc., and then use ferror to detect output error.
+
+	I considered making this patch optional, but decided against it,
+	because libc is obviously being inconsistent here: there is no
+	reason libc should insist that user code must inspect fwrite
+	return's value without also insisting that it inspect printf's,
+	putchar's, etc.  If user code wants to have a strict style where
+	all these functions' values are checked (so that ferror need not
+	be checked), we could add support for that style in a new gnulib
+	module, but in the meantime it's better to be consistent and to
+	support common usage.
+
+	* lib/stdio.in.h (rpl_fwrite): Define this wrapper around fwrite,
+	to work around libc bug 11959, if __USE_FORTIFY_LEVEL indicates
+	that we are compiling in checking mode, and if not C++, and
+	if not already wrapping fwrite for some other reason.
+	(fwrite): #define to rpl_fwrite if the latter is defined.
+
+2011-03-20  Bruno Haible  <bruno@clisp.org>
+
+	verror: Fix compilation error introduced on 2011-02-13.
+	* lib/verror.h (verror, verror_at_line): Use _GL_ATTRIBUTE_FORMAT macro
+	instead of __attribute__.
+	Reported by Tom G. Christensen <tgc@jupiterrise.com>.
+
+2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
+            Bruno Haible  <bruno@clisp.org>
+
+	socklen: do not depend on sys_socket
+	While trying to modify Emacs to use gnulib's socklen module,
+	I discovered a circular dependency: socklen depends on sys_socket
+	and vice versa.  Emacs can use socklen, but it does not need
+	sys_socket because it has its own substitute for sys/socket.h.
+	* m4/socklen.m4 (gl_SOCKET_HEADERS): New macro, extracted from
+	gl_TYPE_SOCKLEN_T.
+	(gl_CHECK_SOCKET_HEADERS): New macro, taken from parts of
+	gl_PREREQ_SYS_H_SOCKET.
+	(gl_TYPE_SOCKLEN_T): Require it instead of requiring
+	gl_PREREQ_SYS_H_SOCKET.
+	* m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_SOCKET): Require
+	gl_CHECK_SOCKET_HEADERS instead of doing its work ourselves.
+	* modules/socklen (Depends-on): Do not depend on sys_socket.
+	(Include): Adjust to match the code used in gl_SOCKET_HEADERS.
+
+2011-03-20  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: sort file names *after* new transformation
+	* top/maint.mk (sc_po_check): Sorting before removing the $(srcdir)/
+	prefix would have led to an unwarranted failure in GNU parted.
+	Sort after that transformation.
+
+2011-03-19  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: fix po-file syntax-check rule
+	* top/maint.mk (sc_po_check): Fix fatal typo in yesterday's change.
+	Patch by Bruno Haible.
+
+2011-03-19  Bruno Haible  <bruno@clisp.org>
+
+	socklen: Update comment.
+	* m4/socklen.m4: Update comment about platforms.
+
+2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
+            Bruno Haible  <bruno@clisp.org>
+
+	inet_ntop, inet_pton: Simplify.
+	* modules/inet_ntop (Depends-on): Remove socklen, since sys_socket is
+	documented to provide socklen_t and we already depend on sys_socket.
+	* modules/inet_pton (Depends-on): Likewise.
+	* lib/arpa_inet.in.h: Adjust comment.
+
+2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
+            Bruno Haible  <bruno@clisp.org>
+
+	netdb: Simplify.
+	* modules/netdb (Depends-on): Remove socklen, since sys_socket is
+	documented to provide socklen_t and we already depend on sys_socket.
+	* lib/netdb.in.h: Adjust comment.
+
+2011-03-19  Bruno Haible  <bruno@clisp.org>
+
+	sys_socket, netdb: Document problem with socklen_t.
+	* doc/posix-headers/sys_socket.texi: Mention lack of socklen_t on some
+	platforms.
+	* doc/posix-headers/netdb.texi: Likewise.
+
+2011-03-18  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: let po check work in VPATH build
+	* top/maint.mk (po_file): Allow cfg.mk override.
+	(sc_po_check): Allow VPATH use.
+	Reported by Jiri Denemark.
+
+2011-03-16  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: allow fine-grained syntax-check exclusion via Make variables
+	Before, you would have had to create one .x-sc_ file per rule in order
+	to exempt offending files.  Now, you may instead use a Make variable --
+	usually defined in cfg.mk -- whose name identifies the affected rule.
+	* top/maint.mk (_sc_excl): Define.
+	(VC_LIST_EXCEPT): Use it to exclude names on a per-rule basis.
+	(_sc_search_regexp): When not using VC_LIST_EXCEPT, exclude here, too.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	ignore-value tests: Avoid warnings.
+	* tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Define to
+	empty for gcc < 3.4.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	passfd: Fix link error on Solaris.
+	* modules/passfd (Description): Correct.
+	(Depends-on): Add socketlib.
+	(Link): New section.
+	* modules/passfd-tests (Makefile.am): Link test-passfd with LIBSOCKET.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	passfd: Fix link error on AIX 5.2.
+	* m4/afunix.m4 (gl_SOCKET_AFUNIX): Define _LINUX_SOURCE_COMPAT.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4.
+	* lib/sys_socket.in.h: Include <stddef.h>.
+	* m4/afunix.m4 (gl_SOCKET_AFUNIX): Include <stddef.h> before using
+	CMSG_FIRSTHDR. Remove unused variable.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	passfd: Fix compilation error on OpenBSD.
+	* lib/passfd.c: Include <sys/uio.h>.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	passfd test: Fix warnings.
+	* tests/test-passfd.c: Include <sys/wait.h>.
+	(main): Fix typo.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	passfd module, part 4, tweaks.
+	* tests/test-passfd.c: Reorder includes.
+	(main): Fix perror and printf calls.
+
+2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
+
+	passfd module, part 4.
+	* modules/passfd-tests: New file.
+	* tests/test-passfd.c: New file.
+
+2011-03-13  Jim Meyering  <meyering@redhat.com>
+
+	Makefile: rely on GNU make; derive syntax-check rule names
+	Rather than requiring that each sc_ rule be listed as a dependent
+	of "check", use features of GNU make to derive the list.
+	* Makefile (syntax-check-rules): Define.
+	(check): Depend on the new variable, not the hard-coded list.
+
+2011-03-13  Bastien Roucariès  <roucaries.bastien@gmail.com>
+            Bruno Haible  <bruno@clisp.org>
+
+	passfd module, part 3.
+	* lib/passfd.h (recvfd): Add a flags argument.
+	* lib/passfd.c: Include <fcntl.h>, cloexec.h.
+	(recvfd): Add a flags argument.
+	* m4/afunix.m4 (gl_SOCKET_AFUNIX): Test whether MSG_CMSG_CLOEXEC
+	exists.
+	* modules/passfd (Depends-on): Add cloexec.
+	Suggested by Eric Blake.
+
+2011-03-13  Bruno Haible  <bruno@clisp.org>
+
+	passfd module, part 2, tweaks.
+	* modules/passfd (Files): Reorder.
+	(Depends-on): Remove errno.
+	(Include): Remove <sys/socket.h>, <sys/un.h>.
+	* lib/passfd.h: Use a GPLv3+ header. Make C++ safe.
+	* lib/passfd.c: Untabify. Use a GPLv3+ header. Really include the
+	specification header. Include <sys/socket.h> always. Don't include
+	<winsock2.h>. Use "#if HAVE_..." instead of "#ifdef HAVE_...".
+	(sendfd): Clarify that it sets errno when it fails.
+	(recvfd): Fix specification.
+
+2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
+
+	passfd module, part 2.
+	* modules/passfd: New file.
+	* lib/passfd.h: New file.
+	* lib/passfd.c: New file.
+
+2011-03-12  Bruno Haible  <bruno@clisp.org>
+
+	wcswidth, mbswidth: Avoid integer overflow.
+	* lib/wcswidth.c: Include <limits.h>.
+	* lib/wcswidth-impl.h (wcswidth): Avoid 'int' overflow.
+	* lib/mbswidth.c: Include <limits.h>.
+	(mbsnwidth): Avoid 'int' overflow.
+	Reported by Jim Meyering.
+
+2011-03-12  Bruno Haible  <bruno@clisp.org>
+
+	futimens, utimensat: Avoid endless recursion on Solaris 10.
+	* lib/sys_stat.in.h (futimens, utimensat): Define with rpl_ prefix on
+	Solaris.
+	Reported by Ben Walton <bwalton@artsci.utoronto.ca> via Eric Blake
+	in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8230>.
+
+2011-03-11  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: relax a regexp to accommodate other formatting styles
+	* top/maint.mk (sc_unmarked_diagnostics): Allow 0 or 1 space
+	between "ngettext" and the following "(".
+
+2011-03-11  Pádraig Brady <P@draigBrady.com>
+
+	maint.mk: suppress a false positive warning
+	* top/maint.mk ((sc_unmarked_diagnostics): Don't warn when
+	diagnostics are marked with ngettext.
+
+2011-03-10  Eric Blake  <eblake@redhat.com>
+
+	wchar: add explicit dependencies, for Tru64
+	* modules/mbmemcasecoll (Depends-on): Add wchar.
+	* modules/mbtowc (Depends-on): Likewise.
+	* modules/vasnprintf (Depends-on): Likewise.
+	* modules/unistdio/u-printf-args (Depends-on): Likewise.
+	* modules/wctomb (Depends-on): Likewise.
+	Reported by Peter O'Gorman.
+
+2011-03-08  Bruno Haible  <bruno@clisp.org>
+
+	passfd module, part 1, tweaks.
+	* m4/afunix.m4 (gl_SOCKET_AFUNIX): Update AC_REQUIRE invocation.
+	Improve indentation. Improve AC_MSG_CHECKING messages.
+	* m4/sockpfaf.m4 (gl_SOCKET_FAMILY_UNIX): New macro, extracted from
+	gl_SOCKET_FAMILIES.
+
+2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
+
+	passfd module, part 1.
+	* m4/afunix.m4: New file.
+	* m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Also test for UNIX domain
+	sockets.
+
+2011-03-08  Bruno Haible  <bruno@clisp.org>
+
+	regex-quote: New API.
+	* lib/regex-quote.h: Include <stdbool.h>.
+	(struct regex_quote_spec): New type.
+	(regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
+	New declarations.
+	(regex_quote_length, regex_quote_copy, regex_quote): Take a
+	'const struct regex_quote_spec *' argument.
+	* lib/regex-quote.c (RE_*, PCRE_*): New macros.
+	(pcre_special): New constant.
+	(regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
+	New functions.
+	(regex_quote_length, regex_quote_copy, regex_quote): Take a
+	'const struct regex_quote_spec *' argument.
+	* modules/regex-quote (Depends-on): Add stdbool.
+	* tests/test-regex-quote.c (check): Update for new API. Add test for
+	anchored results.
+	* NEWS: Mention the API change.
+	Reported by Reuben Thomas and Eric Blake.
+
+2011-03-06  Bruno Haible  <bruno@clisp.org>
+
+	regex-quote: Fix creation of POSIX extended regular expressions.
+	* lib/regex-quote.c (ere_special): Add grouping and alternation
+	operators.
+
+2011-03-05  Bruno Haible  <bruno@clisp.org>
+
+	doc: Improve doc regarding autopoint vs. gnulib.
+	* doc/gnulib-tool.texi (gettextize and autopoint): Recommend to
+	disable autopoint while running autoreconf.
+	Suggested by Ralf Wildenhues.
+
+2011-03-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Update AC_OPENMP macro for Lahey compiler on GNU/Linux.
+	* m4/openmp.m4 (AC_OPENMP): Sync from Autoconf.
+
+2011-03-03  Bruce Korb  <bkorb@gnu.org>
+
+	parse-duration: remove xalloc.h dependency
+	* lib/parse-duration.c (parse_period): handle NULL return from
+	strdup instead of calling xstrdup().
+	* modules/parse-duration: remove "xalloc" dependency
+
+2011-03-03  Matthew Booth  <mbooth@redhat.com>
+
+	bootstrap: honor m4_base when running aclocal
+	* build-aux/bootstrap: Fix hard-coded use of m4 directory name.
+
+2011-03-02  Jim Meyering  <meyering@redhat.com>
+
+	getopt-gnu: relax license from LGPLv3+ to LGPLv2+
+	* modules/getopt-gnu (License): Relax to LGPLv2+, for augeas,
+	on request from Matt Booth.
+
+2011-03-01  Eric Blake  <eblake@redhat.com>
+
+	test-link: work on Hurd
+	* tests/test-link.h (test_link): Hurd rejects linking directories
+	with EISDIR instead of the POSIX-mandated EPERM.
+
+2011-02-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdio: simplify by moving files to printf-posix, sigpipe
+	* m4/stdio_h.m4 (gl_STDIO_H): Do not require gl_ASM_SYMBOL_PREFIX,
+	since this symbol is needed only if printf is replaced.
+	* m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF):
+	Require gl_ASM_SYMBOL_PREFIX.
+	* modules/printf-posix (Files): Add m4/asm-underscore.m4.
+	* modules/sigpipe (Files): Likewise.  Also, add m4/stdio-write.c.
+	(Depends-on): Add 'raise'.
+	(configure.ac): Require gl_ASM_SYMBOL_PREFIX.
+	* modules/stdio (Files): Remove lib/stdio-write.c,
+	m4/asm-underscore.m4.
+	(Depends-on): Remove 'raise'.
+
+	stdio: simplify by moving gl_STDIN_LARGE_OFFSET to fseeko, ftello
+	* m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ...
+	* m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because
+	* modules/ftello (Files): Add m4/fseeko.m4, for gl_STDIN_LARGE_OFFSET.
+
+2011-02-28  Bruno Haible  <bruno@clisp.org>
+
+	localcharset: Assume ANSI C behaviour of free().
+	* lib/localcharset.c (get_charset_aliases): Remove NULL test before
+	calling free().
+	Suggested by Simon Josefsson <simon@josefsson.org>.
+
+2011-02-28  Corinna Vinschen  <vinschen@redhat.com>  (tiny change)
+            Charles Wilson  <cygwin@cwilson.fastmail.fm>  (tiny change)
+            Bruno Haible  <bruno@clisp.org>  (tiny change)
+
+	On Cygwin, use /proc file system instead of win32 API.
+	* lib/relocatable.c: On Cygwin, use file names from /proc, rather than
+	Win32 file names.
+	(DllMain): Simplify by removing Cygwin specific code.
+	(find_shared_library_fullname): Use Linux specific implementation also
+	for Cygwin.
+	(get_shared_library_fullname): Update accordingly.
+	* lib/progreloc.c: On Cygwin, use file names from /proc, rather than
+	Win32 file names.
+	(find_executable): On Cygwin, use /proc, like on Linux. Remove previous
+	Cygwin specific code.
+
+2011-02-28  Christian Rössel  <christian.roessel@gmx.de>  (tiny change)
+	    Markus Geimer  <m.geimer@fz-juelich.de>  (tiny change)
+
+	Fix OpenMP flag detection for various Fortran compilers.
+	* m4/openmp.m4 (_AC_LANG_OPENMP(Fortran 77)): Use '!$'
+	OpenMP-conditional compilation construct, to force compile
+	failure with missing OpenMP flag.
+	(AC_OPENMP): Add flags for Cray CCE and NEC SX compilers.
+
+2011-02-25  Eric Blake  <eblake@redhat.com>
+
+	strstr: expand test coverage
+	* tests/test-strstr.c (main): Add much shorter trigger.  Fix C89
+	compilation.
+	* tests/test-memmem.c (main): Duplicate tests.
+	* tests/test-strcasestr.c (main): Likewise.
+	* tests/test-c-strcasestr.c (main): Likewise.
+
+2011-02-25  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: detect missing-NL-at-EOF, too
+	* top/maint.mk (sc_prohibit_empty_lines_at_EOF): Adjust so that
+	it also detects when a file lacks a newline at EOF.
+	(require_exactly_one_NL_at_EOF_): Renamed from
+	detect_empty_lines_at_EOF_.  I opted not to rename the rule,
+	since people may well have .x-sc_... file names tied to the
+	existing name.  Suggested by Eric Blake.
+
+2011-02-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+	dirname: move m4/dos.m4 functionality into lib/dosname.h
+
+	m4/dos.m4 needs to go.  It laboriously invokes the C compiler, and
+	extracts symbols from it, puts them into config.h; but it's much
+	easier to use the symbols directly.  filename.h already does this,
+	but it disagrees with dos.m4 in some respects.  This patch
+	introduces a different include file dosname.h that packages up
+	dos.m4, and then later we can work on merging filename.h and
+	dosname.h.  Applications that need only the easy-to-configure
+	symbols should consider including dosname.h rather than dirname.h.
+	* NEWS: Mention incompatible changes.
+	* m4/dos.m4: Remove.
+	* lib/dosname.h, modules/dosname: New files.
+	* lib/dirname.h (ISSLASH, FILE_SYSTEM_PREFIX_LEN):
+	(FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE):
+	(IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Move to lib/dosname.h.
+	* lib/at-func.c, lib/at-func2.c, lib/openat.c, lib/savewd.c:
+	Include dosname.h, not dirname.h.
+	* lib/rmdir.c, lib/stat.c, lib/unlink.c, lib/unlinkat.c:
+	Include dosname.h, for definitions of symbols like ISSLASH
+	that used to be in config.h.
+	* m4/dirname.m4 (gl_DIRNAME_LGPL): Do not require gl_AC_DOS.
+	* m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
+	* m4/stat.m4 (gl_FUNC_STAT): Likewise.
+	* m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
+	* modules/dirname-lgpl (Files): Omit m4/dos.m4.
+	* modules/rmdir (Files): Likewise.
+	* modules/stat (Files): Likewise.
+	* modules/unlink (Files): Likewise.
+	* modules/dirname-lgpl (Depends-on): Add dosname.
+	* modules/lstat (Depends-on): Likewise.
+	* modules/openat (Depends-on): Likewise.
+	* modules/rmdir (Depends-on): Likewise.
+	* modules/savewd (Depends-on): Likewise.
+	* modules/stat (Depends-on): Likewise.
+	* modules/unlink (Depends-on): Likewise.
+	* modules/openat (Depends-on): Remove dirname-lgpl.
+	* modules/savewd (Depends-on): Likewise.
+	* tests/test-dirname.c: Do not use removed symbols like
+	FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.  Instead, use
+	the remaining symbols, e.g., ISSLASH ('\\').
+
+2011-02-25  Eric Blake  <eblake@redhat.com>
+
+	strstr: revert patches that introduced bug and pessimization
+	* lib/str-two-way.h: Add another reference.
+	(two_way_short_needle, two_way_long_needle): Revert changes from
+	2011-02-24; they pessimize search speed.
+	(critical_factorization): Partially revert changes from
+	2010-06-22; they violate the requirement that the left half of the
+	needle be smaller than the period of the needle.
+
+2011-02-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+	filenamecat: remove unnecessary dependency on dirname-lgpl
+	* modules/filenamecat (Depends-on): Remove dirname-lgpl, as there
+	is no direct dependency, just an indirect one via filenamecat-lgpl.
+
+	remove: remove unnecessary use of m4/dos.m4
+	* m4/remove.m4 (gl_FUNC_REMOVE): Don't require gl_AC_DOS; not needed.
+	* modules/remove (FILES): Remove m4/dos.m4.
+
+	* lib/openat-proc.c: Don't include dirname.h; not needed.
+
+	backupfile: remove unnecessary use of m4/dos.m4
+	* m4/backupfile.m4 (gl_BACKUPFILE): Don't require gl_AC_DOS; none
+	of its symbols are used by the backupfile code.  backupfile.c does
+	use a symbol HAVE_DOS_FILE_NAMES, but that symbol is meant only
+	for the rare case of programs that want all their backup file
+	names to live within 8+3 limits, and dos.m4 doesn't address that.
+	* modules/backupfile (Files): Remove m4/dos.m4.
+
+2011-02-24  Jim Meyering  <meyering@redhat.com>
+
+	strstr: fix a bug whereby strstr would mistakenly return NULL
+	* lib/str-two-way.h (two_way_short_needle): Correct off-by-one error
+	in period calculation.
+	(two_way_long_needle): Likewise.
+	The original problem was reported by Mike Stump in
+	http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/7834
+	Ralf Wildenhues provided the short needle and haystack.
+	* tests/test-strstr.c: Add Ralf's test case to trigger the bug.
+	Add a more involved test to trigger the bug in two_way_long_needle.
+
+2011-02-24  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
+
+	gnulib-tool: remove use of bold display in help screen
+	* gnulib-tool (func_usage): Do not use bold display anymore in the
+	help screen.  That was just meant to be a temporary emphasis for a
+	backward-incompatible change.
+
+2011-02-23  Bruno Haible  <bruno@clisp.org>
+
+	Fix misindentation of preprocessor directives.
+	* lib/argp-namefrob.h: Reindent preprocessor directives.
+	* lib/getopt_int.h (struct _getopt_data): Likewise.
+	* lib/progreloc.c (maybe_executable, find_executable): Likewise.
+	* lib/vasnprintf.c (decode_long_double): Likewise.
+	* tests/test-argmatch.c: Insert blank lines, for clarity.
+	* tests/test-exclude.c: Likewise.
+
+2011-02-22  Bruno Haible  <bruno@clisp.org>
+
+	ioctl: Fix for MacOS X in 64-bit mode.
+	* lib/ioctl.c (rpl_ioctl): Zero-extend, not sign-extend, the request
+	value.
+	Suggested by Eric Blake.
+	Reported by Markus Gothe <nietzsche@lysator.liu.se>.
+
+2011-02-22  Jim Meyering  <meyering@redhat.com>
+
+	maint: sc_cpp_indent_check: remove the "only in lib/" restriction
+	* Makefile (sc_cpp_indent_check): Don't limit the check to files
+	in lib/.
+
+2011-02-22  Eric Blake  <eblake@redhat.com>
+
+	maint: avoid any CDPATH issue
+	* Makefile (sc_cpp_indent_check): Anchor cd argument.
+
+	maint: adjust cpp indentation for my modules, as well
+	* Makefile (sc_cpp_indent_check): Add my name.
+	* lib/fbufmode.c: Filter through cppi.
+	* lib/fpurge.c: Likewise.
+	* lib/freadable.c: Likewise.
+	* lib/freading.c: Likewise.
+	* lib/fwritable.c: Likewise.
+	* lib/fwriting.c: Likewise.
+	* lib/sigaction.c: Likewise.
+
+2011-02-22  Jim Meyering  <meyering@redhat.com>
+
+	maint: adjust cpp indentation to reflect nesting depth
+	I.e., in a block of code that begins with an unnested "#if",
+	put one space between the "#" in column 1 and following token.
+	For example,
+	-#include <sys/vfs.h>
+	+# include <sys/vfs.h>
+	Do this only in .c files that are part of a module I maintain.
+	* lib/linkat.c: Filter through cppi.
+	* lib/nanosleep.c: Likewise.
+	* lib/openat.c: Likewise.
+	* lib/openat-die.c: Likewise.
+	* lib/dup3.c: Likewise.
+	* lib/fchownat.c: Likewise.
+	* lib/flock.c: Likewise.
+	* lib/fsync.c: Likewise.
+	* lib/fts.c: Likewise.
+	* lib/getpass.c: Likewise.
+	* lib/gettimeofday.c: Likewise.
+	* lib/userspec.c: Likewise.
+	* Makefile (sc_cpp_indent_check): New rule, to check this.
+
+2011-02-22  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wctomb'.
+	* lib/stdlib.in.h (wctomb): New declaration.
+	* lib/wctomb.c: New file.
+	* lib/wctomb-impl.h: New file.
+	* m4/wctomb.m4: New file.
+	* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_WCTOMB,
+	REPLACE_WCTOMB.
+	* modules/stdlib (Makefile.am): Substitute GNULIB_WCTOMB,
+	REPLACE_WCTOMB.
+	* modules/wctomb: New file.
+	* tests/test-stdlib-c++.cc: Test signature of wctomb.
+	* doc/posix-functions/wctomb.texi: Mention the new module.
+	* modules/wctob (Depends-on): Add wctomb.
+
+2011-02-22  Bruno Haible  <bruno@clisp.org>
+
+	New module 'mbtowc'.
+	* lib/stdlib.in.h (mbtowc): New declaration.
+	* lib/mbtowc.c: New file.
+	* lib/mbtowc-impl.h: New file, from libutf8 with modifications.
+	* m4/mbtowc.m4: New file.
+	* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MBTOWC,
+	REPLACE_MBTOWC.
+	* modules/stdlib (Makefile.am): Substitute GNULIB_MBTOWC,
+	REPLACE_MBTOWC.
+	* modules/mbtowc: New file.
+	* tests/test-stdlib-c++.cc: Test signature of mbtowc.
+	* doc/posix-functions/mbtowc.texi: Mention the new module.
+	* modules/btowc (Depends-on): Add mbtowc.
+
+2011-02-22  Bruno Haible  <bruno@clisp.org>
+
+	wcrtomb: Add more tests for native Windows platforms.
+	* tests/test-wcrtomb-w32-1.sh: New file.
+	* tests/test-wcrtomb-w32-2.sh: New file.
+	* tests/test-wcrtomb-w32-3.sh: New file.
+	* tests/test-wcrtomb-w32-4.sh: New file.
+	* tests/test-wcrtomb-w32-5.sh: New file.
+	* tests/test-wcrtomb-w32.c: New file.
+	* modules/wcrtomb-tests (Files): Add them.
+	(Makefile.am): Arrange to run these tests.
+	* tests/test-wcrtomb-w32-6.sh: New file, currently unused.
+	* tests/test-wcrtomb-w32-7.sh: New file, currently unused.
+
+2011-02-20  Bruno Haible  <bruno@clisp.org>
+
+	wcrtomb: Enhance test.
+	* tests/test-wcrtomb.c (main): Add test against bug with NULL argument.
+
+2011-02-20  Bruno Haible  <bruno@clisp.org>
+
+	mbrtowc: Tiny optimization.
+	* lib/mbrtowc.c (mbrtowc): Delay pstate assignment until it is needed.
+
+2011-02-20  Jim Meyering  <meyering@redhat.com>
+
+	test-exclude.c: remove unmatched #endif
+	* tests/test-exclude.c: Remove stray #endif, left over from
+	the change of a week ago.
+
+2011-02-19  Jim Meyering  <meyering@redhat.com>
+
+	git-version-gen: skip "-dirty" check when appropriate
+	* build-aux/git-version-gen: Don't run any git commands when the
+	version string comes from .tarball-version.  Prior to this, we
+	would run git update-index --refresh even from a just-unpacked
+	tarball directory, and that could affect a .git/ directory in a
+	parent of the build directory.  Reported by Mike Frysinger.
+
+2011-02-19  Bruno Haible  <bruno@clisp.org>
+
+	unictype/property-byname: Reduce the size of the 'data' segment.
+	* lib/unictype/pr_byname.gperf: Add gperf option '%pic'.
+
+2011-02-19  Bruno Haible  <bruno@clisp.org>
+
+	unictype/scripts: Reduce the size of the 'data' segment.
+	* lib/gen-uni-tables.c (output_scripts_byname): Emit gperf option
+	'%pic'.
+	* lib/unictype/scripts_byname.gperf: Regenerated.
+
+2011-02-19  Bruno Haible  <bruno@clisp.org>
+
+	stdint: Update documentation.
+	* doc/posix-headers/stdint.texi: Mention WCHAR_MIN, WCHAR_MAX problem.
+
+2011-02-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdint: omit redundant check for wchar.h
+	* m4/stdint.m4 (gl_STDINT_H): The earlier part of this macro now
+	always tests whether wchar.h exists, so remove the now-redundant test.
+
+2011-02-18  Bruno Haible  <bruno@clisp.org>
+
+	stdint: Cut dependency to module 'wchar'.
+	* lib/stdint.in.h: Include wchar.h only when HAVE_WCHAR_H is 1. Also
+	include the necessary prerequisites.
+	* m4/stdint.m4 (gl_STDINT_H): Test whether wchar.h exists.
+	* modules/stdint (Depends-on): Remove wchar.
+	(Makefile.am): Substitute HAVE_WCHAR_H.
+	This reverts part of a 2007-01-06 commit. Reported by Paul Eggert.
+
+2011-02-18  Eric Blake  <eblake@redhat.com>
+
+	longlong: skip, rather than fail, on cross-compilation
+	* m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Avoid aborting configure
+	when cross-compiling; regression from 2011-02-16.
+
+2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* NEWS: Mention 2011-02-08 change to stdlib.
+
+2011-02-17  Bruno Haible  <bruno@clisp.org>
+
+	getloadavg: Add comments about platforms.
+	* m4/getloadavg.m4: Add comment.
+	* lib/getloadavg.c: Likewise.
+
+2011-02-17  Bruno Haible  <bruno@clisp.org>
+
+	getloadavg: Fix link error on Solaris 2.6.
+	* modules/getloadavg (Link): New section.
+	* modules/getloadavg-tests (Makefile.am): Use GETLOADAVG_LIBS for
+	linking test-getloadavg.
+	* doc/glibc-functions/getloadavg.texi: Mention that Solaris 2.6 lacks
+	getloadavg.
+
+2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* lib/getloadavg.c (getloadavg) [sgi]: Make ldav_off of type ptrdiff_t.
+	It was 'int', but this doesn't match the IRIX 6.5 manual.
+	Suggested by Bruno Haible in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00207.html>.
+
+2011-02-17  Bruno Haible  <bruno@clisp.org>
+
+	havelib: Fix comments.
+	* m4/lib-link.m4 (AC_LIB_RPATH): Update comments after 2007-01-02
+	change.
+
+2011-02-17  Bruno Haible  <bruno@clisp.org>
+
+	havelib: Update config.rpath.
+	* build-aux/config.rpath: Update to match libtool.m4 from libtool-2.4.
+
+2011-02-17  Bruno Haible  <bruno@clisp.org>
+
+	getloadavg test: Add some plausibility checks.
+	* tests/test-getloadavg.c (check_avg): Print a warning when the value
+	is improbable.
+
+2011-02-16  Eric Blake  <eblake@redhat.com>
+
+	maintainer-makefile: make syntax-check a no-op from tarballs
+	* top/maint.mk (no-vc-detected): New rule.
+	(local-checks-available): Use it to avoid hanging if someone tries
+	'make syntax-check' from a tarball.  Also append to any non-syntax
+	checks already defined in cfg.mk.
+
+2011-02-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	longlong: tune, particularly for common case of c99
+
+	* m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Don't bother compiling
+	or running anything if c99, or if unsigned long long int does not
+	work.  In either case, we know the answer without further tests.
+	Do not compile _AC_TYPE_LONG_LONG_SNIPPET twice.  Instead, compile
+	it at most once, and use its results for both long long int and
+	unsigned long long int.  This is more likely to be efficient in
+	the common case where the program wants to check for both long
+	long int and unsigned long long int.
+	(AC_TYPE_UNSIGNED_LONG_LONG_INT): Don't bother compiling if c99,
+	since the answer is already known.
+
+2011-02-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+	getloadavg: set errno
+	* lib/getloadavg.c: Set errno when returning -1.  If no other
+	error number looks appropriate, set it to ENOSYS if the getloadavg
+	looks like it can't possibly ever work, ENOTSUP otherwise.
+	Suggested by Bruno Haible in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00187.html>.
+
+	getloadavg: trim unused parts and speed up 'configure'
+	* NEWS: Document this.
+	* lib/getloadavg.c: Ignore HAVE_GETLOADAVG; this file is now
+	always compiled if getloadavg is absent.
+	Move test code to ...
+	* tests/test-getloadavg.c: New file, containing previous
+	contents of test from lib/getloadavg.c.  It also contains
+	suggestions by Bruno Haible in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00186.html>.
+	* modules/getloadavg-tests: New file.
+	* m4/getloadavg.m4 (gl_GETLOADAVG): Do not check for getloadavg twice.
+	Do tests in the same order as they're needed for getloadavg.c.
+	Omit setgid-related tests that generate symbols KMEM_GROUP,
+	NEET_SETGID, GETLOADAVG_PRIVILEGED; nobody seems to use those any more.
+	Do only the tests that are needed to see whether the system has
+	getloadavg, moving the other tests into ...
+	(gl_PREREQ_GETLOADAVG): ... here.  Do not define obsolete symbol
+	NLIST_NAME_UNION; nobody should be using it.  Do not define
+	symbols C_GETLOADAVG and HAVE_GETLOADAVG; they're no longer
+	relevant, as the user of this module shouldn't care how getloadavg
+	is implemented.
+
+	getloadavg: omit unused var
+	* lib/getloadavg.c (getloadavg): Omit unused local variable.
+
+2011-02-15  Jim Meyering  <meyering@redhat.com>
+
+	doc: update users.txt
+	* users.txt: Update iwhd's URL.
+
+2011-02-13  Bruno Haible  <bruno@clisp.org>
+
+	Consistent macro naming for macros that use GCC __attribute__.
+	* lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from
+	_ATTRIBUTE_NONNULL_.
+	* lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise.
+	* lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR.
+	* lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from
+	ATTRIBUTE_DEPRECATED.
+	* lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from
+	ATTRIBUTE_NORETURN.
+	* lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise.
+	* lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise.
+	* lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise.
+	* lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise.
+	(_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC.
+	(_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE.
+	* lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from
+	ATTRIBUTE_SENTINEL.
+	* lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from
+	ATTRIBUTE_RETURN_CHECK.
+	* tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise.
+	* tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from
+	ATTRIBUTE_NORETURN.
+	* tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise.
+	Reported by Paul Eggert.
+
+2011-02-13  Bruno Haible  <bruno@clisp.org>
+
+	Don't interfere with a program's definition of __attribute__.
+	* lib/argp.h (__attribute__): Remove definition.
+	(_GL_ATTRIBUTE_FORMAT): New macro.
+	(argp_error, __argp_error, argp_failure, __argp_failure): Use it.
+	* lib/argp-fmtstream.h (__attribute__): Remove definition.
+	(_GL_ATTRIBUTE_FORMAT): New macro.
+	(__argp_fmtstream_printf, argp_fmtstream_printf): Use it.
+	* lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ only for
+	GCC 3 or newer.
+	* lib/error.h (__attribute__): Remove definition.
+	(_GL_ATTRIBUTE_FORMAT): New macro.
+	(error, error_at_line): Use it.
+	* lib/hash.h (__attribute__): Remove definition.
+	(ATTRIBUTE_WUR): Update definition. Define always.
+	* lib/openat.h (__attribute__): Remove definition.
+	(ATTRIBUTE_NORETURN): Update definition. Define always.
+	* lib/sigpipe-die.h (__attribute__): Remove definition.
+	(ATTRIBUTE_NORETURN): Update definition. Define always.
+	* lib/vasnprintf.h (__attribute__): Remove definition.
+	(_GL_ATTRIBUTE_FORMAT): New macro.
+	(asnprintf, vasnprintf): Use it.
+	* lib/xalloc.h (__attribute__): Remove definition.
+	(ATTRIBUTE_NORETURN): Update definition. Define always.
+	(ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE): Define always.
+	* lib/xmemdup0.h (__attribute__): Remove definition.
+	(ATTRIBUTE_NORETURN): Update definition. Define always.
+	* lib/xprintf.h (__attribute__): Remove definition.
+	(_GL_ATTRIBUTE_FORMAT): New macro.
+	(xprintf, xvprintf, xfprintf, xvfprintf): Use it.
+	* lib/xstrtol.h (__attribute__): Remove definition.
+	(ATTRIBUTE_NORETURN): Update definition. Define always.
+	* lib/xvasprintf.h (__attribute__): Remove definition.
+	(_GL_ATTRIBUTE_FORMAT): New macro.
+	(xasprintf, xvasprintf): Use it.
+	* tests/test-argmatch.c (__attribute__): Remove definition.
+	(ATTRIBUTE_NORETURN): Update definition. Define always.
+	* tests/test-exclude.c (__attribute__): Remove definition.
+	(ATTRIBUTE_NORETURN): Update definition. Define always.
+	Reported by Paul Eggert.
+
+2011-02-13  Bruno Haible  <bruno@clisp.org>
+
+	mbrtowc: Add more tests for native Windows platforms.
+	* tests/test-mbrtowc-w32-1.sh: New file.
+	* tests/test-mbrtowc-w32-2.sh: New file.
+	* tests/test-mbrtowc-w32-3.sh: New file.
+	* tests/test-mbrtowc-w32-4.sh: New file.
+	* tests/test-mbrtowc-w32-5.sh: New file.
+	* tests/test-mbrtowc-w32.c: New file.
+	* modules/mbrtowc-tests (Files): Add them.
+	(Makefile.am): Arrange to run these tests.
+	* tests/test-mbrtowc-w32-6.sh: New file, currently unused.
+	* tests/test-mbrtowc-w32-7.sh: New file, currently unused.
+
+2011-02-13  Bruno Haible  <bruno@clisp.org>
+
+	mbrtowc: Work around native Windows bug.
+	* m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Detect native Windows bug. Use the
+	guess when no suitable locale for testing was found.
+	* doc/posix-functions/mbrtowc.texi: Mention the native Windows bug.
+
+2011-02-13  Bruno Haible  <bruno@clisp.org>
+
+	mbsinit: Work around mingw bug.
+	* m4/mbsinit.m4 (gl_FUNC_MBSINIT): Replace mbsinit also on mingw.
+	* lib/mbsinit.c (mbsinit): Provide an alternate definition for native
+	Windows.
+	* doc/posix-functions/mbsinit.texi: Mention the mingw bug.
+
+2011-02-13  Bruno Haible  <bruno@clisp.org>
+
+	mbsinit: Don't crash for a NULL argument.
+	* lib/mbsinit.c (mbsinit): When the argument is NULL, return 1.
+	* tests/test-mbsinit.c (mbsinit): Check this behaviour.
+
+2011-02-13  Bruno Haible  <bruno@clisp.org>
+
+	Don't interfere with a program's definition of __attribute__.
+	* lib/stdio.in.h (__attribute__): Remove definition.
+	(_GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_FORMAT_PRINTF): New macros.
+	(dprintf, fprintf, obstack_printf, obstack_printf, obstack_vprintf,
+	printf, snprintf, sprintf, asprintf, vasprintf, vdprintf, vfprintf,
+	vsnprintf, vsprintf): Use _GL_ATTRIBUTE_FORMAT_PRINTF.
+	* lib/string.in.h (__attribute__): Remove definition.
+	Reported by Paul Eggert.
+
+2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdlib: don't get in the way of non-GCC __attribute__
+	See thread starting at
+	<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00161.html>.
+	Revert previous stdlib change, installing the following instead:
+	* lib/stdlib.in.h (__attribute__): Remove.  We do not want
+	to get in the way of a non-GCC compiler that supports __attribute__.
+	(_GL_ATTRIBUTE_RETURN): New macro.
+	(_Exit): Use it instead of __attribute__.
+
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+	quotearg test: Avoid test failure on mingw.
+	* tests/test-quotearg.sh: Convert the locale identifier from native
+	Windows syntax to Unix syntax.
+
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+	setlocale: Prefer gnulib's override over libintl's override.
+	* lib/locale.in.h (GNULIB_defined_setlocale): New macro.
+	* lib/gettext.h (setlocale): Redefine to rpl_setlocale if
+	GNULIB_defined_setlocale is set.
+
+2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdlib: support non-GCC __attribute__
+
+	Fix a serious and tricky problem encountered when attempting to
+	add the getloadavg module to Emacs.  Emacs worked fine on RHEL
+	5.5, but it crashed due to memory corruption on Solaris 10 with
+	Sun C 5.11.  Emacs normally ORs 3-bit tags into their low-order
+	bits that are otherwise zero.  This tagging is optional inside
+	Emacs but is preferred and is used when __attribute__ ((__aligned
+	(8))) works, as it does with both recent-enough GCC and with Sun C
+	5.11.  However, Sun C 5.11 is not GCC and does not #define
+	__GNUC__ and __GNUC_MINOR__.
+
+	When I added the getloadavg module to Emacs, it brought in
+	stdlib.in.h, which contained this fragment:
+
+	   #ifndef __attribute__
+	   # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+	   #  define __attribute__(Spec)   /* empty */
+	   # endif
+	   #endif
+
+	When files that include <stdlib.h> were compiled with Sun C 5.11,
+	the above code disabled __attribute__ ((__aligned (8))), which
+	caused variables to not be properly aligned, which eventually led
+	to the pointer corruption mentioned above.  (This was a bit hard
+	to diagnose, unfortunately.)
+
+	Several "#define __attribute__(X) /* empty */" code snippets need
+	to be eradicated from Gnulib to work with non-GCC compilers that
+	support __attribute__.  The Autoconf way to do this is to test for
+	each kind of attribute that we want support for, and selectively
+	enable that in source code.
+
+	Fix this problem just for stdlib.h, by adding a test for the
+	__noreturn__ attribute, and change stdlib.in.h to use that test
+	when needed.  This technique can be easily generalized to the
+	other *.in.h files and attributes, and a similar technique can be
+	used for *.h and *.c files.  This patch is enough to solve the
+	problem for Emacs + getloadavg, and I thought I'd publish it for
+	feedback before undertaking further, similar fixes in other
+	modules.
+
+	This patch does not arrange to #define HAVE_ATTRIBUTE_NORETURN
+	because it's not needed for stdlib.h.  It merely substitutes the
+	value directly into stdlib.h.  We may well need to #define it, or
+	similar symbols, for other modules, but it's nice to also have an
+	option to not #define it for applications like Emacs that do not
+	need it.
+
+	* lib/stdlib.in.h (__attribute__): Do not #define.
+	(_GL_ATTRIBUTE_NORETURN): New macro, which in stdlib.h needs to
+	be defined only if the _Exit module is also used.
+	* m4/_Exit.m4 (gl_FUNC__EXIT): Require gl_ATTRIBUTE_NORETURN.
+	* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Subst
+	HAVE_ATTRIBUTE_NORETURN and default it to 1, its value on GNU
+	platforms.
+	* modules/_Exit (Files): Add m4/attribute.m4.
+	* modules/stdlib (Makefile.am): Substitute HAVE_ATTRIBUTE_NORETURN.
+	* m4/attribute.m4: New file.
+
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+	wcsrtombs: Work around bug on native Windows.
+	* m4/wcsrtombs.m4 (gl_WCSRTOMBS_NULL): Test against mingw bug.
+	* lib/wcsrtombs.c (rpl_wcsrtombs): When dest is NULL, pass SIZE_MAX
+	instead of len.
+	* doc/posix-functions/wcsrtombs.texi: Document mingw bug.
+
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+	mbsrtowcs: Work around bug on native Windows.
+	* m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Require gt_LOCALE_FR. Test
+	against mingw bug.
+	* doc/posix-functions/mbsrtowcs.texi: Document mingw bug.
+
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+	Avoid setlocale bugs in tests.
+	* modules/btowc (Dependencies): Add setlocale.
+	* modules/c-strcase (Dependencies): Likewise.
+	* modules/mbmemcasecmp (Dependencies): Likewise.
+	* modules/mbmemcasecoll (Dependencies): Likewise.
+	* modules/mbrtowc (Dependencies): Likewise.
+	* modules/mbscasecmp (Dependencies): Likewise.
+	* modules/mbscasestr (Dependencies): Likewise.
+	* modules/mbschr (Dependencies): Likewise.
+	* modules/mbscspn (Dependencies): Likewise.
+	* modules/mbsinit (Dependencies): Likewise.
+	* modules/mbsncasecmp (Dependencies): Likewise.
+	* modules/mbsnrtowcs (Dependencies): Likewise.
+	* modules/mbspbrk (Dependencies): Likewise.
+	* modules/mbspcasecmp (Dependencies): Likewise.
+	* modules/mbsrchr (Dependencies): Likewise.
+	* modules/mbsrtowcs (Dependencies): Likewise.
+	* modules/mbsspn (Dependencies): Likewise.
+	* modules/mbsstr (Dependencies): Likewise.
+	* modules/nl_langinfo (Dependencies): Likewise.
+	* modules/quotearg (Dependencies): Likewise.
+	* modules/unicase/locale-language (Dependencies): Likewise.
+	* modules/unicase/ulc-casecmp (Dependencies): Likewise.
+	* modules/unicase/ulc-casecoll (Dependencies): Likewise.
+	* modules/unigbrk/ulc-grapheme-breaks (Dependencies): Likewise.
+	* modules/unistdio/u8-vasnprintf (Dependencies): Likewise.
+	* modules/unistdio/u16-vasnprintf (Dependencies): Likewise.
+	* modules/unistdio/u32-vasnprintf (Dependencies): Likewise.
+	* modules/unistdio/ulc-vasnprintf (Dependencies): Likewise.
+	* modules/uniwbrk/ulc-wordbreaks (Dependencies): Likewise.
+	* modules/vasnprintf-posix (Dependencies): Likewise.
+	* modules/wcrtomb (Dependencies): Likewise.
+	* modules/wcsnrtombs (Dependencies): Likewise.
+	* modules/wcsrtombs (Dependencies): Likewise.
+
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+	setlocale: Workaround native Windows bug.
+	* lib/setlocale.c (rpl_setlocale): On native Windows, when setlocale
+	succeeds but sets LC_CTYPE to "C", report a failure.
+	* tests/test-setlocale2.sh: New file.
+	* tests/test-setlocale2.c: New file.
+	* modules/setlocale-tests (Files): Add the new files.
+	(Makefile.am): Enable test-setlocale2.sh test.
+	* doc/posix-functions/setlocale.texi: Mention workaround.
+
+2011-02-11  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'setlocale'.
+	* modules/setlocale-tests: New file.
+	* tests/test-setlocale1.sh: New file.
+	* tests/test-setlocale1.c: New file.
+
+	New module 'setlocale'.
+	* lib/locale.in.h (setlocale): New declaration.
+	* lib/setlocale.c: New file, based on
+	gettext/gettext-runtime/intl/setlocale.c.
+	* m4/setlocale.m4: New file.
+	* m4/locale_h.m4 (gl_LOCALE_H): Test whether setlocale is declared.
+	(gl_LOCALE_H_DEFAULTS): Initialize GNULIB_SETLOCALE, REPLACE_SETLOCALE.
+	* modules/locale (Makefile.am): Substitute GNULIB_SETLOCALE,
+	REPLACE_SETLOCALE.
+	* modules/setlocale: New file.
+	* tests/test-locale-c++.cc: Test the declaration of setlocale.
+	* doc/posix-functions/setlocale.texi: Mention the new module.
+
+2011-02-11  Bruno Haible  <bruno@clisp.org>
+
+	Prepare for locale dependent tests on mingw.
+	* m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, don't try "ar"
+	because it has the wrong locale encoding.
+	* m4/locale-fr.m4 (gt_LOCALE_FR): On native Windows, try
+	French_France.1252 instead of "fr".
+	(gt_LOCALE_FR_UTF8): On native Windows, try French_France.65001.
+	* m4/locale-ja.m4 (gt_LOCALE_JA): On native Windows, don't try "ja"
+	because it has the wrong locale encoding.
+	* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Require AC_CANONICAL_HOST. On
+	native Windows, try Turkish_Turkey.65001.
+	* m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On native Windows, try
+	Chinese_China.54936.
+
+	Prepare for locale dependent tests on mingw.
+	* m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, call setlocale
+	differently.
+	* m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
+	* m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
+	* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
+	* m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
+
+2011-02-11  Eric Blake  <eblake@redhat.com>
+
+	strptime: avoid compiler warnings
+	* lib/strptime.c (__strptime_internal) [!_NL_CURRENT]: Avoid
+	compiler warnings about dead code.
+	Reported by Daniel P. Berrange.
+
+2011-02-11  Thien-Thi Nguyen  <ttn@gnuvola.org>
+
+	doc: update users.txt
+	* users.txt: Add rcs.
+
+2011-02-10  John W. Eaton  <jwe@gnu.org>
+
+	doc: update users.txt
+	* users.txt: Add octave.
+
+2011-02-10  Jim Meyering  <meyering@redhat.com>
+
+	doc: update users.txt
+	* users.txt: Add iwhd.
+
+2011-02-09  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Make copyright notice adjustment more robust.
+	* gnulib-tool (func_import): In sed_transform_main_lib_file,
+	sed_transform_build_aux_file, sed_transform_testsrelated_lib_file,
+	allow a line break to occur after "GNU" in "GNU [Lesser] General Public
+	License".
+	Reported by Glenn Morris <rgm@gnu.org> via Paul Eggert.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'towctrans'.
+	* modules/towctrans: New file.
+	* lib/wctype.in.h (towctrans): New declaration.
+	* lib/towctrans.c: New file.
+	* lib/towctrans-impl.h: New file.
+	* m4/towctrans.m4: New file.
+	* m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towctrans is declared.
+	(gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_TOWCTRANS.
+	* modules/wctype-h (Makefile.am): Substitute GNULIB_TOWCTRANS.
+	* tests/test-wctype-h-c++.cc: Test the declaration of towctrans.
+	* doc/posix-functions/towctrans.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wctrans'.
+	* modules/wctrans: New file.
+	* lib/wctype.in.h (wctrans): New declaration.
+	* lib/wctrans.c: New file.
+	* lib/wctrans-impl.h: New file.
+	* m4/wctrans.m4: New file.
+	* m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctrans is declared.
+	(gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTRANS.
+	* modules/wctype-h (Makefile.am): Substitute GNULIB_WCTRANS.
+	* tests/test-wctype-h-c++.cc: Test the declaration of wctrans.
+	* doc/posix-functions/wctrans.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'iswctype'.
+	* modules/iswctype: New file.
+	* lib/wctype.in.h (iswctype): New declaration.
+	* lib/iswctype.c: New file.
+	* lib/iswctype-impl.h: New file.
+	* m4/iswctype.m4: New file.
+	* m4/wctype_h.m4 (gl_WCTYPE_H): Test whether iswctype is declared.
+	(gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWCTYPE.
+	* modules/wctype-h (Makefile.am): Substitute GNULIB_ISWCTYPE.
+	* tests/test-wctype-h-c++.cc: Test the declaration of iswctype.
+	* doc/posix-functions/iswctype.texi: Mention the new module and the
+	HP-UX 11.00 problem.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wctype'.
+	* modules/wctype: Change to represent the wctype() substitute.
+	* lib/wctype.in.h (wctype): New declaration.
+	* lib/wctype.c: New file.
+	* lib/wctype-impl.h: New file.
+	* m4/wctype.m4: New file.
+	* m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctype is declared.
+	(gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTYPE.
+	* modules/wctype-h (Makefile.am): Substitute GNULIB_WCTYPE.
+	* tests/test-wctype-h-c++.cc: Test the declaration of wctype.
+	* doc/posix-functions/wctype.texi: Mention the new module and the
+	HP-UX 11.00 problem.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	wctype-h: Ensure wctype_t and wctrans_t are defined.
+	* lib/wctype.in.h (wctype_t, wctrans_t): New type declarations.
+	* m4/wctype_h.m4 (gl_WCTYPE_H): Determine HAVE_WCTYPE_T, HAVE_WCTRANS_T.
+	(gl_WCTYPE_H_DEFAULTS): Initialize HAVE_WCTYPE_T, HAVE_WCTRANS_T.
+	* modules/wctype-h (Makefile.am): Substitute HAVE_WCTYPE_T,
+	HAVE_WCTRANS_T.
+	* tests/test-wctype-h.c: Check that wctype_t and wctrans_t are defined.
+
+2011-02-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+	flock: fix license typo
+
+	* lib/flock.c: Fix typo in license.  One of the "Lesser"s was
+	omitted.
+
+2011-02-08  Bruno Haible  <bruno@clisp.org>
+
+	Split large sed scripts, for HP-UX sed.
+	* modules/math (Makefile.am): Split sed scripts around 50 sed commands,
+	to avoid HP-UX limit of 99 commands, in the near future.
+	* modules/stdlib (Makefile.am): Likewise.
+	* modules/unistd (Makefile.am): Likewise.
+	* modules/wchar (Makefile.am): Likewise.
+	Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
+	Suggestion by Ralf Wildenhues <Ralf.Wildenhues@gmx.de> in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2010-01/msg00216.html>.
+
+2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
+	    Bruno Haible  <bruno@clisp.org>
+
+	stdlib: improve random_r modularization
+	* lib/stdlib.in.h: Encapsulate all the stuff having to do with
+	random_r inside "#if @GNULIB_RANDOM_R@", so that it's clearer that
+	you also need the random_r module to get this material right.
+	* m4/random_r.m4 (gl_FUNC_RANDOM_R): Move check for random.h here ...
+	* m4/stdlib_h.m4 (gl_STDLIB_H): ... from here.
+	(gl_STDLIB_H_DEFAULTS): Default HAVE_RANDOM_H to 1, and AC_SUBST it.
+
+2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdlib: don't depend on stdint
+	* lib/stdlib.in.h: Don't include <stdint.h> merely because
+	GNULIB_POSIXCHECK is defined.  GNULIB_POSIXCHECK seems to
+	be independent of whether stdint.h is needed.
+	* m4/random_r.m4 (gl_FUNC_RANDOM_R): Check for struct random_data
+	here, instead of ...
+	* m4/stdlib_h.m4 (gl_STDLIB_H): ... here.  Applications that need
+	struct random_data should be using the random_r module, not just
+	the stdlib module (which wouldn't make sense: what package needs
+	just struct random_data without also needing random_r?).
+	* modules/stdlib (Depends-on): Remove stdint.
+
+	getloadavg: don't depend on c-strtod, cloexec, fcntl-safer
+	See the thread rooted at
+	<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00090.html>.
+	* lib/getloadavg.c: Do not include c-strtod.h, cloexec.h, or fcntl--.h.
+	Include <fcntl.h> only if (defined __linux__ || defined __CYGWIN__
+	|| defined SUNOS_5 || (defined LOAD_AVE_TYPE && !  defined
+	__VMS)); previously it was always included (via fcntl--.h).
+	(getloadavg): Do not use c_strtod.  Instead, approximate it by
+	hand; this is good enough for load averages.  Also, do not use
+	set_cloexec_flag; instead, use the O_CLOEXEC and F_DUPFD_CLOEXEC
+	flags directly if available and don't bother otherwise.  (Packages
+	that need the extra reliability should use the modules that define
+	these flags on older platforms that lack them.)
+	* modules/getloadavg (Depends-on): Remove c-strtod, cloexec,
+	fcntl-safer.
+
+2011-02-08  Jim Meyering  <meyering@redhat.com>
+
+	di-set.h, ino-map.h: add multiple-inclusion guard
+	Technically, the guard is required only for ino-map.h, due to its
+	INO_MAP_INSERT_FAILURE definition, but do both for consistency.
+	* lib/di-set.h: Add file-spanning #ifndef _GL_DI_SET_H.
+	* lib/ino-map.h: Likewise.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	iswblank: Ensure declaration on glibc systems.
+	* m4/iswblank.m4 (gl_FUNC_ISWBLANK): Require gl_USE_SYSTEM_EXTENSIONS.
+	* modules/iswblank (Dependencies): Add 'extensions'.
+	* doc/posix-functions/iswblank.texi: Document the glibc problem.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'iswblank'.
+	* lib/wctype.in.h (iswblank): Don't declare if GNULIB_ISWBLANK is 0.
+	* modules/iswblank: New file.
+	* modules/wctype-h (Files): Remove lib/iswblank.c.
+	(Makefile.am): Substitute GNULIB_ISWBLANK.
+	* m4/iswblank.m4: New file, partially extracted from m4/wctype_h.m4.
+	* m4/wctype_h.m4 (gl_WCTYPE_MODULE_INDICATOR): New macro.
+	(gl_WCTYPE_H_DEFAULTS): New macro.
+	(gl_WCTYPE_H): Require it. Remove iswblank related code.
+	* modules/iswblank-tests: New file.
+	* tests/test-iswblank.c: New file, extraced from tests/test-wctype-h.c.
+	* tests/test-wctype-h.c (main): Remove iswblank tests.
+	* tests/test-wctype-h-c++.cc: Guard the signature test of iswblank.
+	* doc/posix-functions/iswblank.texi: Mention module 'iswblank' instead
+	of 'wctype-h'.
+	* NEWS: Mention the change.
+	* modules/mbchar (Depends-on): Add iswblank.
+
+2011-02-08  Bruno Haible  <bruno@clisp.org>
+
+	di-set tests: Refactor.
+	* tests/test-di-set.c: Include di-set.h early. Include macros.h. Drop
+	unnecessary includes.
+	(ASSERT): Remove macro.
+	(main): Make C90 compliant by avoiding variable declaration after
+	statement.
+	* modules/di-set-tests (Files): Add tests/macros.h.
+
+2011-02-08  Bruno Haible  <bruno@clisp.org>
+
+	ino-map tests: Refactor.
+	* tests/test-ino-map.c: Include ino-map.h early. Include macros.h. Drop
+	unnecessary includes.
+	(ASSERT): Remove macro.
+	(main): Make C90 compliant by avoiding variable declaration after
+	statement.
+	* modules/ino-map-tests (Files): Add tests/macros.h.
+
+2011-02-08  Jim Meyering  <meyering@redhat.com>
+
+	di-set: add "const" to a cast
+	* lib/di-set.c (di_set_insert): Cast hash_insert0 argument to
+	"(void const *)", not "(void *)".  Spotted by Bruno Haible.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	Rename module 'wctype' to 'wctype-h'.
+	* modules/wctype-h: Renamed from modules/wctype.
+	* modules/wctype: Simplyfy to a redirection to 'wctype-h'.
+	* modules/wctype-h-tests: Renamed from modules/wctype-tests.
+	(Files, Depends-on, Makefile.am): Update.
+	* modules/wctype-h-c++-tests: Renamed from modules/wctype-c++-tests.
+	(Files, Makefile.am): Update.
+	* tests/test-wctype-h.c: Renamed from tests/test-wctype.c.
+	* tests/test-wctype-h-c++.cc: Renamed from tests/test-wctype-c++.cc.
+	* doc/posix-headers/wctype.texi: Update.
+	* doc/posix-functions/iswalnum.texi: Update.
+	* doc/posix-functions/iswalpha.texi: Update.
+	* doc/posix-functions/iswblank.texi: Update.
+	* doc/posix-functions/iswcntrl.texi: Update.
+	* doc/posix-functions/iswdigit.texi: Update.
+	* doc/posix-functions/iswgraph.texi: Update.
+	* doc/posix-functions/iswlower.texi: Update.
+	* doc/posix-functions/iswprint.texi: Update.
+	* doc/posix-functions/iswpunct.texi: Update.
+	* doc/posix-functions/iswspace.texi: Update.
+	* doc/posix-functions/iswupper.texi: Update.
+	* doc/posix-functions/iswxdigit.texi: Update.
+	* doc/posix-functions/towlower.texi: Update.
+	* doc/posix-functions/towupper.texi: Update.
+	* NEWS: Mention the change.
+	* modules/fnmatch (Dependencies): Add wctype-h, remove wctype.
+	* modules/mbchar (Dependencies): Likewise.
+	* modules/mbswidth (Dependencies): Likewise.
+	* modules/quotearg (Dependencies): Likewise.
+	* modules/regex (Dependencies): Likewise.
+	* modules/wcscasecmp (Dependencies): Likewise.
+	* modules/wcsncasecmp (Dependencies): Likewise.
+	* modules/wcwidth (Dependencies): Likewise.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcswidth'.
+	* modules/wcswidth: New file.
+	* lib/wchar.in.h (wcswidth): New declaration.
+	* lib/wcswidth.c: New file.
+	* lib/wcswidth-impl.h: New file, from libutf8 with modifications.
+	* m4/wcswidth.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcswidth is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSWIDTH, HAVE_WCSWIDTH,
+	REPLACE_WCSWIDTH.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSWIDTH,
+	HAVE_WCSWIDTH, REPLACE_WCSWIDTH.
+	* tests/test-wchar-c++.cc: Test the declaration of wcswidth.
+	* doc/posix-functions/wcswidth.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcstok'.
+	* modules/wcstok: New file.
+	* lib/wchar.in.h (wcstok): New declaration.
+	* lib/wcstok.c: New file.
+	* lib/wcstok-impl.h: New file, from libutf8 with modifications.
+	* m4/wcstok.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcstok is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSTOK, HAVE_WCSTOK.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSTOK, HAVE_WCSTOK.
+	* tests/test-wchar-c++.cc: Test the declaration of wcstok.
+	* doc/posix-functions/wcstok.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsstr'.
+	* modules/wcsstr: New file.
+	* lib/wchar.in.h (wcsstr): New declaration.
+	* lib/wcsstr.c: New file.
+	* lib/wcsstr-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsstr.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsstr is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSTR, HAVE_WCSSTR.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSSTR, HAVE_WCSSTR.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsstr.
+	* doc/posix-functions/wcsstr.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcspbrk'.
+	* modules/wcspbrk: New file.
+	* lib/wchar.in.h (wcspbrk): New declaration.
+	* lib/wcspbrk.c: New file.
+	* lib/wcspbrk-impl.h: New file, from libutf8 with modifications.
+	* m4/wcspbrk.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcspbrk is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSPBRK, HAVE_WCSPBRK.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSPBRK, HAVE_WCSPBRK.
+	* tests/test-wchar-c++.cc: Test the declaration of wcspbrk.
+	* doc/posix-functions/wcspbrk.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsspn'.
+	* modules/wcsspn: New file.
+	* lib/wchar.in.h (wcsspn): New declaration.
+	* lib/wcsspn.c: New file.
+	* lib/wcsspn-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsspn.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsspn is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSPN, HAVE_WCSSPN.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSSPN, HAVE_WCSSPN.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsspn.
+	* doc/posix-functions/wcsspn.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcscspn'.
+	* modules/wcscspn: New file.
+	* lib/wchar.in.h (wcscspn): New declaration.
+	* lib/wcscspn.c: New file.
+	* lib/wcscspn-impl.h: New file, from libutf8 with modifications.
+	* m4/wcscspn.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscspn is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCSPN, HAVE_WCSCSPN.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSCSPN, HAVE_WCSCSPN.
+	* tests/test-wchar-c++.cc: Test the declaration of wcscspn.
+	* doc/posix-functions/wcscspn.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsrchr'.
+	* modules/wcsrchr: New file.
+	* lib/wchar.in.h (wcsrchr): New declaration.
+	* lib/wcsrchr.c: New file.
+	* lib/wcsrchr-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsrchr.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsrchr is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRCHR, HAVE_WCSRCHR.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSRCHR, HAVE_WCSRCHR.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsrchr.
+	* doc/posix-functions/wcsrchr.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcschr'.
+	* modules/wcschr: New file.
+	* lib/wchar.in.h (wcschr): New declaration.
+	* lib/wcschr.c: New file.
+	* lib/wcschr-impl.h: New file, from libutf8 with modifications.
+	* m4/wcschr.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcschr is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCHR, HAVE_WCSCHR.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSCHR, HAVE_WCSCHR.
+	* tests/test-wchar-c++.cc: Test the declaration of wcschr.
+	* doc/posix-functions/wcschr.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsdup'.
+	* modules/wcsdup: New file.
+	* lib/wchar.in.h (wcsdup): New declaration.
+	* lib/wcsdup.c: New file.
+	* lib/wcsdup-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsdup.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsdup is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSDUP, HAVE_WCSDUP.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSDUP, HAVE_WCSDUP.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsdup.
+	* doc/posix-functions/wcsdup.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsxfrm'.
+	* modules/wcsxfrm: New file.
+	* lib/wchar.in.h (wcsxfrm): New declaration.
+	* lib/wcsxfrm.c: New file.
+	* lib/wcsxfrm-impl.h: New file.
+	* m4/wcsxfrm.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsxfrm is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSXFRM, HAVE_WCSXFRM.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSXFRM, HAVE_WCSXFRM.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsxfrm.
+	* doc/posix-functions/wcsxfrm.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcscoll'.
+	* modules/wcscoll: New file.
+	* lib/wchar.in.h (wcscoll): New declaration.
+	* lib/wcscoll.c: New file.
+	* lib/wcscoll-impl.h: New file.
+	* m4/wcscoll.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscoll is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCOLL, HAVE_WCSCOLL.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSCOLL, HAVE_WCSCOLL.
+	* tests/test-wchar-c++.cc: Test the declaration of wcscoll.
+	* doc/posix-functions/wcscoll.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsncasecmp'.
+	* modules/wcsncasecmp: New file.
+	* lib/wchar.in.h (wcsncasecmp): New declaration.
+	* lib/wcsncasecmp.c: New file.
+	* lib/wcsncasecmp-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsncasecmp.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncasecmp is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCASECMP, HAVE_WCSNCASECMP.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSNCASECMP,
+	HAVE_WCSNCASECMP.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsncasecmp.
+	* doc/posix-functions/wcsncasecmp.texi: Mention the new module.
+
+2011-02-06  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcscasecmp'.
+	* modules/wcscasecmp: New file.
+	* lib/wchar.in.h (wcscasecmp): New declaration.
+	* lib/wcscasecmp.c: New file.
+	* lib/wcscasecmp-impl.h: New file, from libutf8 with modifications.
+	* m4/wcscasecmp.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscasecmp is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCASECMP, HAVE_WCSCASECMP.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSCASECMP,
+	HAVE_WCSCASECMP.
+	* tests/test-wchar-c++.cc: Test the declaration of wcscasecmp.
+	* doc/posix-functions/wcscasecmp.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsncmp'.
+	* modules/wcsncmp: New file.
+	* lib/wchar.in.h (wcsncmp): New declaration.
+	* lib/wcsncmp.c: New file.
+	* lib/wcsncmp-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsncmp.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncmp is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCMP, HAVE_WCSNCMP.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSNCMP, HAVE_WCSNCMP.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsncmp.
+	* doc/posix-functions/wcsncmp.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcscmp'.
+	* modules/wcscmp: New file.
+	* lib/wchar.in.h (wcscmp): New declaration.
+	* lib/wcscmp.c: New file.
+	* lib/wcscmp-impl.h: New file, from libutf8 with modifications.
+	* m4/wcscmp.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscmp is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCMP, HAVE_WCSCMP.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSCMP, HAVE_WCSCMP.
+	* tests/test-wchar-c++.cc: Test the declaration of wcscmp.
+	* doc/posix-functions/wcscmp.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsncat'.
+	* modules/wcsncat: New file.
+	* lib/wchar.in.h (wcsncat): New declaration.
+	* lib/wcsncat.c: New file.
+	* lib/wcsncat-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsncat.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncat is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCAT, HAVE_WCSNCAT.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSNCAT, HAVE_WCSNCAT.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsncat.
+	* doc/posix-functions/wcsncat.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcscat'.
+	* modules/wcscat: New file.
+	* lib/wchar.in.h (wcscat): New declaration.
+	* lib/wcscat.c: New file.
+	* lib/wcscat-impl.h: New file, from libutf8 with modifications.
+	* m4/wcscat.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscat is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCAT, HAVE_WCSCAT.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSCAT, HAVE_WCSCAT.
+	* tests/test-wchar-c++.cc: Test the declaration of wcscat.
+	* doc/posix-functions/wcscat.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcpncpy'.
+	* modules/wcpncpy: New file.
+	* lib/wchar.in.h (wcpncpy): New declaration.
+	* lib/wcpncpy.c: New file.
+	* lib/wcpncpy-impl.h: New file, from libutf8 with modifications.
+	* m4/wcpncpy.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpncpy is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPNCPY, HAVE_WCPNCPY.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCPNCPY, HAVE_WCPNCPY.
+	* tests/test-wchar-c++.cc: Test the declaration of wcpncpy.
+	* doc/posix-functions/wcpncpy.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsncpy'.
+	* modules/wcsncpy: New file.
+	* lib/wchar.in.h (wcsncpy): New declaration.
+	* lib/wcsncpy.c: New file.
+	* lib/wcsncpy-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsncpy.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncpy is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCPY, HAVE_WCSNCPY.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSNCPY, HAVE_WCSNCPY.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsncpy.
+	* doc/posix-functions/wcsncpy.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcpcpy'.
+	* modules/wcpcpy: New file.
+	* lib/wchar.in.h (wcpcpy): New declaration.
+	* lib/wcpcpy.c: New file.
+	* lib/wcpcpy-impl.h: New file, from libutf8 with modifications.
+	* m4/wcpcpy.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpcpy is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPCPY, HAVE_WCPCPY.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCPCPY, HAVE_WCPCPY.
+	* tests/test-wchar-c++.cc: Test the declaration of wcpcpy.
+	* doc/posix-functions/wcpcpy.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcscpy'.
+	* modules/wcscpy: New file.
+	* lib/wchar.in.h (wcscpy): New declaration.
+	* lib/wcscpy.c: New file.
+	* lib/wcscpy-impl.h: New file, from libutf8 with modifications.
+	* m4/wcscpy.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscpy is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCPY, HAVE_WCSCPY.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSCPY, HAVE_WCSCPY.
+	* tests/test-wchar-c++.cc: Test the declaration of wcscpy.
+	* doc/posix-functions/wcscpy.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcsnlen'.
+	* modules/wcsnlen: New file.
+	* lib/wchar.in.h (wcsnlen): New declaration.
+	* lib/wcsnlen.c: New file.
+	* lib/wcsnlen-impl.h: New file, from libutf8 with modifications.
+	* m4/wcsnlen.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsnlen is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNLEN, HAVE_WCSNLEN.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSNLEN, HAVE_WCSNLEN.
+	* tests/test-wchar-c++.cc: Test the declaration of wcsnlen.
+	* doc/posix-functions/wcsnlen.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wcslen'.
+	* modules/wcslen: New file.
+	* lib/wchar.in.h (wcslen): New declaration.
+	* lib/wcslen.c: New file.
+	* lib/wcslen-impl.h: New file, from libutf8 with modifications.
+	* m4/wcslen.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcslen is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSLEN, HAVE_WCSLEN.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WCSLEN, HAVE_WCSLEN.
+	* tests/test-wchar-c++.cc: Test the declaration of wcslen.
+	* doc/posix-functions/wcslen.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wmemset'.
+	* modules/wmemset: New file.
+	* lib/wchar.in.h (wmemset): New declaration.
+	* lib/wmemset.c: New file.
+	* lib/wmemset-impl.h: New file, from libutf8 with modifications.
+	* m4/wmemset.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemset is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMSET, HAVE_WMEMSET.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WMEMSET, HAVE_WMEMSET.
+	* tests/test-wchar-c++.cc: Test the declaration of wmemset.
+	* doc/posix-functions/wmemset.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wmemmove'.
+	* modules/wmemmove: New file.
+	* lib/wchar.in.h (wmemmove): New declaration.
+	* lib/wmemmove.c: New file.
+	* lib/wmemmove-impl.h: New file, from libutf8 with modifications.
+	* m4/wmemmove.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemmove is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMMOVE, HAVE_WMEMMOVE.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WMEMMOVE,
+	HAVE_WMEMMOVE.
+	* tests/test-wchar-c++.cc: Test the declaration of wmemmove.
+	* doc/posix-functions/wmemmove.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wmemcpy'.
+	* modules/wmemcpy: New file.
+	* lib/wchar.in.h (wmemcpy): New declaration.
+	* lib/wmemcpy.c: New file.
+	* lib/wmemcpy-impl.h: New file, from libutf8 with modifications.
+	* m4/wmemcpy.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcpy is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCPY, HAVE_WMEMCPY.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WMEMCPY, HAVE_WMEMCPY.
+	* tests/test-wchar-c++.cc: Test the declaration of wmemcpy.
+	* doc/posix-functions/wmemcpy.texi: Mention the new module.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wmemcmp'.
+	* modules/wmemcmp: New file.
+	* lib/wchar.in.h (wmemcmp): New declaration.
+	* lib/wmemcmp.c: New file.
+	* lib/wmemcmp-impl.h: New file, from libutf8 with modifications.
+	* m4/wmemcmp.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcmp is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCMP, HAVE_WMEMCMP.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WMEMCMP, HAVE_WMEMCMP.
+	* tests/test-wchar-c++.cc: Test the declaration of wmemcmp.
+	* doc/posix-functions/wmemcmp.texi: Mention the new module.
+
+2011-02-07  Jim Meyering  <meyering@redhat.com>
+
+	di-set, ino-map: new modules, from coreutils
+	* lib/di-set.c: New file.
+	* lib/di-set.h: Likewise.
+	* lib/ino-map.c: Likewise.
+	* lib/ino-map.h: Likewise.
+	* modules/di-set: Likewise.
+	* modules/di-set-tests: Likewise.
+	* modules/ino-map: Likewise.
+	* modules/ino-map-tests: Likewise.
+	* tests/test-di-set.c: Likewise.
+	* tests/test-ino-map.c: Likewise.
+
+2011-02-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+	getloadavg: merge minor changes from Emacs
+
+	* lib/getloadavg.c (getloadavg_initialized): More-accurate comment.
+	(getloadavg): Use memset, not bzero.
+
+	2008-07-25  Chong Yidong  <cyd@stupidchicken.com>
+	* lib/getloadavg.c (nl): Rename to name_list to avoid ncurses.h
+	clash (bug#86).
+
+2010-11-14  Bruno Haible  <bruno@clisp.org>
+
+	Allow multiple gnulib generated replacements to coexist.
+	* lib/getopt.in.h (struct option): Avoid identical redefinition.
+	* lib/inttypes.in.h (imaxdiv_t): Likewise.
+	* lib/langinfo.in.h (nl_item): Likewise.
+	* lib/math.in.h (_NaN, NAN): Likewise.
+	* lib/netdb.in.h (struct addrinfo): Likewise.
+	* lib/poll.in.h (struct pollfd, nfds_t): Likewise.
+	* lib/pthread.in.h (pthread_t, pthread_attr_t, pthread_barrier_t,
+	pthread_barrierattr_t, pthread_cond_t, pthread_condattr_t,
+	pthread_key_t, pthread_mutex_t, pthread_mutexattr_t, pthread_once_t,
+	pthread_rwlock_t, pthread_rwlockattr_t, pthread_cond_destroy,
+	pthread_cond_init, pthread_cond_signal, pthread_cond_wait,
+	pthread_create, pthread_exit, pthread_join, pthread_mutexattr_destroy,
+	pthread_mutexattr_init, pthread_mutexattr_settype,
+	pthread_mutex_destroy, pthread_mutex_init, pthread_mutex_lock,
+	pthread_mutex_trylock, pthread_mutex_unlock, pthread_spinlock_t,
+	pthread_spin_init, pthread_spin_destroy, pthread_spin_lock,
+	pthread_spin_trylock, pthread_spin_unlock): Likewise.
+	* lib/sched.in.h (struct sched_param): Likewise.
+	* lib/se-selinux.in.h (security_class_t, security_context_t,
+	is_selinux_enabled, getcon, freecon, getfscreatecon, setfscreatecon,
+	matchpathcon, getfilecon, lgetfilecon, fgetfilecon, setfilecon,
+	lsetfilecon, fsetfilecon, security_check_context,
+	security_check_context_raw, setexeccon, matchpathcon_init_prefix):
+	Likewise.
+	* lib/search.in.h (VISIT, _gl_search_compar_fn, _gl_search_action_fn):
+	Likewise.
+	* lib/signal.in.h (sig_atomic_t, sigset_t, verify_NSIG_constraint,
+	_gl_function_taking_int_returning_void_t, union sigval,
+	struct siginfo_t, siginfo_t, struct sigaction): Likewise.
+	* lib/spawn.in.h (posix_spawnattr_t, posix_spawn_file_actions_t,
+	verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
+	* lib/stdint.in.h (gl_int8_t, gl_uint8_t, gl_int16_t, gl_uint16_t,
+	gl_int32_t, gl_uint32_t, gl_int64_t, gl_uint64_t, int_least8_t,
+	uint_least8_t, int_least16_t, uint_least16_t, int_least32_t,
+	uint_least32_t, int_least64_t, uint_least64_t, gl_int_fast8_t,
+	gl_uint_fast8_t, gl_int_fast16_t, gl_uint_fast16_t, gl_int_fast32_t,
+	gl_uint_fast32_t, int_fast64_t, uint_fast64_t, gl_intptr_t,
+	gl_uintptr_t, intmax_t, uintmax_t, _verify_intmax_size): Likewise.
+	* lib/stdio.in.h (rpl_fseek, rpl_ftell): Likewise.
+	* lib/sys_socket.in.h (sa_family_t, struct sockaddr_storage,
+	socklen_t, rpl_fd_isset): Likewise.
+	* lib/sys_stat.in.h (rpl_mkdir): Likewise.
+	* lib/sys_time.in.h (struct timeval): Likewise.
+	* lib/sys_times.in.h (struct tms): Likewise.
+	* lib/sys_utsname.in.h (struct utsname):
+	* lib/time.in.h (struct timespec, __time_t_must_be_integral): Likewise.
+	* lib/unistd.in.h (getpagesize): Likewise.
+	* lib/wchar.in.h (mbstate_t): Likewise.
+	* lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
+	iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit,
+	towlower, towupper): Likewise.
+	Reported by Sam Steingold <sds@gnu.org>.
+
+2011-02-05  Eric Blake  <eblake@redhat.com>
+
+	unsetenv: work around Haiku issues
+	* m4/setenv.m4 (gl_FUNC_UNSETENV): Also detect Haiku issue.
+	* doc/posix-functions/unsetenv.texi (unsetenv): Document it.
+
+2010-12-30  Bruce Korb  <bkorb@gnu.org>
+
+	libposix: avoid calling error() within libposix
+	* lib/openat-die.c: remove error module stuff when GNULIB_LIBPOSIX
+	is defined.
+
+2011-02-05  Eric Blake  <eblake@redhat.com>
+
+	strerror_r-posix: port to cygwin
+	* lib/strerror_r.c (strerror_r) [__CYGWIN__]: Add cygwin
+	implementation.
+	* m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Adjust comment.
+	* tests/test-strerror_r.c (main): Fix test.
+	* doc/posix-functions/strerror_r.texi (strerror_r): Document the
+	issue.
+
+2011-02-05  Bruno Haible  <bruno@clisp.org>
+
+	New module 'wmemchr'.
+	* modules/wmemchr: New file.
+	* lib/wchar.in.h (wmemchr): New declaration.
+	* lib/wmemchr.c: New file.
+	* lib/wmemchr-impl.h: New file, from libutf8 with modifications.
+	* m4/wmemchr.m4: New file.
+	* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemchr is declared.
+	(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCHR, HAVE_WMEMCHR.
+	* modules/wchar (Makefile.am): Substitute GNULIB_WMEMCHR, HAVE_WMEMCHR.
+	* tests/test-wchar-c++.cc: Test the declaration of wmemchr.
+	* doc/posix-functions/wmemchr.texi: Mention the new module.
+
+2011-02-04  Eric Blake  <eblake@redhat.com>
+
+	fdopendir: detect FreeBSD bug
+	* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Detect bug.
+	* doc/posix-functions/fdopendir.texi (fdopendir): Document it.
+
+2011-02-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdbool: do not define HAVE_STDBOOL_H
+	* m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Renamed from
+	AC_HEADER_STDBOOL.  All uses changed.  Do not define
+	HAVE_STDBOOL_H, as gnulib does not need this.  This change is
+	imported from the latest Autoconf git.  It was motivated by Emacs,
+	which uses gnulib but does not need HAVE_STDBOOL_H.
+
+2011-02-04  Bruno Haible  <bruno@clisp.org>
+
+	wcsnrtombs: Prepare for new module wwcsnrtombs.
+	* lib/wcsnrtombs-impl.h: New file, extracted from lib/wcsnrtombs.c.
+	* lib/wcsnrtombs.c: Include it.
+	* modules/wcsnrtombs (Files): Add lib/wcsnrtombs-impl.h.
+
+	wcsrtombs: Prepare for new module wwcsrtombs.
+	* lib/wcsrtombs-impl.h: New file, extracted from lib/wcsrtombs.c.
+	* lib/wcsrtombs.c: Include it.
+	* modules/wcsrtombs (Files): Add lib/wcsrtombs-impl.h.
+
+	mbsnrtowcs: Prepare for new module mbsnrtowwcs.
+	* lib/mbsnrtowcs-impl.h: New file, extracted from lib/mbsnrtowcs.c.
+	* lib/mbsnrtowcs.c: Include it.
+	* modules/mbsnrtowcs (Files): Add lib/mbsnrtowcs-impl.h.
+
+	mbsrtowcs: Prepare for new module mbsrtowwcs.
+	* lib/mbsrtowcs-impl.h: New file, extracted from lib/mbsrtowcs.c.
+	* lib/mbsrtowcs.c: Include it.
+	* modules/mbsrtowcs (Files): Add lib/mbsrtowcs-impl.h.
+
+2011-02-04  Bruno Haible  <bruno@clisp.org>
+
+	vasnprintf: Reduce use of malloc for small format strings.
+	* lib/printf-args.h (N_DIRECT_ALLOC_ARGUMENTS): New macro.
+	(arguments): Add room for the first 7 arguments.
+	* lib/printf-parse.h (N_DIRECT_ALLOC_DIRECTIVES): New macro.
+	(char_directives, u8_directives, u16_directives, u32_directives): Add
+	room for the first 7 directives.
+	* lib/printf-parse.c: Include <string.h>.
+	(PRINTF_PARSE): Change memory handling code so that it uses the first
+	7 preallocated elements in an 'arguments' or 'DIRECTIVES' struct.
+	* lib/vasnprintf.c (VASNPRINTF): Update memory handling code.
+	Reported by Pádraig Brady <P@draigbrady.com>.
+
 2011-01-31  Eric Blake  <eblake@redhat.com>
 
 	dup2: work around Haiku bug
@@ -220,7 +2646,7 @@
 
 2011-01-23  Paul Eggert  <eggert@cs.ucla.edu>
 
-	Allow the user to avoid the GNULIB_TEST_* macros.
+	Allow the user to avoid the HAVE_RAW_DECL_* macros.
 	* m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): New macro.
 
 2011-01-23  Bruno Haible  <bruno@clisp.org>
@@ -632,6 +3058,8 @@
 	indirectly on xalloc.  This change causes the openat substitute
 	to fall back on save_cwd when memory is tight, and for save_cwd to
 	fail instead of dying when memory is tight, but that's good enough.
+	Problem and initial idea for fix reported by Bastien Roucaries in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00170.html>.
 
 	* lib/openat-proc.c: Include stdlib.h (for malloc), not
 	xalloc.h (for xmalloc).
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,13 @@
-# Makefile for gnulib central.
+# GNU Makefile for gnulib central.
 # Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # in any medium, are permitted without royalty provided the copyright
 # notice and this notice are preserved.
 
+# This Makefile requires the use of GNU make.  Some targets require
+# that you have tools like git, makeinfo and cppi installed.
+
 # Produce some files that are not stored in the repository.
 all:
 
@@ -12,11 +15,12 @@
 info html dvi pdf:
 	cd doc && $(MAKE) $@ && $(MAKE) mostlyclean
 
+# Collect the names of rules starting with `sc_'.
+syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p'\
+			Makefile))
+
 # Perform some platform independent checks on the gnulib code.
-check: \
-  sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT			\
-  sc_pragma_columns							\
-  sc_prefer_ac_check_funcs_once
+check: $(syntax-check-rules)
 
 sc_prefer_ac_check_funcs_once:
 	if test -d .git; then						\
@@ -45,6 +49,16 @@
 		 exit 1; } || :;					\
 	else :; fi
 
+# Verify that certain (for now, only Jim Meyering and Eric Blake's)
+# *.c files are consistently cpp indented.
+sc_cpp_indent_check:
+	./gnulib-tool --extract-filelist \
+            $$(cd ./modules; grep -ilrE '(meyering|blake)' .) \
+          | sort -u \
+          | grep '\.c$$' \
+          | grep -v '/getloadavg\.c$$' \
+          | xargs cppi -c
+
 # Regenerate some files that are stored in the repository.
 regen: MODULES.html
 
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,43 @@
 
 Date        Modules         Changes
 
+2011-03-08  regex-quote     The last argument is no longer an 'int cflags'
+                            but instead a pointer to a previously constructed
+                            'struct regex_quote_spec'.
+
+2011-02-25  dirname         These modules no longer put #defines for the
+            dirname-lgpl    following symbols into <config.h>: ISSLASH,
+            backupfile      FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX,
+            lstat           FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR,
+            openat          FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE.
+            remove          Applications that need ISSLASH can include the new
+            rmdir           header dosname.h.
+            savewd
+            stat
+            unlink
+
+2011-02-14  getloadavg      This module no longer #defines C_GETLOADAVG or
+                            HAVE_GETLOADAVG, as the application no longer needs
+                            to worry about how getloadavg is defined.  It no
+                            longer defines the obsolete symbol NLIST_NAME_UNION
+                            (which should have been internal to the module
+                            anyway).  Also, support for setgid use has been
+                            removed, as nobody seems to be using it; thus
+                            GETLOADAVG_PRIVILEGED is no longer #defined and
+                            KMEM_GROUP and NEED_SETGID are no longer
+                            substituted for.
+
+2011-02-08  stdlib          Unless the random_r module is also used, this
+                            module no longer guarantees that the following are
+                            defined: struct random_data, RAND_MAX, random_r,
+                            srandom_r, initstate_r, setstate_r.
+
+2011-02-08  wctype-h        This module no longer provides the iswblank()
+                            function. If you need this function, you now need
+                            to request the 'iswblank' module.
+
+2011-02-07  wctype          This module is renamed to wctype-h.
+
 2011-01-18  multiarch       This no longer #defines AA_APPLE_UNIVERSAL_BUILD;
                             instead, use the shell var APPLE_UNIVERSAL_BUILD.
 
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2011-01-21.16; # UTC
+scriptversion=2011-03-03.12; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -874,7 +874,7 @@
 
 for command in \
   libtool \
-  "${ACLOCAL-aclocal} --force -I m4 $ACLOCAL_FLAGS" \
+  "${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
   "${AUTOCONF-autoconf} --force" \
   "${AUTOHEADER-autoheader} --force" \
   "${AUTOMAKE-automake} --add-missing --copy --force-missing"
@@ -885,7 +885,7 @@
     command="${LIBTOOLIZE-libtoolize} -c -f"
   fi
   echo "$0: $command ..."
-  $command || exit
+  eval "$command" || exit
 done
 
 
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011 Free Software Foundation, Inc.
 
-timestamp='2011-01-23'
+timestamp='2011-02-02'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -181,7 +181,7 @@
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -224,7 +224,7 @@
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -299,7 +299,7 @@
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
@@ -398,23 +398,23 @@
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -484,8 +484,8 @@
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -498,7 +498,7 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -598,52 +598,52 @@
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -734,22 +734,22 @@
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -773,14 +773,14 @@
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -808,14 +808,14 @@
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
 	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit ;;
     *:Interix*:*)
-    	case ${UNAME_MACHINE} in
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
@@ -870,7 +870,7 @@
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -895,7 +895,7 @@
 	echo crisv32-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo frv-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
 	LIBC=gnu
@@ -963,7 +963,7 @@
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -981,7 +981,7 @@
 	echo x86_64-unknown-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -990,11 +990,11 @@
 	echo i386-sequent-sysv4
 	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1026,7 +1026,7 @@
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@ -1054,13 +1054,13 @@
 	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configury will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
-        exit ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1095,8 +1095,8 @@
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
 	OS_REL='.3'
 	test -r /etc/.relid \
@@ -1139,10 +1139,10 @@
 		echo ns32k-sni-sysv
 	fi
 	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
@@ -1168,11 +1168,11 @@
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1285,13 +1285,13 @@
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1331,11 +1331,11 @@
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -57,13 +57,6 @@
     aix*)
       wl='-Wl,'
       ;;
-    darwin*)
-      case $cc_basename in
-        xlc*)
-          wl='-Wl,'
-          ;;
-      esac
-      ;;
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       ;;
     hpux9* | hpux10* | hpux11*)
@@ -72,9 +65,7 @@
     irix5* | irix6* | nonstopux*)
       wl='-Wl,'
       ;;
-    newsos6)
-      ;;
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
         ecc*)
           wl='-Wl,'
@@ -85,17 +76,26 @@
         lf95*)
           wl='-Wl,'
           ;;
-        pgcc | pgf77 | pgf90)
+        nagfor*)
+          wl='-Wl,-Wl,,'
+          ;;
+        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
           wl='-Wl,'
           ;;
         ccc*)
           wl='-Wl,'
           ;;
+        xl* | bgxl* | bgf* | mpixl*)
+          wl='-Wl,'
+          ;;
         como)
           wl='-lopt='
           ;;
         *)
           case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ F* | *Sun*Fortran*)
+              wl=
+              ;;
             *Sun\ C*)
               wl='-Wl,'
               ;;
@@ -103,13 +103,24 @@
           ;;
       esac
       ;;
+    newsos6)
+      ;;
+    *nto* | *qnx*)
+      ;;
     osf3* | osf4* | osf5*)
       wl='-Wl,'
       ;;
     rdos*)
       ;;
     solaris*)
-      wl='-Wl,'
+      case $cc_basename in
+        f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+          wl='-Qoption ld '
+          ;;
+        *)
+          wl='-Wl,'
+          ;;
+      esac
       ;;
     sunos4*)
       wl='-Qoption ld '
@@ -171,15 +182,14 @@
       fi
       ;;
     amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we cannot use
-      # them.
-      ld_shlibs=no
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
       ;;
     beos*)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
@@ -198,11 +208,13 @@
         ld_shlibs=no
       fi
       ;;
+    haiku*)
+      ;;
     interix[3-9]*)
       hardcode_direct=no
       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       ;;
-    gnu* | linux* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
         :
       else
@@ -325,10 +337,14 @@
       fi
       ;;
     amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
       ;;
     bsdi[45]*)
       ;;
@@ -342,16 +358,10 @@
       ;;
     darwin* | rhapsody*)
       hardcode_direct=no
-      if test "$GCC" = yes ; then
+      if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
         :
       else
-        case $cc_basename in
-          xlc*)
-            ;;
-          *)
-            ld_shlibs=no
-            ;;
-        esac
+        ld_shlibs=no
       fi
       ;;
     dgux*)
@@ -417,6 +427,8 @@
       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       hardcode_libdir_separator=:
       ;;
+    *nto* | *qnx*)
+      ;;
     openbsd*)
       if test -f /usr/libexec/ld.so; then
         hardcode_direct=yes
@@ -512,7 +524,12 @@
     library_names_spec='$libname$shrext'
     ;;
   amigaos*)
-    library_names_spec='$libname.a'
+    case "$host_cpu" in
+      powerpc*)
+        library_names_spec='$libname$shrext' ;;
+      m68k)
+        library_names_spec='$libname.a' ;;
+    esac
     ;;
   beos*)
     library_names_spec='$libname$shrext'
@@ -542,6 +559,9 @@
   gnu*)
     library_names_spec='$libname$shrext'
     ;;
+  haiku*)
+    library_names_spec='$libname$shrext'
+    ;;
   hpux9* | hpux10* | hpux11*)
     case $host_cpu in
       ia64*)
@@ -577,7 +597,7 @@
     ;;
   linux*oldld* | linux*aout* | linux*coff*)
     ;;
-  linux* | k*bsd*-gnu)
+  linux* | k*bsd*-gnu | kopensolaris*-gnu)
     library_names_spec='$libname$shrext'
     ;;
   knetbsd*-gnu)
@@ -589,7 +609,7 @@
   newsos6)
     library_names_spec='$libname$shrext'
     ;;
-  nto-qnx*)
+  *nto* | *qnx*)
     library_names_spec='$libname$shrext'
     ;;
   openbsd*)
@@ -620,6 +640,9 @@
   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
     library_names_spec='$libname$shrext'
     ;;
+  tpf*)
+    library_names_spec='$libname$shrext'
+    ;;
   uts4*)
     library_names_spec='$libname$shrext'
     ;;
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011 Free Software Foundation, Inc.
 
-timestamp='2011-01-01'
+timestamp='2011-03-23'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -76,7 +76,7 @@
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
 Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -158,8 +158,8 @@
 		os=
 		basic_machine=$1
 		;;
-        -bluegene*)
-	        os=-cnk
+	-bluegene*)
+		os=-cnk
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
@@ -175,10 +175,10 @@
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -288,7 +288,7 @@
 	| ns16k | ns32k \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
 	| rx \
 	| score \
@@ -296,12 +296,12 @@
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
@@ -325,6 +325,18 @@
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
@@ -384,22 +396,22 @@
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
 	| romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile-* | tilegx-* \
 	| tron-* \
 	| ubicom32-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -424,7 +436,7 @@
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -507,7 +519,7 @@
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
 		;;
@@ -755,7 +767,7 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-        microblaze)
+	microblaze)
 		basic_machine=microblaze-xilinx
 		;;
 	mingw32)
@@ -862,10 +874,10 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-        neo-tandem)
+	neo-tandem)
 		basic_machine=neo-tandem
 		;;
-        nse-tandem)
+	nse-tandem)
 		basic_machine=nse-tandem
 		;;
 	nsr-tandem)
@@ -950,9 +962,10 @@
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -1046,6 +1059,9 @@
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1102,8 +1118,8 @@
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-        # This must be matched before tile*.
-        tilegx*)
+	# This must be matched before tile*.
+	tilegx*)
 		basic_machine=tilegx-unknown
 		os=-linux-gnu
 		;;
@@ -1178,6 +1194,9 @@
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1275,11 +1294,11 @@
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
-        -auroraux)
-	        os=-auroraux
+	-auroraux)
+		os=-auroraux
 		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1364,7 +1383,7 @@
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1413,7 +1432,7 @@
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1458,8 +1477,8 @@
 	-dicos*)
 		os=-dicos
 		;;
-        -nacl*)
-	        ;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1482,10 +1501,10 @@
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1497,8 +1516,8 @@
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
 		;;
 	tic54x-*)
 		os=-coff
@@ -1534,7 +1553,7 @@
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1561,7 +1580,7 @@
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2011-01-04.17; # UTC
+scriptversion=2011-02-19.19; # UTC
 
 # Copyright (C) 2007-2011 Free Software Foundation, Inc.
 #
@@ -80,6 +80,7 @@
 
 # Avoid meddling by environment variable of the same name.
 v=
+v_from_git=
 
 # First see if there is a tarball-only version file.
 # then try "git describe", then default.
@@ -134,24 +135,30 @@
     # Change the first '-' to a '.', so version-comparing tools work properly.
     # Remove the "g" in git describe's output string, to save a byte.
     v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
+    v_from_git=1
 else
     v=UNKNOWN
 fi
 
 v=`echo "$v" |sed 's/^v//'`
 
-# Don't declare a version "dirty" merely because a time stamp has changed.
-git update-index --refresh > /dev/null 2>&1
+# Test whether to append the "-dirty" suffix only if the version
+# string we're using came from git.  I.e., skip the test if it's "UNKNOWN"
+# or if it came from .tarball-version.
+if test -n "$v_from_git"; then
+  # Don't declare a version "dirty" merely because a time stamp has changed.
+  git update-index --refresh > /dev/null 2>&1
 
-dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
-case "$dirty" in
-    '') ;;
-    *) # Append the suffix only if there isn't one already.
-        case $v in
-          *-dirty) ;;
-          *) v="$v-dirty" ;;
-        esac ;;
-esac
+  dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
+  case "$dirty" in
+      '') ;;
+      *) # Append the suffix only if there isn't one already.
+          case $v in
+            *-dirty) ;;
+            *) v="$v-dirty" ;;
+          esac ;;
+  esac
+fi
 
 # Omit the trailing newline, so that m4_esyscmd can use the result directly.
 echo "$v" | tr -d "$nl"
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-01-19.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,6 +156,10 @@
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
+	# Protect names problematic for `test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
 	shift;;
 
     -T) no_target_directory=true;;
@@ -186,6 +190,10 @@
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -232,9 +240,9 @@
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for `test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -256,12 +264,7 @@
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
@@ -389,7 +392,7 @@
 
       case $dstdir in
 	/*) prefix='/';;
-	-*) prefix='./';;
+	[-=\(\)!]*) prefix='./';;
 	*)  prefix='';;
       esac
 
@@ -407,7 +410,7 @@
 
       for d
       do
-	test -z "$d" && continue
+	test X"$d" = X && continue
 
 	prefix=$prefix$d
 	if test -d "$prefix"; then
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2011-02-01.10}
+\def\texinfoversion{2011-02-24.09}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -158,6 +158,7 @@
 \def\spaceisspace{\catcode`\ =\spacecat}
 
 % sometimes characters are active, so we need control sequences.
+\chardef\ampChar   = `\&
 \chardef\colonChar = `\:
 \chardef\commaChar = `\,
 \chardef\dashChar  = `\-
@@ -217,7 +218,7 @@
   \tracingmacros2
   \tracingrestores1
   \showboxbreadth\maxdimen \showboxdepth\maxdimen
-  \ifx\eTeXversion\undefined\else % etex gives us more logging
+  \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
     \tracingscantokens1
     \tracingifs1
     \tracinggroups1
@@ -547,7 +548,7 @@
 }
 \def\inenvironment#1{%
   \ifx#1\empty
-    out of any environment%
+    outside of any environment%
   \else
     in environment \expandafter\string#1%
   \fi
@@ -610,7 +611,7 @@
   \else\ifx\temp\offword \plainnonfrenchspacing
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
   \fi\fi
 }
 
@@ -1081,9 +1082,8 @@
 \newif\ifpdfmakepagedest
 
 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set).  So we test for \relax and 0 as well as \undefined,
-% borrowed from ifpdf.sty.
-\ifx\pdfoutput\undefined
+% can be set).  So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
 \else
   \ifx\pdfoutput\relax
   \else
@@ -1515,7 +1515,7 @@
 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
 % (\pdffontattr was introduced many years ago, but people still run
 % older pdftex's; it's easy to conditionalize, so we do.)
-\ifpdf \ifx\pdffontattr\undefined \else
+\ifpdf \ifx\pdffontattr\thisisundefined \else
   \begingroup
     \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
     \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
@@ -1782,7 +1782,7 @@
 % Use cm as the default font prefix.
 % To specify the font prefix, you must define \fontprefix
 % before you read in texinfo.tex.
-\ifx\fontprefix\undefined
+\ifx\fontprefix\thisisundefined
 \def\fontprefix{cm}
 \fi
 % Support font families that don't use the same naming scheme as CM.
@@ -2296,12 +2296,11 @@
 
 \let\markupsetuplqkbd \markupsetnoligaturesquoteleft
 
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report.  xpdf does work with the
-% regular 0x27.
+% Allow an option to not use regular directed right quote/apostrophe
+% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
+% The undirected quote is ugly, so don't make it the default, but it
+% works for pasting with more pdf viewers (at least evince), the
+% lilypond developers report.  xpdf does work with the regular 0x27.
 %
 \def\codequoteright{%
   \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
@@ -2325,6 +2324,36 @@
   \else \char'22 \fi
 }
 
+% Commands to set the quote options.
+% 
+\parseargdef\codequoteundirected{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxicodequoteundirected\endcsname
+      = t%
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxicodequoteundirected\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
+  \fi\fi
+}
+%
+\parseargdef\codequotebacktick{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxicodequotebacktick\endcsname
+      = t%
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxicodequotebacktick\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
+  \fi\fi
+}
+
 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 \def\noligaturesquoteleft{\relax\lq}
 
@@ -2491,22 +2520,8 @@
     \codex
   }
 }
-% Handle @url similarly to \code, but allows line breaks after .#?/ (only).
-{
-  \catcode`\.=\active \catcode`\#=\active
-  \catcode`\?=\active \catcode`\/=\active
-  %
-  \global\def\urefcode{\begingroup
-    \setupmarkupstyle{code}%
-    \catcode\dotChar=\active   \catcode\hashChar=\active
-    \catcode\questChar=\active \catcode\slashChar=\active
-    \let.\urefcodedot
-    \let#\urefcodehash
-    \let?\urefcodequestion
-    \let/\urefcodeslash
-    \codex
-  }
-}
+
+\def\codex #1{\tclose{#1}\endgroup}
 
 \def\realdash{-}
 \def\codedash{-\discretionary{}{}{}}
@@ -2521,25 +2536,6 @@
              \discretionary{}{}{}}%
             {\_}%
 }
-% we put a little stretch before and after the breakable chars, to help
-% line breaking of long url's.  The unequal skips make look better in
-% cmtt at least, especially for dots.
-\def\urefprestretch{\nobreak \hskip0pt plus.13em }
-\def\urefpoststretch{\allowbreak \hskip0pt plus.1em }
-\def\urefcodedot{\urefprestretch .\urefpoststretch}
-\def\urefcodehash{\urefprestretch \#\urefpoststretch}
-\def\urefcodequestion{\urefprestretch ?\urefpoststretch}
-\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
-{
-  \catcode`\/=\active
-  \global\def\urefcodeslashfinish{%
-    \urefprestretch \slashChar
-    % Allow line break only after the final / in a sequence of
-    % slashes, to avoid line break between the slashes in http://.
-    \ifx\next/\else \urefpoststretch \fi
-  }
-}
-\def\codex #1{\tclose{#1}\endgroup}
 
 % An additional complication: the above will allow breaks after, e.g.,
 % each of the four underscores in __typeof__.  This is undesirable in
@@ -2559,10 +2555,156 @@
     \allowcodebreaksfalse
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+    \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
   \fi\fi
 }
 
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself.  First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+      \fi
+    \else
+      \code{#1}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
+% This \urefbreak definition is the active one.
+\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+\let\uref=\urefbreak
+\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
+\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+      \fi
+    \else
+      \urefcode{#1}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
+% Allow line breaks around only a few characters (only).
+\def\urefcatcodes{%
+  \catcode\ampChar=\active   \catcode\dotChar=\active
+  \catcode\hashChar=\active  \catcode\questChar=\active
+  \catcode\slashChar=\active
+}
+{
+  \urefcatcodes
+  %
+  \global\def\urefcode{\begingroup
+    \setupmarkupstyle{code}%
+    \urefcatcodes
+    \let&\urefcodeamp
+    \let.\urefcodedot
+    \let#\urefcodehash
+    \let?\urefcodequest
+    \let/\urefcodeslash
+    \codex
+  }
+  %
+  % By default, they are just regular characters.
+  \global\def&{\normalamp}
+  \global\def.{\normaldot}
+  \global\def#{\normalhash}
+  \global\def?{\normalquest}
+  \global\def/{\normalslash}
+}
+
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's.  The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+%
+\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+  \catcode`\/=\active
+  \global\def\urefcodeslashfinish{%
+    \urefprestretch \slashChar
+    % Allow line break only after the final / in a sequence of
+    % slashes, to avoid line break between the slashes in http://.
+    \ifx\next/\else \urefpoststretch \fi
+  }
+}
+
+% One more complication: by default we'll break after the special
+% characters, but some people like to break before the special chars, so
+% allow that.  Also allow no breaking at all, for manual control.
+% 
+\parseargdef\urefbreakstyle{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\wordnone
+    \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
+  \else\ifx\txiarg\wordbefore
+    \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+  \else\ifx\txiarg\wordafter
+    \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
+  \fi\fi\fi
+}
+\def\wordafter{after}
+\def\wordbefore{before}
+\def\wordnone{none}
+
+\urefbreakstyle after
+
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+  \def\email#1{\doemail#1,,\finish}
+  \def\doemail#1,#2,#3\finish{\begingroup
+    \unsepspaces
+    \pdfurl{mailto:#1}%
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+    \endlink
+  \endgroup}
+\else
+  \let\email=\uref
+\fi
+
 % @kbd is like @code, except that if the argument is just one @key command,
 % then @kbd has no effect.
 \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
@@ -2580,7 +2722,7 @@
     \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
+    \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
   \fi\fi\fi
 }
 \def\worddistinct{distinct}
@@ -2608,79 +2750,6 @@
 \parseargdef\clickstyle{\def\click{#1}}
 \def\click{\arrow}
 
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself.  First (mandatory) arg is the url.  Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
-  \unsepspaces
-  \pdfurl{#1}%
-  \setbox0 = \hbox{\ignorespaces #3}%
-  \ifdim\wd0 > 0pt
-    \unhbox0 % third arg given, show only that
-  \else
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0 > 0pt
-      \ifpdf
-        \unhbox0             % PDF: 2nd arg given, show only it
-      \else
-        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
-      \fi
-    \else
-      \code{#1}% only url given, so show it
-    \fi
-  \fi
-  \endlink
-\endgroup}
-
-\def\nouref#1,#2,#3,#4\finish{\begingroup  % doesn't work in @example
-  \unsepspaces
-  \pdfurl{#1}%
-  \setbox0 = \hbox{\ignorespaces #3}%
-  \ifdim\wd0 > 0pt
-    \unhbox0 % third arg given, show only that
-  \else
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0 > 0pt
-      \ifpdf
-        \unhbox0             % PDF: 2nd arg given, show only it
-      \else
-        % \empty at the end of \scantokens arg gets rid of
-        % trailing newline (and ultimate spurious whitespace).
-        \unhbox0\ (\urefcode{\scantokens{#1\empty}})% DVI: 2nd arg given,
-                                                    % show both it and url
-      \fi
-    \else
-      \urefcode{\scantokens{#1\empty}}% only url given, so show it
-    \fi
-  \fi
-  \endlink
-\endgroup}
-
-% @url synonym for @uref, since that's how everyone uses it.
-%
-\let\url=\uref
-
-% rms does not like angle brackets --karl, 17may97.
-% So now @email is just like @uref, unless we are pdf.
-%
-%\def\email#1{\angleleft{\tt #1}\angleright}
-\ifpdf
-  \def\email#1{\doemail#1,,\finish}
-  \def\doemail#1,#2,#3\finish{\begingroup
-    \unsepspaces
-    \pdfurl{mailto:#1}%
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
-    \endlink
-  \endgroup}
-\else
-  \let\email=\uref
-\fi
-
 % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
 %
@@ -3068,7 +3137,7 @@
 %  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
 % so we'll define it if necessary.
 %
-\ifx\Orb\undefined
+\ifx\Orb\thisisundefined
 \def\Orb{\mathhexbox20D}
 \fi
 
@@ -3343,7 +3412,7 @@
 % This produces Day Month Year style of output.
 % Only define if not already defined, in case a txi-??.tex file has set
 % up a different format (e.g., txi-cs.tex does this).
-\ifx\today\undefined
+\ifx\today\thisisundefined
 \def\today{%
   \number\day\space
   \ifcase\month
@@ -5677,6 +5746,8 @@
 %
 \def\sectionheading#1#2#3#4{%
   {%
+    \checkenv{}% should not be in an environment.
+    %
     % Switch to the right set of fonts.
     \csname #2fonts\endcsname \rmisbold
     %
@@ -6422,7 +6493,7 @@
 %
 \def\Equotation{%
   \par
-  \ifx\quotationauthor\undefined\else
+  \ifx\quotationauthor\thisisundefined\else
     % indent a bit.
     \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
   \fi
@@ -6957,7 +7028,7 @@
 
 % To do this right we need a feature of e-TeX, \scantokens,
 % which we arrange to emulate with a temporary file in ordinary TeX.
-\ifx\eTeXversion\undefined
+\ifx\eTeXversion\thisisundefined
   \newwrite\macscribble
   \def\scantokens#1{%
     \toks0={#1}%
@@ -7379,6 +7450,27 @@
   \fi
 }
 
+% @xrefautosectiontitle on|off says whether @section(ing) names are used
+% automatically in xrefs, if the third arg is not explicitly specified.
+% This was provided as a "secret" @set xref-automatic-section-title
+% variable, now it's official.
+% 
+\parseargdef\xrefautomaticsectiontitle{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETxref-automatic-section-title\endcsname
+      = \empty
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETxref-automatic-section-title\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
+                must be on|off}%
+  \fi\fi
+}
+
+
 % @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
 % the node name, #2 the name of the Info cross-reference, #3 the printed
 % node name, #4 the name of the Info file, #5 the name of the printed
@@ -7395,7 +7487,7 @@
   \setbox0=\hbox{\printedrefname\unskip}%
   \ifdim \wd0 = 0pt
     % No printed node name was explicitly given.
-    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
       % Use the node name inside the square brackets.
       \def\printedrefname{\ignorespaces #1}%
     \else
@@ -7865,7 +7957,7 @@
   it from ftp://tug.org/tex/epsf.tex.}
 %
 \def\image#1{%
-  \ifx\epsfbox\undefined
+  \ifx\epsfbox\thisiundefined
     \ifwarnednoepsf \else
       \errhelp = \noepsfhelp
       \errmessage{epsf.tex not found, images will be ignored}%
@@ -8360,7 +8452,7 @@
   \gdef^^b9{$^1$}
   \gdef^^ba{\ordm}
   %
-  \gdef^^bb{\guilletright}
+  \gdef^^bb{\guillemetright}
   \gdef^^bc{$1\over4$}
   \gdef^^bd{$1\over2$}
   \gdef^^be{$3\over4$}
@@ -9305,24 +9397,15 @@
 \catcode`\^^? = 14
 
 % Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other
-\catcode`\~=\other
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\catcode`\$=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-\def\normaldollar{$}%$ font-lock fix
+\catcode`\"=\other \def\normaldoublequote{"}
+\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
+\catcode`\+=\other \def\normalplus{+}
+\catcode`\<=\other \def\normalless{<}
+\catcode`\>=\other \def\normalgreater{>}
+\catcode`\^=\other \def\normalcaret{^}
+\catcode`\_=\other \def\normalunderscore{_}
+\catcode`\|=\other \def\normalverticalbar{|}
+\catcode`\~=\other \def\normaltilde{~}
 
 % This macro is used to make a character print one way in \tt
 % (where it can probably be output as-is), and another way in other fonts,
@@ -9415,16 +9498,16 @@
 % the literal character `\'.
 %
 @def@normalturnoffactive{%
+  @let"=@normaldoublequote
+  @let$=@normaldollar %$ font-lock fix
+  @let+=@normalplus
+  @let<=@normalless
+  @let>=@normalgreater
   @let\=@normalbackslash
-  @let"=@normaldoublequote
-  @let~=@normaltilde
   @let^=@normalcaret
   @let_=@normalunderscore
   @let|=@normalverticalbar
-  @let<=@normalless
-  @let>=@normalgreater
-  @let+=@normalplus
-  @let$=@normaldollar %$ font-lock fix
+  @let~=@normaltilde
   @markupsetuplqdefault
   @markupsetuprqdefault
   @unsepspaces
@@ -9456,10 +9539,16 @@
 % Say @foo, not \foo, in error messages.
 @escapechar = `@@
 
+% These (along with & and #) are made active for url-breaking, so need
+% active definitions as the normal characters.
+@def@normaldot{.}
+@def@normalquest{?}
+@def@normalslash{/}
+
 % These look ok in all fonts, so just make them not special.
-@catcode`@& = @other
-@catcode`@# = @other
-@catcode`@% = @other
+@catcode`@& = @other @def@normalamp{&}
+@catcode`@# = @other @def@normalhash{#}
+@catcode`@% = @other @def@normalpercent{%}
 
 @c Finally, make ` and ' active, so that txicodequoteundirected and
 @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}.  If we
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -3,12 +3,6 @@
 <!--#include virtual="/server/banner.html" -->
 <h2>%%TITLE%%</h2>
 
-<!-- This document is in XML, and xhtml 1.0 -->
-<!-- Please make sure to properly nest your tags -->
-<!-- and ensure that your final document validates -->
-<!-- consistent with W3C xhtml 1.0 and CSS standards -->
-<!-- See validator.w3.org -->
-
 <address>Free Software Foundation</address>
 <address>last updated %%DATE%%</address>
 
@@ -66,29 +60,28 @@
 <p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
 script</a>.)</p>
 
-<!-- If needed, change the copyright block at the bottom. In general, -->
-<!-- all pages on the GNU web server should have the section about    -->
-<!-- verbatim copying.  Please do NOT remove this without talking     -->
-<!-- with the webmasters first. -->
-<!-- Please make sure the copyright date is consistent with the document -->
-<!-- and that it is like this "2001, 2002" not this "2001-2002." -->
+<!-- If needed, change the copyright block at the bottom. In general,
+     all pages on the GNU web server should have the section about
+     verbatim copying.  Please do NOT remove this without talking
+     with the webmasters first.
+     Please make sure the copyright date is consistent with the document
+     and that it is like this: "2001, 2002", not this: "2001-2002". -->
 </div><!-- for id="content", starts in the include above -->
 <!--#include virtual="/server/footer.html" -->
 <div id="footer">
 
-<p>
-Please send FSF &amp; GNU inquiries to
+<p>Please send general FSF &amp; GNU inquiries to
 <a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
 There are also <a href="/contact/">other ways to contact</a>
 the FSF.<br />
 Please send broken links and other corrections or suggestions to
-<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.
-</p>
+<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
+
+<p>Copyright &copy; 2011 Free Software Foundation, Inc.</p>
 
-<p>Copyright &copy; 2010 Free Software Foundation, Inc.</p>
-
-<p>Verbatim copying and distribution of this entire article is
-permitted in any medium, provided this notice is preserved.</p>
+<p>Verbatim copying and distribution of this entire article are
+permitted worldwide, without royalty, in any medium, provided this
+notice, and the copyright notice, are preserved.</p>
 
 </div>
 </div>
--- a/doc/gendocs_template_min
+++ b/doc/gendocs_template_min
@@ -10,12 +10,6 @@
 <link rev="made" href="webmasters@gnu.org" />
 </head>
 
-<!-- This document is in XML, and xhtml 1.0 -->
-<!-- Please make sure to properly nest your tags -->
-<!-- and ensure that your final document validates -->
-<!-- consistent with W3C xhtml 1.0 and CSS standards -->
-<!-- See validator.w3.org -->
-
 <body>
 
 <h3>%%TITLE%%</h3>
@@ -80,22 +74,21 @@
 <p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
 script</a>.)</p>
 
-<div class="copyright">
-<p>
-Please send FSF &amp; GNU inquiries to
+<div id="footer" class="copyright">
+
+<p>Please send general FSF &amp; GNU inquiries to
 <a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
 There are also <a href="/contact/">other ways to contact</a>
 the FSF.<br />
-Please send broken links and other corrections (or suggestions) to
-<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.
-</p>
+Please send broken links and other corrections or suggestions to
+<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
 
-<p>Copyright &copy; 2010 Free Software Foundation, Inc.</p>
+<p>Copyright &copy; 2011 Free Software Foundation, Inc.</p>
 
-<p>Verbatim copying and distribution of this entire article is
-permitted in any medium, provided this notice is preserved.</p>
+<p>Verbatim copying and distribution of this entire article are
+permitted worldwide, without royalty, in any medium, provided this
+notice, and the copyright notice, are preserved.</p>
 
 </div>
-
 </body>
 </html>
--- a/doc/glibc-functions/getloadavg.texi
+++ b/doc/glibc-functions/getloadavg.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, Interix 3.5, BeOS.
+AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 2.6, Cygwin, mingw, Interix 3.5, BeOS.
 @item
 This function is declared in @code{<sys/loadavg.h>}, not @code{<stdlib.h>},
 on some platforms:
--- a/doc/gnulib-tool.texi
+++ b/doc/gnulib-tool.texi
@@ -483,6 +483,14 @@
 were integrated into Gnulib and now mismatch the @file{po/} infrastructure.
 In this case, fetch and install the new GNU gettext release and run
 @code{gettextize} followed by @code{gnulib-tool}.
+
+@item
+When you invoke @code{autoreconf} after @code{gnulib-tool}, make sure to
+not invoke @code{autopoint} a second time, by setting the @code{AUTOPOINT}
+environment variable, like this:
+@smallexample
+$ env AUTOPOINT=true autoreconf --install
+@end smallexample
 @end enumerate
 
 
--- a/doc/posix-functions/fdopendir.texi
+++ b/doc/posix-functions/fdopendir.texi
@@ -23,6 +23,10 @@
 This function does not reject non-directory file descriptors on some
 platforms:
 GNU/Hurd.
+@item
+This function mistakenly closes non-directory file descriptors on some
+platforms:
+FreeBSD 8.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/getaddrinfo.texi
+++ b/doc/posix-functions/getaddrinfo.texi
@@ -11,11 +11,11 @@
 @item
 This function is missing on some platforms:
 HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
+@item
+On Windows, this function is declared in @code{<ws2tcpip.h>} rather than in
+@code{<netdb.h>}.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-On Windows, this function is declared in @code{<ws2tcpip.h>} rather than in
-@code{<netdb.h>}.
 @end itemize
--- a/doc/posix-functions/iswalnum.texi
+++ b/doc/posix-functions/iswalnum.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswalnum.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswalpha.texi
+++ b/doc/posix-functions/iswalpha.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswalpha.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswblank.texi
+++ b/doc/posix-functions/iswblank.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswblank.html}
 
-Gnulib module: wctype
+Gnulib module: iswblank
 
 Portability problems fixed by Gnulib:
 @itemize
@@ -15,6 +15,9 @@
 This function is declared but not defined on some platforms:
 IRIX 6.5.30.
 @item
+This function is not declared (without @code{-D_GNU_SOURCE}) on some platforms:
+glibc 2.8.
+@item
 This function returns 0 for all possible arguments on some platforms:
 Linux libc5.
 @end itemize
--- a/doc/posix-functions/iswcntrl.texi
+++ b/doc/posix-functions/iswcntrl.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswcntrl.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswctype.texi
+++ b/doc/posix-functions/iswctype.texi
@@ -4,18 +4,22 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswctype.html}
 
-Gnulib module: ---
+Gnulib module: iswctype
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
+@item
+This function is declared in @code{<wchar.h>}, not in @code{<wctype.h>}, on
+some platforms:
+HP-UX 11.00.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/iswdigit.texi
+++ b/doc/posix-functions/iswdigit.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswdigit.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswgraph.texi
+++ b/doc/posix-functions/iswgraph.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswgraph.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswlower.texi
+++ b/doc/posix-functions/iswlower.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswlower.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswprint.texi
+++ b/doc/posix-functions/iswprint.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswprint.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswpunct.texi
+++ b/doc/posix-functions/iswpunct.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswpunct.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswspace.texi
+++ b/doc/posix-functions/iswspace.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswspace.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswupper.texi
+++ b/doc/posix-functions/iswupper.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswupper.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/iswxdigit.texi
+++ b/doc/posix-functions/iswxdigit.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/iswxdigit.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/mbrtowc.texi
+++ b/doc/posix-functions/mbrtowc.texi
@@ -30,7 +30,7 @@
 This function returns the total number of bytes that make up the multibyte
 character, not the number of bytes that were needed to complete the multibyte
 character, on some platforms:
-HP-UX 11.11, Solaris 11 2010-11.
+HP-UX 11.11, Solaris 11 2010-11, mingw.
 @item
 This function may not return 0 when parsing the NUL character on some platforms:
 Solaris 9.
--- a/doc/posix-functions/mbsinit.texi
+++ b/doc/posix-functions/mbsinit.texi
@@ -11,6 +11,9 @@
 @item
 This function is missing on some platforms:
 HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
+@item
+This function always returns 1, even in multibyte locales, on some platforms:
+mingw.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/mbsrtowcs.texi
+++ b/doc/posix-functions/mbsrtowcs.texi
@@ -14,6 +14,9 @@
 @item
 This function does not work on some platforms:
 HP-UX 11, Solaris 11 2010-11.
+@item
+This function does not work when the first argument is NULL on some platforms:
+mingw.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/mbtowc.texi
+++ b/doc/posix-functions/mbtowc.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/mbtowc.html}
 
-Gnulib module: ---
+Gnulib module: mbtowc
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/realloc.texi
+++ b/doc/posix-functions/realloc.texi
@@ -16,6 +16,19 @@
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+It is not portable to call @code{realloc} with a size of 0.  With a
+NULL pointer argument, this is the same ambiguity as @code{malloc (0)}
+on whether a unique zero-size object is created.  With a non-NULL
+pointer argument, C99 requires that if @code{realloc (p, 0)} returns
+@code{NULL} then @code{p} is still valid.  Among implementations that
+obey C99, behavior varies on whether @code{realloc (p, 0)} always
+fails and leaves @code{p} valid, or usually succeeds and returns a
+unique zero-size object; either way, a program not suspecting these
+semantics will leak memory (either the still-valid @code{p}, or the
+non-NULL return value).  Meanwhile, several implementations violate
+C99, by always calling @code{free (p)} but returning NULL:
+glibc, Cygwin
 @end itemize
 
 Extension: Gnulib provides a module @samp{realloc-gnu} that substitutes a
--- a/doc/posix-functions/setlocale.texi
+++ b/doc/posix-functions/setlocale.texi
@@ -4,10 +4,22 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/setlocale.html}
 
-Gnulib module: ---
+Gnulib module: setlocale
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+On Windows platforms (excluding Cygwin), @code{setlocale(@var{category},NULL)}
+ignores the environment variables @code{LC_ALL}, @code{@var{category}}, and
+@code{LANG}.
+@item
+On Windows platforms (excluding Cygwin), @code{setlocale(LC_ALL,@var{name})}
+succeeds and sets the LC_CTYPE category to @samp{C} when it does not support
+the encoding, instead of failing.
+@item
+On Windows platforms (excluding Cygwin), @code{setlocale} understands different
+locale names, that are not based on ISO 639 language names and ISO 3166 country
+names.
 @end itemize
 
 Portability problems not fixed by Gnulib:
@@ -15,7 +27,6 @@
 @item
 On Cygwin 1.5.x, which doesn't have locales,
 @code{setlocale(LC_ALL,NULL)} always returns @code{"C"}.
-
 @item
 On Cygwin 1.7.0, only the charset portion of a locale designation is honored.
 @end itemize
--- a/doc/posix-functions/strerror_r.texi
+++ b/doc/posix-functions/strerror_r.texi
@@ -12,7 +12,8 @@
 This function is missing on some platforms:
 NetBSD 3.0, HP-UX 11.23, IRIX 6.5, Solaris 9, mingw.
 @item
-glibc has an incompatible version of this function.  The POSIX compliant code
+glibc and Cygwin have an incompatible version of this function.  The
+POSIX compliant code
 @smallexample
 char *s = (strerror_r (err, buf, buflen) == 0 ? buf : NULL);
 @end smallexample
--- a/doc/posix-functions/towctrans.texi
+++ b/doc/posix-functions/towctrans.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/towctrans.html}
 
-Gnulib module: ---
+Gnulib module: towctrans
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 6.5, Solaris 2.5.1, mingw, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 6.5, Solaris 2.5.1, mingw, Interix 3.5.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/towlower.texi
+++ b/doc/posix-functions/towlower.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/towlower.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/towupper.texi
+++ b/doc/posix-functions/towupper.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/towupper.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/unsetenv.texi
+++ b/doc/posix-functions/unsetenv.texi
@@ -25,7 +25,7 @@
 @item
 This function removes only the first value association for the given
 environment variable, not all of them, on some platforms:
-Solaris 11 2010-11.
+Solaris 11 2010-11, Haiku.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/wcpcpy.texi
+++ b/doc/posix-functions/wcpcpy.texi
@@ -4,19 +4,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcpcpy.html}
 
-Gnulib module: ---
+Gnulib module: wcpcpy
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX
-11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcpncpy.texi
+++ b/doc/posix-functions/wcpncpy.texi
@@ -4,19 +4,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcpncpy.html}
 
-Gnulib module: ---
+Gnulib module: wcpncpy
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX
-11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcscasecmp.texi
+++ b/doc/posix-functions/wcscasecmp.texi
@@ -4,19 +4,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcscasecmp.html}
 
-Gnulib module: ---
+Gnulib module: wcscasecmp
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 4.3.2, HP-UX
-11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcscat.texi
+++ b/doc/posix-functions/wcscat.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcscat.html}
 
-Gnulib module: ---
+Gnulib module: wcscat
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcschr.texi
+++ b/doc/posix-functions/wcschr.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcschr.html}
 
-Gnulib module: ---
+Gnulib module: wcschr
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcscmp.texi
+++ b/doc/posix-functions/wcscmp.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcscmp.html}
 
-Gnulib module: ---
+Gnulib module: wcscmp
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcscoll.texi
+++ b/doc/posix-functions/wcscoll.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcscoll.html}
 
-Gnulib module: ---
+Gnulib module: wcscoll
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcscpy.texi
+++ b/doc/posix-functions/wcscpy.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcscpy.html}
 
-Gnulib module: ---
+Gnulib module: wcscpy
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcscspn.texi
+++ b/doc/posix-functions/wcscspn.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcscspn.html}
 
-Gnulib module: ---
+Gnulib module: wcscspn
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsdup.texi
+++ b/doc/posix-functions/wcsdup.texi
@@ -4,19 +4,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsdup.html}
 
-Gnulib module: ---
+Gnulib module: wcsdup
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 4.3.2, HP-UX
-11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, BeOS.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcslen.texi
+++ b/doc/posix-functions/wcslen.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcslen.html}
 
-Gnulib module: ---
+Gnulib module: wcslen
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsncasecmp.texi
+++ b/doc/posix-functions/wcsncasecmp.texi
@@ -4,19 +4,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsncasecmp.html}
 
-Gnulib module: ---
+Gnulib module: wcsncasecmp
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 4.3.2, HP-UX
-11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, BeOS.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsncat.texi
+++ b/doc/posix-functions/wcsncat.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsncat.html}
 
-Gnulib module: ---
+Gnulib module: wcsncat
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsncmp.texi
+++ b/doc/posix-functions/wcsncmp.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsncmp.html}
 
-Gnulib module: ---
+Gnulib module: wcsncmp
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsncpy.texi
+++ b/doc/posix-functions/wcsncpy.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsncpy.html}
 
-Gnulib module: ---
+Gnulib module: wcsncpy
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsnlen.texi
+++ b/doc/posix-functions/wcsnlen.texi
@@ -4,19 +4,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsnlen.html}
 
-Gnulib module: ---
+Gnulib module: wcsnlen
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 4.3.2, HP-UX
-11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcspbrk.texi
+++ b/doc/posix-functions/wcspbrk.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcspbrk.html}
 
-Gnulib module: ---
+Gnulib module: wcspbrk
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsrchr.texi
+++ b/doc/posix-functions/wcsrchr.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsrchr.html}
 
-Gnulib module: ---
+Gnulib module: wcsrchr
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsrtombs.texi
+++ b/doc/posix-functions/wcsrtombs.texi
@@ -15,6 +15,9 @@
 This function may set the source pointer to NULL before NUL terminating the destination string on some platforms:
 OSF/1 5.1.
 @item
+This function does not ignore the length argument if the destination argument is NULL on some platforms:
+mingw.
+@item
 This function updates the source pointer also if the destination argument is NULL on some platforms:
 HP-UX 11, OSF/1 5.1.
 @end itemize
--- a/doc/posix-functions/wcsspn.texi
+++ b/doc/posix-functions/wcsspn.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsspn.html}
 
-Gnulib module: ---
+Gnulib module: wcsspn
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsstr.texi
+++ b/doc/posix-functions/wcsstr.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsstr.html}
 
-Gnulib module: ---
+Gnulib module: wcsstr
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 5.3, Solaris 2.6.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 5.3, Solaris 2.6.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcstok.texi
+++ b/doc/posix-functions/wcstok.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcstok.html}
 
-Gnulib module: ---
+Gnulib module: wcstok
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1, Cygwin 1.5.x.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1, Cygwin 1.5.x.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcswidth.texi
+++ b/doc/posix-functions/wcswidth.texi
@@ -4,18 +4,22 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcswidth.html}
 
-Gnulib module: ---
+Gnulib module: wcswidth
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+OpenBSD 3.8, IRIX 5.3, Solaris 2.5.1, mingw, BeOS.
+@item
+This function handles combining characters in UTF-8 locales incorrectly on some
+platforms:
+MacOS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-OpenBSD 3.8, IRIX 5.3, Solaris 2.5.1, mingw, BeOS.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wcsxfrm.texi
+++ b/doc/posix-functions/wcsxfrm.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wcsxfrm.html}
 
-Gnulib module: ---
+Gnulib module: wcsxfrm
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1, Cygwin 1.5.x.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1, Cygwin 1.5.x.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wctomb.texi
+++ b/doc/posix-functions/wctomb.texi
@@ -4,7 +4,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wctomb.html}
 
-Gnulib module: ---
+Gnulib module: wctomb
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/posix-functions/wctrans.texi
+++ b/doc/posix-functions/wctrans.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wctrans.html}
 
-Gnulib module: ---
+Gnulib module: wctrans
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 6.5, Solaris 2.5.1, mingw, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 6.5, Solaris 2.5.1, mingw, Interix 3.5.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wctype.texi
+++ b/doc/posix-functions/wctype.texi
@@ -4,18 +4,22 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wctype.html}
 
-Gnulib module: ---
+Gnulib module: wctype
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+IRIX 5.3, Solaris 2.5.1.
+@item
+This function is declared in @code{<wchar.h>}, not in @code{<wctype.h>}, on
+some platforms:
+HP-UX 11.00.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-IRIX 5.3, Solaris 2.5.1, mingw.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wmemchr.texi
+++ b/doc/posix-functions/wmemchr.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wmemchr.html}
 
-Gnulib module: ---
+Gnulib module: wmemchr
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wmemcmp.texi
+++ b/doc/posix-functions/wmemcmp.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wmemcmp.html}
 
-Gnulib module: ---
+Gnulib module: wmemcmp
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wmemcpy.texi
+++ b/doc/posix-functions/wmemcpy.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wmemcpy.html}
 
-Gnulib module: ---
+Gnulib module: wmemcpy
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wmemmove.texi
+++ b/doc/posix-functions/wmemmove.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wmemmove.html}
 
-Gnulib module: ---
+Gnulib module: wmemmove
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-functions/wmemset.texi
+++ b/doc/posix-functions/wmemset.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/wmemset.html}
 
-Gnulib module: ---
+Gnulib module: wmemset
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.
-@item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
 @end itemize
--- a/doc/posix-headers/netdb.texi
+++ b/doc/posix-headers/netdb.texi
@@ -16,6 +16,10 @@
 Cygwin 1.5.x, Haiku.
 
 @item
+This header file does not define the type @code{socklen_t} on some platforms:
+HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
+
+@item
 This header file does not define @code{AI_ALL}, @code{AI_V4MAPPED},
 @code{AI_ADDRCONFIG} on some platforms:
 NetBSD 5.0.
--- a/doc/posix-headers/stdint.texi
+++ b/doc/posix-headers/stdint.texi
@@ -23,6 +23,10 @@
 The values of @code{INT8_MAX}, @code{UINT8_MAX} etc. are not usable in
 preprocessor expressions on some platforms:
 HP-UX 11.23.
+@item
+The macros @code{WCHAR_MIN} and @code{WCHAR_MAX} are not defined in
+@code{<stdint.h>} (only in @code{<wchar.h>}) on some platforms:
+Dragonfly, BSDI.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-headers/sys_socket.texi
+++ b/doc/posix-headers/sys_socket.texi
@@ -14,6 +14,9 @@
 This header file is not self-contained on some platforms: it requires
 @code{<sys/types.h>} to be included first.
 @item
+This header file does not define the type @code{socklen_t} on some platforms:
+HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
+@item
 This header file is lacking the @code{SHUT_RD}, @code{SHUT_WR},
 @code{SHUT_RDWR} macros on some platforms, despite having the @code{shutdown}
 functions:
--- a/doc/posix-headers/wctype.texi
+++ b/doc/posix-headers/wctype.texi
@@ -3,7 +3,7 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/wctype.h.html}
 
-Gnulib module: wctype
+Gnulib module: wctype-h
 
 Portability problems fixed by Gnulib:
 @itemize
--- a/doc/standards.texi
+++ b/doc/standards.texi
@@ -3,7 +3,7 @@
 @setfilename standards.info
 @settitle GNU Coding Standards
 @c This date is automagically updated when you save this file:
-@set lastupdate January 27, 2011
+@set lastupdate March 28, 2011
 @c %**end of header
 
 @dircategory GNU organization
@@ -50,8 +50,8 @@
 @contents
 
 @ifnottex
-@node Top, Preface, (dir), (dir)
-@top Version
+@node Top
+@top GNU Coding Standards
 
 @insertcopying
 @end ifnottex
@@ -701,7 +701,8 @@
 @end example
 
 @noindent
-or by using the @code{mkstemps} function from libiberty.
+or by using the @code{mkstemps} function from Gnulib
+(@pxref{mkstemps,,, gnulib, Gnulib}).
 
 In bash, use @code{set -C} (long name @code{noclobber}) to avoid this
 problem.  In addition, the @code{mktemp} utility is a more general
@@ -2831,6 +2832,7 @@
 programs.  @code{doschk} also reports file names longer than 14
 characters.
 
+
 @node System Portability
 @section Portability between System Types
 @cindex portability, between system types
@@ -2912,9 +2914,9 @@
 @end example
 
 1989 Standard C requires this to work, and we know of only one
-counterexample: 64-bit programs on Microsoft Windows.  We will
-leave it to those who want to port GNU programs to that environment
-to figure out how to do it.
+counterexample: 64-bit programs on Microsoft Windows.  We will leave
+it to those who want to port GNU programs to that environment to
+figure out how to do it.
 
 Predefined file-size types like @code{off_t} are an exception: they are
 longer than @code{long} on many platforms, so code like the above won't
@@ -2945,51 +2947,6 @@
   @}
 @end example
 
-It used to be ok to not worry about the difference between pointers
-and integers when passing arguments to functions.  However, on most
-modern 64-bit machines pointers are wider than @code{int}.
-Conversely, integer types like @code{long long int} and @code{off_t}
-are wider than pointers on most modern 32-bit machines.  Hence it's
-often better nowadays to use prototypes to define functions whose
-argument types are not trivial.
-
-In particular, if functions accept varying argument counts or types
-they should be declared using prototypes containing @samp{...} and
-defined using @file{stdarg.h}.  For an example of this, please see the
-@uref{http://www.gnu.org/software/gnulib/, Gnulib} error module, which
-declares and defines the following function:
-
-@example
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
-   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
-   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
-
-void error (int status, int errnum, const char *format, ...);
-@end example
-
-A simple way to use the Gnulib error module is to obtain the two
-source files @file{error.c} and @file{error.h} from the Gnulib library
-source code repository at
-@uref{http://git.savannah.gnu.org/@/gitweb/@/?p=gnulib.git}.
-Here's a sample use:
-
-@example
-#include "error.h"
-#include <errno.h>
-#include <stdio.h>
-
-char *program_name = "myprogram";
-
-FILE *
-xfopen (char const *name)
-@{
-  FILE *fp = fopen (name, "r");
-  if (! fp)
-    error (1, errno, "cannot read %s", name);
-  return fp;
-@}
-@end example
-
 @cindex casting pointers to integers
 Avoid casting pointers to integers if you can.  Such casts greatly
 reduce portability, and in most programs they are easy to avoid.  In the
@@ -3000,133 +2957,75 @@
 normal range of addresses you can get from @code{malloc} starts far away
 from zero.
 
+
 @node System Functions
 @section Calling System Functions
+
+@cindex C library functions, and portability
+@cindex POSIX functions, and portability
 @cindex library functions, and portability
 @cindex portability, and library functions
 
-C implementations differ substantially.  Standard C reduces but does
-not eliminate the incompatibilities; meanwhile, many GNU packages still
-support pre-standard compilers because this is not hard to do.  This
-chapter gives recommendations for how to use the more-or-less standard C
-library functions to avoid unnecessary loss of portability.
-
-@itemize @bullet
-@item
-Don't use the return value of @code{sprintf}.  It returns the number of
-characters written on some systems, but not on all systems.
-
-@item
-Be aware that @code{vfprintf} is not always available.
-
-@item
-@code{main} should be declared to return type @code{int}.  It should
-terminate either by calling @code{exit} or by returning the integer
-status code; make sure it cannot ever return an undefined value.
-
-@cindex declaration for system functions
-@item
-Don't declare system functions explicitly.
-
-Almost any declaration for a system function is wrong on some system.
-To minimize conflicts, leave it to the system header files to declare
-system functions.  If the headers don't declare a function, let it
-remain undeclared.
-
-While it may seem unclean to use a function without declaring it, in
-practice this works fine for most system library functions on the
-systems where this really happens; thus, the disadvantage is only
-theoretical.  By contrast, actual declarations have frequently caused
-actual conflicts.
-
-@item
-If you must declare a system function, don't specify the argument types.
-Use an old-style declaration, not a Standard C prototype.  The more you
-specify about the function, the more likely a conflict.
-
-@item
-In particular, don't unconditionally declare @code{malloc} or
-@code{realloc}.
-
-Most GNU programs use those functions just once, in functions
-conventionally named @code{xmalloc} and @code{xrealloc}.  These
-functions call @code{malloc} and @code{realloc}, respectively, and
-check the results.
-
-Because @code{xmalloc} and @code{xrealloc} are defined in your program,
-you can declare them in other files without any risk of type conflict.
-
-On most systems, @code{int} is the same length as a pointer; thus, the
-calls to @code{malloc} and @code{realloc} work fine.  For the few
-exceptional systems (mostly 64-bit machines), you can use
-@strong{conditionalized} declarations of @code{malloc} and
-@code{realloc}---or put these declarations in configuration files
-specific to those systems.
-
-@cindex string library functions
-@item
-The string functions require special treatment.  Some Unix systems have
-a header file @file{string.h}; others have @file{strings.h}.  Neither
-file name is portable.  There are two things you can do: use Autoconf to
-figure out which file to include, or don't include either file.
-
-@item
-If you don't include either strings file, you can't get declarations for
-the string functions from the header file in the usual way.
-
-That causes less of a problem than you might think.  The newer standard
-string functions should be avoided anyway because many systems still
-don't support them.  The string functions you can use are these:
-
-@example
-strcpy   strncpy   strcat   strncat
-strlen   strcmp    strncmp
-strchr   strrchr
-@end example
-
-The copy and concatenate functions work fine without a declaration as
-long as you don't use their values.  Using their values without a
-declaration fails on systems where the width of a pointer differs from
-the width of @code{int}, and perhaps in other cases.  It is trivial to
-avoid using their values, so do that.
-
-The compare functions and @code{strlen} work fine without a declaration
-on most systems, possibly all the ones that GNU software runs on.
-You may find it necessary to declare them @strong{conditionally} on a
-few systems.
-
-The search functions must be declared to return @code{char *}.  Luckily,
-there is no variation in the data type they return.  But there is
-variation in their names.  Some systems give these functions the names
-@code{index} and @code{rindex}; other systems use the names
-@code{strchr} and @code{strrchr}.  Some systems support both pairs of
-names, but neither pair works on all systems.
-
-You should pick a single pair of names and use it throughout your
-program.  (Nowadays, it is better to choose @code{strchr} and
-@code{strrchr} for new programs, since those are the standard
-names.)  Declare both of those names as functions returning @code{char
-*}.  On systems which don't support those names, define them as macros
-in terms of the other pair.  For example, here is what to put at the
-beginning of your file (or in a header) if you want to use the names
-@code{strchr} and @code{strrchr} throughout:
-
-@example
-#ifndef HAVE_STRCHR
-#define strchr index
-#endif
-#ifndef HAVE_STRRCHR
-#define strrchr rindex
-#endif
-
-char *strchr ();
-char *strrchr ();
-@end example
-@end itemize
-
-Here we assume that @code{HAVE_STRCHR} and @code{HAVE_STRRCHR} are
-macros defined in systems where the corresponding functions exist.
-One way to get them properly defined is to use Autoconf.
+Historically, C implementations differed substantially, and many
+systems lacked a full implementation of ANSI/ISO C89.  Nowadays,
+however, very few systems lack a C89 compiler and GNU C supports
+almost all of C99.  Similarly, most systems implement POSIX.1-1993
+libraries and tools, and many have POSIX.1-2001.
+
+Hence, there is little reason to support old C or non-POSIX systems,
+and you may want to take advantage of C99 and POSIX-1.2001 to write
+clearer, more portable, or faster code.  You should use standard
+interfaces where possible; but if GNU extensions make your program
+more maintainable, powerful, or otherwise better, don't hesitate to
+use them.  In any case, don't make your own declaration of system
+functions; that's a recipe for conflict.
+
+Despite the standards, nearly every library function has some sort of
+portability issue on some system or another.  Here are some examples:
+
+@table @code
+@item open
+Names with trailing @code{/}'s are mishandled on many platforms.
+
+@item printf
+@code{long double} may be unimplemented; floating values Infinity and
+NaN are often mishandled; output for large precisions may be
+incorrect.
+
+@item readlink
+May return @code{int} instead of @code{ssize_t}.
+
+@item scanf
+On Windows, @code{errno} is not set on failure.
+@end table
+
+@cindex Gnulib
+@uref{http://www.gnu.org/software/gnulib/, Gnulib} is a big help in
+this regard.  Gnulib provides implementations of standard interfaces
+on many of the systems that lack them, including portable
+implementations of enhanced GNU interfaces, thereby making their use
+portable, and of POSIX-1.2008 interfaces, some of which are missing
+even on up-to-date GNU systems.
+
+@findex xmalloc, in Gnulib
+@findex error messages, in Gnulib
+@findex data structures, in Gnulib
+Gnulib also provides many useful non-standard interfaces; for example,
+C implementations of standard data structures (hash tables, binary
+trees), error-checking type-safe wrappers for memory allocation
+functions (@code{xmalloc}, @code{xrealloc}), and output of error
+messages.
+
+Gnulib integrates with GNU Autoconf and Automake to remove much of the
+burden of writing portable code from the programmer: Gnulib makes your
+configure script automatically determine what features are missing and
+use the Gnulib code to supply the missing pieces.
+
+The Gnulib and Autoconf manuals have extensive sections on
+portability: @ref{Top,, Introduction, gnulib, Gnulib} and
+@pxref{Portable C and C++,,, autoconf, Autoconf}.  Please consult them
+for many more details.
+
 
 @node Internationalization
 @section Internationalization
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -123,24 +123,12 @@
 # outputs to stdout the --help usage message.
 func_usage ()
 {
-  # This use of bold display can be removed on 2011-01-01.
-  if case "$TERM" in
-       xterm*) test -t 1;;
-       *) false;;
-     esac; then
-    # Assume xterm compatible escape sequences.
-    bold_on=`printf '\x1b[1m'`
-    bold_off=`printf '\x1b[0m'`
-  else
-    bold_on=
-    bold_off=
-  fi
   echo "\
 Usage: gnulib-tool --list
-       gnulib-tool --find filename${bold_on}
+       gnulib-tool --find filename
        gnulib-tool --import [module1 ... moduleN]
        gnulib-tool --add-import [module1 ... moduleN]
-       gnulib-tool --remove-import [module1 ... moduleN]${bold_off}
+       gnulib-tool --remove-import [module1 ... moduleN]
        gnulib-tool --update
        gnulib-tool --create-testdir --dir=directory [module1 ... moduleN]
        gnulib-tool --create-megatestdir --dir=directory [module1 ... moduleN]
@@ -165,14 +153,14 @@
 Operation modes:
 
       --list                print the available module names
-      --find                find the modules which contain the specified file${bold_on}
+      --find                find the modules which contain the specified file
       --import              import the given modules into the current package
       --add-import          augment the list of imports from gnulib into the
                             current package, by adding the given modules;
                             if no modules are specified, update the current
                             package from the current gnulib
       --remove-import       reduce the list of imports from gnulib into the
-                            current package, by removing the given modules${bold_off}
+                            current package, by removing the given modules
       --update              update the current package, restore files omitted
                             from version control
       --create-testdir      create a scratch package with the given modules
@@ -3878,11 +3866,16 @@
         yes | 3)
           sed_transform_main_lib_file=$sed_transform_main_lib_file'
             s/GNU General/GNU Lesser General/g
+            s/General Public License/Lesser General Public License/g
+            s/Lesser Lesser General Public License/Lesser General Public License/g
           '
           ;;
         2)
           sed_transform_main_lib_file=$sed_transform_main_lib_file'
             s/GNU General/GNU Lesser General/g
+            s/General Public License/Lesser General Public License/g
+            s/Lesser Lesser General Public License/Lesser General Public License/g
+
             s/version [23]\([ ,]\)/version 2.1\1/g
           '
           ;;
@@ -3892,7 +3885,11 @@
       # Update license.
       sed_transform_main_lib_file=$sed_transform_main_lib_file'
         s/GNU Lesser General/GNU General/g
+        s/Lesser General Public License/General Public License/g
+
         s/GNU Library General/GNU General/g
+        s/Library General Public License/General Public License/g
+
         s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
       '
     fi
@@ -3904,7 +3901,11 @@
     # Update license.
     sed_transform_build_aux_file=$sed_transform_build_aux_file'
       s/GNU Lesser General/GNU General/g
+      s/Lesser General Public License/General Public License/g
+
       s/GNU Library General/GNU General/g
+      s/Library General Public License/General Public License/g
+
       s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
     '
   fi
@@ -3919,7 +3920,11 @@
     # Update license.
     sed_transform_testsrelated_lib_file=$sed_transform_testsrelated_lib_file'
       s/GNU Lesser General/GNU General/g
+      s/Lesser General Public License/General Public License/g
+
       s/GNU Library General/GNU General/g
+      s/Library General Public License/General Public License/g
+
       s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
     '
   fi
--- a/lib/argp-fmtstream.h
+++ b/lib/argp-fmtstream.h
@@ -28,16 +28,16 @@
 #include <string.h>
 #include <unistd.h>
 
-#ifndef __attribute__
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The __-protected variants of the attributes 'format' and 'printf' are
    accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable __attribute__ only if these are supported too, because
+   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
    gnulib and libintl do '#define printf __printf__' when they override
    the 'printf' function.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-#  define __attribute__(Spec)   /* empty */
-# endif
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
 #endif
 
 #if    (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
@@ -128,10 +128,10 @@
 
 extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
                                         const char *__fmt, ...)
-     __attribute__ ((__format__ (printf, 2, 3)));
+     _GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
 extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
                                       const char *__fmt, ...)
-     __attribute__ ((__format__ (printf, 2, 3)));
+     _GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
 
 #if _LIBC || !defined __OPTIMIZE__
 extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
--- a/lib/argp-help.c
+++ b/lib/argp-help.c
@@ -570,7 +570,9 @@
 }
 
 static inline int
+#if __GNUC__ >= 3
 __attribute__ ((always_inline))
+#endif
 hol_entry_long_iterate (const struct hol_entry *entry,
                         int (*func)(const struct argp_option *opt,
                                     const struct argp_option *real,
--- a/lib/argp-namefrob.h
+++ b/lib/argp-namefrob.h
@@ -100,45 +100,45 @@
 #endif
 #if defined(HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
 # define feof_unlocked(x) feof (x)
-# endif
+#endif
 #if defined(HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
 # define ferror_unlocked(x) ferror (x)
-# endif
+#endif
 #if defined(HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
 # define fflush_unlocked(x) fflush (x)
-# endif
+#endif
 #if defined(HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
 # define fgets_unlocked(x,y,z) fgets (x,y,z)
-# endif
+#endif
 #if defined(HAVE_DECL_FPUTC_UNLOCKED) && !HAVE_DECL_FPUTC_UNLOCKED
 # define fputc_unlocked(x,y) fputc (x,y)
-# endif
+#endif
 #if defined(HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
 # define fputs_unlocked(x,y) fputs (x,y)
-# endif
+#endif
 #if defined(HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
 # define fread_unlocked(w,x,y,z) fread (w,x,y,z)
-# endif
+#endif
 #if defined(HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
 # define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
-# endif
+#endif
 #if defined(HAVE_DECL_GETC_UNLOCKED) && !HAVE_DECL_GETC_UNLOCKED
 # define getc_unlocked(x) getc (x)
-# endif
+#endif
 #if defined(HAVE_DECL_GETCHAR_UNLOCKED) && !HAVE_DECL_GETCHAR_UNLOCKED
 #  define getchar_unlocked() getchar ()
-# endif
+#endif
 #if defined(HAVE_DECL_PUTC_UNLOCKED) && !HAVE_DECL_PUTC_UNLOCKED
 # define putc_unlocked(x,y) putc (x,y)
-# endif
+#endif
 #if defined(HAVE_DECL_PUTCHAR_UNLOCKED) && !HAVE_DECL_PUTCHAR_UNLOCKED
 # define putchar_unlocked(x) putchar (x)
-# endif
+#endif
 
 #endif /* !_LIBC */
 
 #ifndef __set_errno
-#define __set_errno(e) (errno = (e))
+# define __set_errno(e) (errno = (e))
 #endif
 
 #if defined GNULIB_ARGP_DISABLE_DIRNAME
--- a/lib/argp.h
+++ b/lib/argp.h
@@ -34,16 +34,16 @@
 # define __NTH(fct) fct __THROW
 #endif
 
-#ifndef __attribute__
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The __-protected variants of the attributes 'format' and 'printf' are
    accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable __attribute__ only if these are supported too, because
+   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
    gnulib and libintl do '#define printf __printf__' when they override
    the 'printf' function.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-#  define __attribute__(Spec)   /* empty */
-# endif
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
 #endif
 
 /* GCC 2.95 and later have "__restrict"; C99 compilers have
@@ -530,10 +530,10 @@
    message, then exit (1).  */
 extern void argp_error (const struct argp_state *__restrict __state,
                         const char *__restrict __fmt, ...)
-     __attribute__ ((__format__ (__printf__, 2, 3)));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
 extern void __argp_error (const struct argp_state *__restrict __state,
                           const char *__restrict __fmt, ...)
-     __attribute__ ((__format__ (__printf__, 2, 3)));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
 
 /* Similar to the standard gnu error-reporting function error(), but will
    respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
@@ -546,11 +546,11 @@
 extern void argp_failure (const struct argp_state *__restrict __state,
                           int __status, int __errnum,
                           const char *__restrict __fmt, ...)
-     __attribute__ ((__format__ (__printf__, 4, 5)));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
 extern void __argp_failure (const struct argp_state *__restrict __state,
                             int __status, int __errnum,
                             const char *__restrict __fmt, ...)
-     __attribute__ ((__format__ (__printf__, 4, 5)));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
 
 #if _LIBC || !defined __USE_EXTERN_INLINES
 /* Returns true if the option OPT is a valid short option.  */
--- a/lib/arpa_inet.in.h
+++ b/lib/arpa_inet.in.h
@@ -27,8 +27,8 @@
 # include <features.h> /* for __GLIBC__ */
 #endif
 
-/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
-   under MinGW.
+/* Gnulib's sys/socket.h is responsible for defining socklen_t (used below) and
+   for pulling in winsock2.h etc. under MinGW.
    But avoid namespace pollution on glibc systems.  */
 #ifndef __GLIBC__
 # include <sys/socket.h>
--- a/lib/at-func.c
+++ b/lib/at-func.c
@@ -16,7 +16,7 @@
 
 /* written by Jim Meyering */
 
-#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
+#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
 #include "openat.h"
 #include "openat-priv.h"
 #include "save-cwd.h"
--- a/lib/at-func2.c
+++ b/lib/at-func2.c
@@ -25,7 +25,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
+#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
 #include "filenamecat.h"
 #include "openat.h"
 #include "same-inode.h"
new file mode 100644
--- /dev/null
+++ b/lib/di-set.c
@@ -0,0 +1,259 @@
+/* Set operations for device-inode pairs stored in a space-efficient manner.
+
+   Copyright 2009-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* written by Paul Eggert and Jim Meyering */
+
+#include <config.h>
+#include "di-set.h"
+
+#include "hash.h"
+#include "ino-map.h"
+
+#include <limits.h>
+#include <stdlib.h>
+
+/* The hash package hashes "void *", but this package wants to hash
+   integers.  Use integers that are as large as possible, but no
+   larger than void *, so that they can be cast to void * and back
+   without losing information.  */
+typedef size_t hashint;
+#define HASHINT_MAX ((hashint) -1)
+
+/* Integers represent inode numbers.  Integers in the range
+   1..(LARGE_INO_MIN-1) represent inode numbers directly.  (The hash
+   package does not work with null pointers, so inode 0 cannot be used
+   as a key.)  To find the representations of other inode numbers, map
+   them through INO_MAP.  */
+#define LARGE_INO_MIN (HASHINT_MAX / 2)
+
+/* Set operations for device-inode pairs stored in a space-efficient
+   manner.  Use a two-level hash table.  The top level hashes by
+   device number, as there are typically a small number of devices.
+   The lower level hashes by mapped inode numbers.  In the typical
+   case where the inode number is positive and small, the inode number
+   maps to itself, masquerading as a void * value; otherwise, its
+   value is the result of hashing the inode value through INO_MAP.  */
+
+/* A pair that maps a device number to a set of inode numbers.  */
+struct di_ent
+{
+  dev_t dev;
+  struct hash_table *ino_set;
+};
+
+/* A two-level hash table that manages and indexes these pairs.  */
+struct di_set
+{
+  /* Map device numbers to sets of inode number representatives.  */
+  struct hash_table *dev_map;
+
+  /* If nonnull, map large inode numbers to their small
+     representatives.  If null, there are no large inode numbers in
+     this set.  */
+  struct ino_map *ino_map;
+
+  /* Cache of the most recently allocated and otherwise-unused storage
+     for probing this table.  */
+  struct di_ent *probe;
+};
+
+/* Hash a device-inode-set entry.  */
+static size_t
+di_ent_hash (void const *x, size_t table_size)
+{
+  struct di_ent const *p = x;
+  dev_t dev = p->dev;
+
+  /* When DEV is wider than size_t, exclusive-OR the words of DEV into H.
+     This avoids loss of info, without applying % to the wider type,
+     which could be quite slow on some systems.  */
+  size_t h = dev;
+  unsigned int i;
+  unsigned int n_words = sizeof dev / sizeof h + (sizeof dev % sizeof h != 0);
+  for (i = 1; i < n_words; i++)
+    h ^= dev >> CHAR_BIT * sizeof h * i;
+
+  return h % table_size;
+}
+
+/* Return true if two device-inode-set entries are the same.  */
+static bool
+di_ent_compare (void const *x, void const *y)
+{
+  struct di_ent const *a = x;
+  struct di_ent const *b = y;
+  return a->dev == b->dev;
+}
+
+/* Free a device-inode-set entry.  */
+static void
+di_ent_free (void *v)
+{
+  struct di_ent *a = v;
+  hash_free (a->ino_set);
+  free (a);
+}
+
+/* Create a set of device-inode pairs.  Return NULL on allocation failure.  */
+struct di_set *
+di_set_alloc (void)
+{
+  struct di_set *dis = malloc (sizeof *dis);
+  if (dis)
+    {
+      enum { INITIAL_DEV_MAP_SIZE = 11 };
+      dis->dev_map = hash_initialize (INITIAL_DEV_MAP_SIZE, NULL,
+                                      di_ent_hash, di_ent_compare,
+                                      di_ent_free);
+      if (! dis->dev_map)
+        {
+          free (dis);
+          return NULL;
+        }
+      dis->ino_map = NULL;
+      dis->probe = NULL;
+    }
+
+  return dis;
+}
+
+/* Free a set of device-inode pairs.  */
+void
+di_set_free (struct di_set *dis)
+{
+  hash_free (dis->dev_map);
+  free (dis->ino_map);
+  free (dis->probe);
+  free (dis);
+}
+
+/* Hash an encoded inode number I.  */
+static size_t
+di_ino_hash (void const *i, size_t table_size)
+{
+  return (hashint) i % table_size;
+}
+
+/* Using the DIS table, map a device to a hash table that represents
+   a set of inode numbers.  Return NULL on error.  */
+static struct hash_table *
+map_device (struct di_set *dis, dev_t dev)
+{
+  /* Find space for the probe, reusing the cache if available.  */
+  struct di_ent *ent;
+  struct di_ent *probe = dis->probe;
+  if (probe)
+    {
+      /* If repeating a recent query, return the cached result.   */
+      if (probe->dev == dev)
+        return probe->ino_set;
+    }
+  else
+    {
+      dis->probe = probe = malloc (sizeof *probe);
+      if (! probe)
+        return NULL;
+    }
+
+  /* Probe for the device.  */
+  probe->dev = dev;
+  ent = hash_insert (dis->dev_map, probe);
+  if (! ent)
+    return NULL;
+
+  if (ent != probe)
+    {
+      /* Use the existing entry.  */
+      probe->ino_set = ent->ino_set;
+    }
+  else
+    {
+      enum { INITIAL_INO_SET_SIZE = 1021 };
+
+      /* Prepare to allocate a new probe next time; this one is in use.  */
+      dis->probe = NULL;
+
+      /* DEV is new; allocate an inode set for it.  */
+      probe->ino_set = hash_initialize (INITIAL_INO_SET_SIZE, NULL,
+                                        di_ino_hash, NULL, NULL);
+    }
+
+  return probe->ino_set;
+}
+
+/* Using the DIS table, map an inode number to a mapped value.
+   Return INO_MAP_INSERT_FAILURE on error.  */
+static hashint
+map_inode_number (struct di_set *dis, ino_t ino)
+{
+  if (0 < ino && ino < LARGE_INO_MIN)
+    return ino;
+
+  if (! dis->ino_map)
+    {
+      dis->ino_map = ino_map_alloc (LARGE_INO_MIN);
+      if (! dis->ino_map)
+        return INO_MAP_INSERT_FAILURE;
+    }
+
+  return ino_map_insert (dis->ino_map, ino);
+}
+
+/* Attempt to insert the DEV,INO pair into the set DIS.
+   If it matches a pair already in DIS, keep that pair and return 0.
+   Otherwise, if insertion is successful, return 1.
+   Upon any failure return -1.  */
+int
+di_set_insert (struct di_set *dis, dev_t dev, ino_t ino)
+{
+  hashint i;
+
+  /* Map the device number to a set of inodes.  */
+  struct hash_table *ino_set = map_device (dis, dev);
+  if (! ino_set)
+    return -1;
+
+  /* Map the inode number to a small representative I.  */
+  i = map_inode_number (dis, ino);
+  if (i == INO_MAP_INSERT_FAILURE)
+    return -1;
+
+  /* Put I into the inode set.  */
+  return hash_insert0 (ino_set, (void const *) i, NULL);
+}
+
+/* Look up the DEV,INO pair in the set DIS.
+   If found, return 1; if not found, return 0.
+   Upon any failure return -1.  */
+int
+di_set_lookup (struct di_set *dis, dev_t dev, ino_t ino)
+{
+  hashint i;
+
+  /* Map the device number to a set of inodes.  */
+  struct hash_table *ino_set = map_device (dis, dev);
+  if (! ino_set)
+    return -1;
+
+  /* Map the inode number to a small representative I.  */
+  i = map_inode_number (dis, ino);
+  if (i == INO_MAP_INSERT_FAILURE)
+    return -1;
+
+  /* Perform the look-up.  */
+  return !!hash_lookup (ino_set, (void const *) i);
+}
new file mode 100644
--- /dev/null
+++ b/lib/di-set.h
@@ -0,0 +1,19 @@
+#ifndef _GL_DI_SET_H
+# define _GL_DI_SET_H
+
+# include <sys/types.h>
+
+# undef _GL_ATTRIBUTE_NONNULL
+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
+#  define _GL_ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
+# else
+#  define _GL_ATTRIBUTE_NONNULL(m)
+# endif
+
+struct di_set *di_set_alloc (void);
+int di_set_insert (struct di_set *, dev_t, ino_t) _GL_ATTRIBUTE_NONNULL (1);
+void di_set_free (struct di_set *) _GL_ATTRIBUTE_NONNULL (1);
+int di_set_lookup (struct di_set *dis, dev_t dev, ino_t ino)
+  _GL_ATTRIBUTE_NONNULL (1);
+
+#endif
--- a/lib/dirname.h
+++ b/lib/dirname.h
@@ -21,44 +21,16 @@
 
 # include <stdbool.h>
 # include <stddef.h>
+# include "dosname.h"
 
 # ifndef DIRECTORY_SEPARATOR
 #  define DIRECTORY_SEPARATOR '/'
 # endif
 
-# ifndef ISSLASH
-#  define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
-# endif
-
-# ifndef FILE_SYSTEM_PREFIX_LEN
-#  if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
-    /* This internal macro assumes ASCII, but all hosts that support drive
-       letters use ASCII.  */
-#   define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \
-                                <= 'z' - 'a')
-#   define FILE_SYSTEM_PREFIX_LEN(Filename) \
-           (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
-#  else
-#   define FILE_SYSTEM_PREFIX_LEN(Filename) 0
-#  endif
-# endif
-
-# ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-#  define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-# endif
-
 # ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
 #  define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
 # endif
 
-# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-#  define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
-# else
-#  define IS_ABSOLUTE_FILE_NAME(F) \
-          (ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F))
-# endif
-# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
-
 # if GNULIB_DIRNAME
 char *base_name (char const *file);
 char *dir_name (char const *file);
new file mode 100644
--- /dev/null
+++ b/lib/dosname.h
@@ -0,0 +1,53 @@
+/* File names on MS-DOS/Windows systems.
+
+   Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   From Paul Eggert and Jim Meyering.  */
+
+#ifndef _DOSNAME_H
+#define _DOSNAME_H
+
+#if (defined _WIN32 || defined __WIN32__ ||     \
+     defined __MSDOS__ || defined __CYGWIN__ || \
+     defined __EMX__ || defined __DJGPP__)
+   /* This internal macro assumes ASCII, but all hosts that support drive
+      letters use ASCII.  */
+# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a'  \
+                              <= 'z' - 'a')
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+          (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
+# ifndef __CYGWIN__
+#  define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
+# endif
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
+#endif
+
+#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+#  define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
+# else
+#  define IS_ABSOLUTE_FILE_NAME(F)                              \
+     (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
+#endif
+#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
+
+#endif /* DOSNAME_H_ */
--- a/lib/dup3.c
+++ b/lib/dup3.c
@@ -56,10 +56,10 @@
         if (!(result < 0 && errno == ENOSYS))
           {
             have_dup3_really = 1;
-#if REPLACE_FCHDIR
+# if REPLACE_FCHDIR
             if (0 <= result)
               result = _gl_register_dup (oldfd, newfd);
-#endif
+# endif
             return result;
           }
         have_dup3_really = -1;
--- a/lib/error.h
+++ b/lib/error.h
@@ -19,16 +19,16 @@
 #ifndef _ERROR_H
 #define _ERROR_H 1
 
-#ifndef __attribute__
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The __-protected variants of the attributes 'format' and 'printf' are
    accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable __attribute__ only if these are supported too, because
+   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
    gnulib and libintl do '#define printf __printf__' when they override
    the 'printf' function.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-#  define __attribute__(Spec)   /* empty */
-# endif
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
 #endif
 
 #ifdef __cplusplus
@@ -40,11 +40,11 @@
    If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
 
 extern void error (int __status, int __errnum, const char *__format, ...)
-     __attribute__ ((__format__ (__printf__, 3, 4)));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
 
 extern void error_at_line (int __status, int __errnum, const char *__fname,
                            unsigned int __lineno, const char *__format, ...)
-     __attribute__ ((__format__ (__printf__, 5, 6)));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6));
 
 /* If NULL, error will flush stdout, then print on stderr the program
    name, a colon and a space.  Otherwise, error will call this
--- a/lib/fbufmode.c
+++ b/lib/fbufmode.c
@@ -78,6 +78,6 @@
     return _IOLBF;
   return (fp->__bufsize > 0 ? _IOFBF : _IONBF);
 #else
- #error "Please port gnulib fbufmode.c to your platform! Look at the setvbuf implementation."
+# error "Please port gnulib fbufmode.c to your platform! Look at the setvbuf implementation."
 #endif
 }
--- a/lib/fchownat.c
+++ b/lib/fchownat.c
@@ -66,15 +66,15 @@
 static int
 local_lchownat (int fd, char const *file, uid_t owner, gid_t group);
 
-# define AT_FUNC_NAME local_lchownat
-# define AT_FUNC_F1 lchown
-# define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group
-# define AT_FUNC_POST_FILE_ARGS        , owner, group
-# include "at-func.c"
-# undef AT_FUNC_NAME
-# undef AT_FUNC_F1
-# undef AT_FUNC_POST_FILE_PARAM_DECLS
-# undef AT_FUNC_POST_FILE_ARGS
+#  define AT_FUNC_NAME local_lchownat
+#  define AT_FUNC_F1 lchown
+#  define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group
+#  define AT_FUNC_POST_FILE_ARGS        , owner, group
+#  include "at-func.c"
+#  undef AT_FUNC_NAME
+#  undef AT_FUNC_F1
+#  undef AT_FUNC_POST_FILE_PARAM_DECLS
+#  undef AT_FUNC_POST_FILE_ARGS
 
 # endif
 
--- a/lib/flock.c
+++ b/lib/flock.c
@@ -18,7 +18,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -27,13 +27,13 @@
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
 /* _get_osfhandle */
-#include <io.h>
+# include <io.h>
 
 /* LockFileEx */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
 
-#include <errno.h>
+# include <errno.h>
 
 /* Determine the current size of a file.  Because the other braindead
  * APIs we'll call need lower/upper 32 bit pairs, keep the file size
@@ -47,9 +47,9 @@
 }
 
 /* LOCKFILE_FAIL_IMMEDIATELY is undefined on some Windows systems. */
-#ifndef LOCKFILE_FAIL_IMMEDIATELY
-# define LOCKFILE_FAIL_IMMEDIATELY 1
-#endif
+# ifndef LOCKFILE_FAIL_IMMEDIATELY
+#  define LOCKFILE_FAIL_IMMEDIATELY 1
+# endif
 
 /* Acquire a lock. */
 static BOOL
@@ -160,17 +160,17 @@
 
 #else /* !Windows */
 
-#ifdef HAVE_STRUCT_FLOCK_L_TYPE
+# ifdef HAVE_STRUCT_FLOCK_L_TYPE
 /* We know how to implement flock in terms of fcntl. */
 
-#include <fcntl.h>
+#  include <fcntl.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#  ifdef HAVE_UNISTD_H
+#   include <unistd.h>
+#  endif
 
-#include <errno.h>
-#include <string.h>
+#  include <errno.h>
+#  include <string.h>
 
 int
 flock (int fd, int operation)
@@ -211,10 +211,10 @@
   return r;
 }
 
-#else /* !HAVE_STRUCT_FLOCK_L_TYPE */
+# else /* !HAVE_STRUCT_FLOCK_L_TYPE */
 
-#error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
+#  error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
 
-#endif /* !HAVE_STRUCT_FLOCK_L_TYPE */
+# endif /* !HAVE_STRUCT_FLOCK_L_TYPE */
 
 #endif /* !Windows */
--- a/lib/fpurge.c
+++ b/lib/fpurge.c
@@ -130,7 +130,7 @@
   fp->__put_limit = fp->__buffer;
   return 0;
 # else
- #error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
+#  error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
 # endif
 
 #endif
--- a/lib/freadable.c
+++ b/lib/freadable.c
@@ -40,6 +40,6 @@
 #elif defined __MINT__              /* Atari FreeMiNT */
   return fp->__mode.__read;
 #else
- #error "Please port gnulib freadable.c to your platform! Look at the definition of fopen, fdopen on your system, then report this to bug-gnulib."
+# error "Please port gnulib freadable.c to your platform! Look at the definition of fopen, fdopen on your system, then report this to bug-gnulib."
 #endif
 }
--- a/lib/freading.c
+++ b/lib/freading.c
@@ -31,38 +31,38 @@
   /* Most systems provide FILE as a struct and the necessary bitmask in
      <stdio.h>, because they need it for implementing getc() and putc() as
      fast macros.  */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   return ((fp->_flags & _IO_NO_WRITES) != 0
           || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
               && fp->_IO_read_base != NULL));
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
   return (fp_->_flags & __SRD) != 0;
-#elif defined __EMX__               /* emx+gcc */
+# elif defined __EMX__               /* emx+gcc */
   return (fp->_flags & _IOREAD) != 0;
-#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
-# if defined __sun                  /* Solaris */
+# elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+#  if defined __sun                  /* Solaris */
   return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0;
-# else
+#  else
   return (fp->_flag & _IOREAD) != 0;
-# endif
-#elif defined __UCLIBC__            /* uClibc */
+#  endif
+# elif defined __UCLIBC__            /* uClibc */
   return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0;
-#elif defined __QNX__               /* QNX */
+# elif defined __QNX__               /* QNX */
   return ((fp->_Mode & 0x2 /* _MOPENW */) == 0
           || (fp->_Mode & 0x1000 /* _MREAD */) != 0);
-#elif defined __MINT__              /* Atari FreeMiNT */
+# elif defined __MINT__              /* Atari FreeMiNT */
   if (!fp->__mode.__write)
     return 1;
   if (!fp->__mode.__read)
     return 0;
-# ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */
+#  ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */
   return (fp->__flags & _IO_CURRENTLY_GETTING) != 0;
-# else
+#  else
   return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/);
+#  endif
+# else
+#  error "Please port gnulib freading.c to your platform!"
 # endif
-#else
- #error "Please port gnulib freading.c to your platform!"
-#endif
 }
 
 #endif
--- a/lib/fsync.c
+++ b/lib/fsync.c
@@ -28,13 +28,13 @@
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
 /* _get_osfhandle */
-#include <io.h>
+# include <io.h>
 
 /* FlushFileBuffers */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
 
-#include <errno.h>
+# include <errno.h>
 
 int
 fsync (int fd)
@@ -73,6 +73,6 @@
 
 #else /* !Windows */
 
-#error "This platform lacks fsync function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
+# error "This platform lacks fsync function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
 
 #endif /* !Windows */
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -628,7 +628,7 @@
 #if defined __linux__ \
   && HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE
 
-#include <sys/vfs.h>
+# include <sys/vfs.h>
 
 /* Linux-specific constants from coreutils' src/fs.h */
 # define S_MAGIC_TMPFS 0x1021994
--- a/lib/fwritable.c
+++ b/lib/fwritable.c
@@ -40,6 +40,6 @@
 #elif defined __MINT__              /* Atari FreeMiNT */
   return fp->__mode.__write;
 #else
- #error "Please port gnulib fwritable.c to your platform! Look at the definition of fopen, fdopen on your system, then report this to bug-gnulib."
+# error "Please port gnulib fwritable.c to your platform! Look at the definition of fopen, fdopen on your system, then report this to bug-gnulib."
 #endif
 }
--- a/lib/fwriting.c
+++ b/lib/fwriting.c
@@ -51,6 +51,6 @@
   return (fp->__buffer < fp->__put_limit /*|| fp->__bufp == fp->__get_limit ??*/);
 # endif
 #else
- #error "Please port gnulib fwriting.c to your platform!"
+# error "Please port gnulib fwriting.c to your platform!"
 #endif
 }
--- a/lib/gen-uni-tables.c
+++ b/lib/gen-uni-tables.c
@@ -21,6 +21,7 @@
      $ gen-uni-tables /usr/local/share/Unidata/UnicodeData.txt \
                       /usr/local/share/Unidata/PropList.txt \
                       /usr/local/share/Unidata/DerivedCoreProperties.txt \
+                      /usr/local/share/Unidata/ArabicShaping.txt \
                       /usr/local/share/Unidata/Scripts.txt \
                       /usr/local/share/Unidata/Blocks.txt \
                       /usr/local/share/Unidata/PropList-3.0.1.txt \
@@ -259,6 +260,7 @@
                              field11, field12, field13, field14);
         }
     }
+
   if (ferror (stream) || fclose (stream))
     {
       fprintf (stderr, "error reading from '%s'\n", unicodedata_filename);
@@ -280,6 +282,17 @@
 }
 
 static bool
+is_category_LC (unsigned int ch)
+{
+  /* See PropertyValueAliases.txt.  */
+  return (unicode_attributes[ch].name != NULL
+          && unicode_attributes[ch].category[0] == 'L'
+          && (unicode_attributes[ch].category[1] == 'u'
+              || unicode_attributes[ch].category[1] == 'l'
+              || unicode_attributes[ch].category[1] == 't'));
+}
+
+static bool
 is_category_Lu (unsigned int ch)
 {
   return (unicode_attributes[ch].name != NULL
@@ -803,6 +816,7 @@
   output_predicate_test ("../tests/unictype/test-categ_" #C ".c", is_category_ ## C, "uc_is_general_category (c, UC_CATEGORY_" #C ")"); \
   output_predicate ("unictype/categ_" #C ".h", is_category_ ## C, "u_categ_" #C, "Categories", version);
   CATEGORY (L)
+  CATEGORY (LC)
   CATEGORY (Lu)
   CATEGORY (Ll)
   CATEGORY (Lt)
@@ -845,6 +859,7 @@
 enum
 {
   UC_CATEGORY_MASK_L  = 0x0000001f,
+  UC_CATEGORY_MASK_LC = 0x00000007,
   UC_CATEGORY_MASK_Lu = 0x00000001,
   UC_CATEGORY_MASK_Ll = 0x00000002,
   UC_CATEGORY_MASK_Lt = 0x00000004,
@@ -894,6 +909,7 @@
         switch (category_name[1])
           {
           case '\0': return UC_CATEGORY_MASK_L;
+          case 'C': return UC_CATEGORY_MASK_LC;
           case 'u': return UC_CATEGORY_MASK_Lu;
           case 'l': return UC_CATEGORY_MASK_Ll;
           case 't': return UC_CATEGORY_MASK_Lt;
@@ -2760,6 +2776,7 @@
       for (i = i1; i <= i2; i++)
         array[i] = 1;
     }
+
   if (ferror (stream) || fclose (stream))
     {
       fprintf (stderr, "error reading from '%s'\n", proplist_filename);
@@ -3651,6 +3668,616 @@
 
 /* ========================================================================= */
 
+/* Arabic Shaping.  */
+
+enum
+{
+  UC_JOINING_TYPE_U, /* Non_Joining */
+  UC_JOINING_TYPE_T, /* Transparent */
+  UC_JOINING_TYPE_C, /* Join_Causing */
+  UC_JOINING_TYPE_L, /* Left_Joining */
+  UC_JOINING_TYPE_R, /* Right_Joining */
+  UC_JOINING_TYPE_D  /* Dual_Joining */
+};
+
+static uint8_t unicode_joining_type[0x110000];
+
+enum
+{
+  UC_JOINING_GROUP_NONE,                  /* No_Joining_Group */
+  UC_JOINING_GROUP_AIN,                   /* Ain */
+  UC_JOINING_GROUP_ALAPH,                 /* Alaph */
+  UC_JOINING_GROUP_ALEF,                  /* Alef */
+  UC_JOINING_GROUP_BEH,                   /* Beh */
+  UC_JOINING_GROUP_BETH,                  /* Beth */
+  UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */
+  UC_JOINING_GROUP_DAL,                   /* Dal */
+  UC_JOINING_GROUP_DALATH_RISH,           /* Dalath_Rish */
+  UC_JOINING_GROUP_E,                     /* E */
+  UC_JOINING_GROUP_FARSI_YEH,             /* Farsi_Yeh */
+  UC_JOINING_GROUP_FE,                    /* Fe */
+  UC_JOINING_GROUP_FEH,                   /* Feh */
+  UC_JOINING_GROUP_FINAL_SEMKATH,         /* Final_Semkath */
+  UC_JOINING_GROUP_GAF,                   /* Gaf */
+  UC_JOINING_GROUP_GAMAL,                 /* Gamal */
+  UC_JOINING_GROUP_HAH,                   /* Hah */
+  UC_JOINING_GROUP_HE,                    /* He */
+  UC_JOINING_GROUP_HEH,                   /* Heh */
+  UC_JOINING_GROUP_HEH_GOAL,              /* Heh_Goal */
+  UC_JOINING_GROUP_HETH,                  /* Heth */
+  UC_JOINING_GROUP_KAF,                   /* Kaf */
+  UC_JOINING_GROUP_KAPH,                  /* Kaph */
+  UC_JOINING_GROUP_KHAPH,                 /* Khaph */
+  UC_JOINING_GROUP_KNOTTED_HEH,           /* Knotted_Heh */
+  UC_JOINING_GROUP_LAM,                   /* Lam */
+  UC_JOINING_GROUP_LAMADH,                /* Lamadh */
+  UC_JOINING_GROUP_MEEM,                  /* Meem */
+  UC_JOINING_GROUP_MIM,                   /* Mim */
+  UC_JOINING_GROUP_NOON,                  /* Noon */
+  UC_JOINING_GROUP_NUN,                   /* Nun */
+  UC_JOINING_GROUP_NYA,                   /* Nya */
+  UC_JOINING_GROUP_PE,                    /* Pe */
+  UC_JOINING_GROUP_QAF,                   /* Qaf */
+  UC_JOINING_GROUP_QAPH,                  /* Qaph */
+  UC_JOINING_GROUP_REH,                   /* Reh */
+  UC_JOINING_GROUP_REVERSED_PE,           /* Reversed_Pe */
+  UC_JOINING_GROUP_SAD,                   /* Sad */
+  UC_JOINING_GROUP_SADHE,                 /* Sadhe */
+  UC_JOINING_GROUP_SEEN,                  /* Seen */
+  UC_JOINING_GROUP_SEMKATH,               /* Semkath */
+  UC_JOINING_GROUP_SHIN,                  /* Shin */
+  UC_JOINING_GROUP_SWASH_KAF,             /* Swash_Kaf */
+  UC_JOINING_GROUP_SYRIAC_WAW,            /* Syriac_Waw */
+  UC_JOINING_GROUP_TAH,                   /* Tah */
+  UC_JOINING_GROUP_TAW,                   /* Taw */
+  UC_JOINING_GROUP_TEH_MARBUTA,           /* Teh_Marbuta */
+  UC_JOINING_GROUP_TEH_MARBUTA_GOAL,      /* Teh_Marbuta_Goal */
+  UC_JOINING_GROUP_TETH,                  /* Teth */
+  UC_JOINING_GROUP_WAW,                   /* Waw */
+  UC_JOINING_GROUP_YEH,                   /* Yeh */
+  UC_JOINING_GROUP_YEH_BARREE,            /* Yeh_Barree */
+  UC_JOINING_GROUP_YEH_WITH_TAIL,         /* Yeh_With_Tail */
+  UC_JOINING_GROUP_YUDH,                  /* Yudh */
+  UC_JOINING_GROUP_YUDH_HE,               /* Yudh_He */
+  UC_JOINING_GROUP_ZAIN,                  /* Zain */
+  UC_JOINING_GROUP_ZHAIN                  /* Zhain */
+};
+
+static uint8_t unicode_joining_group[0x110000];
+
+static void
+fill_arabicshaping (const char *arabicshaping_filename)
+{
+  FILE *stream;
+  unsigned int i;
+  int lineno;
+
+  stream = fopen (arabicshaping_filename, "r");
+  if (stream == NULL)
+    {
+      fprintf (stderr, "error during fopen of '%s'\n", arabicshaping_filename);
+      exit (1);
+    }
+
+  for (i = 0; i < 0x110000; i++)
+    {
+      unicode_joining_type[i] = (uint8_t)~(uint8_t)0;
+      unicode_joining_group[i] = UC_JOINING_GROUP_NONE;
+    }
+
+  lineno = 0;
+  for (;;)
+    {
+      char buf[100+1];
+      char separator1[100+1];
+      char padding1[100+1];
+      char schematic_name[100+1];
+      char separator2[100+1];
+      char padding2[100+1];
+      char joining_type_name[100+1];
+      char separator3[100+1];
+      char padding3[100+1];
+      char joining_group_name[100+1];
+      int joining_type;
+      int joining_group;
+
+      lineno++;
+      if (fscanf (stream, "%100[^\n]\n", buf) < 1)
+        break;
+
+      if (buf[0] == '\0' || buf[0] == '#')
+        continue;
+
+      if (sscanf (buf, "%X%[;]%[ ]%[^;]%[;]%[ ]%[^;]%[;]%[ ]%100[^\n]",
+                  &i, separator1, padding1, schematic_name, separator2,
+                  padding2, joining_type_name, separator3, padding3,
+                  joining_group_name) != 10)
+        {
+          fprintf (stderr, "parse error in '%s':%d\n",
+                   arabicshaping_filename, lineno);
+          exit (1);
+        }
+      if (i >= 0x110000)
+        abort ();
+
+#define TRY(name) else if (strcmp (joining_type_name, #name + 16) == 0) joining_type = name;
+      if (false) {}
+      TRY(UC_JOINING_TYPE_U)
+      TRY(UC_JOINING_TYPE_T)
+      TRY(UC_JOINING_TYPE_C)
+      TRY(UC_JOINING_TYPE_L)
+      TRY(UC_JOINING_TYPE_R)
+      TRY(UC_JOINING_TYPE_D)
+#undef TRY
+      else
+        {
+          fprintf (stderr, "unknown joining type value \"%s\" in '%s':%d\n",
+                   joining_type_name, arabicshaping_filename, lineno);
+          exit (1);
+        }
+
+      /* Remove trailing spaces.  */
+      while (joining_group_name[0] != '\0'
+             && joining_group_name[strlen (joining_group_name) - 1] == ' ')
+        joining_group_name[strlen (joining_group_name) - 1] = '\0';
+
+#define TRY(value,name) else if (strcmp (joining_group_name, name) == 0) joining_group = value;
+      if (false) {}
+      TRY(UC_JOINING_GROUP_NONE,                  "No_Joining_Group")
+      TRY(UC_JOINING_GROUP_AIN,                   "AIN")
+      TRY(UC_JOINING_GROUP_ALAPH,                 "ALAPH")
+      TRY(UC_JOINING_GROUP_ALEF,                  "ALEF")
+      TRY(UC_JOINING_GROUP_BEH,                   "BEH")
+      TRY(UC_JOINING_GROUP_BETH,                  "BETH")
+      TRY(UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, "BURUSHASKI YEH BARREE")
+      TRY(UC_JOINING_GROUP_DAL,                   "DAL")
+      TRY(UC_JOINING_GROUP_DALATH_RISH,           "DALATH RISH")
+      TRY(UC_JOINING_GROUP_E,                     "E")
+      TRY(UC_JOINING_GROUP_FARSI_YEH,             "FARSI YEH")
+      TRY(UC_JOINING_GROUP_FE,                    "FE")
+      TRY(UC_JOINING_GROUP_FEH,                   "FEH")
+      TRY(UC_JOINING_GROUP_FINAL_SEMKATH,         "FINAL SEMKATH")
+      TRY(UC_JOINING_GROUP_GAF,                   "GAF")
+      TRY(UC_JOINING_GROUP_GAMAL,                 "GAMAL")
+      TRY(UC_JOINING_GROUP_HAH,                   "HAH")
+      TRY(UC_JOINING_GROUP_HE,                    "HE")
+      TRY(UC_JOINING_GROUP_HEH,                   "HEH")
+      TRY(UC_JOINING_GROUP_HEH_GOAL,              "HEH GOAL")
+      TRY(UC_JOINING_GROUP_HETH,                  "HETH")
+      TRY(UC_JOINING_GROUP_KAF,                   "KAF")
+      TRY(UC_JOINING_GROUP_KAPH,                  "KAPH")
+      TRY(UC_JOINING_GROUP_KHAPH,                 "KHAPH")
+      TRY(UC_JOINING_GROUP_KNOTTED_HEH,           "KNOTTED HEH")
+      TRY(UC_JOINING_GROUP_LAM,                   "LAM")
+      TRY(UC_JOINING_GROUP_LAMADH,                "LAMADH")
+      TRY(UC_JOINING_GROUP_MEEM,                  "MEEM")
+      TRY(UC_JOINING_GROUP_MIM,                   "MIM")
+      TRY(UC_JOINING_GROUP_NOON,                  "NOON")
+      TRY(UC_JOINING_GROUP_NUN,                   "NUN")
+      TRY(UC_JOINING_GROUP_NYA,                   "NYA")
+      TRY(UC_JOINING_GROUP_PE,                    "PE")
+      TRY(UC_JOINING_GROUP_QAF,                   "QAF")
+      TRY(UC_JOINING_GROUP_QAPH,                  "QAPH")
+      TRY(UC_JOINING_GROUP_REH,                   "REH")
+      TRY(UC_JOINING_GROUP_REVERSED_PE,           "REVERSED PE")
+      TRY(UC_JOINING_GROUP_SAD,                   "SAD")
+      TRY(UC_JOINING_GROUP_SADHE,                 "SADHE")
+      TRY(UC_JOINING_GROUP_SEEN,                  "SEEN")
+      TRY(UC_JOINING_GROUP_SEMKATH,               "SEMKATH")
+      TRY(UC_JOINING_GROUP_SHIN,                  "SHIN")
+      TRY(UC_JOINING_GROUP_SWASH_KAF,             "SWASH KAF")
+      TRY(UC_JOINING_GROUP_SYRIAC_WAW,            "SYRIAC WAW")
+      TRY(UC_JOINING_GROUP_TAH,                   "TAH")
+      TRY(UC_JOINING_GROUP_TAW,                   "TAW")
+      TRY(UC_JOINING_GROUP_TEH_MARBUTA,           "TEH MARBUTA")
+      TRY(UC_JOINING_GROUP_TEH_MARBUTA_GOAL,      "TEH MARBUTA GOAL")
+      TRY(UC_JOINING_GROUP_TETH,                  "TETH")
+      TRY(UC_JOINING_GROUP_WAW,                   "WAW")
+      TRY(UC_JOINING_GROUP_YEH,                   "YEH")
+      TRY(UC_JOINING_GROUP_YEH_BARREE,            "YEH BARREE")
+      TRY(UC_JOINING_GROUP_YEH_WITH_TAIL,         "YEH WITH TAIL")
+      TRY(UC_JOINING_GROUP_YUDH,                  "YUDH")
+      TRY(UC_JOINING_GROUP_YUDH_HE,               "YUDH HE")
+      TRY(UC_JOINING_GROUP_ZAIN,                  "ZAIN")
+      TRY(UC_JOINING_GROUP_ZHAIN,                 "ZHAIN")
+#undef TRY
+      else
+        {
+          fprintf (stderr, "unknown joining group value \"%s\" in '%s':%d\n",
+                   joining_group_name, arabicshaping_filename, lineno);
+          exit (1);
+        }
+
+      unicode_joining_type[i] = joining_type;
+      unicode_joining_group[i] = joining_group;
+    }
+
+  if (ferror (stream) || fclose (stream))
+    {
+      fprintf (stderr, "error reading from '%s'\n", arabicshaping_filename);
+      exit (1);
+    }
+}
+
+/* Convert a Joining_Type value to a C identifier.  */
+static const char *
+joining_type_as_c_identifier (int joining_type)
+{
+#define TRY(value) if (joining_type == value) return #value;
+  TRY(UC_JOINING_TYPE_U)
+  TRY(UC_JOINING_TYPE_T)
+  TRY(UC_JOINING_TYPE_C)
+  TRY(UC_JOINING_TYPE_L)
+  TRY(UC_JOINING_TYPE_R)
+  TRY(UC_JOINING_TYPE_D)
+#undef TRY
+  abort ();
+}
+
+static void
+output_joining_type_test (const char *filename, const char *version)
+{
+  FILE *stream;
+  bool need_comma;
+  unsigned int ch;
+
+  stream = fopen (filename, "w");
+  if (stream == NULL)
+    {
+      fprintf (stderr, "cannot open '%s' for writing\n", filename);
+      exit (1);
+    }
+
+  fprintf (stream, "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\n");
+  fprintf (stream, "/* Arabic joining type of Unicode characters.  */\n");
+  fprintf (stream, "/* Generated automatically by gen-uni-tables.c for Unicode %s.  */\n",
+           version);
+
+  need_comma = false;
+  for (ch = 0; ch < 0x110000; ch++)
+    {
+      int value = unicode_joining_type[ch];
+
+      if (value != (uint8_t)~(uint8_t)0)
+        {
+          if (need_comma)
+            fprintf (stream, ",\n");
+          fprintf (stream, "    { 0x%04X, %s }", ch, joining_type_as_c_identifier (value));
+          need_comma = true;
+        }
+    }
+  if (need_comma)
+    fprintf (stream, "\n");
+
+  if (ferror (stream) || fclose (stream))
+    {
+      fprintf (stderr, "error writing to '%s'\n", filename);
+      exit (1);
+    }
+}
+
+/* Construction of sparse 3-level tables.  */
+#define TABLE joining_type_table
+#define ELEMENT uint8_t
+#define DEFAULT (uint8_t)~(uint8_t)0
+#define xmalloc malloc
+#define xrealloc realloc
+#include "3level.h"
+
+static void
+output_joining_type (const char *filename, const char *version)
+{
+  FILE *stream;
+  unsigned int ch, i;
+  struct joining_type_table t;
+  unsigned int level1_offset, level2_offset, level3_offset;
+  uint8_t *level3_packed;
+
+  stream = fopen (filename, "w");
+  if (stream == NULL)
+    {
+      fprintf (stderr, "cannot open '%s' for writing\n", filename);
+      exit (1);
+    }
+
+  fprintf (stream, "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\n");
+  fprintf (stream, "/* Arabic joining type of Unicode characters.  */\n");
+  fprintf (stream, "/* Generated automatically by gen-uni-tables.c for Unicode %s.  */\n",
+           version);
+
+  t.p = 7;
+  t.q = 9;
+  joining_type_table_init (&t);
+
+  for (ch = 0; ch < 0x110000; ch++)
+    {
+      uint8_t value = unicode_joining_type[ch];
+
+      joining_type_table_add (&t, ch, value);
+    }
+
+  joining_type_table_finalize (&t);
+
+  /* Offsets in t.result, in memory of this process.  */
+  level1_offset =
+    5 * sizeof (uint32_t);
+  level2_offset =
+    5 * sizeof (uint32_t)
+    + t.level1_size * sizeof (uint32_t);
+  level3_offset =
+    5 * sizeof (uint32_t)
+    + t.level1_size * sizeof (uint32_t)
+    + (t.level2_size << t.q) * sizeof (uint32_t);
+
+  for (i = 0; i < 5; i++)
+    fprintf (stream, "#define joining_type_header_%d %d\n", i,
+             ((uint32_t *) t.result)[i]);
+  fprintf (stream, "static const\n");
+  fprintf (stream, "struct\n");
+  fprintf (stream, "  {\n");
+  fprintf (stream, "    int level1[%zu];\n", t.level1_size);
+  fprintf (stream, "    short level2[%zu << %d];\n", t.level2_size, t.q);
+  fprintf (stream, "    unsigned char level3[%zu * %d];\n", t.level3_size,
+           (1 << t.p) * 4 / 8);
+  fprintf (stream, "  }\n");
+  fprintf (stream, "u_joining_type =\n");
+  fprintf (stream, "{\n");
+  fprintf (stream, "  {");
+  if (t.level1_size > 8)
+    fprintf (stream, "\n   ");
+  for (i = 0; i < t.level1_size; i++)
+    {
+      uint32_t offset;
+      if (i > 0 && (i % 8) == 0)
+        fprintf (stream, "\n   ");
+      offset = ((uint32_t *) (t.result + level1_offset))[i];
+      if (offset == 0)
+        fprintf (stream, " %5d", -1);
+      else
+        fprintf (stream, " %5zu",
+                 (offset - level2_offset) / sizeof (uint32_t));
+      if (i+1 < t.level1_size)
+        fprintf (stream, ",");
+    }
+  if (t.level1_size > 8)
+    fprintf (stream, "\n ");
+  fprintf (stream, " },\n");
+  fprintf (stream, "  {");
+  if (t.level2_size << t.q > 8)
+    fprintf (stream, "\n   ");
+  for (i = 0; i < t.level2_size << t.q; i++)
+    {
+      uint32_t offset;
+      if (i > 0 && (i % 8) == 0)
+        fprintf (stream, "\n   ");
+      offset = ((uint32_t *) (t.result + level2_offset))[i];
+      if (offset == 0)
+        fprintf (stream, " %5d", -1);
+      else
+        fprintf (stream, " %5zu",
+                 (offset - level3_offset) / sizeof (uint8_t));
+      if (i+1 < t.level2_size << t.q)
+        fprintf (stream, ",");
+    }
+  if (t.level2_size << t.q > 8)
+    fprintf (stream, "\n ");
+  fprintf (stream, " },\n");
+  /* Pack the level3 array.  Each entry needs 4 bits only.  */
+  level3_packed =
+    (uint8_t *) calloc ((t.level3_size << t.p) * 4 / 8, sizeof (uint8_t));
+  for (i = 0; i < t.level3_size << t.p; i++)
+    {
+      unsigned int j = (i * 4) / 8;
+      unsigned int k = (i * 4) % 8;
+      uint32_t value = ((unsigned char *) (t.result + level3_offset))[i] & 0x0f;
+      level3_packed[j] |= (value << k);
+    }
+  fprintf (stream, "  {");
+  if ((t.level3_size << t.p) * 4 / 8 > 8)
+    fprintf (stream, "\n   ");
+  for (i = 0; i < (t.level3_size << t.p) * 4 / 8; i++)
+    {
+      if (i > 0 && (i % 8) == 0)
+        fprintf (stream, "\n   ");
+      fprintf (stream, " 0x%02x", level3_packed[i]);
+      if (i+1 < (t.level3_size << t.p) * 4 / 8)
+        fprintf (stream, ",");
+    }
+  if ((t.level3_size << t.p) * 4 / 8 > 8)
+    fprintf (stream, "\n ");
+  fprintf (stream, " }\n");
+  free (level3_packed);
+  fprintf (stream, "};\n");
+
+  if (ferror (stream) || fclose (stream))
+    {
+      fprintf (stderr, "error writing to '%s'\n", filename);
+      exit (1);
+    }
+}
+
+/* Convert a Joining_Group value to a C identifier.  */
+static const char *
+joining_group_as_c_identifier (int joining_group)
+{
+#define TRY(value) if (joining_group == value) return #value;
+  TRY(UC_JOINING_GROUP_NONE)
+  TRY(UC_JOINING_GROUP_AIN)
+  TRY(UC_JOINING_GROUP_ALAPH)
+  TRY(UC_JOINING_GROUP_ALEF)
+  TRY(UC_JOINING_GROUP_BEH)
+  TRY(UC_JOINING_GROUP_BETH)
+  TRY(UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE)
+  TRY(UC_JOINING_GROUP_DAL)
+  TRY(UC_JOINING_GROUP_DALATH_RISH)
+  TRY(UC_JOINING_GROUP_E)
+  TRY(UC_JOINING_GROUP_FARSI_YEH)
+  TRY(UC_JOINING_GROUP_FE)
+  TRY(UC_JOINING_GROUP_FEH)
+  TRY(UC_JOINING_GROUP_FINAL_SEMKATH)
+  TRY(UC_JOINING_GROUP_GAF)
+  TRY(UC_JOINING_GROUP_GAMAL)
+  TRY(UC_JOINING_GROUP_HAH)
+  TRY(UC_JOINING_GROUP_HE)
+  TRY(UC_JOINING_GROUP_HEH)
+  TRY(UC_JOINING_GROUP_HEH_GOAL)
+  TRY(UC_JOINING_GROUP_HETH)
+  TRY(UC_JOINING_GROUP_KAF)
+  TRY(UC_JOINING_GROUP_KAPH)
+  TRY(UC_JOINING_GROUP_KHAPH)
+  TRY(UC_JOINING_GROUP_KNOTTED_HEH)
+  TRY(UC_JOINING_GROUP_LAM)
+  TRY(UC_JOINING_GROUP_LAMADH)
+  TRY(UC_JOINING_GROUP_MEEM)
+  TRY(UC_JOINING_GROUP_MIM)
+  TRY(UC_JOINING_GROUP_NOON)
+  TRY(UC_JOINING_GROUP_NUN)
+  TRY(UC_JOINING_GROUP_NYA)
+  TRY(UC_JOINING_GROUP_PE)
+  TRY(UC_JOINING_GROUP_QAF)
+  TRY(UC_JOINING_GROUP_QAPH)
+  TRY(UC_JOINING_GROUP_REH)
+  TRY(UC_JOINING_GROUP_REVERSED_PE)
+  TRY(UC_JOINING_GROUP_SAD)
+  TRY(UC_JOINING_GROUP_SADHE)
+  TRY(UC_JOINING_GROUP_SEEN)
+  TRY(UC_JOINING_GROUP_SEMKATH)
+  TRY(UC_JOINING_GROUP_SHIN)
+  TRY(UC_JOINING_GROUP_SWASH_KAF)
+  TRY(UC_JOINING_GROUP_SYRIAC_WAW)
+  TRY(UC_JOINING_GROUP_TAH)
+  TRY(UC_JOINING_GROUP_TAW)
+  TRY(UC_JOINING_GROUP_TEH_MARBUTA)
+  TRY(UC_JOINING_GROUP_TEH_MARBUTA_GOAL)
+  TRY(UC_JOINING_GROUP_TETH)
+  TRY(UC_JOINING_GROUP_WAW)
+  TRY(UC_JOINING_GROUP_YEH)
+  TRY(UC_JOINING_GROUP_YEH_BARREE)
+  TRY(UC_JOINING_GROUP_YEH_WITH_TAIL)
+  TRY(UC_JOINING_GROUP_YUDH)
+  TRY(UC_JOINING_GROUP_YUDH_HE)
+  TRY(UC_JOINING_GROUP_ZAIN)
+  TRY(UC_JOINING_GROUP_ZHAIN)
+#undef TRY
+  abort ();
+}
+
+static void
+output_joining_group_test (const char *filename, const char *version)
+{
+  FILE *stream;
+  bool need_comma;
+  unsigned int ch;
+
+  stream = fopen (filename, "w");
+  if (stream == NULL)
+    {
+      fprintf (stderr, "cannot open '%s' for writing\n", filename);
+      exit (1);
+    }
+
+  fprintf (stream, "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\n");
+  fprintf (stream, "/* Arabic joining group of Unicode characters.  */\n");
+  fprintf (stream, "/* Generated automatically by gen-uni-tables.c for Unicode %s.  */\n",
+           version);
+
+  need_comma = false;
+  for (ch = 0; ch < 0x110000; ch++)
+    {
+      int value = unicode_joining_group[ch];
+
+      if (value != UC_JOINING_GROUP_NONE)
+        {
+          if (need_comma)
+            fprintf (stream, ",\n");
+          fprintf (stream, "    { 0x%04X, %s }", ch, joining_group_as_c_identifier (value));
+          need_comma = true;
+        }
+    }
+  if (need_comma)
+    fprintf (stream, "\n");
+
+  if (ferror (stream) || fclose (stream))
+    {
+      fprintf (stderr, "error writing to '%s'\n", filename);
+      exit (1);
+    }
+}
+
+static void
+output_joining_group (const char *filename, const char *version)
+{
+  FILE *stream;
+  unsigned int ch_min, ch_max, ch, i;
+
+  stream = fopen (filename, "w");
+  if (stream == NULL)
+    {
+      fprintf (stderr, "cannot open '%s' for writing\n", filename);
+      exit (1);
+    }
+
+  fprintf (stream, "/* DO NOT EDIT! GENERATED AUTOMATICALLY! */\n");
+  fprintf (stream, "/* Arabic joining type of Unicode characters.  */\n");
+  fprintf (stream, "/* Generated automatically by gen-uni-tables.c for Unicode %s.  */\n",
+           version);
+
+  ch_min = 0x10FFFF;
+  for (ch = 0; ch < 0x110000; ch++)
+    if (unicode_joining_group[ch] != UC_JOINING_GROUP_NONE)
+      {
+        ch_min = ch;
+        break;
+      }
+
+  ch_max = 0;
+  for (ch = 0x10FFFF; ch > 0; ch--)
+    if (unicode_joining_group[ch] != UC_JOINING_GROUP_NONE)
+      {
+        ch_max = ch;
+        break;
+      }
+
+  if (!(ch_min <= ch_max))
+    abort ();
+
+  /* If the interval [ch_min, ch_max] is too large, we should better use a
+     3-level table.  */
+  if (!(ch_max - ch_min < 0x200))
+    abort ();
+
+  fprintf (stream, "#define joining_group_header_0 0x%x\n", ch_min);
+  fprintf (stream, "static const unsigned char u_joining_group[0x%x - 0x%x] =\n",
+           ch_max + 1, ch_min);
+  fprintf (stream, "{");
+  for (i = 0; i <= ch_max - ch_min; i++)
+    {
+      const char *s;
+
+      ch = ch_min + i;
+      if ((i % 2) == 0)
+        fprintf (stream, "\n ");
+      s = joining_group_as_c_identifier (unicode_joining_group[ch]);
+      fprintf (stream, " %s", s);
+      if (i+1 <= ch_max - ch_min)
+        {
+          fprintf (stream, ",");
+          if (((i+1) % 2) != 0)
+            fprintf (stream, "%*s", 38 - (int) strlen (s), "");
+        }
+    }
+  fprintf (stream, "\n");
+  fprintf (stream, "};\n");
+
+  if (ferror (stream) || fclose (stream))
+    {
+      fprintf (stderr, "error writing to '%s'\n", filename);
+      exit (1);
+    }
+}
+
+/* ========================================================================= */
+
 /* Scripts.  */
 
 static const char *scripts[256];
@@ -3943,7 +4570,7 @@
   fprintf (stream, "/* Unicode scripts.  */\n");
   fprintf (stream, "/* Generated automatically by gen-uni-tables.c for Unicode %s.  */\n",
            version);
-  fprintf (stream, "struct named_script { const char *name; unsigned int index; };\n");
+  fprintf (stream, "struct named_script { int name; unsigned int index; };\n");
   fprintf (stream, "%%struct-type\n");
   fprintf (stream, "%%language=ANSI-C\n");
   fprintf (stream, "%%define hash-function-name scripts_hash\n");
@@ -3951,6 +4578,8 @@
   fprintf (stream, "%%readonly-tables\n");
   fprintf (stream, "%%global-table\n");
   fprintf (stream, "%%define word-array-name script_names\n");
+  fprintf (stream, "%%pic\n");
+  fprintf (stream, "%%define string-pool-name script_stringpool\n");
   fprintf (stream, "%%%%\n");
   for (s = 0; s < numscripts; s++)
     fprintf (stream, "%s, %u\n", scripts[s], s);
@@ -5251,6 +5880,7 @@
           unicode_width[i] = strdup (field1);
         }
     }
+
   if (ferror (stream) || fclose (stream))
     {
       fprintf (stderr, "error reading from '%s'\n", width_filename);
@@ -6398,6 +7028,7 @@
           unicode_org_lbp[i] = value;
         }
     }
+
   if (ferror (stream) || fclose (stream))
     {
       fprintf (stderr, "error reading from '%s'\n", linebreak_filename);
@@ -7478,6 +8109,7 @@
       for (i = i1; i <= i2; i++)
         unicode_org_gbp[i] = propvalue;
     }
+
   if (ferror (stream) || fclose (stream))
     {
       fprintf (stderr, "error reading from '%s'\n", graphemebreakproperty_filename);
@@ -9013,6 +9645,7 @@
   const char *unicodedata_filename;
   const char *proplist_filename;
   const char *derivedproplist_filename;
+  const char *arabicshaping_filename;
   const char *scripts_filename;
   const char *blocks_filename;
   const char *proplist30_filename;
@@ -9025,9 +9658,9 @@
   const char *casefolding_filename;
   const char *version;
 
-  if (argc != 15)
-    {
-      fprintf (stderr, "Usage: %s UnicodeData.txt PropList.txt DerivedCoreProperties.txt Scripts.txt Blocks.txt PropList-3.0.1.txt EastAsianWidth.txt LineBreak.txt WordBreakProperty.txt GraphemeBreakProperty.txt CompositionExclusions.txt SpecialCasing.txt CaseFolding.txt version\n",
+  if (argc != 16)
+    {
+      fprintf (stderr, "Usage: %s UnicodeData.txt PropList.txt DerivedCoreProperties.txt ArabicShaping.txt Scripts.txt Blocks.txt PropList-3.0.1.txt EastAsianWidth.txt LineBreak.txt WordBreakProperty.txt GraphemeBreakProperty.txt CompositionExclusions.txt SpecialCasing.txt CaseFolding.txt version\n",
                argv[0]);
       exit (1);
     }
@@ -9035,23 +9668,25 @@
   unicodedata_filename = argv[1];
   proplist_filename = argv[2];
   derivedproplist_filename = argv[3];
-  scripts_filename = argv[4];
-  blocks_filename = argv[5];
-  proplist30_filename = argv[6];
-  eastasianwidth_filename = argv[7];
-  linebreak_filename = argv[8];
-  wordbreakproperty_filename = argv[9];
-  graphemebreakproperty_filename = argv[10];
-  compositionexclusions_filename = argv[11];
-  specialcasing_filename = argv[12];
-  casefolding_filename = argv[13];
-  version = argv[14];
+  arabicshaping_filename = argv[4];
+  scripts_filename = argv[5];
+  blocks_filename = argv[6];
+  proplist30_filename = argv[7];
+  eastasianwidth_filename = argv[8];
+  linebreak_filename = argv[9];
+  wordbreakproperty_filename = argv[10];
+  graphemebreakproperty_filename = argv[11];
+  compositionexclusions_filename = argv[12];
+  specialcasing_filename = argv[13];
+  casefolding_filename = argv[14];
+  version = argv[15];
 
   fill_attributes (unicodedata_filename);
   clear_properties ();
   fill_properties (proplist_filename);
   fill_properties (derivedproplist_filename);
   fill_properties30 (proplist30_filename);
+  fill_arabicshaping (arabicshaping_filename);
   fill_scripts (scripts_filename);
   fill_blocks (blocks_filename);
   fill_width (eastasianwidth_filename);
@@ -9066,7 +9701,7 @@
 
   output_categories (version);
   output_category ("unictype/categ_of.h", version);
-  output_combclass ("unictype/combining.h", version);
+  output_combclass ("unictype/combiningclass.h", version);
   output_bidi_category ("unictype/bidi_of.h", version);
   output_decimal_digit_test ("../tests/unictype/test-decdigit.h", version);
   output_decimal_digit ("unictype/decdigit.h", version);
@@ -9076,6 +9711,11 @@
   output_numeric ("unictype/numeric.h", version);
   output_mirror ("unictype/mirror.h", version);
   output_properties (version);
+  output_joining_type_test ("../tests/unictype/test-joiningtype_of.h", version);
+  output_joining_type ("unictype/joiningtype_of.h", version);
+  output_joining_group_test ("../tests/unictype/test-joininggroup_of.h", version);
+  output_joining_group ("unictype/joininggroup_of.h", version);
+
   output_scripts (version);
   output_scripts_byname (version);
   output_blocks (version);
@@ -9121,6 +9761,7 @@
         /gfs/petix/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions/6.0.0/ucd/UnicodeData.txt \
         /gfs/petix/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions/6.0.0/ucd/PropList.txt \
         /gfs/petix/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions/6.0.0/ucd/DerivedCoreProperties.txt \
+        /gfs/petix/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions/6.0.0/ucd/ArabicShaping.txt \
         /gfs/petix/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions/6.0.0/ucd/Scripts.txt \
         /gfs/petix/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions/6.0.0/ucd/Blocks.txt \
         /gfs/petix/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions/3.0.1/PropList-3.0.1.txt \
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -94,11 +94,6 @@
 #include <errno.h>
 #include <stdio.h>
 
-/* Exclude all the code except the test program at the end
-   if the system has its own `getloadavg' function.  */
-
-#ifndef HAVE_GETLOADAVG
-
 # include <sys/types.h>
 
 /* Both the Emacs and non-Emacs sections want this.  Some
@@ -108,8 +103,6 @@
 #  include <sys/param.h>
 # endif
 
-# include "c-strtod.h"
-# include "cloexec.h"
 # include "intprops.h"
 
 /* The existing Emacs configuration files define a macro called
@@ -372,7 +365,6 @@
 #    endif /* NLIST_STRUCT */
 
 #    ifdef SUNOS_5
-#     include <fcntl.h>
 #     include <kvm.h>
 #     include <kstat.h>
 #    endif
@@ -461,7 +453,10 @@
 #  include <sys/dg_sys_info.h>
 # endif
 
-# include "fcntl--.h"
+# if (defined __linux__ || defined __CYGWIN__ || defined SUNOS_5        \
+      || (defined LOAD_AVE_TYPE && ! defined __VMS))
+#  include <fcntl.h>
+# endif
 
 /* Avoid static vars inside a function since in HPUX they dump as pure.  */
 
@@ -482,13 +477,13 @@
 # if !defined (HAVE_LIBKSTAT) && defined (LOAD_AVE_TYPE)
 /* File descriptor open to /dev/kmem or VMS load ave driver.  */
 static int channel;
-/* True iff channel is valid.  */
+/* True if channel is valid.  */
 static bool getloadavg_initialized;
 /* Offset in kmem to seek to read load average, or 0 means invalid.  */
 static long offset;
 
 #  if ! defined __VMS && ! defined sgi && ! defined __linux__
-static struct nlist nl[2];
+static struct nlist name_list[2];
 #  endif
 
 #  ifdef SUNOS_5
@@ -500,7 +495,7 @@
 /* Put the 1 minute, 5 minute and 15 minute load averages
    into the first NELEM elements of LOADAVG.
    Return the number written (never more than 3, but may be less than NELEM),
-   or -1 if an error occurred.  */
+   or -1 (setting errno) if an error occurred.  */
 
 int
 getloadavg (double loadavg[], int nelem)
@@ -509,18 +504,17 @@
 
 # ifdef NO_GET_LOAD_AVG
 #  define LDAV_DONE
-  /* Set errno to zero to indicate that there was no particular error;
-     this function just can't work at all on this system.  */
-  errno = 0;
+  errno = ENOSYS;
   elem = -1;
 # endif
 
-# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT)
+# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT)       /* Solaris <= 2.6 */
 /* Use libkstat because we don't have to be root.  */
 #  define LDAV_DONE
   kstat_ctl_t *kc;
   kstat_t *ksp;
   kstat_named_t *kn;
+  int saved_errno;
 
   kc = kstat_open ();
   if (kc == 0)
@@ -559,10 +553,13 @@
         }
     }
 
+  saved_errno = errno;
   kstat_close (kc);
+  errno = saved_errno;
 # endif /* HAVE_LIBKSTAT */
 
 # if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC)
+                                                           /* HP-UX */
 /* Use pstat_getdynamic() because we don't have to be root.  */
 #  define LDAV_DONE
 #  undef LOAD_AVE_TYPE
@@ -579,7 +576,7 @@
 
 # endif /* hpux && HAVE_PSTAT_GETDYNAMIC */
 
-# if ! defined LDAV_DONE && defined HAVE_LIBPERFSTAT
+# if ! defined LDAV_DONE && defined HAVE_LIBPERFSTAT       /* AIX */
 #  define LDAV_DONE
 #  undef LOAD_AVE_TYPE
 /* Use perfstat_cpu_total because we don't have to be root. */
@@ -596,6 +593,7 @@
 # endif
 
 # if !defined (LDAV_DONE) && (defined (__linux__) || defined (__CYGWIN__))
+                                              /* Linux without glibc, Cygwin */
 #  define LDAV_DONE
 #  undef LOAD_AVE_TYPE
 
@@ -605,39 +603,54 @@
 
   char ldavgbuf[3 * (INT_STRLEN_BOUND (int) + sizeof ".00 ")];
   char const *ptr = ldavgbuf;
-  int fd, count;
+  int fd, count, saved_errno;
 
   fd = open (LINUX_LDAV_FILE, O_RDONLY);
   if (fd == -1)
     return -1;
   count = read (fd, ldavgbuf, sizeof ldavgbuf - 1);
+  saved_errno = errno;
   (void) close (fd);
+  errno = saved_errno;
   if (count <= 0)
     return -1;
   ldavgbuf[count] = '\0';
 
   for (elem = 0; elem < nelem; elem++)
     {
-      char *endptr;
-      double d;
+      double numerator = 0;
+      double denominator = 1;
 
-      errno = 0;
-      d = c_strtod (ptr, &endptr);
-      if (ptr == endptr || (d == 0 && errno != 0))
+      while (*ptr == ' ')
+        ptr++;
+
+      /* Finish if this number is missing, and report an error if all
+         were missing.  */
+      if (! ('0' <= *ptr && *ptr <= '9'))
         {
           if (elem == 0)
-            return -1;
+            {
+              errno = ENOTSUP;
+              return -1;
+            }
           break;
         }
-      loadavg[elem] = d;
-      ptr = endptr;
+
+      while ('0' <= *ptr && *ptr <= '9')
+        numerator = 10 * numerator + (*ptr++ - '0');
+
+      if (*ptr == '.')
+        for (ptr++; '0' <= *ptr && *ptr <= '9'; ptr++)
+          numerator = 10 * numerator + (*ptr - '0'), denominator *= 10;
+
+      loadavg[elem++] = numerator / denominator;
     }
 
   return elem;
 
 # endif /* __linux__ || __CYGWIN__ */
 
-# if !defined (LDAV_DONE) && defined (__NetBSD__)
+# if !defined (LDAV_DONE) && defined (__NetBSD__)          /* NetBSD < 0.9 */
 #  define LDAV_DONE
 #  undef LOAD_AVE_TYPE
 
@@ -657,7 +670,10 @@
                   &scale);
   (void) fclose (fp);
   if (count != 4)
-    return -1;
+    {
+      errno = ENOTSUP;
+      return -1;
+    }
 
   for (elem = 0; elem < nelem; elem++)
     loadavg[elem] = (double) load_ave[elem] / (double) scale;
@@ -666,7 +682,7 @@
 
 # endif /* __NetBSD__ */
 
-# if !defined (LDAV_DONE) && defined (NeXT)
+# if !defined (LDAV_DONE) && defined (NeXT)                /* NeXTStep */
 #  define LDAV_DONE
   /* The NeXT code was adapted from iscreen 3.2.  */
 
@@ -698,7 +714,10 @@
     }
 
   if (!getloadavg_initialized)
-    return -1;
+    {
+      errno = ENOTSUP;
+      return -1;
+    }
 # endif /* NeXT */
 
 # if !defined (LDAV_DONE) && defined (UMAX)
@@ -732,7 +751,7 @@
       for (i = 0; i < conf.config_maxclass; ++i)
         {
           struct class_stats stats;
-          bzero ((char *) &stats, sizeof stats);
+          memset (&stats, 0, sizeof stats);
 
           desc.sd_type = CPUTYPE_CLASS;
           desc.sd_objid = i;
@@ -825,6 +844,7 @@
 # endif /* OSF_MIPS */
 
 # if !defined (LDAV_DONE) && (defined (__MSDOS__) || defined (WINDOWS32))
+                                                           /* DJGPP */
 #  define LDAV_DONE
 
   /* A faithful emulation is going to have to be saved for a rainy day.  */
@@ -834,7 +854,7 @@
     }
 # endif  /* __MSDOS__ || WINDOWS32 */
 
-# if !defined (LDAV_DONE) && defined (OSF_ALPHA)
+# if !defined (LDAV_DONE) && defined (OSF_ALPHA)           /* OSF/1 */
 #  define LDAV_DONE
 
   struct tbl_loadavg load_ave;
@@ -846,7 +866,7 @@
          : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale));
 # endif /* OSF_ALPHA */
 
-# if ! defined LDAV_DONE && defined __VMS
+# if ! defined LDAV_DONE && defined __VMS                  /* VMS */
   /* VMS specific code -- read from the Load Ave driver.  */
 
   LOAD_AVE_TYPE load_ave[3];
@@ -883,10 +903,14 @@
     }
 
   if (!getloadavg_initialized)
-    return -1;
+    {
+      errno = ENOTSUP;
+      return -1;
+    }
 # endif /* ! defined LDAV_DONE && defined __VMS */
 
 # if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS
+                                                  /* IRIX, other old systems */
 
   /* UNIX-specific code -- read the average from /dev/kmem.  */
 
@@ -899,38 +923,36 @@
     {
 #  ifndef sgi
 #   if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
-      strcpy (nl[0].n_name, LDAV_SYMBOL);
-      strcpy (nl[1].n_name, "");
+      strcpy (name_list[0].n_name, LDAV_SYMBOL);
+      strcpy (name_list[1].n_name, "");
 #   else /* NLIST_STRUCT */
 #    ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
-      nl[0].n_un.n_name = LDAV_SYMBOL;
-      nl[1].n_un.n_name = 0;
+      name_list[0].n_un.n_name = LDAV_SYMBOL;
+      name_list[1].n_un.n_name = 0;
 #    else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
-      nl[0].n_name = LDAV_SYMBOL;
-      nl[1].n_name = 0;
+      name_list[0].n_name = LDAV_SYMBOL;
+      name_list[1].n_name = 0;
 #    endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
 #   endif /* NLIST_STRUCT */
 
 #   ifndef SUNOS_5
       if (
 #    if !(defined (_AIX) && !defined (ps2))
-          nlist (KERNEL_FILE, nl)
+          nlist (KERNEL_FILE, name_list)
 #    else  /* _AIX */
-          knlist (nl, 1, sizeof (nl[0]))
+          knlist (name_list, 1, sizeof (name_list[0]))
 #    endif
           >= 0)
-          /* Omit "&& nl[0].n_type != 0 " -- it breaks on Sun386i.  */
+          /* Omit "&& name_list[0].n_type != 0 " -- it breaks on Sun386i.  */
           {
 #    ifdef FIXUP_KERNEL_SYMBOL_ADDR
-            FIXUP_KERNEL_SYMBOL_ADDR (nl);
+            FIXUP_KERNEL_SYMBOL_ADDR (name_list);
 #    endif
-            offset = nl[0].n_value;
+            offset = name_list[0].n_value;
           }
 #   endif /* !SUNOS_5 */
 #  else  /* sgi */
-      int ldav_off;
-
-      ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
+      ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
       if (ldav_off != -1)
         offset = (long int) ldav_off & 0x7fffffff;
 #  endif /* sgi */
@@ -940,13 +962,27 @@
   if (!getloadavg_initialized)
     {
 #  ifndef SUNOS_5
-      channel = open ("/dev/kmem", O_RDONLY);
-      if (channel >= 0)
+      /* Set the channel to close on exec, so it does not
+         litter any child's descriptor table.  */
+#   ifndef O_CLOEXEC
+#    define O_CLOEXEC 0
+#   endif
+      int fd = open ("/dev/kmem", O_RDONLY | O_CLOEXEC);
+      if (0 <= fd)
         {
-          /* Set the channel to close on exec, so it does not
-             litter any child's descriptor table.  */
-          set_cloexec_flag (channel, true);
-          getloadavg_initialized = true;
+#   if F_DUPFD_CLOEXEC
+          if (fd <= STDERR_FILENO)
+            {
+              int fd1 = fcntl (fd, F_DUPFD_CLOEXEC, STDERR_FILENO + 1);
+              close (fd);
+              fd = fd1;
+            }
+#   endif
+          if (0 <= fd)
+            {
+              channel = fd;
+              getloadavg_initialized = true;
+            }
         }
 #  else /* SUNOS_5 */
       /* We pass 0 for the kernel, corefile, and swapfile names
@@ -955,8 +991,8 @@
       if (kd != 0)
         {
           /* nlist the currently running kernel.  */
-          kvm_nlist (kd, nl);
-          offset = nl[0].n_value;
+          kvm_nlist (kd, name_list);
+          offset = name_list[0].n_value;
           getloadavg_initialized = true;
         }
 #  endif /* SUNOS_5 */
@@ -985,7 +1021,10 @@
     }
 
   if (offset == 0 || !getloadavg_initialized)
-    return -1;
+    {
+      errno = ENOTSUP;
+      return -1;
+    }
 # endif /* ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS */
 
 # if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) /* Including VMS.  */
@@ -1000,51 +1039,8 @@
 # endif /* !LDAV_DONE && LOAD_AVE_TYPE */
 
 # if !defined LDAV_DONE
-  /* Set errno to zero to indicate that there was no particular error;
-     this function just can't work at all on this system.  */
-  errno = 0;
+  errno = ENOSYS;
   elem = -1;
 # endif
   return elem;
 }
-
-#endif /* ! HAVE_GETLOADAVG */
-
-#ifdef TEST
-int
-main (int argc, char **argv)
-{
-  int naptime = 0;
-
-  if (argc > 1)
-    naptime = atoi (argv[1]);
-
-  while (1)
-    {
-      double avg[3];
-      int loads;
-
-      errno = 0;                /* Don't be misled if it doesn't set errno.  */
-      loads = getloadavg (avg, 3);
-      if (loads == -1)
-        {
-          perror ("Error getting load average");
-          return EXIT_FAILURE;
-        }
-      if (loads > 0)
-        printf ("1-minute: %f  ", avg[0]);
-      if (loads > 1)
-        printf ("5-minute: %f  ", avg[1]);
-      if (loads > 2)
-        printf ("15-minute: %f  ", avg[2]);
-      if (loads > 0)
-        putchar ('\n');
-
-      if (naptime == 0)
-        break;
-      sleep (naptime);
-    }
-
-  return EXIT_SUCCESS;
-}
-#endif /* TEST */
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -181,6 +181,7 @@
    one).  For long options that have a zero `flag' field, `getopt'
    returns the contents of the `val' field.  */
 
+# if !GNULIB_defined_struct_option
 struct option
 {
   const char *name;
@@ -190,6 +191,8 @@
   int *flag;
   int val;
 };
+#  define GNULIB_defined_struct_option 1
+# endif
 
 /* Names for the values of the `has_arg' field of `struct option'.  */
 
--- a/lib/getopt_int.h
+++ b/lib/getopt_int.h
@@ -108,7 +108,7 @@
 #if defined _LIBC && defined USE_NONOPTION_FLAGS
   int __nonoption_flags_max_len;
   int __nonoption_flags_len;
-# endif
+#endif
 };
 
 /* The initializer is necessary to set OPTIND and OPTERR to their
--- a/lib/getpass.c
+++ b/lib/getpass.c
@@ -26,53 +26,53 @@
 
 #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
 
-#include <stdbool.h>
+# include <stdbool.h>
 
-#if HAVE_DECL___FSETLOCKING && HAVE___FSETLOCKING
-# if HAVE_STDIO_EXT_H
-#  include <stdio_ext.h>
+# if HAVE_DECL___FSETLOCKING && HAVE___FSETLOCKING
+#  if HAVE_STDIO_EXT_H
+#   include <stdio_ext.h>
+#  endif
+# else
+#  define __fsetlocking(stream, type)    /* empty */
 # endif
-#else
-# define __fsetlocking(stream, type)    /* empty */
-#endif
 
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
+# if HAVE_TERMIOS_H
+#  include <termios.h>
+# endif
 
-#if USE_UNLOCKED_IO
-# include "unlocked-io.h"
-#else
-# if !HAVE_DECL_FFLUSH_UNLOCKED
-#  undef fflush_unlocked
-#  define fflush_unlocked(x) fflush (x)
-# endif
-# if !HAVE_DECL_FLOCKFILE
-#  undef flockfile
-#  define flockfile(x) ((void) 0)
+# if USE_UNLOCKED_IO
+#  include "unlocked-io.h"
+# else
+#  if !HAVE_DECL_FFLUSH_UNLOCKED
+#   undef fflush_unlocked
+#   define fflush_unlocked(x) fflush (x)
+#  endif
+#  if !HAVE_DECL_FLOCKFILE
+#   undef flockfile
+#   define flockfile(x) ((void) 0)
+#  endif
+#  if !HAVE_DECL_FUNLOCKFILE
+#   undef funlockfile
+#   define funlockfile(x) ((void) 0)
+#  endif
+#  if !HAVE_DECL_FPUTS_UNLOCKED
+#   undef fputs_unlocked
+#   define fputs_unlocked(str,stream) fputs (str, stream)
+#  endif
+#  if !HAVE_DECL_PUTC_UNLOCKED
+#   undef putc_unlocked
+#   define putc_unlocked(c,stream) putc (c, stream)
+#  endif
 # endif
-# if !HAVE_DECL_FUNLOCKFILE
-#  undef funlockfile
-#  define funlockfile(x) ((void) 0)
-# endif
-# if !HAVE_DECL_FPUTS_UNLOCKED
-#  undef fputs_unlocked
-#  define fputs_unlocked(str,stream) fputs (str, stream)
-# endif
-# if !HAVE_DECL_PUTC_UNLOCKED
-#  undef putc_unlocked
-#  define putc_unlocked(c,stream) putc (c, stream)
-# endif
-#endif
 
 /* It is desirable to use this bit on systems that have it.
    The only bit of terminal state we want to twiddle is echoing, which is
    done in software; there is no need to change the state of the terminal
    hardware.  */
 
-#ifndef TCSASOFT
-# define TCSASOFT 0
-#endif
+# ifndef TCSASOFT
+#  define TCSASOFT 0
+# endif
 
 static void
 call_fclose (void *arg)
@@ -112,7 +112,7 @@
   flockfile (out);
 
   /* Turn echoing off if it is on now.  */
-#if HAVE_TCGETATTR
+# if HAVE_TCGETATTR
   if (tcgetattr (fileno (in), &t) == 0)
     {
       /* Save the old one. */
@@ -121,7 +121,7 @@
       t.c_lflag &= ~(ECHO | ISIG);
       tty_changed = (tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &t) == 0);
     }
-#endif
+# endif
 
   /* Write the prompt.  */
   fputs_unlocked (prompt, out);
@@ -158,10 +158,10 @@
     }
 
   /* Restore the original setting.  */
-#if HAVE_TCSETATTR
+# if HAVE_TCSETATTR
   if (tty_changed)
     tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &s);
-#endif
+# endif
 
   funlockfile (out);
 
@@ -176,15 +176,15 @@
    improved by Simon Josefsson. */
 
 /* For PASS_MAX. */
-#include <limits.h>
+# include <limits.h>
 /* For _getch(). */
-#include <conio.h>
+# include <conio.h>
 /* For strdup(). */
-#include <string.h>
+# include <string.h>
 
-#ifndef PASS_MAX
-# define PASS_MAX 512
-#endif
+# ifndef PASS_MAX
+#  define PASS_MAX 512
+# endif
 
 char *
 getpass (const char *prompt)
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -93,6 +93,12 @@
 
 #endif
 
+/* Prefer gnulib's setlocale override over libintl's setlocale override.  */
+#ifdef GNULIB_defined_setlocale
+# undef setlocale
+# define setlocale rpl_setlocale
+#endif
+
 /* A pseudo function call that serves as a marker for the automated
    extraction of messages, but does not call gettext().  The run-time
    translation is done at a different place in the code.
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -40,10 +40,10 @@
 static struct tm tm_zero_buffer;
 static struct tm *localtime_buffer_addr = &tm_zero_buffer;
 
-#undef localtime
+# undef localtime
 extern struct tm *localtime (time_t const *);
 
-#undef gmtime
+# undef gmtime
 extern struct tm *gmtime (time_t const *);
 
 /* This is a wrapper for localtime.  It is used only on systems for which
@@ -79,7 +79,7 @@
 
 #if TZSET_CLOBBERS_LOCALTIME
 
-#undef tzset
+# undef tzset
 extern void tzset (void);
 
 /* This is a wrapper for tzset, for systems on which tzset may clobber
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -27,15 +27,12 @@
 # include <stdio.h>
 # include <stdbool.h>
 
-/* The warn_unused_result attribute appeared first in gcc-3.4.0 */
-# ifndef __attribute__
-#  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
-#   define __attribute__(x)
-#  endif
-# endif
-
-# ifndef ATTRIBUTE_WUR
-#  define ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__))
+/* The