changeset 17261:e2f98cc246bd

maint: merge stable to default
author John W. Eaton <jwe@octave.org>
date Sat, 05 Jan 2013 19:58:22 -0500
parents c960be36c9f3 (diff) 7ebb2c82d76f (current diff)
children 30110a025c48
files ChangeLog lib/stdio.in.h
diffstat 2672 files changed, 49940 insertions(+), 9798 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,3626 @@
+2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	sys_stat: no 'static inline'
+	* lib/sys_stat.in.h (rpl_mkdir): Now static, not static inline.
+	* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Do not require AC_C_INLINE.
+
+	extern-inline: no 'static inline'
+	* m4/extern-inline.m4 (gl_EXTERN_INLINE):
+	Do not require AC_C_INLINE.
+	(_GL_INLINE, _GL_EXTERN_INLINE): Define as 'static', not as
+	'static inline', for older compilers.
+
+	snippet/warn-on-use: no 'static inline'
+	* build-aux/snippet/warn-on-use.h:
+	Remove unnecessary 'inline' in comment.
+
+	rbtree-list, rbtreehash-list: no 'static inline'
+	* lib/gl_anyrbtree_list2.h (rotate_left, rotate_right):
+	* lib/gl_anytree_list2.h (node_at):
+	* lib/gl_anytreehash_list1.h (hash_resize_after_add)
+	(gl_oset_first, add_nodes_to_buckets):
+	Now static, not static inline.
+
+	regex: no 'static inline'
+	* lib/regex_internal.c (calc_state_hash):
+	* lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain)
+	(bitset_empty, bitset_set_all, bitset_copy, bitset_not, bitset_merge)
+	(bitset_mask, re_string_char_size_at, re_string_wchar_at):
+	Now static, not static inline.
+	(inline) [__GNUC__ < 3 && _LIBC]:
+	Remove macro; no longer needed.
+
+	xvasprintf: no 'static inline'
+	* lib/xvasprintf.c (xstrcat):
+	Now static, not static inline.
+	* m4/xvasprintf.m4 (gl_XVASPRINTF):
+	Do not require AC_C_INLINE.
+
+	parse-datetime, parse-duration: no 'static inline'
+	* lib/parse-datetime.y (to_uchar):
+	* lib/parse-duration.c (str_const_to_ul, str_const_to_l)
+	(scale_n_add):
+	Now static, not static inline.
+	* m4/parse-datetime.m4 (gl_PARSE_DATETIME):
+	* modules/parse-duration (configure.ac):
+	Do not require AC_C_INLINE.
+
+	getaddrinfo: no 'static inline'
+	* lib/getaddrinfo.c (validate_family):
+	Now static, not static inline.
+	* m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO):
+	Do not require AC_C_INLINE.
+
+	ftruncate, fts, lstat, openat, raise: no 'static inline'
+	* lib/ftruncate.c (chsize_nothrow):
+	* lib/fts.c (opendirat, diropen):
+	* lib/lstat.c (orig_lstat):
+	* lib/openat.c (orig_openat):
+	* lib/raise.c (raise_nothrow):
+	Now static, not static inline.
+	* m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE):
+	* m4/fts.m4 (gl_FUNC_FTS_CORE):
+	* m4/lstat.m4 (gl_PREREQ_LSTAT):
+	* m4/openat.m4 (gl_PREREQ_OPENAT):
+	* m4/raise.m4 (gl_PREREQ_RAISE):
+	Do not require AC_C_INLINE.
+
+	fflush, stat: no 'static inline'
+	* lib/fflush.c (clear_ungetc_buffer_preserving_position)
+	(clear_ungetc_buffer, disable_seek_optimization)
+	(restore_seek_optimization, update_fpos_cache):
+	* lib/stat.c (orig_stat):
+	Now static, not static inline.
+	* lib/fflush.c (disable_seek_optimization, restore_seek_optimization)
+	(update_fpos_cache):
+	Define only if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1).
+	* m4/fflush.m4 (gl_PREREQ_FFLUSH):
+	* m4/stat.m4 (gl_PREREQ_STAT):
+	Do not require AC_C_INLINE.
+
+	error, filevercmp: no 'static inline'
+	* lib/error.c (is_open, flush_stdout):
+	* lib/filevercmp.c (order):
+	Now static, not static inline.
+	* m4/error.m4 (gl_PREREQ_ERROR):
+	* modules/filevercmp (configure.ac):
+	Do not require AC_C_INLINE.
+
+	dup, execute, fatal-signal, etc.: no 'static inline'
+	* lib/dup.c (dup_nothrow):
+	* lib/execute.c (nonintr_close, nonintr_open):
+	* lib/fatal-signal.c (uninstall_handlers, install_handlers):
+	* lib/fopen.c (orig_fopen):
+	* lib/freadseek.c (freadptrinc):
+	* lib/freopen.c (orig_freopen):
+	* lib/fstat.c (orig_fstat, fstat_nothrow):
+	* lib/get-rusage-as.c (get_rusage_as_via_setrlimit)
+	(get_rusage_as_via_iterator):
+	* lib/get-rusage-data.c (get_rusage_data_via_setrlimit):
+	* lib/getdtablesize.c (_setmaxstdio_nothrow):
+	* lib/isatty.c (_isatty_nothrow):
+	* lib/open.c (orig_open):
+	* lib/read.c (read_nothrow):
+	* lib/sigprocmask.c (signal_nothrow):
+	* lib/spawn-pipe.c (nonintr_close, nonintr_open):
+	* lib/vasnprintf.c (MAX_ROOM_NEEDED):
+	* lib/wait-process.c (unregister_slave_subprocess):
+	* lib/write.c (write_nothrow):
+	Now static, not static inline.
+	* lib/spawn-pipe.c (nonintr_open): Define only if
+	(defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__.
+	* m4/dup.m4 (gl_PREREQ_DUP):
+	* m4/execute.m4 (gl_EXECUTE):
+	* m4/fatal-signal.m4 (gl_FATAL_SIGNAL):
+	* m4/fopen.m4 (gl_PREREQ_FOPEN):
+	* m4/freadseek.m4 (gl_FUNC_FREADSEEK):
+	* m4/freopen.m4 (gl_PREREQ_FREOPEN):
+	* m4/fstat.m4 (gl_PREREQ_FSTAT):
+	* m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE):
+	* m4/isatty.m4 (gl_PREREQ_ISATTY):
+	* m4/open.m4 (gl_PREREQ_OPEN):
+	* m4/read.m4 (gl_PREREQ_READ):
+	* m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK):
+	* m4/spawn-pipe.m4 (gl_SPAWN_PIPE):
+	* m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF):
+	* m4/wait-process.m4 (gl_WAIT_PROCESS):
+	* m4/write.m4 (gl_PREREQ_WRITE):
+	* modules/get-rusage-as, modules/get-rusage-data (configure.ac):
+	Do not require AC_C_INLINE.
+
+	c-strtod, memcoll, readutmp: no 'static inline'
+	* lib/c-strtod.c (c_locale):
+	* lib/memcoll.c (strcoll_loop):
+	* lib/readutmp.c (desirable_utmp_entry):
+	Now static, not static inline.
+	* m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD):
+	* m4/memcoll.m4 (gl_MEMCOLL):
+	* m4/readutmp.m4 (gl_READUTMP):
+	Do not require AC_C_INLINE.
+
+	arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
+	* lib/arctwo.c (to_uchar):
+	* lib/md4.c (set_uint32):
+	* lib/md5.c (set_uint32):
+	* lib/sha1.c (set_uint32):
+	* lib/sha256.c (set_uint32):
+	* lib/sha512.c (set_uint64):
+	Now static, not static inline.  This is a bit simpler, and doesn't
+	affect performance with GCC and default optimization.
+	* m4/arctwo.m4 (gl_ARCTWO):
+	* m4/md4.m4 (gl_MD4):
+	* m4/md5.m4 (gl_MD5):
+	* m4/sha1.m4 (gl_SHA1):
+	* m4/sha256.m4 (gl_SHA256):
+	* m4/sha512.m4 (gl_SHA512):
+	Do not require AC_C_INLINE.
+
+	cond, lock, thread: better 'inline'
+	* lib/glthread/cond.c, lib/glthread/cond.h (_GLTHREAD_COND_INLINE):
+	* lib/glthread/thread.c, lib/glthread/thread.h (_GLTHREAD_THREAD_INLINE):
+	New macros.  Use them instead of static inline, for header functions.
+	* lib/glthread/cond.c (gl_waitqueue_init, gl_waitqueue_remove)
+	(gl_waitqueue_notify_first, gl_waitqueue_notify_all):
+	* lib/glthread/lock.c (gl_waitqueue_init)
+	(gl_waitqueue_notify_first, gl_waitqueue_notify_all):
+	* lib/glthread/thread.c (get_current_thread_handle):
+	Change 'static inline' to 'inline'.
+	* lib/glthread/cond.h, lib/glthread/thread.h:
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/cond.m4 (gl_COND):
+	* m4/lock.m4 (gl_PREREQ_LOCK):
+	* m4/thread.m4 (gl_THREAD):
+	Do not require AC_C_INLINE.
+	* modules/cond, modules/thread (Depends-on): Add extern-inline.
+
+	chdir-long, cycle-check, savewd: better 'inline'
+	* lib/chdir-long.c (cdb_init, cdb_fchdir, cdb_free)
+	(find_non_slash):
+	* lib/cycle-check.c (is_zero_or_power_of_two):
+	* lib/savewd.c (savewd_delegating):
+	Change 'static inline' to 'inline'.
+	* lib/savewd.c, lib/savewd.h (SAVEWD_INLINE): New macro.
+	Replace all remaining uses of 'static inline' with it.
+	* lib/savewd.h:
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG):
+	* m4/cycle-check.m4 (gl_CYCLE_CHECK):
+	* m4/savewd.m4 (gl_SAVEWD):
+	Do not require AC_C_INLINE.
+	* modules/savewd (Depends-on): Add extern-inline.
+
+	base32, base64: no need for 'inline'
+	* lib/base32.c (to_uchar, get_8, decode_8):
+	* lib/base64.c (to_uchar, get_4, decode_4):
+	Change 'static inline' to 'inline'.
+	* m4/base32.m4 (gl_PREREQ_BASE32):
+	* m4/base64.m4 (gl_PREREQ_BASE64):
+	Do not require AC_C_INLINE.
+
+	array-oset, linkedhash-list, rbtree-oset: no need for 'inline'
+	* lib/gl_array_oset.c (gl_array_nx_add_at):
+	(gl_array_remove_at):
+	* lib/gl_linkedhash_list.c (hash_resize_after_add)
+	(add_to_bucket, remove_from_bucket):
+	* lib/gl_rbtree_oset.c (rotate_left, rotate_right):
+	Change 'static inline' to 'static', as it's simpler to omit
+	'inline' unless there's a significant performance advantage.
+
+	list, oset, xlist, xoset, xsublist: simplify via extern inline
+	* lib/gl_list.h, lib/gl_list.c (GL_LIST_INLINE):
+	* lib/gl_oset.c, lib/gl_oset.h (GL_OSET_INLINE):
+	* lib/gl_xlist.c, lib/gl_xlist.h (GL_XLIST_INLINE):
+	* lib/gl_xoset.c, lib/gl_xoset.h (GL_XOSET_INLINE):
+	* lib/gl_xsublist.c, lib/gl_xsublist.h (GL_XSUBLIST_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	[HAVE_INLINE]: Implement functions as *_INLINE functions,
+	instead of as macros FOO that are defined to static inline
+	functions FOO_inline.
+	* lib/gl_list.c, lib/gl_oset.c, lib/gl_xlist.c, lib/gl_xoset.c:
+	* lib/gl_xsublist.c:
+	Reimplement from scratch, by defining the corresponding *_INLINE
+	macro and including the corresponding .h file.  This is simpler.
+	* modules/list, modules/oset, modules/xlist, modules/xoset:
+	(Files): Remove m4/gl_list.m4.
+	(configure.ac): Remove gl_LIST.
+	* m4/gl_list.m4: Remove.
+	* modules/list, modules/oset, modules/xlist, modules/xoset:
+	* modules/xsublist:
+	(Depends-on): Depend on extern-inline, not inline.
+
+	xalloc: better 'inline'
+	* lib/xmalloc.c, lib/xalloc.h (XALLOC_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	(static_inline): Remove.
+	* lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
+	Let 'extern inline' do the work automatically, instead of doing
+	it by hand.
+	* m4/xalloc.m4 (gl_PREREQ_XALLOC, gl_PREREQ_XMALLOC):
+	Remove.  All uses removed.
+	* modules/xalloc (Depends-on): Remove 'inline'.  Add 'extern-inline'.
+
+	gethrxtime: better 'inline'
+	* lib/xtime.c: New file.
+	* lib/gethrxtime.c, lib/gethrxtime.h (GETHRXTIME_INLINE):
+	* lib/xtime.h (XTIME_INCLUDE):
+	New macros.  Replace all uses of 'static inline' with them.
+	* lib/gethrxtime.c (gethrxtime): Define only if
+	! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME), since
+	this source file is now always compiled, because of the extern inline.
+	* lib/gethrxtime.h, lib/xtime.h:
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/gethrxtime.m4 (gl_GETHRXTIME): Do not check for clock macros
+	if gethrtime works, as they're not needed in that case.
+	(gl_XTIME): Do not require AC_C_INLINE.
+	(gl_PREREQ_GETHRXTIME): Remove; all uses removed, as it's always
+	compiled now.  Move the check into gl_GETHRXTIME.
+	* modules/gethrxtime (Files, lib_SOURCES): Add lib/xtime.c.
+	(Depends-on): Add extern-inline.
+	(configure.ac): gethrxtime is always compiled now.
+	(lib_SOURCES): Add gethrxtime.c.
+
+	wctype-h: better 'inline'
+	* lib/wctype-h.c: New file.
+	* lib/wctype.in.h (_GL_WCTYPE_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/wctype_h.m4 (gl_WCTYPE_H): Do not require AC_C_INLINE.
+	* modules/wctype-h (Files, lib_SOURCES): Add lib/wctype-h.c.
+	(Depends-on): Add extern-inline.
+
+	unistd: better 'inline'
+	* lib/unistd.c: New file.
+	* lib/unistd.in.h (_GL_UNISTD_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/unistd_h.m4 (gl_UNISTD_H): Do not require AC_C_INLINE.
+	* modules/unistd (Files, lib_SOURCES): Add lib/unistd.c.
+	(Depends-on): Add extern-inline.
+
+	sys_socket: better 'inline'
+	* lib/sys_socket.c: New file.
+	* lib/sys_socket.in.h (_GL_SYS_SOCKET_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Do not require AC_C_INLINE.
+	* modules/sys_socket (Files, lib_SOURCES): Add lib/sys_socket.c.
+	(Depends-on): Add extern-inline.
+
+	stdio: better 'inline'
+	* lib/stdio.c: New file.
+	* lib/stdio.in.h (_GL_STDIO_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/stdio_h.m4 (gl_STDIO_H): Do not require AC_C_INLINE.
+	* modules/stdio (Files, lib_SOURCES): Add lib/stdio.c.
+	(Depends-on): Add extern-inline.
+
+	sigaction: better 'inline'
+	* lib/sig-handler.c: New file.
+	* lib/sig-handler.h (SIG_HANDLER_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): Do not require AC_C_INLINE.
+	* modules/sigaction (Files, lib_SOURCES): Add lib/sig-handler.c.
+	(Depends-on): Add extern-inline.
+
+	selinux-h: better 'inline'
+	* lib/se-context.c, lib/se-selinux.c: New files.
+	* lib/getfilecon.c (map_to_failure): Omit 'inline' for static function.
+	* lib/se-context.in.h (SE_CONTEXT_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* lib/se-selinux.in.h (SE_SELINUX_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* modules/selinux-h (Files, lib_SOURCES):
+	Add lib/se-context.c, lib/se-selinux.c.
+	(Depends-on): Add extern-inline.
+	(configure.ac): Do not require AC_C_INLINE.
+
+	pthread: better 'inline'
+	* lib/pthread.c: New file.
+	* lib/pthread.in.h (_GL_PTHREAD_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/pthread.m4 (gl_PTHREAD_CHECK):
+	Add AC_LIBOBJ([pthread]).  Do not require AC_C_INLINE.
+	* modules/pthread (Files): Add lib/pthread.c.
+	(Depends-on): Add extern-inline.
+
+	math: better 'inline'
+	* lib/math.c: New file.
+	* lib/math.in.h (_GL_MATH_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/math_h.m4 (gl_MATH_H):
+	Do not require AC_C_INLINE.
+	* modules/math (Files, lib_SOURCES):
+	Add lib/math.c.
+	(Depends-on): Add extern-inline.
+
+	count-one-bits: better 'inline'
+	* lib/count-one-bits.c: New file.
+	* lib/count-one-bits.h (COUNT_ONE_BITS_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/count-one-bits.m4 (gl_COUNT_ONE_BITS):
+	Do not require AC_C_INLINE.
+	* modules/count-one-bits (Files, lib_SOURCES):
+	Add lib/count-one-bits.c.
+	(Depends-on): Add extern-inline.
+
+	count-leading-zeros: better 'inline'
+	* lib/count-leading-zeros.c: New file.
+	* lib/count-leading-zeros.h (COUNT_LEADING_ZEROS_INLINE):
+	New macro.  Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/count-leading-zeros.m4 (gl_COUNT_LEADING_ZEROS):
+	Do not require AC_C_INLINE.
+	* modules/count-leading-zeros (Files, lib_SOURCES):
+	Add lib/count-leading-zeros.c.
+	(Depends-on): Add extern-inline.
+
+	bitrotate: better 'inline'
+	* lib/bitrotate.c: New file.
+	* lib/bitrotate.h (BITROTATE_INLINE):
+	New macros.
+	Replace all uses of 'static inline' with them.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* modules/bitrotate (Files, lib_SOURCES): Add lib/bitrotate.c.
+	(Depends-on): Add extern-inline.
+	(configure.ac): Do not require AC_C_INLINE.
+
+2012-11-20  Theophile Ranquet <ranquet@lrde.epita.fr>
+
+	maint.mk: avoid gratuitous failure
+	Reported by Stefano Lattarini in
+	<http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00022.html>
+	* top/maint.mk (public-submodule-commit): Quote more safely.
+
+2012-11-20  Eli Zaretskii  <eliz@gnu.org>
+
+	canonicalize, canonicalize-lgpl: support MS-Windows file names
+	See <http://lists.gnu.org/archive/html/bug-gnulib/2012-11/msg00074.html>
+	for test cases, which it'd be nice to add at some point.
+	* lib/canonicalize.c, lib/canonicalize-lgpl.c: Include dosname.h.
+	* lib/canonicalize.c (canonicalize_filename_mode):
+	* lib/canonicalize-lgpl.c (__realpath):
+	Use FILE_SYSTEM_PREFIX_LEN instead of assuming that the first
+	slash is at the beginning of the file name.  Use ISSLASH, instead
+	of a literal '/'.  Use IS_ABSOLUTE_FILE_NAME instead of comparing
+	the first character with '/'.  Test for
+	DOUBLE_SLASH_IS_DISTINCT_ROOT only if the file name does not begin
+	with a drive letter.
+	* lib/canonicalize.c (SLASHES): New macro.
+	(canonicalize_filename_mode): Use SLASHES instead of a literal "/".
+
+2012-11-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	fts: introduce FTS_VERBATIM
+	* lib/fts_.h (FTS_VERBATIM): New bit flag.
+	(FTS_OPTIONMASK, FTS_NAMEONLY, FTS_STOP): Adjust.
+	* lib/fts.c (fts_open): Honor it.
+
+2012-11-09  Pádraig Brady  <P@draigBrady.com>
+
+	getlogin-tests: allow errno == ENXIO
+	* tests/test-getlogin.c (main): Skip tests if getlogin fails
+	with errno == ENXIO (No controlling tty).
+	getlogin_r-tests: Likewise. Also allow errno == ENOENT
+	* tests/test-getlogin_r.c (main): Skip tests if getlogin_r fails
+	with errno == ENOENT.  This was reported to happen in various
+	situations on GNU/Linux.
+
+2012-11-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+	getlogin-tests: allow errno == ENOENT
+	* tests/test-getlogin.c (main): Skip tests if getlogin fails
+	with errno == ENOENT.  This happened to me on Ubuntu 12.04.1 x86,
+	when running a test in an Emacs shell buffer.
+
+2012-11-08  Jim Meyering  <jim@meyering.net>
+
+	tests/nap.h: avoid warning about unused variable
+	* tests/nap.h (nap_works): Remove now-unused declaration of "result".
+
+	prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition
+	* build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require
+	white space before each of the special-cased file names, to avoid
+	adding "lib/" after $(libdir)/.  Reported by Matias A. fonzo
+	in http://bugs.gnu.org/12830.
+
+2012-11-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fcntl-h: default O_SEARCH, O_EXEC back to O_RDONLY
+	O_PATH doesn't work with Linux kernel 3.6.5, as fchmod (fd, ...)
+	fails with errno == EBADF when fd is opened with O_PATH.
+	Reported by Jim Meyering in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-11/msg00026.html>.
+	* doc/posix-headers/fcntl.texi (fcntl.h): Document this.
+	* lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default back to O_RDONLY.
+
+2012-11-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+	test-utimens: speed up by taking shorter naps
+	* tests/nap.h (lt_mtime, get_mtime, nap_works, guess_delay):
+	New functions.
+	(nap): Use them, to do a better job of guessing the delay.
+	On Fedora 17 with ext4 atop md atop hard disks, this made
+	test-utimens run 10x faster, because the test napped for
+	1 ms at a time rather than 20 ms.  Reported by Stefano Lattarini in
+	<http://bugs.gnu.org/12820#11>.
+
+2012-11-07  Jim Meyering  <jim@meyering.net>
+
+	mountlist.c: fix a compilation failure
+	* lib/mountlist.c (read_file_system_list): Fix a compilation failure
+	I introduced while transforming commit v0.0-7683-g613bcb6
+
+2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+	errno: port to LynxOS 178 2.2.2
+	Problem reported by Joel Brobecker in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-10/msg00088.html>.
+	* doc/posix-headers/errno.texi (errno.h): Document this.
+	* lib/errno.in.h (EILSEQ, GNULIB_defined_EILSEQ) [!EILSEQ]: New macros.
+	* lib/strerror-override.c, lib/strerror-override.h (strerror_override):
+	Supply a string for EILSEQ.
+	* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Check for EILSEQ.
+
+2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fcntl-h: default O_SEARCH, O_EXEC to O_PATH if available
+	Linux kernel 2.6.39 introduced O_PATH (see
+	<http://lwn.net/Articles/433854/>) and this is a better fallback
+	for O_SEARCH and O_EXEC than O_RDONLY, if O_PATH is available.
+	* doc/posix-headers/fcntl.texi (fcntl.h): Document this.
+	* lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default to O_PATH.
+	* lib/fcntl.in.h (O_ACCMODE):
+	* tests/test-fcntl-h.c (main):
+	Do not reject O_ACCMODE merely because it has more than the
+	minimal number of bits, as POSIX allows extensions here.
+
+2012-11-04  Andrew Warshall  <warshall@99main.com>  (tiny change)
+
+	mountlist: do not classify a bind-mounted dir entry as "dummy"
+	* lib/mountlist.c (ME_DUMMY_0): Rename from ME_DUMMY, but omit
+	the "none"-testing clause.
+	(ME_DUMMY) [MOUNTED_GETMNTENT1]: New macro to encapsulate the
+	exception for bind-mounted directories.
+
+2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
+
+	quote: provide a means to escape strings with nul characters
+	* lib/quote.h, lib/quotearg.c (quote_mem, quote_n_mem): New functions.
+	(quote, quote_n): Rename formal arguments for consistency with
+	quotearg.
+
+2012-10-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+	test-raise: don't assume 199 is an invalid signal
+	* tests/test-raise.c (main): Don't assume 199 is not a signal number.
+
+	sh-quote-tests: port to Solaris 9
+	* modules/sh-quote-tests (test_sh_quote_LDADD): Add @LIBINTL@.
+	Problem reported by Dagobert Michelsen in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-10/msg00114.html>.
+
+2012-10-28  Jim Meyering  <jim@meyering.net>
+
+	maint.mk: rename a new configurable variable
+	* top/maint.mk (_gl_translatable_string_re): Rename from
+	translation-markers: _gl_ prefix to insulate from user Makefile code,
+	and the _re suffix to inform that it's a regular expression.
+
+2012-10-26  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: let packages tweak sc_po_check pattern
+	* top/maint.mk (sc_po_check): Add translation-markers, to allow
+	finding files with other translation markers.
+
+2012-10-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	euidaccess: speed up 'configure' on GNU hosts
+	* m4/euidaccess.m4 (gl_FUNC_NONREENTRANT_EUIDACCESS):
+	Check for setregid here, not in gl_PREREQ_EUIDACCESS, since
+	it's needed only in this case.  Use AC_CHECK_DECLS, not
+	AC_CHECK_DECLS_ONCE.
+	(gl_PREREQ_EUIDACCESS): Do not use AC_CHECK_HEADERS_ONCE libgen.h
+	or AC_REQUIRE for AC_FUNC_GETGROUPS.
+
+	* lib/regexec.c (re_search_internal): Fix grammar in comment.
+
+2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fchmodat, fchownat, fstatat: port to non-inlining compilers
+	Problem reported for FreeBSD 9 by Jim Meyering in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-10/msg00070.html>.
+	* lib/chmodat.c, lib/chownat.c, lib/statat.c:
+	New files, which define FCHMODAT_INLINE etc.
+	* lib/fchmodat.c (FCHMODAT_INLINE):
+	* lib/fchownat.c (FCHOWNAT_INLINE):
+	* lib/fstatat.c (FSTATAT_INLINE):
+	Remove, as chmodat.c etc. now do this.
+	* modules/fchmodat (Files): Add lib/chmodat.c.
+	* modules/fchownat (Files): Add lib/chownat.c.
+	* modules/fstatat (Files): Add lib/statat.c.
+
+2012-10-15  Jim Meyering  <jim@meyering.net>
+
+	fchmodat.c, fchownat.c: compile-impeding typos
+	* lib/fchmodat.c (FCHMODAT_INLINE): Fix typo: s/#include/#define/
+	* lib/fchownat.c (FCHOWNAT_INLINE): Likewise.
+	Introduced in commit v0.0-7636-gd202279.
+
+2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fcntl-h: support GNU flags like O_IGNORE_CTTY
+	* doc/posix-headers/fcntl.texi (fcntl.h): Support O_IGNORE_CTTY,
+	O_NOLINK, and O_NOTRANS.  These flags are nonzero on GNU/Hurd
+	systems.  Discovered when using fcntl-h with GNU Emacs, which uses
+	O_IGNORE_CTTY.  Fix misspelling of F_SETLKW.
+	* lib/fcntl.in.h (O_IGNORE_CTTY, O_NOLINK, O_NOTRANS):
+	Define to 0 if not already defined.
+	* tests/test-fcntl-h.c: Test these new flags.
+
+2012-10-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+	faccessat, etc.: support AT_FDCWD-only use
+	* lib/at-func.c: If GNULIB_SUPPORT_ONLY_AT_FDCWD, then support
+	this function only if its first argument is AT_FDCWD.
+	Emacs wants faccessat for AT_EACCESS but not for any first-arg
+	values other than AT_FDCWD, so it doesn't want all the openat
+	machinery with fchdir etc.
+	* modules/faccessat, modules/fchmodat, modules/fchownat (Files):
+	* modules/fstatat, modules/mkdirat, modules/openat (Files):
+	* modules/unlinkat (Files):
+	Remove lib/openat-priv.h, as at-internal supplies this file.
+	Removing this file here allows us to support programs like Emacs
+	that avoid at-internal.
+
+	faccessat: speed up 'configure' on mainstream hosts
+	* m4/faccessat.m4 (gl_PREREQ_FACCESSAT):
+	Use AT_CHECK_FUNCS for 'access', not AC_CHECK_FUNCS_ONCE,
+	since it's only on unusual platforms that we need to check for
+	'access', and it's better not to slow 'configure' down on all
+	platforms.
+
+	faccessat: port to Solaris 10
+	* lib/faccessat.c: Include <fcntl.h>, for AT_EACCESS.
+	Needed on Solaris 10, which doesn't have AT_EACCESS,
+	so we need the Gnulib fcntl.h, which defines it.
+
+2012-10-14  Pádraig Brady  <P@draigBrady.com>
+	canonicalize: fix C89 compilation
+	* lib/canonicalize.c (canonicalize_filename_mode): Swap order of
+	declarations so C89 is supported.  Also remove the comment
+	referencing memorty allocation as the suggested feature could
+	not be implemented as suggested.
+	Reported by Michael Goffioul.
+
+2012-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	group-member: omit unnecessary dependencies
+	This is for Emacs, which has its own allocator and where we
+	don't want to use xalloc.
+	* lib/group-member.c: Include xalloc-oversized.h, not xalloc.h,
+	since we no longer use xmalloc.  Do not include stdbool.h, since
+	the changes below happen to remove the only use of bool.
+	(GROUPBUF_SIZE): New constant.
+	(struct group_info): Remove n_groups member.  Add groupbuf member.
+	This lets us get the groups without using malloc, usually.
+	(free_group_info, get_group_info): Adjust to this.
+	(get_group_info): Return the number of groups found, or -1 on error.
+	Use plain malloc not xmalloc, and treat its failure as if there
+	are no groups, as the user already loses in case of error.
+	(group_member): Simplify, based on changes to get_group_info.
+	* modules/group-member (Depends-on): Remove dependencies on
+	xalloc and stdbool.  Add dependency on xalloc-oversized.
+
+2012-10-08  Alexandre Duret-Lutz  <adl@lrde.epita.fr>  (tiny change)
+
+	gethrxtime: port to C++
+	* lib/gethrxtime.h, lib/xtime.h [__cplusplus]: Add extern "C".
+
+2012-10-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+	ptsname: fix macro-name typo
+	* lib/stdlib.in.h (ptsname): Fix misspelling of GNULIB_NAMESPACE.
+
+2012-10-03  Simon Josefsson  <simon@josefsson.org>
+
+	inttostr: Relax license.
+	* modules/inttostr (License): Change from LGPL to LGPLv2+.
+
+2012-10-03  Eric Blake  <eblake@redhat.com>
+
+	ptsname_r: support ptys returned by FreeBSD posix_openpt
+	* lib/ptsname_r.c (__ptsname_r): Don't munge name if it already
+	lives in /dev/pts/.
+
+2012-10-02  Eric Blake  <eblake@redhat.com>
+
+	pselect: reject invalid file descriptors
+	* m4/pselect.m4 (gl_FUNC_PSELECT): Probe for FreeBSD bug.
+	* lib/pselect.c (rpl_pselect) [!win32]: Work around it.
+	* modules/pselect (Depends-on): Add dup2.
+	* doc/posix-functions/pselect.texi (pselect): Document this.
+
+	select: reject invalid file descriptors
+	* m4/select.m4 (gl_FUNC_SELECT): Probe for FreeBSD bug.
+	* lib/select.c (rpl_select) [!win32]: Work around it.
+	* modules/select (Depends-on): Add dup2.
+	* doc/posix-functions/select.texi (select): Document this.
+
+	select: enhance test
+	* tests/test-select.h (do_select_bad_nfd_nowait, test_bad_nfd):
+	New functions.
+	(test_function): Enhance test.
+	(do_select_bad_fd): Avoid any stale errno values.
+
+	ptsname: reject invalid file descriptors
+	http://www.austingroupbugs.net/view.php?id=503
+	* m4/ptsname.m4 (gl_FUNC_PTSNAME): Probe for FreeBSD bug.
+	* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add new witness.
+	* modules/stdlib (Makefile.am): Replace witness.
+	* lib/stdlib.in.h (ptsname): Allow for replacement.
+	* modules/ptsname (configure.ac): Trigger replacement.
+	* doc/posix-functions/ptsname.texi (ptsname): Document this.
+
+2012-10-02:  Nikos Mavrogiannopoulos  <nmav@gnutls.org>  (tiny change)
+
+	hash-pjw-bare: new module
+	* lib/hash-pjw-bare.c: New file, very much like hash-pjw.c.
+	* lib/hash-pjw-bare.h: Likewise.
+	* modules/hash-pjw-bare: New file.
+	* MODULES.html.sh (Misc): Add it.
+
+2012-10-02  Eric Blake  <eblake@redhat.com>
+
+	manywarnings: cater to more gcc infelicities
+	* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add test for
+	-Wuninitialized without -O.
+
+2012-10-01  Ed Maste  <emaste@freebsd.org>  (tiny change)
+
+	select, poll tests: Make setsockopt invocation effective.
+	* tests/test-poll.c (open_server_socket): Move setsockopt() call before
+	the bind() call.
+	* tests/test-select.h (open_server_socket): Likewise.
+
+2012-09-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+	sockets, sys_stat: restore AC_C_INLINE
+	This undoes the 2012-09-22 patch.
+	* m4/sockets.m4 (gl_SOCKETS):
+	* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
+	Restore AC_C_INLINE, since MSVC requires __inline or _inline
+	and does not support plain 'inline'.  Reported by Bruno Haible in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-09/msg00183.html>.
+
+2012-09-30  Bruno Haible  <bruno@clisp.org>
+
+	localeconv tests: Avoid test failure on OpenIndiana.
+	* tests/test-localeconv.c (main): On OpenIndiana (a Solaris 11 variant)
+	skip the 'grouping' and 'mon_grouping' tests.
+	Reported by Jim Meyering.
+
+2012-09-30  Bruno Haible  <bruno@clisp.org>
+
+	havelib: Follow libtool developments.
+	* m4/lib-ld.m4: Rebase on libtool.m4 from libtool-2.4.
+	Suggested by Simon Josefsson.
+
+2012-09-29  Jim Meyering  <meyering@redhat.com>
+
+	fstatat.c: fix a compile-impeding typo
+	* lib/fstatat.c (FSTATAT_INLINE): Fix typo: s/#include/#define/
+	Introduced in commit v0.0-7636-gd202279.
+	Mats Erik Andersson reported the resulting OpenBSD compilation failure.
+
+2012-09-28  Akim Demaille  <akim@lrde.epita.fr>
+
+	extern-inline: provide a -Wundef safe config.h
+	* m4/extern-inline.m4 (gl_EXTERN_INLINE): Protect
+	"#if __GNUC_STDC_INLINE__" with "defined __GNUC_STDC_INLINE__"
+	to produce a -Wundef warning free config.h.
+
+2012-09-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+	hash-pjw: relax license to LGPLv2+
+	* modules/hash-pjw (License): Relax, with consent of author.
+
+2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: fix strict vs. lazy variable issues with RELEASE
+	* top/maint.mk (_equal): New function.
+	(member_check): Strip the result to avoid spurious spaces.
+	(url_dir_list): Do not use ifeq, which is strict, as it will
+	require RELEASE_TYPE to be defined.
+	(announcement_Cc_, announcement_mail_headers_): Likewise: instead
+	of relying on ifeq, use $(release_type) to dispatch (lazily) onto...
+	(announcement_Cc_alpha,announcement_mail_headers_alpha)
+	(announcement_Cc_beta,announcement_mail_headers_beta)
+	(announcement_Cc_stable,announcement_mail_headers_stable): these.
+	(release): Do not depend on $(release-type), as it forces its
+	evaluation.  Bounce to it.
+
+2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: formatting changes
+	* top/maint.mk: Indent bodies of if's.
+
+2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: factor the validation of RELEASE_TYPE
+	With help from Jim Meyering.
+	http://lists.gnu.org/archive/html/bug-gnulib/2012-09/msg00132.html
+	* top/maint.mk (_empty, _sp): Move their definition earlier.
+	(member-check, release-type): New.
+	Use the latter instead of $(RELEASE_TYPE).
+	Remove now useless local checks.
+
+2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: provide "make upload" to ease uploading
+	See
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00028.html>.
+	Do not depend simply on the current $(VERSION), as there may have been
+	new commits since the tarball generation.  Rather, rely on $(RELEASE),
+	as "make release-commit" already does.
+
+	For consistency, add "make release RELEASE='X.Y TYPE'" as an alias for
+	"make TYPE".
+
+	* top/maint.mk (upload_command, upload, release): New.
+	(RELEASE_TYPE): If undefined, default to the second word of $(RELEASE).
+	(VERSION): first word of $(RELEASE) is always right.
+	(emit_upload_commands): Adjust.
+	* top/README-release: Update.
+
+2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: silent rules
+	With help from Stefano Lattarini.
+	* top/maint.mk (writable-files): Use $(AM_V_GEN).
+	(announcement): Use $(AM_V_at).
+
+2012-09-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+	localename: port gl_locale_name_thread_unsafe to FreeBSD
+	* lib/localename.c (gl_locale_name_thread_unsafe): Port to FreeBSD,
+	and use the simpler FreeBSD implementation on Mac OS X as well.
+	Original idea suggested by Ed Maste in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-09/msg00094.html>.
+
+2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+	binary-io, eealloc, mbfile, mbiter, mbutil, xsize: better 'inline'
+	* lib/binary-io.c, lib/eealloc.c, lib/mbfile.c, lib/mbiter.c:
+	* lib/mbuiter.c, lib/xsize.c: New files.
+	* lib/binary-io.h (BINARY_IO_INLINE):
+	* lib/eealloc.h (EEALLOC_INLINE):
+	* lib/mbfile.h (MBFILE_INLINE):
+	* lib/mbiter.h (MBITER_INLINE):
+	* lib/mbuiter.h (MBUITER_INLINE):
+	* lib/xsize.h (XSIZE_INLINE):
+	New macros.
+	Replace all uses of 'static inline' with them.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/eealloc.m4 (gl_EEALLOC):
+	* m4/mbfile.m4 (gl_MBFILE):
+	* m4/mbiter.m4 (gl_MBITER):
+	* m4/xsize.m4 (gl_XSIZE):
+	Do not require AC_C_INLINE.
+	* modules/binary-io (Files, lib_SOURCES): Add lib/binary-io.c
+	* modules/eealloc (Files, lib_SOURCES): Add lib/eealloc.c.
+	* modules/mbfile (Files, lib_SOURCES): Add lib/mbfile.c.
+	* modules/mbiter (Files, lib_SOURCES): Add lib/mbiter.c.
+	* modules/mbuiter (Files, lib_SOURCES): Add lib/mbuiter.c.
+	* modules/xsize (Files, lib_SOURCES): Add lib/xsize.c.
+	* modules/binary-io, modules/eealloc, modules/mbfile:
+	* modules/mbiter, modules/mbuiter:
+	(Depends-on): Add extern-inline.
+
+	pipe-filter-gi, pipe-filter-ii: better use of 'inline'
+	* lib/pipe-filter-aux.c: New file.
+	* lib/pipe-filter-aux.h (PIPE_FILTER_AUX_INLINE): New macro.
+	Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* lib/pipe-filter-gi.c (filter_init, filter_cleanup)
+	(filter_retcode): No real need for inline here.
+	* modules/pipe-filter-gi, modules/pipe-filter-ii:
+	(Files): Add lib/pipe-filter-aux.c.
+	(Depends-on): Add extern-inline.
+	(configure.ac): Do not require AC_C_INLINE.
+	(lib_SOURCES): Add pipe-filter-aux.c.
+
+	fdutimensat: omit unnecessary AC_C_INLINE
+	* modules/fdutimensat (configure.ac): Remove AC_C_INLINE.
+
+	fchmodat, fchownat, fstatat: use extern-inline
+	* lib/fchmodat.c, lib/openat.h (FCHMODAT_INLINE):
+	* lib/fchownat.c, lib/openat.h (FCHOWNAT_INLINE):
+	* lib/fstatat.c, lib/openat.h (FSTATAT_INLINE):
+	New macros.
+	* lib/openat.h:
+	Replace all uses of 'static inline' with them.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* modules/fchmodat, modules/fchownat, modules/fstatat:
+	* modules/openat-h:
+	(Depends-on):
+	Add extern-inline.
+	(configure.ac): Remove AC_C_INLINE.
+
+	acl, mbchar, priv-set: use extern-inline
+	* lib/set-mode-acl.c, lib/acl-internal.h (ACL_INTERNAL_INLINE):
+	* lib/mbchar.c, lib/mbchar.h (MBCHAR_INLINE):
+	* lib/priv-set.c, lib/priv-set.h (PRIV_SET_INLINE):
+	New macros.
+	* lib/acl-internal.h, lib/mbchar.h, lib/priv-set.h:
+	Replace all uses of 'static inline' with it.
+	Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	* m4/acl.m4 (gl_FUNC_ACL):
+	* m4/mbchar.m4 (gl_MBCHAR):
+	* m4/priv-set.m4 (gl_PRIV_SET):
+	Remove AC_C_INLINE, since 'inline' is no longer used directly.
+	* modules/acl, modules/mbchar, modules/priv-set (Depends-on):
+	Add extern-inline.
+
+	sockets, sys_stat: remove AC_C_INLINE in MSVC-only cases
+	* m4/sockets.m4 (gl_SOCKETS):
+	* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
+	Remove AC_C_INLINE.  Here, 'inline' is used only in MSVC
+	environments where it's already guaranteed to work, so we needn't
+	check for it at 'configure'-time.
+
+	tls-tests: omit unnecessary 'inline'
+	* tests/test-tls.c (perhaps_yield): No longer inline.
+	Simplicity and portability trump efficiency in test cases.
+
+	utimens-tests: avoid unnecessary 'inline'
+	* modules/fdutimensat-tests (configure.ac):
+	* modules/futimens-tests (configure.ac):
+	* modules/utimens-tests (configure.ac):
+	* modules/utimensat-tests (configure.ac):
+	Remove AC_C_INLINE.
+	* tests/test-utimens-common.h (ctime_compare):
+	No longer inline.  Simplicity and portability trump efficiency here.
+
+	misc: don't limit commentary to inline functions
+	* lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c:
+	* lib/xalloc-oversized.h, lib/xsize.h:
+	Contrast macros to functions in general, not just to inline functions,
+	when the commentary does not apply only to inline functions.
+
+2012-09-20  Jim Meyering  <meyering@redhat.com>
+
+	non-recursive-gnulib-prefix-hack: new module
+	* build-aux/prefix-gnulib-mk: Copied from coreutils, derived from
+	the file that originated in Bison.
+	* m4/non-recursive-gnulib-prefix-hack.m4: Likewise, this code is
+	largely copied from a snippet that resided in bison's configure.ac.
+	* modules/non-recursive-gnulib-prefix-hack: New file.
+	* MODULES.html.sh (Support for maintaining and releasing projects):
+	Add it.
+
+2012-09-18  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: generalize _gl_tight_scope for non-recursive make
+	* top/maint.mk (_gl_tight_scope): Remove a hard-coded assumption
+	that *.h would describe additional .h files in the directory
+	specified by $(_gl_TS_dir).  I.e., add this...
+	(_gl_TS_other_headers): New variable.
+
+	maint.mk: exempt trailing blanks found in "binary" files
+	* top/maint.mk (sc_trailing_blank): Filter out any matches found in
+	"binary" files, as reported by grep.  Suggested by Richard W.M. Jones
+	in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
+
+2012-09-17  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: sc_prohibit_path_max_allocation: don't FP for UNIX_PATH_MAX
+	* top/maint.mk (sc_prohibit_path_max_allocation): Avoid false-positive
+	match for symbols like UNIX_PATH_MAX. Reported by Richard W.M. Jones
+	in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
+
+2012-09-17  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: teach sc_prohibit_magic_number_exit to accept 77
+	* top/maint.mk (sc_prohibit_magic_number_exit): Do not complain about
+	uses like "exit (77)".  "77" is automake's "skip this test" exit code.
+	It is not in the same category as "exit (0)" or "exit (1)", and
+	besides, I know of no symbolic name for that 77.  Reported by
+	Richard W.M. Jones in
+	http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
+
+2012-09-17  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: relax sc_prohibit_strcmp, to avoid a false positive
+	* top/maint.mk (sc_prohibit_strcmp): Relax regexp, so as to match
+	all uses of #define, not just those that start in column 1.
+	Richard W.M. Jones reported a false positive in
+	http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
+
+2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	localcharset: work around Mac OS X bug with UTF-8 and MB_CUR_MAX
+	* lib/localcharset.c (locale_charset) [DARWIN7]:
+	Return "ASCII" if the system reports "UTF-8" and MB_CUR_MAX <= 1,
+	as these two values are incompatible.  Problem reported by Max Horn.
+	For more discussion, please see
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-09/msg00061.html>.
+
+	doc: document sticky-EOF issue
+	* doc/posix-functions/fgetc.texi (fgetc):
+	* doc/posix-functions/fgets.texi (fgets):
+	* doc/posix-functions/fread.texi (fread):
+	* doc/posix-functions/fscanf.texi (fscanf):
+	* doc/posix-functions/getc.texi (getc):
+	* doc/posix-functions/getchar.texi (getchar):
+	* doc/posix-functions/scanf.texi (scanf):
+	Mention that glibc and default Solaris do not conform to
+	C99 and POSIX-2001 or later, with respect to how getchar
+	etc. behave when feof reports nonzero.
+
+2012-09-13  Joachim Schmitz <jojo@schmitz-digital.de>  (tiny change)
+
+	poll: fix poll(0, NULL, msec)
+	* lib/poll.c: don't exit early if NULL is the 1st arg to poll(),
+	but nfd is 0.  In that case poll should behave like select.
+
+2012-09-13  Joachim Schmitz <jojo@schmitz-digital.de>  (tiny change)
+	    Paolo Bonzini <bonzini@gnu.org>
+
+	poll: fix for systems that can't recv() on a non-socket
+	* lib/poll.c: if recv returns ENOTSOCK, assume the descriptor
+	is readable.  In this case POLLHUP will not be supported.
+	* doc/posix-functions/poll.texi: Document this.
+
+2012-09-13  Paolo Bonzini  <bonzini@gnu.org>
+
+	poll/select: document portability problems not fixed by Gnulib.
+	* doc/posix-functions/poll.texi: poll does not work well on
+	pipes under Windows.  It has the same limitations as select on
+	BeOS.
+	* doc/posix-functions/select.texi: select does not work well
+	on pipes under Windows.
+
+2012-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fcntl-h: check for AIX 7.1 bug with O_NOFOLLOW and O_CREAT
+	* m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Check for AIX 7.1 bug
+	that caused a GNU tar test failure.  Problem reported by Jez Wain; see
+	<http://lists.gnu.org/archive/html/bug-tar/2012-07/msg00018.html>.
+
+2012-09-06  Eric Blake  <eblake@redhat.com>
+
+	net_if: give more details about the bug being fixed
+	* doc/posix-headers/net_if.texi: Add clarification.
+
+2012-09-05  Eric Blake  <eblake@redhat.com>
+
+	net_if: new module
+	* modules/net_if: New module, borrowing ideas from netinet_in.
+	* m4/net_if_h.m4: New file.
+	* lib/net_if.in.h: Likewise.
+	* doc/posix-headers/net_if.texi (net/if.h): Document it.
+	* MODULES.html.sh (lacking POSIX:2008): Likewise.
+	* tests/test-net_if.c: Make function checks conditional.
+	Reported by Jasper Lievisse Adriaanse <jasper@humppa.nl>.
+
+2012-09-05  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
+
+	readutmp: fix non-portable UT_PID use
+	* lib/readutmp.c (desirable_utmp_entry) <READ_UTMP_CHECK_PIDS>:
+	Use `UT_PID (u) > 0' as absolute condition.
+
+2012-09-04  Jim Meyering  <meyering@redhat.com>
+
+	fts: reduce two or more trailing spaces to just one, usually
+	* lib/fts.c (fts_open): Upon initialization, if a name ends in two
+	or more slashes, trim all but the final one.  But if a name consists
+	solely of two slashes, don't modify it.  If it consists solely of
+	three or more slashes, strip all but one.
+
+	This is part of the solution to a minor problem with rm:
+	it would print a bogus ELOOP diagnostic when failing to remove
+	the slash-decorated name of a symlink-to-directory:
+
+	    $ mkdir d && ln -s d s && env rm -r s/
+	    rm: cannot remove 's': Too many levels of symbolic links
+
+	With the change below and a trivial don't-trim-trailing-slashes
+	adjustment to remove.c, it does this:
+
+	    $ env rm -r s/
+	    rm: cannot remove 's/': Not a directory
+
+	Improved by: Eric Blake
+
+	fts: when there is no risk of overlap, use memcpy, not memmove
+	* lib/fts.c (fts_alloc): Fix unjustified memcopy: s/memmove/memcpy/
+
+2012-08-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdbool: be more compatible with mixed C/C++ compiles
+	* lib/stdbool.in.h (_Bool, true, false) [__cplusplus]:
+	Define to bool, true, false, respectively, as GCC's builtin
+	stdbool.h does.  Problem reported by Michael Goffioul in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00143.html>.
+
+2012-08-28  Jim Meyering  <meyering@redhat.com>
+
+	revert last change: it was not needed
+	* tests/test-vc-list-files-git.sh: There's already a test for
+	a working git, just below.
+
+2012-08-28  Jim Meyering  <meyering@redhat.com>
+
+	tests: test-vc-list-files-git.sh: skip if git is not available
+	* tests/test-vc-list-files-git.sh: Skip this test when git is
+	not available.
+
+2012-08-26  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Remove no-op option --no-changelog.
+	* gnulib-tool (func_usage): Don't mention --no-changelog.
+	(do_changelog): Remove variable.
+	Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
+
+2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: remove fdl-1.2.texi
+	It is no longer used or maintained, and its use of @acronym
+	is problematic.  See the thread containing
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00134.html>.
+	* config/srclist.txt: Remove doc/old-licenses/fdl-1.2.texi.
+	* doc/old-licenses/fdl-1.2.texi: Remove.
+
+	execinfo: port to FreeBSD
+	* m4/execinfo.m4 (gl_EXECINFO_H): Set LIB_EXECINFO to -lexecinfo
+	if needed, as in FreeBSD.  Reported by Bastien Roucariès in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00113.html>.
+	* modules/execinfo (Link): Add $(LIB_EXECINFO).
+
+2012-08-23  Jim Meyering  <meyering@redhat.com>
+
+	xstrtol.h: avoid "_Noreturn is not at beginning of declaration" warning
+	* lib/xstrtol.h: Put "_Noreturn" before "void" in declaration,
+	to placate gcc's -Wold-style-declaration.
+
+2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: do not use @acronym
+	* doc/inet_ntoa.texi (inet_ntoa):
+	* doc/parse-datetime.texi (Seconds since the Epoch)
+	(Specifying time zone rules):
+	* doc/posix-functions/inet_ntoa.texi (inet_ntoa):
+	Don't use @acronym.  Problem reported by John Darlington in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00124.html>.
+
+2012-08-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdnoreturn: port to newer GCCs
+	* m4/stdnoreturn.m4 (gl_STDNORETURN_H): Avoid problems with
+	bleeding-edge GCC that complains about 'int _Noreturn foo (void);'.
+	Problem reported by Jim Meyering in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00121.html>.
+	Also, rename the 'test' function to a void a clash with the
+	already-supplied 'main' function; this fixes a bug that incorrectly
+	rejected GCC 4.7.1's <stdnoreturn.h>.
+	* doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
+	Document GCC problem.
+
+2012-08-22  Reuben Thomas  <rrt@sc3d.org>
+
+	pipe-filter: fix comment typo
+	* lib/pipe-filter.h: Mention correct function.
+
+2012-08-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+	execinfo: new module
+	This is for Emacs.  Currently, it provides a no-effect stub
+	on all platforms where it does not already work.
+	It already works on glibc-based systems, and on Solaris 11.
+	* lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4, modules/execinfo:
+	New files.
+	* doc/glibc-headers/execinfo.texi (execinfo.h):
+	* MODULES.html.sh (Misc): Document it.
+
+2012-08-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	extern-inline: support old GCC 'inline'
+	* m4/extern-inline.m4 (gl_EXTERN_INLINE): Use pre-C99 GCC 'inline'
+	if available.  This applies to GCC versions 2.7 through 4.2, or
+	when newer GCC is using -fgnu89-inline.  The goal is to address
+	some of the performance issues mentioned by Bruno Haible in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00097.html>.
+
+2012-08-20  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: avoid redundant file name in message
+	* top/maint.mk (sc_prohibit_strcmp, sc_unmarked_diagnostics)
+	(sc_prohibit_defined_have_decl_tests, sc_const_long_option)
+	(sc_makefile_path_separator_check): Remove bogus $(ME).
+
+2012-08-20  Mike Frysinger <vapier@gentoo.org>
+
+	timer-time: fix link order when static linking on glibc
+	* m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
+	_after_ -lrt so that it's significant.
+
+2012-08-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+	timespec: omit unnecessary AC_C_INLINE
+	* m4/timespec.m4 (gl_TIMESPEC): Do not require AC_C_INLINE.
+
+	stat-time: omit unnecessary AC_C_INLINE
+	* m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
+	Do not require AC_C_INLINE.
+
+	ignore-value: omit unnecessary AC_C_INLINE
+	* modules/ignore-value (configure.ac): Do not require AC_C_INLINE.
+
+	sys_select: avoid 'static inline'
+	* lib/sys_select.in.h (rpl_fd_isset): Now static, not static inline.
+
+	mktime: avoid 'static inline'
+	* lib/mktime.c (leapyear, ydhms_diff): Now static, not static inline.
+	* m4/mktime.m4 (gl_PREREQ_MKTIME): Do not require AC_C_INLINE.
+
+2012-08-19  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Improve coding style.
+	* gnulib-tool (func_emit_tests_Makefile_am): Set perhapsLT, like in
+	func_emit_lib_Makefile_am.
+	Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
+
+2012-08-19  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Fix indentation.
+	* gnulib-tool (func_import): Fix indentation.
+
+2012-08-19  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Remove old file names from .cvsignore, .gitignore.
+	* gnulib-tool (func_update_ignorelist): Don't use 'join -v 1' command
+	on the list of removed files.
+
+2012-08-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	test-parse-datetime: avoid glibc leap-second glitch
+	* tests/test-parse-datetime.c (main): Set TZ to US Eastern time
+	with the 2012 rules.  Problem reported by Bruce Dubbs in
+	<http://bugs.gnu.org/12206>.
+
+2012-08-14  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Fix indentation of generated gnulib-comp.m4 file.
+	* gnulib-tool (func_emit_autoconf_snippet): Initialize indentation
+	from argument.
+	Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
+
+2012-08-14  Eric Blake  <eblake@redhat.com>
+
+	ldexp: relax license
+	* modules/ldexp (License): Trivial relax, since the module only
+	provides a permissively licensed m4 file.
+
+2012-08-13  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Fix persistence of --witness-c-macro option.
+	* gnulib-tool (func_import): Fix typo in emit of gl_WITNESS_C_MACRO.
+	Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
+
+2012-08-11  Eric Blake  <eblake@redhat.com>
+
+	count-leading-zeros: use a lookup table on non-gcc compilers
+	* lib/count-leading-zeros.h (count_leading_zeros_32): Use an
+	alternate implementation, suggested by Jim Meyering.
+
+2012-08-10  Eric Blake  <eblake@redhat.com>
+
+	count-leading-zeros: new module
+	* modules/count-leading-zeros: New module.
+	* m4/count-leading-zeros.m4: New file.
+	* lib/count-leading-zeros.h: Likewise.
+	* modules/count-leading-zeros-tests: New test.
+	* tests/test-count-leading-zeros.c: New file.
+	* MODULES.html.sh (Integer arithmetic functions): Document it.
+
+2012-08-07  Simon Josefsson  <simon@josefsson.org>
+	    Jim Meyering  <meyering@redhat.com>
+
+	maintainer-makefile: Fix syntax error with dash.
+	* top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): Quote arguments.
+	(sc_vulnerable_makefile_CVE-2012-3386): Likewise.
+
+2012-08-05  Jim Meyering  <meyering@redhat.com>
+
+	extern-inline: also ignore -Wmissing-declarations
+	* m4/extern-inline.m4: Also ignore -Wmissing-declarations,
+	required with gcc-4.8.0-to-be.
+
+	maint.mk: sc_prohibit_magic_number_exit: avoid new false positives
+	* top/maint.mk (sc_prohibit_magic_number_exit): Also filter out matches
+	for /error ?([^,]*)/.  This avoids false-positives for strings like
+	"Unknown error (252)", introduced via commit v0.0-7538-g92875a6.
+
+2012-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	gnumakefile: better interaction with Automake-NG
+	* modules/gnumakefile [Makefile.am]: The makefiles generated by
+	Automake-NG always contain a definition of VPATH, even in non-VPATH
+	builds (its value being simply '.' in that case).  So, in the
+	'clean-GNUmakefile' rule, to determine whether running under a
+	VPATH setup, compare '$(srcdir)' to '.' rather than checking whether
+	'$(VPATH)' expands to the empty string.
+
+2012-08-02  Carlo de Falco  <carlo.defalco@polimi.it>  (tiny change)
+
+	base64: Use extern C scope in header file, for C++.
+	* lib/base64.h: Add C++ namespace protection.
+
+2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stat-time, timespec, u64: support naive out-of-dir builds
+	* lib/stat-time.c, lib/timespec.c, lib/u64.c:
+	Use '#include "foo.h"', not '#include <foo.h>', when including
+	one's own interface.  This works better when configuring with
+	out-of-directory builds, since packages need not add an
+	otherwise-unnecessary -I$(topdir_src)/lib to DEFAULT_INCLUDES.
+
+2012-08-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+	utimens: use extern-inline
+	* lib/utimens.c (_GL_UTIMENS_INLINE): Define when including utimens.h.
+	* lib/utimens.h: Add copyright notice, since this is now large enough
+	to copyright.  Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	(_GL_UTIMENS_INLINE): New macro.  Use it instead of 'static inline'.
+	* modules/utimens (Depends-on): Add extern-inline.
+
+	u64: use extern-inline
+	* lib/u64.c: New file.
+	* lib/u64.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	(_GL_U64_INLINE): New macro.  Use it instead of 'static inline'.
+	* modules/u64 (Files): Add lib/u64.c.
+	(Depends-on): Add extern-inline.
+	(configure.ac): No need to require AC_C_INLINE, since extern-inline
+	does that now.
+	(lib_SOURCES): Add u64.c.
+
+	timespec: use extern-inline
+	* lib/timespec.c: New file.
+	* lib/timespec.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	(_GL_TIMESPEC_INLINE): New macro.  Use it instead of 'static inline'.
+	* modules/timespec (Files): Add lib/timespec.c.
+	(Depends-on): Add extern-inline.
+	(lib_SOURCES): Add timespec.c.
+
+	stat-time: use extern-inline
+	* lib/stat-time.c: New file.
+	* lib/stat-time.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
+	(_GL_STAT_TIME_INLINE): New macro.  Use it instead of 'static inline'.
+	* modules/stat-time (Files): Add lib/stat-time.c.
+	(Depends-on): Add extern-inline.
+	(lib_SOURCES): Add stat-time.c.
+
+	extern-inline: new module
+	* modules/extern-inline, m4/extern-inline.m4: New files.
+	This is for better support of 'extern inline' a la ISO C99,
+	with a portable alternative on compilers that do not support
+	C99-style 'extern inline'.  Using 'extern inline' shrinks the size
+	of the Emacs executable, when compiled with debugging disabled,
+	which is a typical way that Emacs is built while developing.
+
+2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: a "release-commit" wrapper to do-release-commit-and-tag
+	* build-aux/do-release-commit-and-tag: Move variable definitions
+	together.
+	($branch): Instead of defaulting to "master", default to the current
+	branch (as gnu-web-doc-update does).
+	(help): Display the current values of the option arguments.
+	* top/maint.mk (release-commit): New.
+	* top/README-release: Simplify the corresponding step.
+
+2012-07-30  Eric Blake  <eblake@redhat.com>
+
+	passfd: fix comment on recvfd
+	* lib/passfd.c (recvfd): Fix comment.
+	Reported by Jann Horn <jannhorn@googlemail.com>.
+
+2012-07-30  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: avoid a sub-shell
+	* top/maint.mk (release-prep): Remove unneeded sub-shell.
+
+2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: use silent-rules support from Automake
+	* top/maint.mk (news-check, vc-diff-check, announcement)
+	(no-submodule-changes, alpha beta stable, release-prep)
+	(web-manual, update-copyright): Use $(AM_V_GEN) and $(AM_V_at).
+
+2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: provide a web-manual-update target
+	* top/maint.mk: here.
+	* top/README-release: Use it to simplify the web manual update step.
+
+2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
+
+	README-release: shorten the circuit to post a news
+	* top/README-release: Point directly to the news submission form.
+
+2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
+
+	gnu-web-doc-update: fix --help
+	* build-aux/gnu-web-doc-update: The information "top level" was written
+	twice.
+
+2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: absolute VPATH issue
+	* top/maint.mk (release-prep): Help Git find .git/.
+	From Jim Meyering.
+
+2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
+
+	gitlog-to-changelog: fix previous change
+	* build-aux/gitlog-to-changelog: Fix condition.
+	Add missing ";".
+
+2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
+
+	gitlog-to-changelog: don't expect .git to be in $srcdir
+	Reported by Bruno Haible.
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-07/msg00265.html>
+	* build-aux/gitlog-to-changelog (&git_dir_option): New.
+	Use it.
+
+2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: absolute VPATH build fix
+	* top/maint.mk (gpg_key_ID): Help git find .git when, for instance,
+	$(srcdir) is not a parent of $(builddir).
+
+2012-07-28  John Darrington  <john@darrington.wattle.id.au>
+
+	clean-temp: Fix memory leak.
+	* lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and
+	'files' members of tmpdir.
+
+2012-07-27  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: new rule: refresh-gnulib-patches
+	I noticed that 8 of coreutils' 9 gl/**/*.diff files were stale.
+	Use this rule to refresh them.
+	* top/maint.mk (refresh-gnulib-patches): New rule.
+
+2012-07-24  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Fix handling of inctests variable.
+	* gnulib-tool: Canonicalize $inctests also in 'update' mode.
+	Reported by Nick Bowler <nbowler@elliptictech.com>.
+
+2012-07-22  Bruno Haible  <bruno@clisp.org>
+
+	getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.
+	* lib/getpass.h: Assume HAVE_DECL_GETPASS is defined.
+	* cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
+	Remove exemption for getpass.h.
+	Suggested by Eric Blake.
+
+2012-07-20  Eric Blake  <eblake@redhat.com>
+
+	verify: document conflict with -Wnested-externs
+	* lib/verify.h: Give hint about usage when gcc warnings are enabled.
+
+	maint.mk: forbid exit(-1)
+	* top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives.
+
+2012-07-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fsusage: port back to Solaris
+	* lib/fsusage.c (get_fs_usage): Fix busted logic causing compile-time
+	error (fsd not declared) on Solaris 10.  Reported privately by
+	Andrew Borodin.
+
+2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
+
+	gnu-web-doc-update: fix error messages
+	* build-aux/gnu-web-doc-update: Don't pass $ME to die.
+
+	gnu-web-doc-update: check the requirements.
+	* build-aux/gnu-web-doc-update (find_tool): Import from bootstrap.
+	($CVS, $CVSU, $GIT, $RSYNC, $XARGS): New.
+	* build-aux/bootstrap (find_tool): Comment change.
+
+2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: minor simplication.
+	* top/maint.mk (_sc_excl): Use $(or...) instead of $(if...)
+	for default values.
+
+2012-07-15  Akim Demaille  <akim@lrde.epita.fr>
+
+	gitlog-to-changelog: VPATH build issues
+	If builddir is not a subdirectory of srcdir, running git from it will
+	fail.
+	* build-aux/gitlog-to-changelog (--srcdir): New option.
+
+2012-07-15  Bruno Haible  <bruno@clisp.org>
+
+	fpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.
+	* lib/fpending.h: Assume HAVE_DECL___FPENDING is defined.
+	* cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests)
+	Remove exemption for fpending.h.
+	Suggested by Eric Blake.
+
+2012-07-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+	pthread_sigmask: fix bug on FreeBSD 9
+	* lib/pthread_sigmask.c [PTHREAD_SIGMASK_INEFFECTIVE]:
+	Include string.h.
+	(pthread_sigmask) [PTHREAD_SIGMASK_INEFFECTIVE]:
+	When calling pthread_sigmask (1729, NEW, OLD), specify non-null NEW;
+	this avoids a bug on FreeBSD 9, where pthread_sigmask is effective
+	but pthread_sigmask (1729, NULL, NULL) returns zero.
+	See <http://bugs.gnu.org/11884>.
+	Avoid the need to call pthread_sigmask (1729, ...) in most cases,
+	by inspecting whether the main call changed the old mask.
+
+2012-07-15  Reuben Thomas  <rrt@sc3d.org>
+
+	README-release: make it more legible
+	* top/README-release: Improve typography slightly.
+
+2012-07-15  Jim Meyering  <meyering@redhat.com>
+
+	maint: require that each sc_... command start with "@"
+	* Makefile (sc_prohibit_sc_omitted_at): New rule so that
+	"make sc_maint" helps us avoid this nit.
+
+2012-07-15  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: add leading "@" to quiet new "make syntax-check" rule
+	* top/maint.mk (sc_prohibit_defined_have_decl_tests): Add "@".
+
+2012-07-13  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: new syntax check for HAVE_DECL checks
+	* top/maint.mk (sc_prohibit_defined_have_decl_tests): New rule.
+	* cfg.mk
+	(exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
+	Exempt some false positives.
+	Based on a report by Karel Zak.
+
+	argp: make HAVE_DECL usage consistent
+	* lib/argp-parse.c (__argp_parse): Check contents of HAVE_DECL
+	macros, not whether they are defined.
+	* m4/argp.m4 (gl_ARGP): Always define HAVE_DECL_* macros, per
+	convention with other declaration checks.
+	Reported by Karel Zak, with suggestions from Paul Eggert.
+
+	stat-time: relax license to LGPLv2+
+	* modules/stat-time (License): Relax, with consent of all authors.
+
+	strndup: fix m4 usage error
+	* m4/strndup.m4 (gl_FUNC_STRNDUP): HAVE_DECL_STRNDUP is always
+	defined, to either 0 or 1.
+	Reported by Karel Zak.
+
+2012-07-11  Jim Meyering  <meyering@redhat.com>
+
+	maint: enable the sc_avoid_if_before_free syntax-check rule
+	* cfg.mk (local-checks-to-skip): Enable sc_avoid_if_before_free.
+	(if_before_free_offenders_): Define.
+	(if_before_free_basename_re_): Define.
+	Exempt current files with useless if-before-free.
+
+2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+	gettext: do not assume '#define ... defined ...' behavior
+	* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS):
+	Do not use '#define FOO ... defined BAR ...', as the C standard says
+	it's not portable to expect that this works after macro expansion.
+	Problem reported for gzip by Steven M. Schweda in
+	<http://lists.gnu.org/archive/html/bug-gzip/2012-07/msg00000.html>.
+
+2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+	getloadavg: clean out old Emacs and Autoconf cruft
+	See Glenn Morris in <http://bugs.gnu.org/11905>.
+	* lib/getloadavg.c: Include <config.h>, <stdbool.h> always.
+	Include <sys/param.h> if HAVE_SYS_PARAM_H, not if unix or __unix.
+	(LDAV_CVT): Remove no-longer-used LOAD_AVE_CVT hook.
+	* m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Check for <sys/param.h>.
+
+2012-07-10  Akim Demaille  <akim@lrde.epita.fr>
+
+	bootstrap: let warn be like tests/init.sh's warn_
+	Reported by Jim Meyering.
+	* build-aux/bootstrap (warn): Remove, replaced by...
+	(warnf_, warn_): these.
+	Adjust callers.
+	Shorten messages that no longer fit in 80 columns.
+
+2012-07-09  Bruno Haible  <bruno@clisp.org>
+
+	getopt: Simplify after Emacs changed.
+	* m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
+	(gl_GETOPT_IFELSE): Remove macro.
+
+2012-07-09  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: add sc_vulnerable_makefile_CVE-2012-3386
+	* top/maint.mk (sc_vulnerable_makefile_CVE-2012-3386): New rule.
+
+	maint.mk: _sc_search_regexp, sc_vulnerable_makefile_CVE-2009-4029: fix
+	Bugs in both of those conspired to make the
+	sc_vulnerable_makefile_CVE-2009-4029 rule 99% useless.
+	_sc_search_regexp's handling of non-empty $in_files would filter
+	out any offending file names.  sc_vulnerable_makefile_CVE-2009-4029's
+	choice of in_files value meant there would be no match in most
+	projects, due to the presence of two or more Makefile.in files.
+	* top/maint.mk (_sc_search_regexp) [in_vc_files,in_files]: Clarify.
+	Fix a bug in how a non-empty $$in_files was processed:
+	(sc_vulnerable_makefile_CVE-2009-4029): Fix erroneous use of in_files:
+	in spite of the name, it's a regexp, not a list of file names.
+
+2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+	getloadavg, getopt: fix commentary re configure.in
+	Autoconf is deprecating the name 'configure.in', so change it to
+	to the new name 'configure.ac' in a couple of places.
+	* lib/getloadavg.c: configure.in -> configure.ac, in comment.
+	* m4/getopt.m4 (gl_GETOPT_IFELSE, gl_GETOPT_SUBSTITUTE_HEADER)
+	(gl_PREREQ_GETOPT): Remove obsolete commentary re Emacs configure.in.
+	Emacs has renamed it to configure.ac, and it no longer refers
+	to these macros anyway.
+
+	timespec: mark functions with const attributes
+	* lib/timespec.h (timespec_add, timespec_sub, dtotimespec):
+	Mark with _GL_ATTRIBUTE_CONST.
+
+2012-07-07  Ludovic Courtès  <ludo@gnu.org>
+
+	canonicalize[-lgpl]: handle "guessing" values when cross-building
+	* m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
+	(gl_CANONICALIZE_LGPL): Check whether $gl_cv_func_realpath_works
+	matches "*yes" instead of just "yes".  Regression introduced in commit
+	e0bcf6626cde8dad4bfbdc4045c744f0cd8b9e24.
+
+2012-07-07  Ludovic Courtès  <ludo@gnu.org>
+	    Bruno Haible  <bruno@clisp.org>
+
+	canonicalize: make the right guess when cross-compiling to GNU
+	* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Match also "gnu*" to
+	determine whether cross-compiling to glibc systems, so as to
+	include GNU/Hurd.
+
+2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+	timespec-sub: avoid duplicate include
+	* lib/timespec-sub.c: Do not include <config.h> twice.
+	Reported by Juanma Barranquero.
+
+2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
+
+	bootstrap: use a more consistent error reporting scheme
+	* build-aux/bootstrap (warn, die): New.
+	Use them.
+
+2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+	sys_time: allow too-wide tv_sec
+	* m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Allow struct
+	timeval even if tv_sec is wider than time_t.  This allows
+	OpenBSD 5.1 amd64 and fixes an Emacs porting glitch with utimens.c,
+	as without this patch gnulib replaces struct timeval
+	and OpenBSD futimes therefore has a type mismatch.
+	* doc/posix-headers/sys_time.texi: Mention this.
+
+	pthread: check for both pthread_create and pthread_join
+	* m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, but
+	alter the check so that it tests for both pthread_create and
+	pthread_join.  This should be more portable to hosts like OSF/1 5.1.
+	Suggested by Bruno Haible and Richard Yao in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-07/msg00048.html>.
+
+	parse-datetime: doc tuneup
+	* doc/parse-datetime.texi: Index "leap seconds" and fix minor
+	spacing issues.
+
+2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
+
+	do-release-commit-and-tag: fix the previous commit
+	* build-aux/do-release-commit-and-tag: Actually the test was right,
+	but the comment and the error message were misleading.
+	Fix comment, and improve error message.
+	Perform check first, so that NEWS is not modified uselessly.
+
+	do-release-commit-and-tag: fix typo
+	* build-aux/do-release-commit-and-tag: Be sure that NEWS does
+	_not_ start with a stub.
+
+2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+	pthread: check for pthread_create, not pthread_join
+	* m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_create, not
+	pthread_join.  On FreeBSD 9, pthread_create is in libpthread but
+	pthread_join in libc.  I hope this removes the need for all the
+	OSF/1 5.1 pthread_join business.  Reported by Richard Yao in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-07/msg00042.html>.
+
+2012-07-04  Jim Meyering  <meyering@redhat.com>
+
+	parse-datetime: fix failure to diagnose invalid input
+	date -d "$(printf '\xb0')" would print 00:00:00 with today's date
+	rather than diagnosing the invalid input.  Now it reports this:
+	date: invalid date '\260'
+	* lib/parse-datetime.y (to_uchar): Define.
+	(yylex): Don't sign-extend "other" bytes.
+	* m4/parse-datetime.m4: Require AC_C_INLINE for first use of "inline".
+	Thanks to Bruno Haible for the patch to this file.
+	* tests/test-parse-datetime.c (main): Add a test to trigger the bug.
+	Peter Evans reported the bug in GNU date: http://bugs.gnu.org/11843
+
+2012-07-03  Jim Meyering  <meyering@redhat.com>
+
+	bootstrap: do not require now-removed build-aux/missing
+	Now that build-aux/missing is, er, missing, bootstrap would
+	silently fail.
+	* build-aux/bootstrap (gnulib_extra_files): Remove $build_aux/missing
+	from the list, now that (since commit v0.0-7489-gd0f486f) the file is
+	no longer part of gnulib.
+	Diagnose the failure.
+
+2012-07-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+	alloca: add support for HP NonStop TNS/E native
+	* lib/alloca.in.h (alloca): Support the new host.
+	From a suggestion by Joachim Schmitz in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00355.html>.
+
+2012-07-02  Pádraig Brady  <P@draigBrady.com>
+
+	fsusage: remove code not needed on non GNU/Linux systems.
+
+	* lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
+	Don't include headers no longer needed in this case.
+	* lib/fsusage.c [STAT_STATVFS &&
+	! (__linux__ && (__GLIBC__||__UCLIBC__))]: Undefine
+	STAT_STATFS2_FRSIZE to exclude code not used in this case.
+
+2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fsusage: include files needed for glibc 2.6 fallback
+	* lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
+	Include <sys/param.h>, <sys/mount.h>, <sys/vfs.h>
+	as they are needed for the 2.6 < glibc/Linux < 2.6.36 fallback.
+	Problem reported by Ludovic Courtès in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-07/msg00005.html>.
+
+	fsusage: avoid needless check on GNU/Linux
+	* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Omit STAT_STATFS3_OSF1 check
+	on GNU/Linux systems, since it can't possibly work.
+
+2012-07-01  Bruno Haible  <bruno@clisp.org>
+
+	log: Fix an autoconf >= 2.64 warning.
+	* modules/log (configure.ac): Require, not invoke, gl_FUNC_LOG.
+	Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
+
+2012-06-28  Bruno Haible  <bruno@clisp.org>
+
+	log10f: Fix possible configuration problem.
+	* m4/log10f.m4 (gl_FUNC_LOG10F): Augment LIBS by $LOG10F_LIBM, not
+	$LOGF_LIBM.
+	Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
+
+2012-06-28  Bruno Haible  <bruno@clisp.org>
+
+	remove: No longer override on all platforms. Fixes bug from 2010-03-20.
+	* m4/remove.m4 (gl_FUNC_REMOVE): Test gl_cv_func_unlink_honors_slashes,
+	not gl_cv_func_unlink_works.
+	Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
+
+2012-06-27  Eric Blake  <eblake@redhat.com>
+
+	config: drop scripts that automake says are not independent
+	* config/srclist.txt: Drop elisp-comp, missing, and ylwrap.
+	* build-aux/elisp-comp: Delete.
+	* build-aux/missing: Likewise.
+	* build-aux/ylwrap: Likewise.
+	* modules/elisp-comp: Likewise.
+	* MODULES.html.sh: Drop mention of elisp-comp.
+	* NEWS: Mention this.
+
+2012-06-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+	root-uid: new module
+	This is for portability to Tandem's NonStop Kernel.
+	* lib/root-uid.h, modules/root-uid: New files.
+	* lib/euidaccess.c, lib/pt_chown.c, lib/unlinkdir.c:
+	* lib/write-any-file.c, tests/test-sethostname2.c:
+	Include "root-uid.h".
+	* lib/euidaccess.c (euidaccess):
+	* lib/pt_chown.c (main):
+	* lib/unlinkdir.c (cannot_unlink_dir):
+	* lib/write-any-file.c (can_write_any_file):
+	* m4/mknod.m4 (gl_FUNC_MKNOD):
+	* tests/test-sethostname2.c (geteuid, main):
+	Don't assume ROOT_UID == 0.
+	* modules/euidaccess (Depends-on):
+	* modules/pt_chown (Depends-on):
+	* modules/sethostname-tests (Depends-on):
+	* modules/unlinkdir (Depends-on):
+	* modules/write-any-file (Depends-on):
+	Add root-uid.
+
+	regex: use locale-independent comparison for codeset name
+	See Bruno Haible's comment in <http://bugs.gnu.org/10305#120>.
+	* lib/regcomp.c (init_dfa): Use just ASCII case comparison
+	for codeset name.
+	* lib/regex_internal.h: Do not include <strings.h>, since we
+	no longer use strcasecmp.
+	* modules/regex (Depends-on): Remove strcase.
+
+2012-06-23  Bruno Haible  <bruno@clisp.org>
+
+	getopt-posix: No longer guarantee that option processing is resettable.
+	* doc/posix-functions/getopt.texi: Drop description of problem with
+	internal state. Fix info about mingw and msvc9.
+	* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Don't require a resettable
+	option processing by getopt(). Run three test programs instead of one.
+	Simplify cross-compilation guess.
+	* NEWS: Mention the change.
+	Reported by Rich Felker <dalias@aerifal.cx>.
+
+2012-06-26  Bruno Haible  <bruno@clisp.org>
+
+	argp, regex: Ensure strcasecmp gets declared.
+	* lib/argp-help.c: Include <strings.h>.
+	* lib/regex_internal.h: Likewise.
+	Reported and suggested by Joachim Schmitz <jojo@schmitz-digital.de>.
+
+2012-06-24  Bruno Haible  <bruno@clisp.org>
+
+	ptsname_r: Make it consistent with ptsname on AIX.
+	* lib/ptsname_r.c (__ptsname_r): For AIX, use nearly the same
+	implementation as for OSF/1.
+	* tests/test-ptsname_r.c (main) [AIX]: Use the modern way of opening
+	a pty master.
+
+	ptsname_r: Make it consistent with ptsname on OSF/1.
+	* lib/ptsname_r.c (__ptsname_r): Add a different implementation for
+	OSF/1.
+
+2012-06-24  Bruno Haible  <bruno@clisp.org>
+
+	ttyname_r: Fix result on OSF/1, Solaris.
+	* lib/ttyname_r.c (ttyname_r): Produce a NUL-terminated result.
+
+2012-06-24  Bruno Haible  <bruno@clisp.org>
+
+	ptsname_r: Add support for Solaris.
+	* lib/ptsname_r.c (__ptsname_r): Add a different implementation for
+	Solaris.
+
+	ptsname_r: Fix test failure on native Windows.
+	* modules/ptsname_r (Depends-on): Add isatty.
+
+	ptsname_r: Fix test failures on IRIX, Solaris.
+	* m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Test whether isatty sets
+	errno when it fails. Define ISATTY_FAILS_WITHOUT_SETTING_ERRNO
+	accordingly.
+	* lib/ptsname_r.c: Include <fcntl.h>.
+	(__ptsname_r): When isatty returned false, then on IRIX, Solaris
+	set errno if fd is invalid.
+	* tests/test-isatty.c (main): Update comments.
+
+2012-06-24  Bruno Haible  <bruno@clisp.org>
+
+	ptsname test: Extend test.
+	* tests/test-ptsname.c: Include <errno.h>.
+	(main): Test behaviour with invalid file descriptor.
+
+2012-06-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+	time: fix obsolete comment
+	* m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Remove obsolete
+	reference to HAVE_STRUCT_TIMESPEC in comment.
+
+2012-06-23  Bruno Haible  <bruno@clisp.org>
+
+	getopt-gnu: Handle suboptimal getopt_long's abbreviation handling.
+	* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): If getopt_long exists but
+	does not handle abbreviated long options with equivalent
+	disambiguations, set gl_replace_getopt to yes.
+	* doc/posix-functions/getopt.texi: Mention the OpenBSD 5.0 problem.
+
+2012-06-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+	time_r: fix typo that always overrode localtime_r decl
+	* m4/time_r.m4 (gl_TIME_R): Use AC_CHECK_DECLS, not
+	AC_CHECK_DECLS_ONCE, since localtime_r is declared in <time.h>,
+	not in a standard include.
+
+2012-06-22  Bruno Haible  <bruno@clisp.org>
+
+	Write "Mac OS X" instead of "MacOS X".
+	* README: Write "Mac OS X" instead of "MacOS X".
+	* build-aux/bootstrap: Likewise.
+	* build-aux/install-reloc: Likewise.
+	* lib/acl-internal.h: Likewise.
+	* lib/acl_entries.c: Likewise.
+	* lib/argp-ba.c: Likewise.
+	* lib/argp-pv.c: Likewise.
+	* lib/config.charset: Likewise.
+	* lib/copy-acl.c: Likewise.
+	* lib/csharpexec.c: Likewise.
+	* lib/euidaccess.c: Likewise.
+	* lib/fbufmode.c: Likewise.
+	* lib/fflush.c: Likewise.
+	* lib/file-has-acl.c: Likewise.
+	* lib/filemode.h: Likewise.
+	* lib/fpurge.c: Likewise.
+	* lib/freadable.c: Likewise.
+	* lib/freadahead.c: Likewise.
+	* lib/freading.c: Likewise.
+	* lib/freadptr.c: Likewise.
+	* lib/freadseek.c: Likewise.
+	* lib/fseeko.c: Likewise.
+	* lib/fseterr.c: Likewise.
+	* lib/fsusage.c: Likewise.
+	* lib/fwritable.c: Likewise.
+	* lib/fwriting.c: Likewise.
+	* lib/get-rusage-as.c: Likewise.
+	* lib/get-rusage-data.c: Likewise.
+	* lib/getdomainname.c: Likewise.
+	* lib/idpriv-drop.c: Likewise.
+	* lib/idpriv-droptemp.c: Likewise.
+	* lib/localcharset.c: Likewise.
+	* lib/locale.in.h: Likewise.
+	* lib/localename.c: Likewise.
+	* lib/mbsrtowcs-state.c: Likewise.
+	* lib/nproc.c: Likewise.
+	* lib/passfd.c: Likewise.
+	* lib/posix_openpt.c: Likewise.
+	* lib/printf-parse.c: Likewise.
+	* lib/progreloc.c: Likewise.
+	* lib/safe-read.h: Likewise.
+	* lib/safe-write.h: Likewise.
+	* lib/sched.in.h: Likewise.
+	* lib/set-mode-acl.c: Likewise.
+	* lib/signal.in.h: Likewise.
+	* lib/stdint.in.h: Likewise.
+	* lib/stdio-impl.h: Likewise.
+	* lib/stdlib.in.h: Likewise.
+	* lib/strtod.c: Likewise.
+	* lib/sys_select.in.h: Likewise.
+	* lib/tcgetsid.c: Likewise.
+	* lib/unistd.in.h: Likewise.
+	* lib/unlockpt.c: Likewise.
+	* lib/vasnprintf.c: Likewise.
+	* lib/vma-iter.c: Likewise.
+	* lib/wcsrtombs-state.c: Likewise.
+	* m4/acl.m4: Likewise.
+	* m4/acosl.m4: Likewise.
+	* m4/asinl.m4: Likewise.
+	* m4/atanl.m4: Likewise.
+	* m4/c-stack.m4: Likewise.
+	* m4/cosl.m4: Likewise.
+	* m4/expl.m4: Likewise.
+	* m4/extensions.m4: Likewise.
+	* m4/fdatasync.m4: Likewise.
+	* m4/fmal.m4: Likewise.
+	* m4/frexp.m4: Likewise.
+	* m4/frexpf.m4: Likewise.
+	* m4/frexpl.m4: Likewise.
+	* m4/fsusage.m4: Likewise.
+	* m4/getdomainname.m4: Likewise.
+	* m4/getloadavg.m4: Likewise.
+	* m4/getopt.m4: Likewise.
+	* m4/gettext.m4: Likewise.
+	* m4/gnulib-common.m4: Likewise.
+	* m4/intdiv0.m4: Likewise.
+	* m4/intlmacosx.m4: Likewise.
+	* m4/largefile.m4: Likewise.
+	* m4/ldexpl.m4: Likewise.
+	* m4/link-follow.m4: Likewise.
+	* m4/locale-ar.m4: Likewise.
+	* m4/locale-fr.m4: Likewise.
+	* m4/locale-ja.m4: Likewise.
+	* m4/locale-tr.m4: Likewise.
+	* m4/locale-zh.m4: Likewise.
+	* m4/locale_h.m4: Likewise.
+	* m4/lock.m4: Likewise.
+	* m4/logl.m4: Likewise.
+	* m4/mathfunc.m4: Likewise.
+	* m4/minus-zero.m4: Likewise.
+	* m4/mktime.m4: Likewise.
+	* m4/mmap-anon.m4: Likewise.
+	* m4/multiarch.m4: Likewise.
+	* m4/nanosleep.m4: Likewise.
+	* m4/nocrash.m4: Likewise.
+	* m4/poll.m4: Likewise.
+	* m4/printf-frexpl.m4: Likewise.
+	* m4/printf.m4: Likewise.
+	* m4/signbit.m4: Likewise.
+	* m4/sinl.m4: Likewise.
+	* m4/sqrtl.m4: Likewise.
+	* m4/strerror_r.m4: Likewise.
+	* m4/tanl.m4: Likewise.
+	* m4/threadlib.m4: Likewise.
+	* m4/ttyname_r.m4: Likewise.
+	* m4/unlink.m4: Likewise.
+	* m4/visibility.m4: Likewise.
+	* m4/wcwidth.m4: Likewise.
+	* tests/minus-zero.h: Likewise.
+	* tests/test-alloca-opt.c: Likewise.
+	* tests/test-copy-acl.sh: Likewise.
+	* tests/test-copy-file.sh: Likewise.
+	* tests/test-fdatasync.c: Likewise.
+	* tests/test-file-has-acl.sh: Likewise.
+	* tests/test-flock.c: Likewise.
+	* tests/test-fsync.c: Likewise.
+	* tests/test-localename.c: Likewise.
+	* tests/test-malloca.c: Likewise.
+	* tests/test-nonblocking-pipe.h: Likewise.
+	* tests/test-nonblocking-socket.h: Likewise.
+	* tests/test-openpty.c: Likewise.
+	* tests/test-posix_openpt.c: Likewise.
+	* tests/test-ptsname.c: Likewise.
+	* tests/test-ptsname_r.c: Likewise.
+	* tests/test-sameacls.c: Likewise.
+	* tests/test-select.h: Likewise.
+	* tests/test-set-mode-acl.sh: Likewise.
+	* tests/test-snprintf-posix.h: Likewise.
+	* tests/test-sprintf-posix.h: Likewise.
+	* tests/test-strtod.c: Likewise.
+	* tests/test-time.c: Likewise.
+	* tests/test-vasnprintf-posix.c: Likewise.
+	* tests/test-vasprintf-posix.c: Likewise.
+	* doc/acl-resources.txt: Likewise.
+	* doc/**/*.texi: Likewise.
+	Reported by Max Horn <max@quendi.de>.
+
+2012-06-22  Bruno Haible  <bruno@clisp.org>
+
+	grantpt: Relax requirement regarding invalid file descriptors.
+	* lib/grantpt.c: Don't include <fcntl.h>.
+	(grantpt): Don't verify the validity of the file descriptor.
+	* modules/grantpt (Depends-on): Remove fcntl-h.
+	* tests/test-grantpt.c (main): Allow grantpt to succeed for invalid
+	file descriptors.
+	* doc/posix-functions/grantpt.texi: Document more platforms on which
+	grantpt succeeds for invalid file descriptors.
+	Reported by Rich Felker <dalias@aerifal.cx>.
+
+2012-06-22  Bruno Haible  <bruno@clisp.org>
+
+	fbufmode test: Don't test unportable behaviour.
+	* tests/test-fbufmode.c (test_mode): New function, extracted from main.
+	(main): Invoke it three times.
+	Reported by Szabolcs Nagy <nsz@port70.net>
+	and Rich Felker <dalias@aerifal.cx>.
+
+2012-06-21  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Refactor inctests variable.
+	* gnulib-tool: Normalize inctests to 'true' or 'false', not ''.
+	(func_modules_transitive_closure,
+	func_modules_transitive_closure_separately,
+	func_import, func_create_testdir): Update.
+
+	gnulib-tool: --create-[mega]testdir, --[mega]test implies --with-tests.
+	* gnulib-tool: Accept option --without-tests.
+	(func_usage): Document --without-tests option. Rearrange.
+	(inctests): Normalize according to the mode.
+	* NEWS: Mention the change.
+	Suggested by Simon Josefsson.
+
+2012-06-21  Bruce Korb  <bkorb@gnu.org>
+
+	parse-duration test: Avoid spurious output.
+	* tests/test-parse-duration.sh: Reindent with leading tabs.
+
+2012-06-21  Jim Meyering  <meyering@redhat.com>
+
+	maint: disable the strncpy prohibition
+	* cfg.mk: Do not prohibit strncpy here.
+
+2012-06-21  Bruno Haible  <bruno@clisp.org>
+
+	nonblocking: Avoid compilation error on mingw64.
+	* m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MODULE_INDICATOR for scanf,
+	fscanf.
+	* modules/vscanf (configure.ac): Invoke gl_MODULE_INDICATOR.
+	* modules/vfscanf (configure.ac): Likewise.
+	* lib/stdio-read.c (scanf, fscanf, vscanf, vfscanf): Enable function
+	definition only if stdio.h has prepared it.
+	Reported by Daniel P. Berrange <berrange@redhat.com>.
+
+2012-06-20  Bernd Jendrissek  <bernd.jendrissek@gmail.com>  (tiny change)
+
+	gnulib-tool: Use readlink if it is available.
+	* gnulib-tool (func_readlink): Choose function more appropriately.
+
+2012-06-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+	posixtm-tests: port to buggy compiler
+	Problem reported by Simon Josefsson in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00246.html>.
+	* modules/posixtm-tests (Depends-on): Add stdint.
+	* tests/test-posixtm.c (struct posixtm_test.t_expected):
+	Now of type int_least64_t, not int64_t, both because that's
+	what INT64_C returns and because int_least64_t works even
+	on 72-bit hosts.
+	(T): Use INT64_C on constants outside the traditional int range,
+	to work around compiler bug noted by Simon.
+
+	mktime: fix integer overflow in 'configure'-time test
+	* m4/mktime.m4 (gl_FUNC_MKTIME): Do not rely on undefined behavior
+	after integer overflow.  Problem reported by Rich Felker in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00257.html>.
+	Also, don't look for further instances of a bug if we've already
+	found one instance; this helps 'configure' run faster.
+
+2012-06-20  John Darrington  <john@darrington.wattle.id.au>  (tiny change)
+
+	tmpfile, clean-temp: Fix invocation of GetVersionEx.
+	* lib/tmpfile.c (supports_delete_on_close): Initialize parameter for
+	GetVersionEx correctly.
+	* lib/clean-temp.c (supports_delete_on_close): Likewise.
+
+2012-06-20  Bruno Haible  <bruno@clisp.org>
+
+	fdopen: Allow implementations that don't reject invalid fd arguments.
+	* m4/fdopen.m4 (gl_FUNC_FDOPEN): Let the test pass if fdopen(-1,...)
+	succeeds.
+	Reported by Rich Felker <dalias@aerifal.cx>.
+
+2012-06-20  Simon Josefsson  <simon@josefsson.org>
+
+	* modules/parse-duration-tests (test_parse_duration_LDADD): Don't
+	bring in LIBINTL.
+
+2012-06-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	init.sh: do not rely on autoupated PWD
+	This addresses symptoms of the problem reported by Nelson H.F. Beebe in
+	<http://lists.gnu.org/archive/html/bug-gzip/2012-06/msg00008.html>.
+	Although Nelson's bug was not necessarily fixed by this patch,
+	it seems wise to make the change for safety.
+	* tests/init.sh (path_prepend_): Do not rely on PWD updating
+	automagically after 'cd'; this is not reliable on older shells.
+	(setup_): Fail if we cannot cd to temporary directory.
+
+2012-06-19  Bruno Haible  <bruno@clisp.org>
+
+	stat, fstat: Avoid warnings on mingw64.
+	* lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Undefine before
+	redefining.
+	* lib/fstat.c (stat, fstat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Likewise.
+	Reported by Daniel P. Berrange <berrange@redhat.com>.
+
+2012-06-19  Bruno Haible  <bruno@clisp.org>
+
+	stdioext: Add support for musl libc.
+
+	* m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists.
+	* lib/fbufmode.c (fbufmode): Add conditional code for musl.
+
+	* m4/fseterr.m4: New file.
+	* lib/fseterr.h (fseterr): Define as an alias of __fseterr if that
+	function exists.
+	* modules/fseterr (Files): Add m4/fseterr.m4.
+	(configure.ac): Invoke gl_FUNC_FSETERR. Compile fseterr.c if
+	__fseterr does not exist.
+	(Makefile.am): Remove fseterr.c from lib_SOURCES.
+
+	* lib/freadable.h: Update comment.
+
+	* lib/fwritable.h: Update comment.
+
+	* lib/freading.h: Update comment.
+
+	* lib/fwriting.h: Update comment.
+
+	* m4/freadahead.m4: New file.
+	* lib/freadahead.h (freadahead): Define as an alias of __freadahead if
+	that function exists.
+	* modules/freadahead (Files): Add m4/freadahead.m4.
+	(configure.ac): Invoke gl_FUNC_FREADAHEAD. Compile freadahead.c if
+	__freadahead does not exist.
+	(Makefile.am): Remove freadahead.c from lib_SOURCES.
+
+	* m4/freadptr.m4: New file.
+	* lib/freadptr.h (freadptr): Define as an alias of __freadptr if that
+	function exists.
+	* modules/freadptr (Files): Add m4/freadptr.m4.
+	(configure.ac): Invoke gl_FUNC_FREADPTR. Compile freadptr.c if
+	__freadptr does not exist.
+	(Makefile.am): Remove freadptr.c from lib_SOURCES.
+
+	* m4/freadseek.m4: New file.
+	* lib/freadseek.c (freadptrinc): Use __freadptrinc if that function
+	exists.
+	* modules/freadseek (Files): Add m4/freadseek.m4.
+	(configure.ac): Invoke gl_FUNC_FREADSEEK.
+
+	* lib/fpurge.c (fpurge): Update comment.
+
+	Reported by and with help from Rich Felker <dalias@aerifal.cx>.
+
+2012-06-19  Bruno Haible  <bruno@clisp.org>
+
+	*printf-posix: Put more info into config.log.
+	* m4/printf.m4 (gl_PRINTF_ENOMEM): Emit conftest's error output and
+	exit code into config.log.
+
+2012-06-19  Bruno Haible  <bruno@clisp.org>
+
+	getopt-gnu: Fix exit code overflow in autoconf test.
+	* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Squash exit code values,
+	to keep them below < 128.
+
+2012-06-17  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: fix typo in code to derive GPG key at release time
+	* top/maint.mk (gpg_key_ID): Fix typo: $3 -> $$3
+
+2012-06-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: avoid warning when pointers are not long
+	* lib/regcomp.c (parse_dup_op, mark_opt_subexp): Cast between void *
+	and uintptr_t, not long, for portability to hosts where pointers and
+	long have different sizes.  Issue noted by Daniel P. Berrange in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00122.html>
+	and fix suggested by Bruno Haible in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00128.html>.
+
+2012-06-17  Bruno Haible  <bruno@clisp.org>
+
+	dummy: Relicense into the public domain.
+	* modules/dummy (License): Set to "public domain".
+	Suggested by Reuben Thomas.
+
+2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
+
+	announce-gen: VPATH issues
+	* build-aux/announce-gen (--srcdir): New option, used to trim the
+	$srcdir part of the path from $builddir to NEWS.
+	* top/maint.mk (announcement): Adjust.
+
+2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
+
+	gnu-web-doc-update: VPATH builds
+	* build-aux/gnu-web-doc-update (--builddir): New option.
+	Revamp the handling of options.
+	Prefer $(...) to `...`.
+	Don't pass --tmpdir=. to mktemp, it is useless given that we specify
+	the template, and it is GNU mktemp specific.
+	Prefer set -e to long series of &&.
+	Restore the initial git branch, not "master".
+	Properly initialize submodules (don't rely only on bootstrap).
+	Do not reconfigure blindly, use config.status.
+	* top/README-release: Update instructions for gnu-web-doc-update.
+
+2012-06-11  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: revert most of the previous change re "all these"
+	* top/maint.mk (prohibit_undesirable_word_seq_RE_): Remove that pair.
+	For rationale, see the discussion at
+	http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30912
+
+2012-06-10  Karl Berry  <karl@gnu.org>
+
+	* build-aux/gnupload: with --dry-run, do not ask for gpg pw.
+
+	* build-aux/gnupload: implement --replace, ftp-upload protocol v1.2.
+
+2012-06-10  Bruce Korb  <bkorb@gnu.org>
+
+	parse-duration: Relicense under LGPLv2+.
+	* modules/parse-duration (License): Change to LGPLv2+.
+
+2012-06-10  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: prohibit common grammar error: "all these"
+	* top/maint.mk (prohibit_undesirable_word_seq_RE_): Add "all these" to
+	the list of prohibited word sequences.  It should be "all of these".
+	* lib/tempname.c (__gen_tempname): Fix one of them.
+
+2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
+
+	do-release-commit-and-tag: support VPATH builds
+	* build-aux/do-release-commit-and-tag: Prefer $(...) to `...`.
+	(noteworthy): Defined earlier to factor its value.
+	(noteworthy_stub): New.
+	Use it to factor.
+	(help_version): Split into...
+	(help, version): these.
+	Adjust the option processing part.
+	Support "--option=value" in addition to "--option value".
+	(builddir): New.
+	(--builddir): New option.
+	* top/README-release: Document this.
+	Reword slightly so that the reader cannot understand that he
+	has to do these steps before calling do-release-commit-and-tag.
+
+2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
+
+	readme-release: also require announce-gen and maintainer-makefile
+	* modules/readme-release (Depends-on): here.
+	* modules/announce-gen, modules/do-release-commit-and-tag,
+	modules/gnu-web-doc-update, modules/maintainer-makefile
+	(Description): Point to readme-release.
+
+2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: fix VPATH issues.
+	* top/maint.mk (news-check): GNU Make understand $< very well.
+	(release-prep): NEWS is in $(srcdir).
+
+2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
+
+	readme-release: require the promoted modules.
+	* modules/readme-release (Depends-on): Add
+	do-release-commit-and-tag, gnupload, and gnu-web-doc-update, used
+	in this text.
+
+2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
+	    Bruno Haible  <bruno@clisp.org>
+
+	error, strerror-override: Support mingw64 from Fedora 17.
+	* lib/errno.in.h (GNULIB_defined_ESTREAMS): Use a different indicator
+	for ETXTBSY, ENODATA, ENOSR, ENOSTR, ETIME, EOTHER, compared to
+	EINPROGRESS.
+	* lib/strerror-override.h (strerror_override): Test it.
+	* lib/strerror-override.c (strerror_override): Likewise.
+	* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also ETXTBSY.
+
+2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
+	    Bruno Haible  <bruno@clisp.org>
+
+	error, strerror-override: Support mingw64 from Fedora 17.
+	* lib/errno.in.h (GNULIB_defined_ENOTRECOVERABLE): Use a different
+	indicator for ENOTRECOVERABLE, compared to EOWNERDEAD.
+	* lib/strerror-override.h (strerror_override): Test it.
+	* lib/strerror-override.c (strerror_override): Likewise.
+
+2012-06-03  Bruno Haible  <bruno@clisp.org>
+
+	error, strerror-override: Support new errno values from POSIX:2008.
+	* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also EOWNERDEAD and
+	ENOTRECOVERABLE.
+	* lib/errno.in.h (EOWNERDEAD, ENOTRECOVERABLE): Define on all
+	platforms.
+	* lib/strerror-override.c (strerror_override): Conditionalize the
+	EOWNERDEAD, ENOTRECOVERABLE handling on GNULIB_defined_EOWNERDEAD.
+	* lib/strerror-override.h (strerror_override): Declare also if
+	GNULIB_defined_EOWNERDEAD is defined.
+	* tests/test-errno.c (e130, e131): New variables.
+	* doc/posix-headers/errno.texi: Mention the status for EOWNERDEAD,
+	ENOTRECOVERABLE.
+	Reported by Paolo Bonzini.
+
+2012-05-31  Jim Meyering  <meyering@redhat.com>
+
+	savewd: add missing dependency on sys_wait module
+	* modules/savewd (Depends-on): Add sys_wait, needed at least
+	for MSVC.  Report and suggested change by Michael Goffioul.
+
+2012-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	system-quote-tests: port to CentOS 5
+	Problem reported by Tom G. Christensen in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00255.html>.
+	* tests/test-system-quote-child.c (fclose, fprintf): Undef.
+
+2012-05-29  Jim Meyering  <meyering@redhat.com>
+
+	maint: fix typos in comments and ChangeLog
+	Culprits identified and fixed mostly automatically using these commands:
+	git ls-files | misspellings -f - |grep -v '^ERROR:' |perl -pe \
+	's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'
+	using http://github.com/lyda/misspell-check
+	* ChangeLog: Fix typos.
+	* doc/solaris-versions: Likewise.
+	* lib/regexec.c (re_search_stub): Likewise.
+	* m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
+
+2012-05-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+	manywarnings: remove duplicate -Wmultichar entry
+	* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove duplicate
+	entry for -Wmultichar.  -Wno-multichar is in the GCC 4.7.0 manual,
+	so keep the entry marked as documented.
+
+2012-05-27  Karl Berry  <karl@gnu.org>
+
+	* config/srclist.txt (mktime.c): remove last libc sync,
+	perhaps just temporarily.
+
+2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: don't assume uint64_t or uint32_t
+	* lib/regcomp.c (init_word_char): Don't assume that the types
+	uint64_t and uint32_t exist.  The C standard doesn't guarantee
+	them, and on some 32-bit compilers there is no uint64_t.
+	Problem reported by Gianluigi Tiesi in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00154.html>.
+
+2012-05-25  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: add strncpy-prohibiting syntax-check rule
+	* top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils.
+
+2012-05-24  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: compute $(gpg_key_ID) more portably
+	* top/maint.mk (gpg_key_ID): Use awk in place of sed '{...;...;}'.
+	That use of sed is not portable to some fringe systems.
+	Reported by Paul Eggert in
+	http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30793/focus=30802
+
+2012-05-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+	mktime: sync from glibc
+	* config/srclist.txt: Uncomment mktime.c.
+	* lib/mktime.c: Sync from glibc master.  This incorporates 3 changes.
+	First, indent with tabs, since glibc uses tabs and doesn't want to
+	change and we'd rather be identical to glibc.  Also, two small
+	coding changes:
+	(isdst_differ): Use &&, not &, as && is the usual style.
+	(__mktime_internal): Rename local var from abs_diff to approx_abs_diff
+	for clarity.
+
+2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
+
+	announce-gen: du -h is more portable than du --human
+	* build-aux/announce-gen (sizes): Invoke du with -h instead
+	of --human.  Accept leading white space in its output.
+
+2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
+
+	announce-gen: Improve diagnostics.
+	* build-aux/announce-gen: When parsing command line options,
+	prefer "announce-gen: option --release-type requires an argument"
+	to "Option release-type requires an argument".
+
+2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
+
+	maint.mk: gpg_key_ID: use sed more portably
+	* top/maint.mk (gpg_key_ID): End sed block with a semicolon before
+	the closing brace.
+	(refresh-po): Fuse two sed invocations into one.
+
+2012-05-15  Akim Demaille  <akim@lrde.epita.fr>
+
+	gitlog-to-changelog: support the log message format used in Bison.
+	* build-aux/gitlog-to-changelog: Support --strip-tab and
+	--strip-cherry-picked.
+
+2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
+
+	poll/select: prevent busy-waiting.  SwitchToThread() only gives away
+	the rest of the current time slice to another thread in the current
+	process. So if the thread that feeds the file decscriptor we're
+	polling is not in the current process, we get busy-waiting.
+	* lib/poll.c: Use SleepEx(1, TRUE) instead of SwitchToThread().
+	Patch from Theodore Leblond.
+	* lib/select.c: Split polling out of the loop that sets the output
+	fd_sets.  Check for zero result and loop if the wait timeout is
+	infinite.
+
+2012-05-21  Simon Josefsson  <simon@josefsson.org>
+
+	select: Fix build error on IRIX 6.5.
+	* lib/select.c: Include stddef.h for NULL.
+
+2012-05-21  Simon Josefsson  <simon@josefsson.org>
+
+	gc: fix libgcrypt detection on older machines.
+	* m4/gc.m4: Reject libgcrypt earlier than 1.4.4.  Collapse
+	copyright years because the file has been distributed every year
+	since it was created.
+
+2012-05-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+	crypto: fix bug in large buffer handling
+	Problem reported by Serge Belyshev for glibc in
+	<http://sourceware.org/bugzilla/show_bug.cgi?id=14090> and for gnulib in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00226.html>.
+	* lib/md4.c (md4_process_block):
+	* lib/md5.c (md5_process_block):
+	* lib/sha1.c (sha1_process_block):
+	* lib/sha256.c (sha256_process_block):
+	Don't assume the buffer length is less than 2**32.
+	* lib/sha512.c (sha512_process_block): Likewise.
+	Here, the bug is present only in the rare case where the host does
+	not support uint64_t or where size_t is wider than 64 bits.
+	Use u64size to work around the problems.
+	* lib/u64.h (u64size): New macro.
+
+2012-05-15  Pádraig Brady  <P@draigBrady.com>
+
+	fsusage: fix block size returned on older Linux 2.6
+
+	* lib/fsusage.c: Fall back to (struct statfs).f_frsize
+	which is available since Linux 2.6.
+	* m4/fsusage.m4 (STAT_STATFS2_FRSIZE): Always define
+	when the member is available so it can be used as a fallback.
+	* doc/posix-functions/statvfs.texi: Mention the hang issue
+	on Linux < 2.6.36.
+
+2012-05-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+	bootstrap: suppress stderr chatter
+	* build-aux/bootstrap (insert_sorted_if_absent, main program):
+	Omit unnecessary chatter to stderr.  The main program chatter
+	was there only inadvertantly.
+
+	bootstrap: .gitignore files created by autopoint, libtool
+	I ran into this problem when bootstrapping the latest diffutils.
+	After './bootstrap', 'git status' reported lots of untracked files
+	m4/codeset.m4, m4/gettext.m4, etc.  These files were created by
+	autopoint and do not need to be version-controlled.
+	* build-aux/bootstrap: Put into .gitignore the files that
+	autopoint and libtool create, by keeping track of files that exist
+	after but not before these programs are run.
+	(version_controlled_file): Move up.  2nd arg is now full file
+	name, not base name; this is more convenient.  Put CVS at the end,
+	as it's now somewhat deprecated.
+
+2012-05-14  Jim Meyering  <meyering@redhat.com>
+
+	ignore-value.h: remove unused _GL_ATTRIBUTE_DEPRECATED definition
+	* lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Remove now-unused
+	definition.  Reported by Bruno Haible.
+
+2012-05-13  Bruno Haible  <bruno@clisp.org>
+	    Paul Eggert  <eggert@cs.ucla.edu>
+
+	binary-io: Define set_binary_mode function.
+	* lib/binary-io.h (set_binary_mode): New function.
+	(SET_BINARY): Define in terms of set_binary_mode.
+	* modules/binary-io (configure.ac): Require AC_C_INLINE.
+	* tests/test-binary-io.c (main): Accept an argument, and test either
+	set_binary_mode or SET_BINARY depending on the argument.
+	* tests/test-binary-io.sh: Invoke test-binary-io twice, with an
+	argument. Clean up also t-bin-out0.tmp.
+
+2012-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	bootstrap: take advantage of POSIX shell features
+
+	The 'bootstrap' script offered by Gnulib script already uses POSIX
+	shell features (like $((...)) arithmetic expansions) that are not
+	supported by legacy Bourne shells like Solaris 10 /bin/sh.  This
+	means that bootstrap must already be run using a proper POSIX shell,
+	which will thus provide more features, like ${var#pattern} parameter
+	expansion or inversion of a command exit status with '!'.  We can
+	thus use these features to improve the clarity and the performances
+	of the bootstrap script.
+
+	Suggested by Eric Blake.
+
+	* build-aux/bootstrap: Prefer xpg4 parameter expansions over use
+	of sed/expr plus command substitutions, to save some forks.  While
+	we are at it, prefer the POSIX $(...) form of command substitution,
+	rather than the legacy form `...` (since the former is visually
+	clearer and interacts better with quoting), and prefer the idiom:
+	  "if ! CMD; then ACTION ..."
+	over the idiom:
+	  "if CMD; then :; else ACTION ..."
+	which was required by legacy Bourne shells not supporting '!'.
+
+2012-05-12  Bruno Haible  <bruno@clisp.org>
+
+	system-quote: Add more comments.
+	* lib/system-quote.h: Add more comments about wilcards and limitations.
+	Suggested by Eli Zaretskii <eliz@gnu.org>.
+
+	sh-quote, system-quote: Add comments about wildcards.
+	* lib/sh-quote.h: Clarify what happens with wildcard characters.
+	* lib/system-quote.h: Likewise.
+	Reported by Eli Zaretskii <eliz@gnu.org>.
+
+2012-05-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+	fsusage: check for GNU/Linux statvfs problem dynamically
+	* lib/fsusage.c [STAT_STATVFS && __linux__ && (__GLIBC__||__UCLIBC__)]:
+	Define STAT_STATFS2_BSIZE too, since in this case the code now
+	checks dynamically whether statvfs is reliable, falling back on
+	Linux-style statfs otherwise.
+	(statvfs_works): New function, for dynamically testing statvfs.
+	(get_fs_usage) [STAT_STATVFS]: Use it.
+	* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove static check for
+	statvfs on GNU/Linux hosts, since it's now done dynamically.
+
+2012-05-10  Bruno Haible  <bruno@clisp.org>
+
+	system-quote, execute, spawn-pipe: Escape '?' on Windows.
+	* lib/system-quote.c (SHELL_SPECIAL_CHARS, CMD_SPECIAL_CHARS): Add the
+	'?' character.
+	* lib/w32spawn.h (SHELL_SPECIAL_CHARS): Likewise.
+	* tests/test-system-quote-main.c (check_all): Check also strings like
+	"??????????".
+	Reported by Eli Zaretskii <eliz@gnu.org>.
+
+2012-05-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+	_Noreturn: port config.h to gcc -Wundef
+	* m4/gnulib-common.m4 (gl_COMMON_BODY): Check that __STDC_VERSION__ is
+	defined before using it, for gcc -Wundef.  Reported by Akim Demaille in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00147.html>.
+
+2012-05-10  Bruno Haible  <bruno@clisp.org>
+
+	system-quote: Refactor.
+	* lib/system-quote.h (system_quote_copy): Fix comment.
+	* lib/system-quote.c (windows_createprocess_quote, windows_cmd_quote):
+	New functions, extracted from system_quote_copy.
+	(system_quote_length, system_quote_copy): Use these functions.
+	Reported by Paul Eggert.
+
+2012-05-08  Bruno Haible  <bruno@clisp.org>
+
+	execute, spawn-pipe: Escape '*' characters in arguments on Windows.
+	* lib/w32spawn.h (SHELL_SPECIAL_CHARS): Add the '*' character.
+
+2012-05-08  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'system-quote'.
+	* modules/system-quote-tests: New file.
+	* tests/test-system-quote.sh: New file.
+	* tests/test-system-quote-main.c: New file.
+	* tests/test-system-quote-child.c: New file.
+
+	New module 'system-quote'.
+	* lib/system-quote.h: New file.
+	* lib/system-quote.c: New file.
+	* modules/system-quote: New file.
+
+2012-05-08  Bruno Haible  <bruno@clisp.org>
+
+	sh-quote: Make C++ safe and allow multiple inclusion.
+	* lib/sh-quote.h: Add double-inclusion guard. For C++, wrap function
+	declarations in extern "C".
+
+2012-05-08  Bruno Haible  <bruno@clisp.org>
+
+	sh-quote tests: Make tests stricter.
+	* tests/test-sh-quote.c (check_one): Check the return value of
+	shell_quote_copy.
+	(main): Check a string with a CR character. Check a string that
+	contains UCHAR_MAX.
+
+2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
+
+	warnings.m4: provide a means to specify the program to compile.
+	* m4/warnings.m4 (gl_COMPILER_OPTION_IF): New, extracted from...
+	(gl_WARN_ADD): here.
+	Use gl_AS_VAR_APPEND.
+	Support an argument to specify the program to compile.
+	(gl_WARN_ADD): Accept an argument to specify the program to compile.
+	AC_SUBST the WARN_CFLAGS when they are used.
+	* modules/warnings (configure.ac): Don't AC_SUBST WARN_CFLAGS,
+	leave this to gl_WARN_ADD.
+
+2012-05-08  Eric Blake  <eblake@redhat.com>
+
+	doc: recommendations on gettext version
+	* doc/gnulib-tool.texi (gettextize and autopoint): Document the
+	choice between versions.
+	* DEPENDENCIES (gettext): Cover both approaches.
+
+2012-05-08  Jim Meyering  <meyering@redhat.com>
+
+	init.sh: explain why EXEEXT support uses aliases rather than functions
+	* tests/init.sh: Add a comment.
+
+	init.sh: don't let bash aliases interfere with tests
+	* tests/init.sh: Undefine any pre-defined aliases if the selected shell
+	is bash.  This avoids problems for those who alias standard commands to
+	non-conforming uses, like those reported in http://bugs.gnu.org/11256.
+	Suggested by Tim Mooney <Tim.Mooney@ndsu.edu>.
+
+2012-05-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdint: be more consistent with glibc, SunOS libc
+	* lib/stdint.in.h (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_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX)
+	(INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX)
+	(INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
+	Be consistent with glibc by default, and with SunOS 5.10 and later
+	if __sun is defined.  This lessens the likelihood of clashes if
+	code compiled for older hosts is combined with code compiled for
+	newer ones.  Problem reported by Niels Möller in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00074.html>.
+
+2012-05-07  Eric Blake  <eblake@redhat.com>
+
+	isatty: relax license to LGPLv2+
+	* modules/isatty (License): Relax license.
+
+2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stat-size: comment fix
+	* lib/stat-size.h: Remove obsolete comment about indenting.
+
+2012-05-06  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'sh-quote'.
+	* modules/sh-quote-tests: New file.
+	* tests/test-sh-quote.c: New file.
+
+2012-05-06  Bruno Haible  <bruno@clisp.org>
+
+	sh-quote: Improve shell_quote_argv's signature.
+	* lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'.
+	* lib/sh-quote.c (shell_quote_argv): Likewise.
+
+2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdint: document issues with int_fast8_t etc.
+	* doc/posix-headers/stdint.texi (stdint.h): Say that other
+	stdint.h substitutes may define these types differently.  See
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00071.html>.
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	nanosleep: Avoid guessing wrong when cross-compiling to Linux.
+	* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require AC_CANONICAL_HOST. When
+	cross-compiling, set gl_cv_func_nanosleep to either 'guessing no'
+	or 'guessing no (mishandles large arguments)'.
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	link-follow: Avoid guessing wrong when cross-compiling to glibc/Linux.
+	* m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Require
+	AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
+	set gl_cv_func_link_follows_symlink to "guessing no".
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	tzset: Avoid guessing wrong when cross-compiling to glibc systems.
+	* m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require AC_CANONICAL_HOST. When
+	cross-compiling to a glibc platform, set gl_cv_func_tzset_clobber to
+	"guessing no".
+	* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Update.
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	d-ino: Avoid guessing "no" when cross-compiling to glibc/Linux systems.
+	* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Require
+	AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
+	set gl_cv_struct_dirent_d_ino to "guessing yes".
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	fseeko-tests, ftello-tests: Avoid "guessing no" when cross-compiling.
+	* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Require AC_CANONICAL_HOST. When
+	cross-compiling to a glibc platform, set gl_cv_func_ungetc_works to
+	"guessing yes".
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	signbit: Avoid "guessing no" when cross-compiling to glibc systems.
+	* m4/signbit.m4 (gl_SIGNBIT): Require AC_CANONICAL_HOST. When cross-
+	compiling to a glibc system, set gl_cv_func_signbit and
+	gl_cv_func_signbit_gcc to "guessing yes".
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	strerror: Avoid "guessing no" when cross-compiling to glibc systems.
+	* m4/strerror.m4 (gl_FUNC_STRERROR): Require AC_CANONICAL_HOST. When
+	cross-compiling to a glibc platform, set gl_cv_func_working_strerror
+	to "guessing yes".
+	(gl_FUNC_STRERROR_0): Require AC_CANONICAL_HOST. When cross-compiling
+	to a glibc platform, set gl_cv_func_strerror_0_works to "guessing yes".
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	canonicalize[-lgpl]: Avoid "guessing no" when cross-compiling to glibc.
+	* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Require
+	AC_CANONICAL_HOST. When cross-compiling to a glibc system, set
+	gl_cv_func_realpath_works to "guessing yes".
+
+2012-05-05  Bruno Haible  <bruno@clisp.org>
+
+	gettimeofday: Avoid bad guess when cross-compiling to glibc systems.
+	* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require
+	AC_CANONICAL_HOST. When cross-compiling, guess no on glibc platforms.
+
+2012-05-04  Bruno Haible  <bruno@clisp.org>
+
+	Tweak last commit.
+	* m4/off_t.m4 (gl_TYPE_OFF_T): Tweak comments.
+	* m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
+
+2012-05-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+	unistd_h: make it easier to avoid sys_types_h
+	This is useful for Emacs, which has its own method of porting to
+	Windows, and which therefore does not need the sys_types_h module.
+	* m4/off_t.m4: New file, defining gl_TYPE_OFF_T, which contains
+	code moved here from gl_SYS_TYPES_H.
+	* m4/sys_types_h.m4 (gl_SYS_TYPES_H): Require it instead of
+	using the code directly.
+	* m4/unistd_h.m4 (gl_UNISTD_H): Require gl_TYPE_OFF_T, not
+	gl_SYS_TYPES_H.
+	* modules/sys_types (Files):
+	* modules/unistd (Files): Add m4/off_t.m4.
+
+2012-05-03  Bruno Haible  <bruno@clisp.org>
+
+	lstat: Avoid "guessing no" when cross-compiling to glibc systems.
+	* m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): When cross-
+	compiling, set gl_cv_func_lstat_dereferences_slashed_symlink to
+	"guessing yes" or "guessing no".
+	(gl_FUNC_LSTAT): Update.
+	* m4/fstatat.m4 (gl_FUNC_FSTATAT): Update.
+	* m4/openat.m4 (gl_FUNC_OPENAT): Update.
+	* m4/unlinkat.m4 (gl_FUNC_UNLINKAT): Update.
+
+2012-05-03  Bruno Haible  <bruno@clisp.org>
+
+	*alloc-gnu, eealloc: Avoid "guessing no" when cross-compiling to glibc.
+	* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Override in autoconf < 2.70.
+	* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Override in autoconf < 2.70.
+	* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Require AC_CANONICAL_HOST. When
+	cross-compiling, choose the first alternative on glibc systems.
+	* modules/eealloc (Files): Add m4/malloc.m4, m4/realloc.m4.
+
+2012-05-03  Bruno Haible  <bruno@clisp.org>
+
+	getgroups: Avoid "guessing no" when cross-compiling to glibc systems.
+	* m4/getgroups.m4 (AC_FUNC_GETGROUPS): Override in autoconf < 2.70.
+	(gl_FUNC_GETGROUPS): Adapt to change of ac_cv_func_getgroups_works.
+
+2012-05-03  Bruno Haible  <bruno@clisp.org>
+
+	chown: Avoid "guessing no" when cross-compiling to glibc systems.
+	* m4/chown.m4 (AC_FUNC_CHOWN): Override in autoconf < 2.70.
+
+2012-05-03  Bruno Haible  <bruno@clisp.org>
+
+	Avoid "guessing no" guesses when cross-compiling to glibc systems.
+	* m4/cbrtl.m4 (gl_FUNC_CBRTL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_cbrtl_ieee to "guessing yes".
+	* m4/ceil.m4 (gl_FUNC_CEIL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_ceil_ieee to "guessing yes".
+	* m4/ceilf.m4 (gl_FUNC_CEILF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_ceilf_ieee to "guessing yes".
+	* m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_ceill_ieee to "guessing yes".
+	* m4/chown.m4 (gl_FUNC_CHOWN): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_chown_slash_works,
+	gl_cv_func_chown_ctime_works to "guessing yes".
+	* m4/lchown.m4 (gl_FUNC_LCHOWN): Update.
+	* m4/exp2l.m4 (gl_FUNC_EXP2L): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_exp2l_ieee to "guessing yes".
+	* m4/expm1.m4 (gl_FUNC_EXPM1): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_expm1_ieee to "guessing yes".
+	* m4/fchdir.m4 (gl_FUNC_FCHDIR): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_open_directory_works to
+	"guessing yes".
+	* m4/fstat.m4 (gl_FUNC_FSTAT): Update.
+	* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require AC_CANONICAL_HOST. When
+	cross-compiling to glibc systems, set gl_cv_func_fdopendir_works to
+	"guessing yes".
+	* m4/floor.m4 (gl_FUNC_FLOOR): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_floor_ieee to "guessing yes".
+	* m4/floorf.m4 (gl_FUNC_FLOORF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_floorf_ieee to
+	"guessing yes".
+	* m4/fmod.m4 (gl_FUNC_FMOD): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_fmod_ieee to "guessing yes".
+	* m4/fmodf.m4 (gl_FUNC_FMODF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_fmodf_ieee to "guessing yes".
+	* m4/fmodl.m4 (gl_FUNC_FMODL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_fmodl_ieee to "guessing yes".
+	* m4/getgroups.m4 (gl_FUNC_GETGROUPS): Require AC_CANONICAL_HOST. When
+	cross-compiling to glibc systems, set gl_cv_func_getgroups_works to
+	"guessing yes".
+	* m4/hypot.m4 (gl_FUNC_HYPOT): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_hypot_ieee to "guessing yes".
+	* m4/hypotf.m4 (gl_FUNC_HYPOTF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_hypotf_ieee to
+	"guessing yes".
+	* m4/hypotl.m4 (gl_FUNC_HYPOTL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_hypotl_ieee to
+	"guessing yes".
+	* m4/link.m4 (gl_FUNC_LINK): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_link_works to "guessing yes".
+	* m4/log.m4 (gl_FUNC_LOG): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log_ieee to "guessing yes".
+	* m4/logf.m4 (gl_FUNC_LOGF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_logf_ieee to "guessing yes".
+	* m4/log10.m4 (gl_FUNC_LOG10): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log10_ieee to "guessing yes".
+	* m4/log10f.m4 (gl_FUNC_LOG10F): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log10f_ieee to
+	"guessing yes".
+	* m4/log1p.m4 (gl_FUNC_LOG1P): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log1p_ieee to "guessing yes".
+	* m4/log1pf.m4 (gl_FUNC_LOG1PF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log1pf_ieee to
+	"guessing yes".
+	* m4/log1pl.m4 (gl_FUNC_LOG1PL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log1pl_ieee to
+	"guessing yes".
+	* m4/log2.m4 (gl_FUNC_LOG2): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log2_ieee to "guessing yes".
+	* m4/log2f.m4 (gl_FUNC_LOG2F): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_log2f_ieee to "guessing yes".
+	* m4/mkdir.m4 (gl_FUNC_MKDIR): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_mkdir_trailing_slash_works,
+	gl_cv_func_mkdir_trailing_dot_works to "guessing yes".
+	* m4/mkfifo.m4 (gl_FUNC_MKFIFO): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_mkfifo_works to
+	"guessing yes".
+	* m4/mknod.m4 (gl_FUNC_MKNOD): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_mknod_works to
+	"guessing yes".
+	* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_CANONICAL_HOST. When
+	cross-compiling to glibc systems, set gl_cv_func_working_mkstemp to
+	"guessing yes".
+	* m4/modf.m4 (gl_FUNC_MODF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_modf_ieee to "guessing yes".
+	* m4/modff.m4 (gl_FUNC_MODFF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_modff_ieee to "guessing yes".
+	* m4/modfl.m4 (gl_FUNC_MODFL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_modfl_ieee to "guessing yes".
+	* m4/putenv.m4 (gl_FUNC_PUTENV): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_svid_putenv to
+	"guessing yes".
+	* m4/readlink.m4 (gl_FUNC_READLINK): Require AC_CANONICAL_HOST. When
+	cross-compiling to glibc systems, set gl_cv_func_readlink_works to
+	"guessing yes".
+	* m4/remainder.m4 (gl_FUNC_REMAINDER): Require AC_CANONICAL_HOST. When
+	cross-compiling to glibc systems, set gl_cv_func_remainder_ieee to
+	"guessing yes".
+	* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Require AC_CANONICAL_HOST.
+	When cross-compiling to glibc systems, set gl_cv_func_remainderf_ieee
+	to "guessing yes".
+	* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Require AC_CANONICAL_HOST.
+	When cross-compiling to glibc systems, set gl_cv_func_remainderl_ieee
+	to "guessing yes".
+	* m4/rmdir.m4 (gl_FUNC_RMDIR): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_rmdir_works to
+	"guessing yes".
+	* m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_unlink_honors_slashes,
+	gl_cv_func_unlink_parent_fails to "guessing yes".
+	* m4/remove.m4 (gl_FUNC_REMOVE): Update.
+	* m4/rename.m4 (gl_FUNC_RENAME): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_rename_slash_dst_works,
+	gl_cv_func_rename_slash_src_works, gl_cv_func_rename_link_works,
+	gl_cv_func_rename_dest_works to "guessing yes".
+	* m4/round.m4 (gl_FUNC_ROUND): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_round_ieee to "guessing yes".
+	* m4/roundf.m4 (gl_FUNC_ROUNDF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_roundf_ieee to
+	"guessing yes".
+	* m4/roundl.m4 (gl_FUNC_ROUNDL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_roundl_ieee to
+	"guessing yes".
+	* m4/setenv.m4 (gl_FUNC_SETENV): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_setenv_works to
+	"guessing yes".
+	(gl_FUNC_UNSETENV): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_unsetenv_works to
+	"guessing yes".
+	* m4/sleep.m4 (gl_FUNC_SLEEP): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_sleep_works to
+	"guessing yes".
+	* m4/stat.m4 (gl_FUNC_STAT): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_stat_file_slash to
+	"guessing yes".
+	* m4/symlink.m4 (gl_FUNC_SYMLINK): Require AC_CANONICAL_HOST. When
+	cross-compiling to glibc systems, set gl_cv_func_symlink_works to
+	"guessing yes".
+	* m4/trunc.m4 (gl_FUNC_TRUNC): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_trunc_ieee to "guessing yes".
+	* m4/truncf.m4 (gl_FUNC_TRUNCF): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_truncf_ieee to
+	"guessing yes".
+	* m4/truncl.m4 (gl_FUNC_TRUNCL): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_truncl_ieee to
+	"guessing yes".
+	* m4/usleep.m4 (gl_FUNC_USLEEP): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_usleep_works to
+	"guessing yes".
+	* m4/utimens.m4 (gl_UTIMENS): Require AC_CANONICAL_HOST. When cross-
+	compiling to glibc systems, set gl_cv_func_futimesat_works to
+	"guessing yes".
+
+2012-05-03  Bruno Haible  <bruno@clisp.org>
+
+	Say "guessing yes" or "guessing no" when cross-compiling.
+	* m4/dup2.m4 (gl_FUNC_DUP2): When cross-compiling, set
+	gl_cv_func_dup2_works to "guessing yes" or "guessing no".
+	* m4/getdelim.m4 (gl_FUNC_GETDELIM): When cross-compiling, set
+	gl_cv_func_working_getdelim to "guessing yes" or "guessing no".
+	* m4/getline.m4 (gl_FUNC_GETLINE): When cross-compiling, set
+	am_cv_func_working_getline to "guessing yes" or "guessing no".
+	* m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, set
+	gl_cv_func_memmem_works_always to "guessing yes" or "guessing no".
+	(gl_FUNC_MEMMEM): When cross-compiling, set
+	gl_cv_func_memmem_works_fast to "guessing yes" or "guessing no".
+	* m4/stpncpy.m4 (gl_FUNC_STPNCPY): When cross-compiling, set
+	gl_cv_func_stpncpy to "guessing yes" or "guessing no".
+	* m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): When cross-compiling,
+	set gl_cv_func_strcasestr_works_always to "guessing yes" or
+	"guessing no".
+	(gl_FUNC_STRCASESTR): When cross-compiling, set
+	gl_cv_func_strcasestr_linear to "guessing yes" or "guessing no".
+	* m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): When cross-compiling, set
+	gl_cv_func_strstr_works_always to "guessing yes" or "guessing no".
+	(gl_FUNC_STRSTR): When cross-compiling, set
+	gl_cv_func_strstr_linear to "guessing yes" or "guessing no".
+	* m4/strtod.m4 (gl_FUNC_STRTOD): When cross-compiling, set
+	gl_cv_func_strtod_works to "guessing yes" or "guessing no".
+	* m4/wctype_h.m4 (gl_WCTYPE_H): When cross-compiling, set
+	gl_cv_func_iswcntrl_works to "guessing yes" or "guessing no".
+
+2012-05-01  Bruno Haible  <bruno@clisp.org>
+
+	relocatable-prog: Enable ELF ORIGIN trick also on GNU/kFreeBSD.
+	* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Treat kFreeBSD like Linux.
+	* build-aux/reloc-ldflags: Likewise.
+	Suggested by Steven Chamberlain <steven@pyro.eu.org>.
+
+2012-05-01  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Remove transitional code.
+	* gnulib-tool: Don't warn about --import with 0 arguments any more.
+	Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
+
+2012-05-01  Bruno Haible  <bruno@clisp.org>
+
+	getcwd: Fix misindentation.
+	* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Fix indentation.
+
+2012-04-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	exclude: process exclude and include directives in order
+	This restores the pre-2009 behavior, and is part of a fix of a
+	grep bug reported by Quentin Arce in
+	<http://lists.gnu.org/archive/html/bug-grep/2012-04/msg00056.html>.
+	* lib/exclude.c (struct exclude): Remove 'tail' member.
+	(new_exclude_segment): Prepend the new segment instead of appending.
+	Return void, since that's now more convenient.
+	(file_pattern_matches): Renamed from excluded_file_pattern_p.
+	(file_name_matches): Renamed from excluded_file_name_p.
+	(file_pattern_matches, file_name_matches):
+	Return true if the pattern matches, not if it excludes.
+	All callers changed.
+	(excluded_file_name): Process the list in reverse order;
+	since the list is now reversed this restores the pre-2009 behavior.
+	(add_exclude): Adjust to new reversed-order list.  Use local var
+	rather than macro, for clarity.
+	* tests/test-exclude7.sh: Adjust to corrected behavior.
+
+	exclude: handle wildcards with FNM_NOESCAPE and with trailing \
+	* lib/exclude.c (unescape_pattern): Don't worry about unescaped [;
+	it's not possible here.  Handle the case of \ at end of pattern
+	without dumping core.
+	(add_exclude): Do not unescape the pattern if FNM_NOESCAPE is used.
+
+	_Noreturn: future-proof non-GNU and non-MSVC compilers
+	* build-aux/snippet/_Noreturn.h (_Noreturn):
+	* m4/gnulib-common.m4 (gl_COMMON_BODY):
+	Do not define _Noreturn if __STDC_VERSION__ indicates this is
+	C11 or later.  This is more likely to work with random future C
+	compilers that are neither GNUish nor MSVCish.  See Vincent Lefevre in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-04/msg00195.html>.
+
+	exclude: handle wildcards with FNM_EXTMATCH
+	* lib/exclude.c (fnmatch_pattern_has_wildcards): Also treat '+(',
+	'+@', '!(' as wildcards, if FNM_EXTMATCH.  Make it clear in a
+	comment that "has wildcards" really means "has or may have
+	wildcards".  Simplify by avoiding the need to call strcspn.
+
+2012-04-29  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Fix list of authors.
+	* gnulib-tool (func_version): Add Paul Eggert to list of authors.
+
+2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	bootstrap: support Automake-NG in $buildreq
+	* bootstrap (check_versions): Handle automake and aclocal from
+	Automake-NG specially.  They can be specified as respectively
+	the "automake-ng" and "aclocal-ng" requirements.
+
+2012-04-25  Eric Blake  <eblake@redhat.com>
+
+	bootstrap: only force latest Makefile.in.in for gettext module
+	* build-aux/bootstrap (with_gettext): Only install latest
+	Makefile.in.in for projects requesting bleeding edge gettext.
+
+2012-04-22  Bruno Haible  <bruno@clisp.org>
+
+	doc: Mention reason for replacement on glibc/Linux systems.
+	* doc/posix-functions/dprintf.texi: Mention the problem with special
+	'long double' values.
+	* doc/posix-functions/fprintf.texi: Likewise.
+	* doc/posix-functions/printf.texi: Likewise.
+	* doc/posix-functions/snprintf.texi: Likewise.
+	* doc/posix-functions/sprintf.texi: Likewise.
+	* doc/posix-functions/vdprintf.texi: Likewise.
+	* doc/posix-functions/vfprintf.texi: Likewise.
+	* doc/posix-functions/vprintf.texi: Likewise.
+	* doc/posix-functions/vsnprintf.texi: Likewise.
+	* doc/posix-functions/vsprintf.texi: Likewise.
+	* doc/posix-functions/fcntl.texi: Add glibc/Linux to the list of
+	platforms with F_DUPFD_CLOEXEC problems.
+	* doc/posix-functions/glob.texi: Mention which platforms are affected
+	by the problem with symbolic links.
+	* doc/posix-functions/linkat.texi: Mention the problem with
+	AT_SYMLINK_FOLLOW on Linux.
+
+2012-04-22  Bruno Haible  <bruno@clisp.org>
+
+	pwrite: Don't replace on all platforms.
+	* m4/pwrite.m4 (gl_FUNC_PWRITE): Fix syntax error in test program.
+
+2012-04-22  Bruno Haible  <bruno@clisp.org>
+
+	rint* tests: Avoid gcc warnings.
+	* tests/test-rint.c (INFINITY, NAN): Undefine before redefining.
+	* tests/test-rintf.c (INFINITY, NAN): Likewise.
+	* tests/test-rintl.c (INFINITY, NAN): Likewise.
+
+2012-04-21  Bruno Haible  <bruno@clisp.org>
+
+	users.txt: Update.
+	* users.txt: Add freedink, wdiff. Update URLs for projects that have
+	switched from CVS to git, bzr, or svn.
+
+2012-04-21  Bruno Haible  <bruno@clisp.org>
+
+	Large File Support for native Windows platforms.
+
+	* m4/largefile.m4 (gl_LARGEFILE): New macro.
+	* modules/largefile (configure.ac): Require gl_LARGEFILE.
+
+	* lib/sys_types.in.h (off_t) [WINDOWS_64_BIT_OFF_T]: Define to a 64-bit
+	type.
+	* m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_64_BIT_OFF_T.
+	* modules/sys_types (Makefile.am): Substitute WINDOWS_64_BIT_OFF_T.
+	* doc/posix-headers/sys_types.texi: Mention the effect of the
+	'largefile' module.
+
+	* lib/fcntl.in.h: Add comments about off_t.
+	* modules/fcntl-h (Depends-on): Add sys_types.
+
+	* lib/unistd.in.h [WINDOWS_64_BIT_OFF_T]: Include <sys/types.h>.
+	(ftruncate): Replace it if REPLACE_FTRUNCATE is 1.
+	* m4/unistd_h.m4 (gl_UNISTD_H): Require gl_SYS_TYPES_H.
+	(gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FTRUNCATE.
+	* modules/unistd (Depends-on): Add sys_types.
+	(Makefile.am): Substitute WINDOWS_64_BIT_OFF_T, REPLACE_FTRUNCATE.
+
+	* lib/lseek.c (rpl_lseek) [_GL_WINDOWS_64_BIT_OFF_T]: Use _lseeki64
+	instead of lseek.
+	* m4/lseek.m4 (gl_FUNC_LSEEK): Require gl_SYS_TYPES_H. Set
+	REPLACE_LSEEK if WINDOWS_64_BIT_OFF_T is 1.
+	* modules/lseek (Depends-on): Add sys_types.
+
+	* lib/ftruncate.c: Put under GPLv3+. Include <windows.h>,
+	msvc-nothrow.h.
+	(SetFileSize): New function.
+	(ftruncate) [_GL_WINDOWS_64_BIT_OFF_T]: New implementation.
+	* m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Set REPLACE_FTRUNCATE on Windows
+	if Large File Support is requested.
+	* modules/ftruncate (configure.ac): Consider REPLACE_FTRUNCATE.
+	(Depends-on): Add sys_types, msvc-nothrow. Update conditions.
+
+	* lib/stdio.in.h: Add comments about off_t.
+	* modules/stdio (Depends-on): Add sys_types.
+
+	* lib/ftello.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _ftelli64 or ftello64
+	instead of ftello.
+	* m4/ftello.m4 (gl_FUNC_FTELLO): Require gl_SYS_TYPES_H. Set
+	REPLACE_FTELLO if WINDOWS_64_BIT_OFF_T is 1.
+	(gl_PREREQ_FTELLO): New macro.
+	* modules/ftello (Depends-on): Add sys_types.
+	(configure.ac): Incoke gl_PREREQ_FTELLO.
+
+	* lib/fseeko.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _fseeki64 or fseeko64
+	instead of fseeko.
+	* m4/fseeko.m4 (gl_FUNC_FSEEKO): Require gl_SYS_TYPES_H. Set
+	REPLACE_FSEEKO if WINDOWS_64_BIT_OFF_T is 1.
+	(gl_PREREQ_FSEEKO): New macro.
+	* modules/fseeko (Depends-on): Add sys_types.
+	(configure.ac): Invoke gl_PREREQ_FSEEKO.
+
+	* lib/sys_stat.in.h: Add comments about off_t.
+	(stat, fstat) [WINDOWS_64_BIT_ST_SIZE]: Define to variants that use a
+	64-bit integer for st_size in 'struct stat'.
+	* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_64_BIT_ST_SIZE.
+	Define _GL_WINDOWS_64_BIT_ST_SIZE.
+	* modules/sys_stat (Depends-on): Add sys_types.
+	(Makefile.am): Substitute WINDOWS_64_BIT_ST_SIZE.
+
+	* lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Define to _stati64
+	instead of stat or _stat.
+
+	* lib/fstat.c [_GL_WINDOWS_64_BIT_ST_SIZE]: Use _fstati64 and
+	'struct _stati64' instead of fstat and 'struct stat'.
+	* m4/fstat.m4 (gl_FUNC_FSTAT): Require gl_HEADER_SYS_STAT_H. Set
+	REPLACE_FSTAT if WINDOWS_64_BIT_ST_SIZE is 1.
+
+	Reported by Ray Satiro <raysatiro@yahoo.com>.
+
+2012-04-19  Eric Blake  <eblake@redhat.com>
+
+	bootstrap: accommodate older libtool
+	* build-aux/bootstrap (use_libtool): Cater to libtool 1.5.22.
+	Reported by Daniel P. Berrange.
+
+2012-04-19  Jim Meyering  <meyering@redhat.com>
+
+	announce-gen: avoid failure due to lack of Digest::SHA1
+	Even with the preferred Digest::SHA available, this script
+	would fail when the backup module, Digest::SHA1, was not installed.
+	* build-aux/announce-gen: Quote the conditional use of "use".
+	Reported by Reuben Thomas in:
+	http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30444
+
+	bootstrap: don't let a user's CDPATH setting affect this script
+	When CDPATH is set, cd will sometimes generate output.
+	When "cd" is run in a subshell whose output matters, that
+	surprising-to-some output can cause malfunction.
+	Unsetting CDPATH turns off this shell "feature."
+	* build-aux/bootstrap (CDPATH): Unset.
+	Reported by Reuben Thomas in:
+	http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30435
+	and inspired by his patch here:
+	http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30440
+
+2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
+	and Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: catch "see @xref{}" and similar
+	* top/maint.mk (prohibit_undesirable_word_seq_RE_): Also
+	prohibit "See also @xref{", "Also see @pxref{", and similar.
+
+2012-04-16  Jim Meyering  <meyering@redhat.com>
+
+	bootstrap: really use gnulib's po/Makefile.in.in
+	* build-aux/bootstrap: Correct the source file name in previous change.
+	Reported by Akim Demaille.
+
+	configmake: correct minor inconsistency in Makefile rule
+	* modules/configmake (Makefile.am): All other rules like this one
+	run the final "mv -f ..." in the same backslash-continued command
+	as the one that does everything else.  This one put the mv -f ...
+	command on a separate, non-backslash-continued line.
+	Make it like the others.
+
+	bootstrap: use gnulib's po/Makefile.in.in, not the one from gettext
+	* build-aux/bootstrap: Use gnulib's po/Makefile.in.in, not
+	the one from gettext.  Reported by Akim Demaille.
+
+2012-04-16  Joel E. Denny  <joeldenny@joeldenny.org>
+
+	Fix recursion of install-* into po directories.
+	Bison's install-pdf bug reported by Hans Aberg at
+	<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
+	* build-aux/po/Makefile.in.in (install-dvi, install-html)
+	(install-info, install-pdf, install-ps): New targets.
+
+2012-04-16  Jim Meyering  <meyering@redhat.com>
+
+	maint: avoid spurious "make sc_maint" failure
+	* cfg.mk (exclude_file_name_regexp--sc_trailing_blank): Also
+	exempt all *.class file names, for lib/javaversion.class.
+
+2012-04-15  Bruno Haible  <bruno@clisp.org>
+
+	lseek: Make configure test independent of environment.
+	* m4/lseek.m4 (gl_FUNC_LSEEK): Require AC_CANONICAL_HOST. On native
+	Windows, we know that lseek() on pipes is broken; skip the runtime
+	test.
+
+2012-04-14  Bruno Haible  <bruno@clisp.org>
+
+	stat: Bypass buggy override in mingw64.
+	* m4/stat.m4 (gl_FUNC_STAT): Update comments.
+	* lib/stat.c (stat) [mingw64]: Define to _stat.
+	* doc/posix-functions/stat.texi: Mention mingw64 bug.
+
+2012-04-14  Bruno Haible  <bruno@clisp.org>
+
+	pathmax: Fix compilation error on MSVC 9.
+	* modules/pathmax (Depends-on): Add unistd.
+
+2012-04-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	README: document pointer comparison assumption
+	* README (Portability guidelines): Document assumption about
+	pointer comparisons, in response to a recent bug-gnulib comment by
+	Jeffrey Kegler.
+
+2012-04-12  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'getrusage'.
+	* modules/getrusage-tests: New file.
+	* tests/test-getrusage.c: New file.
+
+	New module 'getrusage'.
+	* lib/sys_resource.in.h: Include arg-nonnull.h, c++defs.h,
+	warn-on-use.h.
+	(getrusage): New declaration.
+	* lib/getrusage.c: New file.
+	* m4/getrusage.m4: New file.
+	* m4/sys_resource_h.m4 (gl_HEADER_SYS_RESOURCE): Test whether getrusage
+	is declared.
+	(gl_SYS_RESOURCE_H_DEFAULTS): Initialize GNULIB_GETRUSAGE,
+	HAVE_GETRUSAGE.
+	* modules/sys_resource (Depends-on): Add snippet/arg-nonnull,
+	snippet/c++defs, snippet/warn-on-use.
+	(Makefile.am): Update generation of sys/resource.h. Substitute
+	GNULIB_GETRUSAGE, HAVE_GETRUSAGE.
+	* modules/getrusage: New file.
+	* doc/posix-functions/getrusage.texi: Mention the new module.
+
+2012-04-12  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'sys_resource'.
+	* modules/sys_resource-tests: New file.
+	* tests/test-sys_resource.c: New file.
+
+	New module 'sys_resource'.
+	* lib/sys_resource.in.h: New file.
+	* m4/sys_resource_h.m4: New file.
+	* modules/sys_resource: New file.
+	* doc/posix-headers/sys_resource.texi: Mention the new module.
+
+2012-04-12  LRN  <lrn1986@gmail.com>  (tiny change)
+
+	ioctl: Fix compilation error on mingw.
+	* lib/ioctl.c: Include <windows.h>.
+	Also reported by Ray Satiro <raysatiro@yahoo.com>.
+
+2012-04-04  Jim Meyering  <meyering@redhat.com>
+
+	regex: correct #pragma guard expression
+	* lib/regex.c: -Wsuggest-attribute=pure was introduced in gcc-4.6,
+	not 4.3.  Correct its cpp guard expression.
+
+2012-04-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: remove unnecessary type punning
+	Problem reported by Vladimir Serbinenko in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-04/msg00006.html>.
+	* lib/regex.h (struct re_pattern_buffer): Change the type of
+	__REPB_PREFIX(buffer) from unsigned char * to struct re_dfa_t *.
+	Fix comment to match code.
+	* lib/regcomp.c (re_compile_fastmap, re_compile_fastmap_iter, regfree)
+	(re_compile_internal, free_workarea_compile, analyze, lower_subexp)
+	(parse, parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
+	* lib/regexec.c (regexec, re_search_stub, re_search_internal)
+	(set_regs):
+	Omit no-longer-necessary casts.
+
+2012-04-03  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'ilogbl'.
+	* modules/ilogbl-tests: New file.
+	* tests/test-ilogbl.c: New file.
+
+	New module 'ilogbl'.
+	* lib/math.in.h (ilogbl): New declaration.
+	* lib/ilogbl.c: New file.
+	* m4/ilogbl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether ilogbl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBL, HAVE_ILOGBL.
+	* modules/math (Makefile.am): Substitute GNULIB_ILOGBL, HAVE_ILOGBL.
+	Split sed invocation, to avoid the limit of 100 substitutions of
+	HP-UX 'sed'.
+	* modules/ilogbl: New file.
+	* tests/test-math-c++.cc: Check the declaration of ilogbl.
+	* doc/posix-functions/ilogbl.texi: Mention the new module.
+
+2012-04-03  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'ilogbf'.
+	* modules/ilogbf-tests: New file.
+	* tests/test-ilogbf.c: New file.
+
+	New module 'ilogbf'.
+	* lib/math.in.h (ilogbf): New declaration.
+	* lib/ilogbf.c: New file.
+	* m4/ilogbf.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether ilogbf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBF, HAVE_ILOGBF,
+	REPLACE_ILOGBF.
+	* modules/math (Makefile.am): Substitute GNULIB_ILOGBF, HAVE_ILOGBF,
+	REPLACE_ILOGBF.
+	* modules/ilogbf: New file.
+	* tests/test-math-c++.cc: Check the declaration of ilogbf.
+	* doc/posix-functions/ilogbf.texi: Mention the new module.
+
+2012-04-03  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'ilogb'.
+	* modules/ilogb-tests: New file.
+	* tests/test-ilogb.c: New file.
+	* tests/test-ilogb.h: New file, based on tests/test-logb.h and
+	tests/test-logb-ieee.h.
+
+	New module 'ilogb'.
+	* lib/math.in.h (ilogb): New declaration.
+	* lib/ilogb.c: New file.
+	* m4/ilogb.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether ilogb is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGB, HAVE_ILOGB,
+	REPLACE_ILOGB.
+	* modules/math (Makefile.am): Substitute GNULIB_ILOGB, HAVE_ILOGB,
+	REPLACE_ILOGB.
+	* modules/ilogb: New file.
+	* tests/test-math-c++.cc: Check the declaration of ilogb.
+	* doc/posix-functions/ilogb.texi: Mention the new module.
+
+2012-04-03  Bruno Haible  <bruno@clisp.org>
+
+	math: Provide FP_ILOGB0 and FP_ILOGBNAN.
+	* lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Define fallback.
+	* tests/test-math.c: Check that FP_ILOGB0, FP_ILOGBNAN are defined.
+	(main): Check their values.
+	* doc/posix-headers/math.texi: Mention the FP_ILOGB0, FP_ILOGBNAN
+	problem.
+
+2012-04-03  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'logbl-ieee'.
+	* modules/logbl-ieee-tests: New file.
+	* tests/test-logbl-ieee.c: New file.
+
+	New module 'logbl-ieee'.
+	* modules/logbl-ieee: New file.
+
+	Tests for module 'logb-ieee'.
+	* modules/logb-ieee-tests: New file.
+	* tests/test-logb-ieee.c: New file.
+
+	New module 'logb-ieee'.
+	* modules/logb-ieee: New file.
+
+	Tests for module 'logbf-ieee'.
+	* modules/logbf-ieee-tests: New file.
+	* tests/test-logbf-ieee.c: New file.
+	* tests/test-logb-ieee.h: New file.
+
+	New module 'logbf-ieee'.
+	* modules/logbf-ieee: New file.
+
+2012-04-03  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'logbl'.
+	* modules/logbl-tests: New file.
+	* tests/test-logbl.c: New file.
+
+	New module 'logbl'.
+	* lib/math.in.h (logbl): New declaration.
+	* lib/logbl.c: New file.
+	* m4/logbl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether logbl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBL, HAVE_LOGBL,
+	REPLACE_LOGBL.
+	* modules/math (Makefile.am): Substitute GNULIB_LOGBL, HAVE_LOGBL,
+	REPLACE_LOGBL.
+	* modules/logbl: New file.
+	* tests/test-math-c++.cc: Check the declaration of logbl.
+	* doc/posix-functions/logbl.texi: Mention the new module.
+
+2012-04-02  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'logbf'.
+	* modules/logbf-tests: New file.
+	* tests/test-logbf.c: New file.
+
+	New module 'logbf'.
+	* lib/math.in.h (logbf): New declaration.
+	* lib/logbf.c: New file.
+	* m4/logbf.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether logbf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBF, HAVE_LOGBF,
+	REPLACE_LOGBF.
+	* modules/math (Makefile.am): Substitute GNULIB_LOGBF, HAVE_LOGBF,
+	REPLACE_LOGBF.
+	* modules/logbf: New file.
+	* tests/test-math-c++.cc: Check the declaration of logbf.
+	* doc/posix-functions/logbf.texi: Mention the new module.
+
+2012-04-02  Bruno Haible  <bruno@clisp.org>
+
+	logb tests: More tests.
+	* tests/test-logb.h: New file, based on tests/test-logb.c and
+	tests/test-frexp.h.
+	* tests/test-logb.c: Include minus-zero.h, test-logb.h.
+	(main): Just invoke test_function.
+	* modules/logb-tests (Files): Add tests/test-logb.h,
+	tests/minus-zero.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_logb_SOURCES.
+
+	logb: Provide replacement and workarounds.
+	* lib/math.in.h (logb): Ensure declaration. Replace if REPLACE_LOGB
+	is 1.
+	* lib/logb.c: New file.
+	* m4/logb.m4 (gl_FUNC_LOGB_WORKS): New macro.
+	(gl_FUNC_LOGB): Invoke it. Set HAVE_LOGB, REPLACE_LOGB.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGB.
+	* modules/math (Makefile.am): Substitute REPLACE_LOGB.
+	* modules/logb (Files): Add lib/logb.c.
+	(Depends-on): Add isfinite, frexp, isnand.
+	(configure.ac): Compile the replacement code logb.c if needed.
+	* tests/test-math-c++.cc: Check the declaration of logb.
+	* doc/posix-functions/logb.texi: Mention the replacement and the bug
+	with subnormal numbers.
+
+2012-04-02  Bruno Haible  <bruno@clisp.org>
+
+	log10* tests: Speed up.
+	* tests/test-log10.h (test_function): Reduce amount of random numbers
+	to test.
+
+2012-04-01  Bruno Haible  <bruno@clisp.org>
+
+	logf-ieee: Fix test whether logf works.
+	* m4/logf.m4 (gl_FUNC_LOGF): Fix typo in test program.
+
+2012-04-01  Bruno Haible  <bruno@clisp.org>
+
+	log10l: Work around log10l-ieee test failure on IRIX 6.5.
+	* lib/log10l.c: Include <float.h>
+	(log10l): On IRIX, normalize the +Infinity value.
+	* modules/log10l (Depends-on): Add 'float'.
+	* doc/posix-functions/log10l.texi: Mention the IRIX problem with
+	+Infinity.
+
+	log10f-ieee: Work around test failure on NetBSD 5.1.
+	* m4/log10f-ieee.m4: New file.
+	* m4/log10f.m4 (gl_FUNC_LOG10F): If gl_FUNC_LOG10F_IEEE is present,
+	test whether log10f works with a negative argument. Replace it if not.
+	* lib/log10f.c (log10f): For negative arguments, return NaN.
+	* modules/log10f-ieee (Files): Add m4/log10f-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_LOG10F_IEEE.
+	* doc/posix-functions/log10f.texi: Mention the log10f-ieee module.
+
+	log10f-ieee: Work around test failure on Solaris 9.
+	* modules/log10f-ieee (Depends-on): Add log10-ieee.
+	(configure.ac): Require gl_FUNC_LOG10F.
+
+	log10-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
+	* m4/log10-ieee.m4: New file.
+	* m4/log10.m4 (gl_FUNC_LOG10): If gl_FUNC_LOG10_IEEE is present, test
+	whether log10 works with a negative argument. Replace it if not.
+	* lib/log10.c (log10): For negative arguments, return NaN.
+	* modules/log10-ieee (Files): Add m4/log10-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_LOG10_IEEE.
+	* doc/posix-functions/log10.texi: Mention the log10-ieee module.
+
+	Tests for module 'log10l-ieee'.
+	* modules/log10l-ieee-tests: New file.
+	* tests/test-log10l-ieee.c: New file.
+
+	New module 'log10l-ieee'.
+	* modules/log10l-ieee: New file.
+
+	Tests for module 'log10-ieee'.
+	* modules/log10-ieee-tests: New file.
+	* tests/test-log10-ieee.c: New file.
+
+	New module 'log10-ieee'.
+	* modules/log10-ieee: New file.
+
+	Tests for module 'log10f-ieee'.
+	* modules/log10f-ieee-tests: New file.
+	* tests/test-log10f-ieee.c: New file.
+	* tests/test-log10-ieee.h: New file.
+
+	New module 'log10f-ieee'.
+	* modules/log10f-ieee: New file.
+
+2012-04-01  Bruno Haible  <bruno@clisp.org>
+
+	log10l: Work around AIX 5.1, IRIX 6.5, OSF/1 5.1 bug.
+	* lib/math.in.h (log10l): Override if REPLACE_LOG10L is 1.
+	* lib/log10l.c (log10l): If log10l exists, use it and provide just the
+	workaround.
+	* m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): New macro.
+	(gl_FUNC_LOG10L): Invoke it. Set REPLACE_LOG10L.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10L.
+	* modules/math (Makefile.am): Substitute REPLACE_LOG10L.
+	* modules/log10l (configure.ac): Consider REPLACE_LOG10L.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/log10l.texi: Mention the MSVC9, AIX 5.1,
+	IRIX 6.5, OSF/1 5.1 problems.
+
+2012-04-01  Bruno Haible  <bruno@clisp.org>
+
+	log10f: Work around OSF/1 5.1 bug.
+	* lib/math.in.h (log10f): Override if REPLACE_LOG10F is 1.
+	* lib/log10f.c (log10f): If logf exists, use it and provide just the
+	workaround.
+	* m4/log10f.m4 (gl_FUNC_LOG10F_WORKS): New macro.
+	(gl_FUNC_LOG10F): Invoke it. Set REPLACE_LOG10F.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10F.
+	* modules/math (Makefile.am): Substitute REPLACE_LOG10F.
+	* modules/log10f (configure.ac): Consider REPLACE_LOG10F.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/log10f.texi: Mention the OSF/1 5.1 problem.
+
+2012-04-01  Bruno Haible  <bruno@clisp.org>
+
+	log10: Work around OSF/1 5.1 bug.
+	* lib/math.in.h (log10): New declaration.
+	* lib/log10.c: New file.
+	* m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro.
+	(gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10.
+	* modules/log10 (Files): Add lib/log10.c.
+	(Depends-on): Add math.
+	(configure.ac): If REPLACE_LOG10 is 1, compile an override.
+	* tests/test-math-c++.cc: Check the declaration of log10.
+	* doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
+
+2012-03-31  Bruno Haible  <bruno@clisp.org>
+
+	log10l tests: More tests.
+	* modules/log10l-tests (Files): Add tests/test-log10l.h,
+	tests/minus-zero.h, tests/randoml.c.
+	(Makefile.am): Add randoml.c to test_log10l_SOURCES.
+	* tests/test-log10l.c: Include <float.h>, minus-zero.h, test-log10l.h.
+	(main): Invoke test_function.
+
+	log10f tests: More tests.
+	* modules/log10f-tests (Files): Add tests/test-log10.h,
+	tests/minus-zero.h, tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_log10f_SOURCES.
+	* tests/test-log10f.c: Include <float.h>, minus-zero.h, test-log10.h.
+	(main): Invoke test_function.
+
+	log10 tests: More tests.
+	* tests/test-log10.h: New file.
+	* modules/log10-tests (Files): Add tests/test-log10.h,
+	tests/minus-zero.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_log10_SOURCES.
+	* tests/test-log10.c: Include <float.h>, minus-zero.h, test-log10.h.
+	(main): Invoke test_function.
+
+2012-03-31  Simon Josefsson  <simon@josefsson.org>
+
+	fflush: Fix syntax error.
+	* lib/fflush.c: Include unused-parameter.h, needed for
+	_GL_UNUSED_PARAMETER.
+	* modules/fflush (Depends-on): Add snippet/unused-parameter.
+
+2012-03-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: pacify GCC when compiling GRUB
+	* lib/regcomp.c (init_dfa): Make a pointer 'const', to avoid
+	a diagnostic.  Reported by Vladimir Serbinenko in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00163.html>.
+
 2012-03-29  Eric Blake  <eblake@redhat.com>
 
 	stdio: don't assume gets any more
@@ -11,6 +3634,3718 @@
 	* doc/posix-functions/gets.texi (gets): Update documentation.
 	Reported by Christer Solskogen.
 
+	maint.mk: fix syntax checks without exclusions
+	* top/maint.mk (_sc_search_regexp): Allow for empty variable.
+	Reported by Daniel P. Berrange.
+
+	strerror_r: avoid compiler warning
+	* lib/strerror_r.c (strerror_r): Hoist extern declaration to top
+	level.
+
+	fflush: avoid compiler warning
+	* lib/fflush.c (update_fpos_cache): Mark variables that are
+	potentially unused.
+
+2012-03-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'localeconv'.
+	* modules/localeconv-tests: New file.
+	* tests/test-localeconv.c: New file.
+
+	New module 'localeconv'.
+	* lib/locale.in.h (localeconv): New declaration.
+	* lib/localeconv.c: New file.
+	* m4/localeconv.m4: New file.
+	* m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALECONV,
+	REPLACE_LOCALECONV.
+	* modules/locale (Makefile.am): Substitute GNULIB_LOCALECONV,
+	REPLACE_LOCALECONV.
+	* modules/localeconv: New file.
+	* modules/nl_langinfo (Depends-on): Add localeconv.
+	* modules/human (Depends-on): Likewise.
+	* doc/posix-functions/localeconv.texi: Mention the new module.
+
+2012-03-25  Bruno Haible  <bruno@clisp.org>
+
+	locale: Provide a complete 'struct lconv'.
+	* m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
+	'struct lconv' does not contain int_p_cs_precedes.
+	* tests/test-locale.c (main): Check that 'struct lconv' is complete.
+	* doc/posix-headers/locale.texi: Update.
+
+	locale: Provide a complete 'struct lconv' on Solaris 10, 11.
+	* m4/locale_h.m4 (gl_LOCALE_H): On Solaris, define _LCONV_C99.
+	* doc/posix-headers/locale.texi: Update.
+
+	locale: Provide a working 'struct lconv'.
+	* lib/locale.in.h (lconv): Override if REPLACE_STRUCT_LCONV is 1.
+	* m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
+	'struct lconv' does not even contain decimal_point.
+	(gl_LOCALE_H_DEFAULTS): Initialize REPLACE_STRUCT_LCONV.
+	* modules/locale (Makefile.am): Substitute REPLACE_STRUCT_LCONV.
+	* tests/test-locale.c (main): Check that 'struct lconv' is complete.
+	* doc/posix-headers/locale.texi: Mention the problems with
+	'struct lconv'.
+	Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
+
+2012-03-24  Bruno Haible  <bruno@clisp.org>
+
+	Enable common subexpression optimization in GCC.
+	* lib/unitypes.in.h (_UC_ATTRIBUTE_CONST, _UC_ATTRIBUTE_PURE): New
+	macros.
+	* lib/unicase.in.h (uc_toupper, uc_tolower, uc_totitle): Declare with
+	GCC attribute 'const'.
+	(uc_locale_language): Declare with GCC attribute 'pure'.
+	* lib/unicase/caseprop.h (uc_is_cased, uc_is_case_ignorable): Declare
+	with GCC attribute 'const'.
+	* lib/unictype.in.h (uc_is_general_category_withtable,
+	uc_combining_class, uc_combining_class_name,
+	uc_combining_class_long_name, uc_bidi_class_name,
+	uc_bidi_category_name, uc_bidi_class_long_name, uc_bidi_class,
+	uc_bidi_category, uc_is_bidi_class, uc_is_bidi_category,
+	uc_decimal_value, uc_digit_value, uc_numeric_value,
+	uc_joining_type_name, uc_joining_type_long_name, uc_joining_type,
+	uc_joining_group_name, uc_joining_group, uc_is_property_*, uc_script,
+	uc_block, uc_is_c_whitespace, uc_is_java_whitespace,
+	uc_c_ident_category, uc_java_ident_category, uc_is_alnum, uc_is_alpha,
+	uc_is_cntrl, uc_is_digit, uc_is_graph, uc_is_lower, uc_is_print,
+	uc_is_punct, uc_is_space, uc_is_upper, uc_is_xdigit, uc_is_blank):
+	Declare with GCC attribute 'const'.
+	(uc_general_category_name, uc_general_category_long_name,
+	uc_general_category_byname, uc_general_category,
+	uc_is_general_category, uc_combining_class_byname,
+	uc_bidi_class_byname, uc_bidi_category_byname, uc_joining_type_byname,
+	uc_joining_group_byname, uc_script_byname, uc_is_script, uc_is_block):
+	Declare with GCC attribute 'pure'.
+	* lib/unigbrk.in.h (uc_graphemeclusterbreak_property,
+	uc_is_grapheme_break, u8_grapheme_next, u16_grapheme_next,
+	u32_grapheme_next, u8_grapheme_prev, u16_grapheme_prev,
+	u32_grapheme_prev, lib/uniname.in.h (unicode_name_character): Declare
+	with GCC attribute 'pure'.
+	* lib/uninorm.in.h (uc_composition): Declare with GCC attribute
+	'const'.
+	(uninorm_decomposing_form): Declare with GCC attribute 'pure'.
+	* lib/unistr.in.h (): Declare with GCC attribute 'const'.
+	(u8_check, u16_check, u32_check, u8_mblen, u16_mblen, u32_mblen,
+	u8_cmp, u16_cmp, u32_cmp, u8_cmp2, u16_cmp2, u32_cmp2, u8_chr, u16_chr,
+	u32_chr, u8_mbsnlen, u16_mbsnlen, u32_mbsnlen, u8_strmblen,
+	u16_strmblen, u32_strmblen, u8_strlen, u16_strlen, u32_strlen,
+	u8_strnlen, u16_strnlen, u32_strnlen, u8_strcmp_gnu, u8_strcmp,
+	u16_strcmp, u32_strcmp, u8_strncmp, u16_strncmp, u32_strncmp,
+	u8_strchr, u16_strchr, u32_strchr, u8_strrchr, u16_strrchr,
+	u32_strrchr, u8_strcspn, u16_strcspn, u32_strcspn, u8_strspn,
+	u16_strspn, u32_strspn, u8_strpbrk, u16_strpbrk, u32_strpbrk,
+	u8_strstr, u16_strstr, u32_strstr, u8_startswith, u16_startswith,
+	u32_startswith, u8_endswith, u16_endswith, u32_endswith): Declare with
+	GCC attribute 'pure'.
+	* lib/uniwbrk.in.h (uc_wordbreak_property): Declare with GCC attribute
+	'const'.
+	* lib/uniwidth.in.h (uc_width): Simplify declaration.
+	(u8_width, u16_width, u32_width, u8_strwidth, u16_strwidth,
+	u32_strwidth): Declare with GCC attribute 'pure'.
+
+	Enable common subexpression optimization in GCC.
+	* lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
+	(alphasort): Declare with GCC attribute 'pure'.
+	* lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
+	(atoll): Declare with GCC attribute 'pure'.
+	* lib/string.in.h (mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
+	mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
+	mbsspn, strverscmp): Declare with GCC attribute 'pure'.
+	* lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
+	(btowc, wctob, wcwidth, wmemchr, wmemcmp, wcslen, wcsnlen, wcscmp,
+	wcsncmp, wcscasecmp, wcsncasecmp, wcschr, wcsrchr, wcscspn, wcsspn,
+	wcspbrk, wcsstr, wcswidth): Declare with GCC attribute 'pure'.
+
+2012-03-24  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Avoid unintended error output from 'cmp'.
+	* gnulib-tool (func_add_file, func_update_file, func_import): Use
+	"cmp -s", not "cmp > /dev/null".
+
+2012-03-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	gnulib-tool: fix imprecise comments w.r.t. an automake bug
+
+	It's not just Automake versions < 1.9b that creates an empty
+	pkgdatadir at installation time if pkgdata_DATA is specified
+	to empty; modern automake versions do this as well, at least
+	until automake 1.11.4 (not yet released at the moment of writing,
+	but soon to appear).  That behaviour was generally considered a
+	feature rather than a bug, at least until this discussion:
+	<http://lists.gnu.org/archive/html/automake/2012-03/msg00014.html>
+
+	See also automake bugs #10997 and #11030.
+
+	* gnulib-tool (func_emit_lib_Makefile_am): Adjust comments.  Add
+	reference to relevant automake bug numbers.
+	(func_emit_tests_Makefile_am): Likewise.
+
+2012-03-20  Reuben Thomas  <rrt@sc3d.org>
+
+	announce-gen: use Digest::SHA when possible
+	* build-aux/announce-gen: Use Digest::SHA when possible, falling
+	back to Digest::SHA1 if necessary.
+
+2012-03-20  Jim Meyering  <meyering@redhat.com>
+
+	tests: avoid gcc warnings about argv vs. const initializers
+	* tests/test-posix_spawn1.c (main): Cast to "(char *)" to avoid two
+	warnings about discarding 'const' qualifier from pointer target type.
+	* tests/test-posix_spawn2.c (main): Likewise.
+
+2012-03-20  Reuben Thomas  <rrt@sc3d.org>
+
+	README-release: simplify slightly
+	* top/README-release: Run "git checkout master" only once.
+
+2012-03-15  Mark Wielaard  <mark@klomp.org>
+
+	git-merge-changelog: add specific example on how to use with hg.
+	* lib/git-merge-changelog.c: Add example on how to use in .hgrc.
+
+2012-03-18  Mark Wielaard  <mark@klomp.org>
+
+	lib/git-merge-changelog.c (status): Report bugs to bug-gnulib@gnu.org.
+
+2012-03-18  Andreas Oberritter  <obi@opendreambox.org>
+
+	git-version-gen: don't let "prefix" envvar cause trouble
+	* build-aux/git-version-gen (prefix): Initialize properly,
+	so as not to use a value specified via the environment.
+	Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
+
+2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: diagnose too-large repeat counts in EREs
+	Previously, the code did not diagnose the too-large repeat count
+	in EREs like 'b{1000000000}'; instead, it silently treated the ERE
+	as if it were 'b\{1000000000}', which is unexpected.
+	* lib/regcomp.c (parse_dup_op): Fail with REG_ESIZE if a repeat count
+	is too large.  REG_ESIZE is used nowhere else, and the diagnostic
+	is a reasonable one for this problem.  Another option would be to
+	create a new REG_OVERFLOW error for repeat counts that are too large.
+	(fetch_number): Return RE_DUP_MAX + 1, not REG_ERROR, if the repeat
+	count is too large, so that the caller can distinguish the two cases.
+	* lib/regex.h (_REG_ESIZE): Document that this is now a generic
+	"Too large" return code, and that repeat counts are one example of this.
+
+2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: some glibc x32 integer width issues
+	* doc/posix-headers/sys_types.texi (sys/types.h):
+	* doc/posix-headers/time.texi (time.h):
+	Mention that glibc x32 does not conform to POSIX in a couple of
+	areas related to integer widths.
+
+2012-03-15  Bruno Haible  <bruno@clisp.org>
+
+	fmal: Avoid test failure on OpenBSD 5.1/SPARC64.
+	* lib/fma.c (VOLATILE): New macro.
+	(FUNC): Use it to work around a GCC compiler bug.
+
+2012-03-13  Bruno Haible  <bruno@clisp.org>
+
+	hypotl: Bypass broken implementation in OpenBSD 5.1/SPARC.
+	* m4/hypotl.m4 (gl_FUNC_HYPOTL_WORKS): New macro.
+	(gl_FUNC_HYPOTL): Invoke it. If the function does not work, set
+	REPLACE_HYPOTL to 1.
+	* doc/posix-functions/hypotl.texi: Mention the OpenBSD 5.1/SPARC bug.
+
+2012-03-13  Bruno Haible  <bruno@clisp.org>
+
+	remainderl: Bypass broken implementation in OpenBSD 5.1/SPARC.
+	* m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): New macro.
+	(gl_FUNC_REMAINDERL): Invoke it. If the function does not work, set
+	REPLACE_REMAINDERL to 1.
+	* doc/posix-functions/remainderl.texi: Mention the OpenBSD 5.1/SPARC
+	bug.
+
+2012-03-13  Bruno Haible  <bruno@clisp.org>
+
+	sqrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
+	* lib/math.in.h (sqrtl): Replace it if REPLACE_SQRTL is 1.
+	* m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): New macro.
+	(gl_FUNC_SQRTL): Invoke it. Set REPLACE_SQRTL to 1 if sqrtl() produces
+	too big rounding errors.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SQRTL.
+	* modules/math (Makefile.am): Substitute REPLACE_SQRTL.
+	* modules/sqrtl (configure.ac): Consider REPLACE_SQRTL.
+	(Depends-on): Update conditions.
+	* tests/test-sqrtl.c (my_ldexpl): New function.
+	(main): Add test of a particular value.
+	* doc/posix-functions/sqrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
+
+2012-03-13  Pádraig Brady  <P@draigBrady.com>
+
+	doc: Update timer_* platform portability notes.
+	* doc/posix-functions/timer_create.texi: Add platforms (OpenBSD 4.9)
+	that always return ENOSYS.
+	* doc/posix-functions/timer_delete.texi: Likewise.
+	* doc/posix-functions/timer_gettime.texi: Likewise.
+	* doc/posix-functions/timer_settime.texi: Likewise.
+
+2012-03-13  Bruno Haible  <bruno@clisp.org>
+
+	cbrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
+	* m4/cbrtl.m4 (gl_FUNC_CBRTL_WORKS): New macro.
+	(gl_FUNC_CBRTL): Invoke it. If the function does not work, set
+	REPLACE_CBRTL to 1.
+	* doc/posix-functions/cbrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
+
+2012-03-13  Bruno Haible  <bruno@clisp.org>
+
+	remainderl: Avoid compilation error on AIX >= 5.2.
+	* lib/math.in.h (remainderl): Undefine macro from the system header.
+
+2012-03-13  Bruno Haible  <bruno@clisp.org>
+
+	Avoid compilation errors with MSVC option -fp:strict.
+	* lib/cbrt.c: Use MSVC specific pragma fenv_access.
+	* lib/cbrtf.c: Likewise.
+	Reported by Michael Goffioul <michael.goffioul@gmail.com>.
+
+2012-03-12  Bruno Haible  <bruno@clisp.org>
+
+	uninorm: Don't crash in out-of-memory conditions.
+	* lib/uninorm/u-normalize-internal.h (FUNC): Handle malloc() failure
+	gracefully.
+	* lib/uninorm/uninorm-filter.c (uninorm_filter_write): Likewise.
+	Based on a report and patch by Stephen Gallagher <sgallagh@redhat.com>.
+
+2012-03-13  Akim Demaille  <akim@lrde.epita.fr>
+
+	quote: fix syntax-check
+	* top/maint.mk (sc_prohibit_quote_without_use): quote.h
+	also exports quote_quoting_options.
+
+2012-03-12  Simon Josefsson  <simon@josefsson.org>
+
+	Collapse list of copyright years to ranges.  See
+	<https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00051.html>.
+	* build-aux/bootstrap.conf, build-aux/csharpcomp.sh.in,
+	build-aux/csharpexec.sh.in, build-aux/gnupload,
+	build-aux/install-reloc, build-aux/javacomp.sh.in,
+	build-aux/javaexec.sh.in, build-aux/ldd.sh.in,
+	build-aux/move-if-change, build-aux/reloc-ldflags,
+	build-aux/relocatable.sh.in, build-aux/x-to-1.in: Fix copyright.
+
+2012-03-11  Bruno Haible  <bruno@clisp.org>
+
+	log2f-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
+	* m4/log2f-ieee.m4: New file.
+	* m4/log2f.m4 (gl_FUNC_LOG2F): If gl_FUNC_LOG2F_IEEE is present, test
+	whether log2f works with a minus zero argument. Replace it if not.
+	* modules/log2f-ieee (Files): Add m4/log2f-ieee.m4.
+	(Depends-on): Add log2-ieee.
+	(configure.ac): Invoke gl_FUNC_LOG2F_IEEE.
+	* doc/posix-functions/log2f.texi: Mention the log2f-ieee module.
+
+	log2-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
+	* m4/log2-ieee.m4: New file.
+	* m4/log2.m4 (gl_FUNC_LOG2): If gl_FUNC_LOG2_IEEE is present, test
+	whether log2 works with a minus zero argument. Replace it if not.
+	* modules/log2-ieee (Files): Add m4/log2-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_LOG2_IEEE.
+	* doc/posix-functions/log2.texi: Mention the log2-ieee module.
+
+	Tests for module 'log2l-ieee'.
+	* modules/log2l-ieee-tests: New file.
+	* tests/test-log2l-ieee.c: New file.
+
+	New module 'log2l-ieee'.
+	* modules/log2l-ieee: New file.
+
+	Tests for module 'log2-ieee'.
+	* modules/log2-ieee-tests: New file.
+	* tests/test-log2-ieee.c: New file.
+
+	New module 'log2-ieee'.
+	* modules/log2-ieee: New file.
+
+	Tests for module 'log2f-ieee'.
+	* modules/log2f-ieee-tests: New file.
+	* tests/test-log2f-ieee.c: New file.
+	* tests/test-log2-ieee.h: New file.
+
+	New module 'log2f-ieee'.
+	* modules/log2f-ieee: New file.
+
+2012-03-11  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'log2l'.
+	* modules/log2l-tests: New file.
+	* tests/test-log2l.c: New file.
+
+	New module 'log2l'.
+	* lib/math.in.h (log2l): New declaration.
+	* lib/log2l.c: New file.
+	* m4/log2l.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log2l is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2L, HAVE_DECL_LOG2L,
+	REPLACE_LOG2L.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG2L, HAVE_DECL_LOG2L,
+	REPLACE_LOG2L.
+	* modules/log2l: New file.
+	* tests/test-math-c++.cc: Check the declaration of log2l.
+	* doc/posix-functions/log2l.texi: Mention the new module and the IRIX
+	and OSF/1 problems.
+
+2012-03-11  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'log2f'.
+	* modules/log2f-tests: New file.
+	* tests/test-log2f.c: New file.
+
+	New module 'log2f'.
+	* lib/math.in.h (log2f): New declaration.
+	* lib/log2f.c: New file.
+	* m4/log2f.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log2f is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2F, HAVE_DECL_LOG2F,
+	REPLACE_LOG2F.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG2F, HAVE_DECL_LOG2F,
+	REPLACE_LOG2F.
+	* modules/log2f: New file.
+	* tests/test-math-c++.cc: Check the declaration of log2f.
+	* doc/posix-functions/log2f.texi: Mention the new module and the IRIX
+	and OSF/1 and Cygwin problems.
+
+2012-03-11  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'log2'.
+	* modules/log2-tests: New file.
+	* tests/test-log2.c: New file.
+	* tests/test-log2.h: New file.
+
+	New module 'log2'.
+	* lib/math.in.h (log2): New declaration.
+	* lib/log2.c: New file.
+	* m4/log2.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log2 is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2, HAVE_DECL_LOG2,
+	REPLACE_LOG2.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG2, HAVE_DECL_LOG2,
+	REPLACE_LOG2.
+	* modules/log2: New file.
+	* tests/test-math-c++.cc: Check the declaration of log2.
+	* doc/posix-functions/log2.texi: Mention the new module and the IRIX
+	and OSF/1 and Cygwin problems.
+
+2012-03-11  Bruno Haible  <bruno@clisp.org>
+
+	exp2* tests: More tests.
+	* tests/test-exp2.h (test_function): Test all integral arguments that
+	don't need to overflow or denormalized numbers.
+	* tests/test-exp2.c (MAX_EXP, MIN_EXP): New macros.
+	* tests/test-exp2f.c (MAX_EXP, MIN_EXP): Likewise.
+	* tests/test-exp2l.c (MAX_EXP, MIN_EXP): Likewise.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	log1pl-ieee: Work around test failure on AIX 7.1.
+	* modules/log1pl-ieee (Depends-on): Add log1p-ieee.
+
+	log1pl-ieee: Work around test failure on IRIX 6.5.
+	* m4/log1pl-ieee.m4: New file.
+	* m4/log1pl.m4 (gl_FUNC_LOG1PL): If gl_FUNC_LOG1PL_IEEE is present,
+	test whether log1pl works with a minus zero argument. Replace it if
+	not.
+	* lib/math.in.h (log1pl): Override if REPLACE_LOG1PL is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1PL.
+	* modules/math (Makefile.am): Substitute REPLACE_LOG1PL.
+	* modules/log1pl (configure.ac): Consider REPLACE_LOG1PL.
+	(Depends-on): Update conditions.
+	* modules/log1pl-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(configure.ac): Invoke gl_FUNC_LOG1PL_IEEE.
+	* doc/posix-functions/log1pl.texi: Mention the log1pl-ieee module.
+
+	log1pf-ieee: Work around test failure on OpenBSD 4.9 and AIX 7.1.
+	* m4/log1pf-ieee.m4: New file.
+	* m4/log1pf.m4 (gl_FUNC_LOG1PF): If gl_FUNC_LOG1PF_IEEE is present,
+	test whether log1pf works with a minus zero argument. Replace it if
+	not.
+	* modules/log1pf-ieee (Files): Add m4/log1pf-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(configure.ac): Invoke gl_FUNC_LOG1PF_IEEE.
+	* doc/posix-functions/log1pf.texi: Mention the log1pf-ieee module.
+
+	log1pf-ieee: Work around test failure on AIX 5.1 and HP-UX 11.
+	* modules/log1pf-ieee (Depends-on): Add log1p-ieee.
+	(configure.ac): Require gl_FUNC_LOG1PF.
+
+	log1p-ieee: Work around test failure on AIX 7.1 and HP-UX 11.
+	* m4/log1p-ieee.m4: New file.
+	* m4/log1p.m4 (gl_FUNC_LOG1P): If gl_FUNC_LOG1P_IEEE is present, test
+	whether log1p works with a minus zero argument. Replace it if not.
+	* lib/math.in.h (log1p): Override if REPLACE_LOG1P is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1P.
+	* modules/math (Makefile.am): Substitute REPLACE_LOG1P.
+	* modules/log1p (configure.ac): Consider REPLACE_LOG1P.
+	(Depends-on): Update conditions.
+	* modules/log1p-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(configure.ac): Invoke gl_FUNC_LOG1P_IEEE.
+	* doc/posix-functions/log1p.texi: Mention the log1p-ieee module.
+
+	Tests for module 'log1pl-ieee'.
+	* modules/log1pl-ieee-tests: New file.
+	* tests/test-log1pl-ieee.c: New file.
+
+	New module 'log1pl-ieee'.
+	* modules/log1pl-ieee: New file.
+
+	Tests for module 'log1p-ieee'.
+	* modules/log1p-ieee-tests: New file.
+	* tests/test-log1p-ieee.c: New file.
+
+	New module 'log1p-ieee'.
+	* modules/log1p-ieee: New file.
+
+	Tests for module 'log1pf-ieee'.
+	* modules/log1pf-ieee-tests: New file.
+	* tests/test-log1pf-ieee.c: New file.
+	* tests/test-log1p-ieee.h: New file.
+
+	New module 'log1pf-ieee'.
+	* modules/log1pf-ieee: New file.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'log1pl'.
+	* modules/log1pl-tests: New file.
+	* tests/test-log1pl.c: New file.
+
+	New module 'log1pl'.
+	* lib/math.in.h (log1pl): New declaration.
+	* lib/log1pl.c: New file.
+	* m4/log1pl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log1pl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PL, HAVE_LOG1PL.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG1PL, HAVE_LOG1PL.
+	* modules/log1pl: New file.
+	* tests/test-math-c++.cc: Check the declaration of log1pl.
+	* doc/posix-functions/log1pl.texi: Mention the new module.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'log1pf'.
+	* modules/log1pf-tests: New file.
+	* tests/test-log1pf.c: New file.
+
+	New module 'log1pf'.
+	* lib/math.in.h (log1pf): New declaration.
+	* lib/log1pf.c: New file.
+	* m4/log1pf.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log1pf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PF, HAVE_LOG1PF,
+	REPLACE_LOG1PF.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG1PF, HAVE_LOG1PF,
+	REPLACE_LOG1PF.
+	* modules/log1pf: New file.
+	* tests/test-math-c++.cc: Check the declaration of log1pf.
+	* doc/posix-functions/log1pf.texi: Mention the new module.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	log1p tests: More tests.
+	* tests/test-log1p.h: New file.
+	* modules/log1p-tests (Files): Add tests/test-log1p.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_log1p_SOURCES.
+	* tests/test-log1p.c: Include <float.h> and test-log1p.h.
+	(main): Invoke test_function.
+
+	log1p: Provide replacement for Minix and MSVC.
+	* lib/math.in.h (log1p): New declaration.
+	* lib/log1p.c: New file.
+	* m4/log1p.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log1p is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1P, HAVE_LOG1P.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG1P, HAVE_LOG1P.
+	* modules/log1p (Files): Add lib/log1p.c, m4/log1p.m4.
+	(Depends-on): Add math, isnand, log, round.
+	(configure.ac): Invoke gl_FUNC_LOG1P. Arrange to compile replacement if
+	HAVE_LOG1P is 0.
+	* tests/test-math-c++.cc: Check the declaration of log1p.
+	* doc/posix-functions/log1p.texi: Mention the replacement.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	math tests: Small simplification.
+	* tests/test-exp.h (test_function): Use the same err_bound for
+	'double' on platforms with sizeof (long double) == sizeof (double)
+	than on platforms with sizeof (long double) > sizeof (double).
+	* tests/test-exp2.h (test_function): Likewise.
+	* tests/test-expm1.h (test_function): Likewise.
+	* tests/test-log.h (test_function): Likewise.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	Fix some comments.
+	* lib/expl.c: Fix an ambiguous comment.
+	* lib/expm1.c: Likewise.
+	* lib/expm1l.c: Likewise.
+	* lib/exp2.c: Likewise.
+	* lib/exp2l.c: Likewise.
+
+2012-03-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: allow inclusion of <regex.h> before <limits.h>
+	Without this patch, portable programs had to include <limits.h> before
+	<regex.h> if they wanted a consistent value for RE_DUP_MAX.
+	I ran into this problem with a test version of GNU grep on Solaris 8.
+	* lib/regex.h: Include <limits.h> if _REGEX_INCLUDE_LIMITS_H.
+	This is done conditionally so that this change can be merged
+	back to glibc.
+	* m4/regex.m4 (gl_REGEX): Define _REGEX_INCLUDE_LIMITS_H if
+	using the included regex.
+
+	fts: depend on fdopendir
+	* modules/fts (Depends-on): Depend on fdopendir.  This is needed
+	on Solaris 8, at least, since it lacks fdopendir.  Evidently the
+	problem was introduced when fdopendir was split out.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	Remove unused variables.
+	* m4/fmodf.m4 (gl_FUNC_FMODF): Remove unused variable 'i'.
+	* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	isnanf-nolibm: Fix last commit.
+	* lib/isnanf-nolibm.h [IRIX]: Don't include <ieeefp.h>. Declare isnanf.
+
+	isnanf-nolibm: Make it work on IRIX 6.5 with cc.
+	* lib/isnanf-nolibm.h [IRIX]: Include <ieeefp.h>.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	logf-ieee: Work around test failure on NetBSD 5.1.
+	* m4/logf-ieee.m4: New file.
+	* m4/logf.m4 (gl_FUNC_LOGF): If gl_FUNC_LOGF_IEEE is present, test
+	whether logf works with a negative argument. Replace it if not.
+	* lib/logf.c (logf): For negative arguments, return NaN.
+	* modules/logf-ieee (Files): Add m4/logf-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_LOGF_IEEE.
+	* doc/posix-functions/logf.texi: Mention the logf-ieee module.
+
+	logf-ieee: Work around test failure on Solaris 9.
+	* modules/logf-ieee (Depends-on): Add log-ieee.
+	(configure.ac): Require gl_FUNC_LOGF.
+
+	log-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
+	* m4/log-ieee.m4: New file.
+	* m4/log.m4 (gl_FUNC_LOG): If gl_FUNC_LOG_IEEE is present, test whether
+	log works with a negative argument. Replace it if not.
+	* lib/log.c (log): For negative arguments, return NaN.
+	* modules/log-ieee (Files): Add m4/log-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_LOG_IEEE.
+	* doc/posix-functions/log.texi: Mention the log-ieee module.
+
+	Tests for module 'logl-ieee'.
+	* modules/logl-ieee-tests: New file.
+	* tests/test-logl-ieee.c: New file.
+
+	New module 'logl-ieee'.
+	* modules/logl-ieee: New file.
+
+	Tests for module 'log-ieee'.
+	* modules/log-ieee-tests: New file.
+	* tests/test-log-ieee.c: New file.
+
+	New module 'log-ieee'.
+	* modules/log-ieee: New file.
+
+	Tests for module 'logf-ieee'.
+	* modules/logf-ieee-tests: New file.
+	* tests/test-logf-ieee.c: New file.
+	* tests/test-log-ieee.h: New file.
+
+	New module 'logf-ieee'.
+	* modules/logf-ieee: New file.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	log: Fix bug introduced on 2012-03-09.
+	* m4/log.m4 (gl_FUNC_LOG): Require gl_MATH_H_DEFAULTS.
+
+2012-03-10  Pádraig Brady  <P@draigBrady.com>
+
+	timer-time: link explicitly with pthreads on glibc
+	* m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
+	to support static linking, when newer glibc is
+	detected, as that contains pthread emulation of
+	POSIX timer functions where required.
+	* modules/timer-time: Depend on threadlib to
+	pull in the appropriate library to link.
+
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	log* tests: More tests.
+	* tests/test-log.h: New file.
+	* tests/test-log.c: Include <float.h>, minus-zero.h, test-log.h.
+	(main): Invoke test_function.
+	* tests/test-logf.c: Include <float.h>, minus-zero.h, test-log.h.
+	(main): Invoke test_function.
+	* tests/test-logl.c: Include <float.h>, minus-zero.h, test-log.h.
+	(main): Invoke test_function.
+	* modules/log-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
+	tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_log_SOURCES.
+	* modules/logf-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
+	tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_logf_SOURCES.
+	* modules/logl-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
+	tests/randoml.c.
+	(Depends-on): Add 'float'.
+	(Makefile.am): Add randoml.c to test_logl_SOURCES.
+
+2012-03-09  Bruno Haible  <bruno@clisp.org>
+
+	logl: Work around OSF/1 5.1 bug.
+	* lib/math.in.h (logl): Override if REPLACE_LOGL is 1.
+	* lib/logl.c (logl): If logl exists, use it and provide just the
+	workaround.
+	* m4/logl.m4 (gl_FUNC_LOGL_WORKS): New macro.
+	(gl_FUNC_LOGL): Invoke it. Set REPLACE_LOGL.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGL.
+	* modules/math (Makefile.am): Substitute REPLACE_LOGL.
+	* modules/logl (configure.ac): Consider REPLACE_LOGL.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/logl.texi: Mention the OSF/1 5.1 problem.
+
+2012-03-09  Bruno Haible  <bruno@clisp.org>
+
+	logf: Work around OSF/1 5.1 bug.
+	* lib/math.in.h (logf): Override if REPLACE_LOGF is 1.
+	* lib/logf.c (logf): If logf exists, use it and provide just the
+	workaround.
+	* m4/logf.m4 (gl_FUNC_LOGF_WORKS): New macro.
+	(gl_FUNC_LOGF): Invoke it. Set REPLACE_LOGF.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGF.
+	* modules/math (Makefile.am): Substitute REPLACE_LOGF.
+	* modules/logf (configure.ac): Consider REPLACE_LOGF.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/logf.texi: Mention the OSF/1 5.1 problem.
+
+2012-03-09  Bruno Haible  <bruno@clisp.org>
+
+	log: Work around OSF/1 5.1 bug.
+	* lib/math.in.h (log): New declaration.
+	* lib/log.c: New file.
+	* m4/log.m4 (gl_FUNC_LOG_WORKS): New macro.
+	(gl_FUNC_LOG): Invoke it. Set REPLACE_LOG.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG, REPLACE_LOG.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG, REPLACE_LOG.
+	* modules/log (Files): Add lib/log.c.
+	(Depends-on): Add math.
+	(configure.ac): If REPLACE_LOG is 1, compile an override.
+	* tests/test-math-c++.cc: Check the declaration of log.
+	* doc/posix-functions/log.texi: Mention the OSF/1 5.1 problem.
+
+2012-03-09  Jim Meyering  <meyering@redhat.com>
+
+	readtokens.c: adjust wording in a comment
+	* lib/readtokens.c: Insert omitted "that" in a comment.
+
+2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+	modechange: add notations +40, 00440, etc.
+	* lib/modechange.c (mode_compile): Support new notations
+	+40, -40, =440, 00440.  See <http://debbugs.gnu.org/8391>.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	exp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5.
+	* m4/exp2l-ieee.m4: New file.
+	* m4/exp2l.m4 (gl_FUNC_EXP2L): If gl_FUNC_EXP2L_IEEE is present,
+	test whether exp2l works with a NaN argument and with a negative
+	infinity argument. Replace it if not.
+	* lib/math.in.h (exp2l): Override if REPLACE_EXP2L is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXP2L.
+	* modules/math (Makefile.am): Substitute REPLACE_EXP2L.
+	* modules/exp2l (configure.ac): Consider REPLACE_EXP2L.
+	(Depends-on): Update conditions.
+	* modules/exp2l-ieee (Files): Add m4/exp2l-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_EXP2L_IEEE.
+	* doc/posix-functions/exp2l.texi: Mention the exp2l-ieee module.
+
+	Tests for module 'exp2l-ieee'.
+	* modules/exp2l-ieee-tests: New file.
+	* tests/test-exp2l-ieee.c: New file.
+
+	New module 'exp2l-ieee'.
+	* modules/exp2l-ieee: New file.
+
+	Tests for module 'exp2-ieee'.
+	* modules/exp2-ieee-tests: New file.
+	* tests/test-exp2-ieee.c: New file.
+
+	New module 'exp2-ieee'.
+	* modules/exp2-ieee: New file.
+
+	Tests for module 'exp2f-ieee'.
+	* modules/exp2f-ieee-tests: New file.
+	* tests/test-exp2f-ieee.c: New file.
+	* tests/test-exp2-ieee.h: New file.
+
+	New module 'exp2f-ieee'.
+	* modules/exp2f-ieee: New file.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'exp2l'.
+	* modules/exp2l-tests: New file.
+	* tests/test-exp2l.c: New file.
+
+	New module 'exp2l'.
+	* lib/math.in.h (exp2l): New declaration.
+	* lib/exp2l.c: New file.
+	* lib/expl-table.c: New file, extracted from lib/expl.c.
+	* lib/expl.c (gl_expl_table): New declaration.
+	(expl): Remove expl_table. Update reference.
+	* m4/exp2l.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether exp2l is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2L, HAVE_DECL_EXP2L.
+	* modules/math (Makefile.am): Substitute GNULIB_EXP2L, HAVE_DECL_EXP2L.
+	* modules/exp2l: New file.
+	* modules/expl (Files): Add lib/expl-table.c.
+	(configure.ac): Compile also expl-table.c.
+	* tests/test-math-c++.cc: Check the declaration of exp2l.
+	* doc/posix-functions/exp2l.texi: Mention the new module and the IRIX
+	problem.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'exp2f'.
+	* modules/exp2f-tests: New file.
+	* tests/test-exp2f.c: New file.
+
+	New module 'exp2f'.
+	* lib/math.in.h (exp2f): New declaration.
+	* lib/exp2f.c: New file.
+	* m4/exp2f.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether exp2f is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2F, HAVE_DECL_EXP2F.
+	* modules/math (Makefile.am): Substitute GNULIB_EXP2F, HAVE_DECL_EXP2F.
+	* modules/exp2f: New file.
+	* tests/test-math-c++.cc: Check the declaration of exp2f.
+	* doc/posix-functions/exp2f.texi: Mention the new module and the
+	IRIX problem.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'exp2'.
+	* modules/exp2-tests: New file.
+	* tests/test-exp2.c: New file.
+	* tests/test-exp2.h: New file.
+
+	New module 'exp2'.
+	* lib/math.in.h (exp2): New declaration.
+	* lib/exp2.c: New file.
+	* m4/exp2.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether exp2 is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2, HAVE_DECL_EXP2,
+	REPLACE_EXP2.
+	* modules/math (Makefile.am): Substitute GNULIB_EXP2, HAVE_DECL_EXP2,
+	REPLACE_EXP2.
+	* modules/exp2: New file.
+	* tests/test-math-c++.cc: Check the declaration of exp2.
+	* doc/posix-functions/exp2.texi: Mention the new module and the IRIX
+	and OpenBSD problems.
+
+2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+	savedir: fix comment typo
+	* lib/savedir.c (savedirstream): Fix typo in comment.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	test-readtokens.c: use const; remove unwarranted cast
+	* tests/test-readtokens.c: Declare delim to be const, to avoid a cast.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	fmal: Avoid compilation error on AIX.
+	* lib/math.in.h (fmal): Undefine macro before declaration. Needed on
+	AIX 5.2..7.1.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	fma, fmaf, fmal: Override undeclared system functions on IRIX 6.5.
+	* m4/fma.m4 (gl_FUNC_FMA): If fma() exists but is not declared,
+	arrange to set REPLACE_FMA=1, not HAVE_FMA=0.
+	* m4/fmaf.m4 (gl_FUNC_FMAF): If fmaf() exists but is not declared,
+	arrange to set REPLACE_FMAF=1, not HAVE_FMAF=0.
+	* m4/fmal.m4 (gl_FUNC_FMAL): If fmal() exists but is not declared,
+	arrange to set REPLACE_FMAL=1, not HAVE_FMAL=0.
+
+2012-03-08  Bruno Haible  <bruno@clisp.org>
+
+	remainderf: Override buggy system function on IRIX 6.5.
+	* m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): New macro.
+	(gl_FUNC_REMAINDERF): Invoke it. Don't assume remainderf() is declared
+	when it exists.
+	* doc/posix-functions/remainderf.texi: Mention the IRIX problems.
+
+2012-03-08  Jim Meyering  <meyering@redhat.com>
+
+	test-readtokens.c: avoid const-related compilation warnings
+	* tests/test-readtokens.c: Avoid const-related compilation warnings.
+
+2012-03-07  Jim Meyering  <meyering@redhat.com>
+	    Bruno Haible  <bruno@clisp.org>
+
+	frexp-nolibm, frexpl-nolibm tests: Fix bug introduced on 2012-03-03.
+	* modules/frexp-nolibm-tests (Files): Add tests/test-frexp.h,
+	tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_frexp_nolibm_SOURCES.
+	* modules/frexpl-nolibm-tests (Files): Add tests/test-frexp.h,
+	tests/randoml.c.
+	(Makefile.am): Add randoml.c to test_frexpl_nolibm_SOURCES.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	expm1l: Avoid compilation error on AIX.
+	* lib/math.in.h (expm1l): Undefine macro before declaration. Needed on
+	AIX 5.2..7.1.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	expm1l: Don't override undeclared system function on IRIX 6.5.
+	* lib/math.in.h (expm1l): Test HAVE_DECL_EXPM1L, not HAVE_EXPM1L.
+	* m4/expm1l.m4 (gl_FUNC_EXPM1L): Don't assume expm1l() is declared when
+	it exists. Set HAVE_DECL_EXPM1L.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_EXPM1L, not
+	HAVE_EXPM1L.
+	* modules/math (Makefile.am): Substitute HAVE_DECL_EXPM1L, not
+	HAVE_EXPM1L.
+	* doc/posix-functions/expm1l.texi: Mention missing declaration problem.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	remainderl: Don't override undeclared system function on IRIX 6.5.
+	* lib/math.in.h (remainderl): Test HAVE_DECL_REMAINDERL, not
+	HAVE_REMAINDERL.
+	* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Don't assume remainderl() is
+	declared when it exists. Set HAVE_DECL_REMAINDERL.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_REMAINDERL,
+	not HAVE_REMAINDERL.
+	* modules/math (Makefile.am): Substitute HAVE_DECL_REMAINDERL, not
+	HAVE_REMAINDERL.
+	* doc/posix-functions/remainderl.texi: Mention missing declaration
+	problem.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	rintf: Don't override undeclared system function on IRIX 6.5.
+	* lib/math.in.h (rintf): Test HAVE_DECL_RINTF, not HAVE_RINTF.
+	* m4/rintf.m4 (gl_FUNC_RINTF): Don't assume rintf() is declared when it
+	exists. Set HAVE_DECL_RINTF.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_RINTF, not
+	HAVE_RINTF.
+	* modules/math (Makefile.am): Substitute HAVE_DECL_RINTF, not
+	HAVE_RINTF.
+	* doc/posix-functions/rintf.texi: Mention missing declaration problem.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	roundl: Avoid compilation error on AIX.
+	* lib/math.in.h (roundl): Undefine macro before declaration. Needed on
+	AIX 5.2..7.1.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	roundl: Don't override undeclared system function on IRIX 6.5.
+	* m4/roundl.m4 (gl_FUNC_ROUNDL): Search for roundl() in the libraries
+	also when it is not declared. Set HAVE_ROUNDL. For replacement code,
+	test HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
+	* modules/roundl (configure.ac): For replacement code, test
+	HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/roundl.texi: Mention the IRIX problem.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	roundf: Don't override undeclared system function on IRIX 6.5.
+	* m4/roundf.m4 (gl_FUNC_ROUNDF): Search for roundf() in the libraries
+	also when it is not declared. Set HAVE_ROUNDF. For replacement code,
+	test HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
+	* modules/roundf (configure.ac): For replacement code, test
+	HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
+	(Depends-on): Update conditions.
+	* modules/roundf-ieee (Depends-on): Update conditions.
+	* doc/posix-functions/roundf.texi: Mention the IRIX problem.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	round: Don't override undeclared system function on IRIX 6.5.
+	* m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an optional third
+	argument.
+	* m4/round.m4 (gl_FUNC_ROUND): Search for round() in the libraries
+	also when it is not declared. Set HAVE_ROUND. For replacement code,
+	test HAVE_ROUND, not HAVE_DECL_ROUND.
+	* modules/round (configure.ac): For replacement code, test HAVE_ROUND,
+	not HAVE_DECL_ROUND.
+	(Depends-on): Update conditions.
+	* modules/round-ieee (Depends-on): Update conditions.
+	* doc/posix-functions/round.texi: Mention the IRIX problem.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	copysignf: Don't override undeclared system function on IRIX 6.5.
+	* lib/math.in.h (copysignf): Test HAVE_DECL_COPYSIGNF, not
+	HAVE_COPYSIGNF.
+	* m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Don't assume copysignf() is
+	declared when it exists. Set HAVE_DECL_COPYSIGNF.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_COPYSIGNF,
+	not HAVE_COPYSIGNF.
+	* modules/math (Makefile.am): Substitute HAVE_DECL_COPYSIGNF, not
+	HAVE_COPYSIGNF.
+	* doc/posix-functions/copysignf.texi: Mention missing declaration
+	problem.
+
+2012-03-07  Jim Meyering  <meyering@redhat.com>
+
+	readtokens: add tests
+	* modules/readtokens-tests: New file.
+	* tests/test-readtokens.c: New file.
+
+2012-03-07  Jim Meyering  <meyering@redhat.com>
+
+	quotearg: the module must now include quote.h
+	With commit v0.0-7133-g6417476, quotearg.c includes "quote.h".
+	So must the module.
+	* modules/quotearg (Files): Add quote.h.
+
+2012-03-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+	readtokens: avoid core dumps with unusual calling patterns
+	Reported by Xu Zhongxing in <http://debbugs.gnu.org/10953>.
+	* lib/readtokens.c: Include limits.h.
+	(word, bits_per_word, get_nth_bit, set_nth_bit): New.
+	(readtoken): Don't cache the delimiters; the cache code was buggy
+	if !delim && saved_delim, or if the new n_delim differs from the old.
+	Also, it wasn't thread-safe.
+
+2012-03-07  Bruno Haible  <bruno@clisp.org>
+
+	quote: Adhere to common module description layout.
+	* modules/quote (Makefile.am): Add back empty section.
+
+2012-03-06  Akim Demaille  <demaille@gostai.com>
+
+	quote: fuse into quotearg
+	This patch is made for the benefit of Bison.
+	quote does not leave the choice of the quoting style to the user.
+	quoting_style provides poor customizability, yet quoting_options,
+	which is very rich, is hidden inside quotearg.c.  So in order to
+	allow quote customization, move its implementation to quotearg.c.
+	* lib/quote.c: Remove.
+	* modules/quote: Adjust.
+	* lib/quotearg.c (quoting_options_from_style): Fix a compiler
+	warning: provide all the members of literal structs.
+	(quote_quoting_options): New.
+	(quote, quote_n): Import implementation from quote.c.
+	* lib/quote.h: Import the comments from quote.c.
+	(quote_quoting_options): New.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'expm1l-ieee'.
+	* modules/expm1l-ieee-tests: New file.
+	* tests/test-expm1l-ieee.c: New file.
+
+	New module 'expm1l-ieee'.
+	* modules/expm1l-ieee: New file.
+
+	Tests for module 'expm1f-ieee'.
+	* modules/expm1f-ieee-tests: New file.
+	* tests/test-expm1f-ieee.c: New file.
+
+	New module 'expm1f-ieee'.
+	* modules/expm1f-ieee: New file.
+
+	Tests for module 'expm1-ieee'.
+	* modules/expm1-ieee-tests: New file.
+	* tests/test-expm1-ieee.c: New file.
+	* tests/test-expm1-ieee.h: New file.
+
+	New module 'expm1-ieee'.
+	* modules/expm1-ieee: New file.
+	* m4/expm1-ieee.m4: New file.
+	* m4/expm1.m4 (gl_FUNC_EXPM1): If gl_FUNC_EXPM1_IEEE is present, test
+	whether expm1 works with a minus zero argument. Replace it if not.
+	* lib/math.in.h (expm1): Override if REPLACE_EXPM1 is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1.
+	* modules/math (Makefile.am): Substitute REPLACE_EXPM1.
+	* modules/expm1 (configure.ac): Consider REPLACE_EXPM1.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/expm1.texi: Mention the expm1-ieee module and the
+	AIX problem.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	Work around expm1f bug on IRIX 6.5.
+	* lib/math.in.h (expm1f): Override if REPLACE_EXPM1F is 1.
+	* m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): New macro.
+	(gl_FUNC_EXPM1F): Invoke it. Set REPLACE_EXPM1F to 1 if expm1f() does
+	not work.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1F.
+	* modules/math (Makefile.am): Substitute REPLACE_EXPM1F.
+	* modules/expm1f (configure.ac): Consider REPLACE_EXPM1F.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/expm1f.texi: Mention the IRIX 6.5 bug.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'expm1l'.
+	* modules/expm1l-tests: New file.
+	* tests/test-expm1l.c: New file.
+
+	New module 'expm1l'.
+	* lib/math.in.h (expm1l): New declaration.
+	* lib/expm1l.c: New file.
+	* m4/expm1l.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether expm1l is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1L, HAVE_EXPM1L.
+	* modules/math (Makefile.am): Substitute GNULIB_EXPM1L, HAVE_EXPM1L.
+	* modules/expm1l: New file.
+	* tests/test-math-c++.cc: Check the declaration of expm1l.
+	* doc/posix-functions/expm1l.texi: Mention the new module.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'expm1f'.
+	* modules/expm1f-tests: New file.
+	* tests/test-expm1f.c: New file.
+
+	New module 'expm1f'.
+	* lib/math.in.h (expm1f): New declaration.
+	* lib/expm1f.c: New file.
+	* m4/expm1f.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether expm1f is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1F, HAVE_EXPM1F.
+	* modules/math (Makefile.am): Substitute GNULIB_EXPM1F, HAVE_EXPM1F.
+	* modules/expm1f: New file.
+	* tests/test-math-c++.cc: Check the declaration of expm1f.
+	* doc/posix-functions/expm1f.texi: Mention the new module.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'expm1'.
+	* modules/expm1-tests: New file.
+	* tests/test-expm1.c: New file.
+	* tests/test-expm1.h: New file.
+
+	New module 'expm1'.
+	* lib/math.in.h (expm1): New declaration.
+	* lib/expm1.c: New file.
+	* m4/expm1.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether expm1 is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1, HAVE_EXPM1.
+	* modules/math (Makefile.am): Substitute GNULIB_EXPM1, HAVE_EXPM1.
+	* modules/expm1: New file.
+	* tests/test-math-c++.cc: Check the declaration of expm1.
+	* doc/posix-functions/expm1.texi: Mention the new module.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	math: Ensure declarations of math functions.
+	* modules/acosf (Depends-on): Add 'extensions'.
+	* modules/asinf (Depends-on): Likewise.
+	* modules/atan2f (Depends-on): Likewise.
+	* modules/atanf (Depends-on): Likewise.
+	* modules/cbrt (Depends-on): Likewise.
+	* modules/cbrtf (Depends-on): Likewise.
+	* modules/cbrtl (Depends-on): Likewise.
+	* modules/copysignf (Depends-on): Likewise.
+	* modules/copysignl (Depends-on): Likewise.
+	* modules/cosf (Depends-on): Likewise.
+	* modules/coshf (Depends-on): Likewise.
+	* modules/expf (Depends-on): Likewise.
+	* modules/fabsf (Depends-on): Likewise.
+	* modules/fabsl (Depends-on): Likewise.
+	* modules/fmaf (Depends-on): Likewise.
+	* modules/fmal (Depends-on): Likewise.
+	* modules/fmodf (Depends-on): Likewise.
+	* modules/fmodl (Depends-on): Likewise.
+	* modules/frexpf (Depends-on): Likewise.
+	* modules/frexpl (Depends-on): Likewise.
+	* modules/hypot (Depends-on): Likewise.
+	* modules/hypotf (Depends-on): Likewise.
+	* modules/hypotl (Depends-on): Likewise.
+	* modules/ldexpf (Depends-on): Likewise.
+	* modules/ldexpl (Depends-on): Likewise.
+	* modules/log10f (Depends-on): Likewise.
+	* modules/log10l (Depends-on): Likewise.
+	* modules/log1p (Depends-on): Likewise.
+	* modules/logb (Depends-on): Likewise.
+	* modules/logf (Depends-on): Likewise.
+	* modules/modff (Depends-on): Likewise.
+	* modules/modfl (Depends-on): Likewise.
+	* modules/powf (Depends-on): Likewise.
+	* modules/remainderf (Depends-on): Likewise.
+	* modules/remainderl (Depends-on): Likewise.
+	* modules/rintf (Depends-on): Likewise.
+	* modules/rintl (Depends-on): Likewise.
+	* modules/sinf (Depends-on): Likewise.
+	* modules/sinhf (Depends-on): Likewise.
+	* modules/sqrtf (Depends-on): Likewise.
+	* modules/tanf (Depends-on): Likewise.
+	* modules/tanhf (Depends-on): Likewise.
+	* m4/acosf.m4 (gl_FUNC_ACOSF): Require gl_USE_SYSTEM_EXTENSIONS.
+	* m4/asinf.m4 (gl_FUNC_ASINF): Likewise.
+	* m4/atan2f.m4 (gl_FUNC_ATAN2F): Likewise.
+	* m4/atanf.m4 (gl_FUNC_ATANF): Likewise.
+	* m4/cbrt.m4 (gl_FUNC_CBRT): Likewise.
+	* m4/cbrtf.m4 (gl_FUNC_CBRTF): Likewise.
+	* m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
+	* m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Likewise.
+	* m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Likewise.
+	* m4/cosf.m4 (gl_FUNC_COSF): Likewise.
+	* m4/coshf.m4 (gl_FUNC_COSHF): Likewise.
+	* m4/expf.m4 (gl_FUNC_EXPF): Likewise.
+	* m4/fabsf.m4 (gl_FUNC_FABSF): Likewise.
+	* m4/fabsl.m4 (gl_FUNC_FABSL): Likewise.
+	* m4/fmaf.m4 (gl_FUNC_FMAF): Likewise.
+	* m4/fmal.m4 (gl_FUNC_FMAL): Likewise.
+	* m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
+	* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
+	* m4/frexpf.m4 (gl_FUNC_FREXPF): Likewise.
+	* m4/frexpl.m4 (gl_FUNC_FREXPL): Likewise.
+	* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
+	* m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
+	* m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
+	* m4/ldexpf.m4 (gl_FUNC_LDEXPF): Likewise.
+	* m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
+	* m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
+	* m4/log10l.m4 (gl_FUNC_LOF10L): Likewise.
+	* m4/logb.m4 (gl_FUNC_LOGB): Likewise.
+	* m4/logf.m4 (gl_FUNC_LOGF): Likewise.
+	* m4/modff.m4 (gl_FUNC_MODFF): Likewise.
+	* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
+	* m4/powf.m4 (gl_FUNC_POWF): Likewise.
+	* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
+	* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
+	* m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
+	* m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
+	* m4/sinf.m4 (gl_FUNC_SINF): Likewise.
+	* m4/sinhf.m4 (gl_FUNC_SINHF): Likewise.
+	* m4/sqrtf.m4 (gl_FUNC_SQRTF): Likewise.
+	* m4/tanf.m4 (gl_FUNC_TANF): Likewise.
+	* m4/tanhf.m4 (gl_FUNC_TANHF): Likewise.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	math: Update module names in warnings.
+	* lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
+	tanl): Use specific module name in warn-on-use warning.
+
+2012-03-06  Bruno Haible  <bruno@clisp.org>
+
+	expl: Simplify computation.
+	* lib/expl.c (expl): Simplify computation of exp_y. Fix comment.
+
+2012-03-05  Bruno Haible  <bruno@clisp.org>
+
+	exp* tests: More tests.
+	* tests/test-exp.h: New file.
+	* tests/test-exp.c: Include <float.h> and test-exp.h.
+	(main): Invoke test_function.
+	* tests/test-expf.c: Include <float.h> and test-exp.h.
+	(main): Invoke test_function.
+	* tests/test-expl.c: Include <float.h> and test-exp.h.
+	(main): Invoke test_function.
+	* modules/exp-tests (Files): Add tests/test-exp.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_exp_SOURCES.
+	* modules/expf-tests (Files): Add tests/test-exp.h, tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_expf_SOURCES.
+	* modules/expl-tests (Files): Add tests/test-exp.h, tests/randoml.c.
+	(Depends-on): Add 'float'.
+	(Makefile.am): Add randoml.c to test_expl_SOURCES.
+
+	expl: Fix precision of computed result.
+	* lib/expl.c: Completely rewritten.
+	* modules/expl (Depends-on): Add isnanl, roundl, ldexpl. Remove floorl.
+	(Maintainer): Add me.
+	* m4/expl.m4 (gl_FUNC_EXPL): Update computation of EXPL_LIBM.
+
+2012-03-05  Bruno Haible  <bruno@clisp.org>
+
+	cbrt* tests: More tests.
+	* tests/test-cbrt.h: New file.
+	* tests/test-cbrt.c: Include <float.h> and test-cbrt.h.
+	(main): Invoke test_function.
+	* tests/test-cbrtf.c: Include <float.h> and test-cbrt.h.
+	(main): Invoke test_function.
+	* tests/test-cbrtl.c: Include <float.h> and test-cbrt.h.
+	(main): Invoke test_function.
+	* modules/cbrt-tests (Files): Add tests/test-cbrt.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_cbrt_SOURCES.
+	* modules/cbrtf-tests (Files): Add tests/test-cbrt.h, tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_cbrtf_SOURCES.
+	* modules/cbrtl-tests (Files): Add tests/test-cbrt.h, tests/randoml.c.
+	(Depends-on): Add 'float'.
+	(Makefile.am): Add randoml.c to test_cbrtl_SOURCES.
+
+2012-03-05  Bruno Haible  <bruno@clisp.org>
+
+	hypot* tests: More tests.
+	* tests/test-hypot.h: New file, partially extracted from
+	tests/test-hypotl.c.
+	* tests/test-hypot.c: Include test-hypot.h.
+	(main): Invoke test_function.
+	* tests/test-hypotf.c: Include test-hypot.h.
+	(main): Invoke test_function.
+	* tests/test-hypotl.c: Include fpucw.h and test-hypot.h.
+	(main): Invoke BEGIN_LONG_DOUBLE_ROUNDING and test_function.
+	* modules/hypot-tests (Files): Add tests/test-hypot.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_hypot_SOURCES.
+	* modules/hypotf-tests (Files): Add tests/test-hypot.h,
+	tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_hypotf_SOURCES.
+	* modules/hypotl-tests (Files): Add tests/test-hypot.h,
+	tests/randoml.c.
+	(Depends-on): Add 'fpucw', 'float'.
+	(Makefile.am): Add randoml.c to test_hypotl_SOURCES.
+
+2012-03-05  Bruno Haible  <bruno@clisp.org>
+
+	fpucw: Doc about FreeBSD.
+	* lib/fpucw.h: Mention FreeBSD in comments.
+
+2012-03-04  Bruno Haible  <bruno@clisp.org>
+
+	sqrt* tests: More tests.
+	* tests/test-sqrt.h: New file.
+	* tests/test-sqrt.c: Include <float.h> and test-sqrt.h.
+	(main): Invoke test_function.
+	* tests/test-sqrtf.c: Include <float.h> and test-sqrt.h.
+	(main): Invoke test_function.
+	* tests/test-sqrtl.c: Include <float.h> and test-sqrt.h.
+	(main): Invoke test_function.
+	* modules/sqrt-tests (Files): Add tests/test-sqrt.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_sqrt_SOURCES.
+	* modules/sqrtf-tests (Files): Add tests/test-sqrt.h, tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_sqrtf_SOURCES.
+	* modules/sqrtl-tests (Files): Add tests/test-sqrt.h, tests/randoml.c.
+	(Depends-on): Add 'float'.
+	(Makefile.am): Add randoml.c to test_sqrtl_SOURCES.
+
+2012-03-04  Bruno Haible  <bruno@clisp.org>
+
+	remainder* tests: More tests.
+	* tests/test-remainder.h: New file, based on tests/test-fmod.h.
+	* tests/test-remainder.c: Include <float.h> and test-remainder.h.
+	(main): Invoke test_function.
+	* tests/test-remainderf.c: Include <float.h> and test-remainder.h.
+	(main): Invoke test_function.
+	* tests/test-remainderl.c: Include <float.h> and test-remainder.h.
+	(main): Invoke test_function.
+	* modules/remainder-tests (Files): Add tests/test-remainder.h,
+	tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_remainder_SOURCES.
+	* modules/remainderf-tests (Files): Add tests/test-remainder.h,
+	tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_remainderf_SOURCES.
+	* modules/remainderl-tests (Files): Add tests/test-remainder.h,
+	tests/randoml.c.
+	(Depends-on): Add 'float'.
+	(Makefile.am): Add randoml.c to test_remainderl_SOURCES.
+
+2012-03-04  Bruno Haible  <bruno@clisp.org>
+
+	remainder, remainderf, remainderl: Fix computation for large quotients.
+	* lib/remainder.c: Completely rewritten.
+	* lib/remainderf.c (remainderf): Use implementation of remainder.c with
+	USE_FLOAT.
+	* lib/remainderl.c (remainderl): Use implementation of remainder.c with
+	USE_LONG_DOUBLE.
+	* modules/remainder (Depends-on): Add isfinite, signbit, fabs, fmod,
+	isnand, isinf. Remove round, fma.
+	* modules/remainderf (Files): Add lib/remainder.c.
+	(Depends-on): Add isfinite, signbit, fabsf, fmodf, isnanf, isinf.
+	Remove roundf, fmaf.
+	* modules/remainderl (Files): Add lib/remainder.c.
+	(Depends-on): Add float, isfinite, signbit, fabsl, fmodl, isnanl,
+	isinf. Remove roundl, fmal.
+	* m4/remainder.m4 (gl_FUNC_REMAINDER): Update computation of
+	REMAINDER_LIBM.
+	* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Update computation of
+	REMAINDERF_LIBM.
+	* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Update computation of
+	REMAINDERL_LIBM.
+
+2012-03-04  Bruno Haible  <bruno@clisp.org>
+
+	fmod* tests: More tests.
+	* tests/test-fmod.h (my_ldexp): New function.
+	(test_function): Reduce amount of random numbers to test. Add tests
+	of very large quotients x / y.
+	* tests/test-fmod.c (MAX_EXP): New macro.
+	* tests/test-fmodf.c (MAX_EXP): Likewise.
+	* tests/test-fmodl.c (MAX_EXP): Likewise.
+
+2012-03-04  Bruno Haible  <bruno@clisp.org>
+
+	fmod, fmodl: Fix computation for large quotients x / y.
+	* lib/fmod.c: Completely rewritten.
+	* lib/fmodl.c (fmodl): Use implementation of fmod.c with
+	USE_LONG_DOUBLE.
+	* modules/fmod (Depends-on): Add isfinite, signbit, fabs, frexp, ldexp,
+	isnand. Remove fma.
+	* modules/fmodl (Files): Add lib/fmod.c.
+	(Depends-on): Add float, isfinite, signbit, fabsl,
+	frexpl, ldexpl, isnanl. Remove fma.
+	* m4/fmod.m4 (gl_FUNC_FMOD): Update computation of FMOD_LIBM.
+	* m4/fmodl.m4 (gl_FUNC_FMODL): Update computation of FMODL_LIBM.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	fmod* tests: More tests.
+	* tests/test-fmod.h: New file.
+	* tests/test-fmod.c: Include <float.h> and test-fmod.h.
+	(main): Invoke test_function.
+	* tests/test-fmodf.c: Include <float.h> and test-fmod.h.
+	(main): Invoke test_function.
+	* tests/test-fmodl.c: Include <float.h> and test-fmod.h.
+	(main): Invoke test_function.
+	* modules/fmod-tests (Files): Add tests/test-fmod.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_fmod_SOURCES.
+	* modules/fmodf-tests (Files): Add tests/test-fmod.h, tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_fmodf_SOURCES.
+	* modules/fmodl-tests (Files): Add tests/test-fmod.h, tests/randoml.c.
+	(Depends-on): Add 'float'.
+	(Makefile.am): Add randoml.c to test_fmodl_SOURCES.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	rint* tests: More tests.
+	* tests/test-rint.h: New file, partially extracted from
+	tests/test-rintl.c.
+	* tests/test-rint.c: Include test-rint.h.
+	(main): Invoke test_function.
+	* tests/test-rintf.c: Include test-rint.h.
+	(main): Invoke test_function.
+	* tests/test-rintl.c: Include test-rint.h.
+	(main): Invoke test_function.
+	* modules/rint-tests (Files): Add tests/test-rint.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_rint_SOURCES.
+	* modules/rintf-tests (Files): Add tests/test-rint.h, tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_rintf_SOURCES.
+	* modules/rintl-tests (Files): Add tests/test-rint.h, tests/randoml.c.
+	(Makefile.am): Add randoml.c to test_rintl_SOURCES.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	modf* tests: More tests.
+	* tests/test-modf.h: New file.
+	* tests/test-modf.c: Include <float.h> and test-modf.h.
+	(main): Invoke test_function.
+	* tests/test-modff.c: Include <float.h> and test-modf.h.
+	(main): Invoke test_function.
+	* tests/test-modfl.c: Include <float.h> and test-modf.h.
+	(main): Invoke test_function.
+	* modules/modf-tests (Files): Add tests/test-modf.h, tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_modf_SOURCES.
+	* modules/modff-tests (Files): Add tests/test-modf.h, tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_modff_SOURCES.
+	* modules/modfl-tests (Files): Add tests/test-modf.h, tests/randoml.c.
+	(Depends-on): Add 'float'.
+	(Makefile.am): Add randoml.c to test_modfl_SOURCES.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	fabs* tests: More tests.
+	* tests/test-fabs.h: New file, partially extracted from
+	tests/test-fabsl.c.
+	* tests/test-fabs.c (RANDOM): New macro.
+	* tests/test-fabsf.c (RANDOM): New macro.
+	* tests/test-fabsl.c (RANDOM): New macro.
+	* modules/fabs-tests (Files): Add tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_fabs_SOURCES.
+	* modules/fabsf-tests (Files): Add tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_fabsf_SOURCES.
+	* modules/fabsl-tests (Files): Add tests/randoml.c.
+	(Makefile.am): Add randoml.c to test_fabsl_SOURCES.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	ldexp* tests: More tests.
+	* tests/test-ldexp.h (test_function): Add some pseudo-randomized tests.
+	* tests/test-ldexp.c (RANDOM): New macro.
+	* tests/test-ldexpf.c (RANDOM): New macro.
+	* tests/test-ldexpl.c (RANDOM): New macro.
+	* modules/ldexp-tests (Files): Add tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_ldexp_SOURCES.
+	* modules/ldexpf-tests (Files): Add tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_ldexpf_SOURCES.
+	* modules/ldexpl-tests (Files): Add tests/randoml.c.
+	(Makefile.am): Add randoml.c to test_ldexpl_SOURCES.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	frexp* tests: More tests.
+	* tests/test-frexp.h (test_function): Add some pseudo-randomized tests.
+	* tests/test-frexp.c (RANDOM): New macro.
+	* tests/test-frexpf.c (RANDOM): New macro.
+	* tests/test-frexpl.c (RANDOM): New macro.
+	* modules/frexp-tests (Files): Add tests/randomd.c.
+	(Makefile.am): Add randomd.c to test_frexp_SOURCES.
+	* modules/frexpf-tests (Files): Add tests/randomf.c.
+	(Makefile.am): Add randomf.c to test_frexpf_SOURCES.
+	* modules/frexpl-tests (Files): Add tests/randoml.c.
+	(Makefile.am): Add randoml.c to test_frexpl_SOURCES.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	Support for pseudo-random numbers in tests.
+	* tests/randomf.c: New file.
+	* tests/randomd.c: New file.
+	* tests/randoml.c: New file.
+	* tests/macros.h (randomf, randomd, randoml): New declarations.
+
+2012-03-03  Bruno Haible  <bruno@clisp.org>
+
+	frexp* tests: Refactor.
+	* tests/test-frexp.h: New file, extracted from tests/test-frexpl.c.
+	* tests/test-frexp.c: Include and use it.
+	* tests/test-frexpf.c: Likewise.
+	* tests/test-frexpl.c: Likewise.
+	* modules/frexp-tests (Files): Add tests/test-frexp.h.
+	* modules/frexpf-tests (Files): Likewise.
+	* modules/frexpl-tests (Files): Likewise.
+
+2012-03-02  Jim Meyering  <meyering@redhat.com>
+
+	maint: don't specify XZ_OPT=-9ev in dist-related rule
+	Using xz's -9 option is warranted only if you have a very large
+	tarball (see xz's documentation for the sizes vs. presets), and
+	requires 64MiB of memory at decompression time.
+	* top/maint.mk (alpha beta stable): Don't specify XZ_OPT=-9ev.
+	Automake's default of just "-e" is fine.  Override on a
+	per-package basis by setting XZ_OPT e.g., in cfg.mk.
+
+2012-03-01  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: allow announcement for non-gnulib project
+	* maint.mk (announcement): Skip gnulib version if not used.
+
+2012-03-01  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: avoid spurious failure of _sc_search_regexp-using tests
+	* top/maint.mk: Initialize _sc_search_regexp parameters, so that
+	envvar settings cannot interfere.  Otherwise, setting envvars like
+	prohibit=foo require=bar, etc. would cause spurious test failures.
+
+2012-03-01  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: add per-line exclusions to prohibitions
+	* maint.mk (_sc_search_regexp): Add $exclude parameter.
+	(sc_prohibit_strcmp, sc_unmarked_diagnostics)
+	(sc_const_long_option): Use it.
+
+2012-03-01  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'expl-ieee'.
+	* modules/expl-ieee-tests: New file.
+	* tests/test-expl-ieee.c: New file.
+
+	New module 'expl-ieee'.
+	* modules/expl-ieee: New file.
+
+	Tests for module 'exp-ieee'.
+	* modules/exp-ieee-tests: New file.
+	* tests/test-exp-ieee.c: New file.
+
+	New module 'exp-ieee'.
+	* modules/exp-ieee: New file.
+
+	Tests for module 'expf-ieee'.
+	* modules/expf-ieee-tests: New file.
+	* tests/test-expf-ieee.c: New file.
+	* tests/test-exp-ieee.h: New file.
+
+	New module 'expf-ieee'.
+	* modules/expf-ieee: New file.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	cbrtl-ieee: Work around test failure on IRIX 6.5.
+	* m4/cbrtl-ieee.m4: New file.
+	* m4/cbrtl.m4 (gl_FUNC_CBRTL): If gl_FUNC_CBRTL_IEEE is present,
+	test whether cbrtl works with a minus zero argument. Replace it if not.
+	* lib/math.in.h (cbrtl): Override if REPLACE_CBRTL is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTL.
+	* modules/math (Makefile.am): Substitute REPLACE_CBRTL.
+	* modules/cbrtl (configure.ac): Consider REPLACE_CBRTL.
+	(Depends-on): Update conditions.
+	* modules/cbrtl-ieee (Files): Add m4/cbrtl-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(configure.ac): Invoke gl_FUNC_CBRTL_IEEE.
+	* lib/cbrtl.c (cbrtl) [IRIX]: Avoid an unnecessary addition.
+	* doc/posix-functions/cbrtl.texi: Mention the cbrtl-ieee module.
+
+	Tests for module 'cbrtl-ieee'.
+	* modules/cbrtl-ieee-tests: New file.
+	* tests/test-cbrtl-ieee.c: New file.
+
+	New module 'cbrtl-ieee'.
+	* modules/cbrtl-ieee: New file.
+
+	Tests for module 'cbrt-ieee'.
+	* modules/cbrt-ieee-tests: New file.
+	* tests/test-cbrt-ieee.c: New file.
+
+	New module 'cbrt-ieee'.
+	* modules/cbrt-ieee: New file.
+
+	Tests for module 'cbrtf-ieee'.
+	* modules/cbrtf-ieee-tests: New file.
+	* tests/test-cbrtf-ieee.c: New file.
+	* tests/test-cbrt-ieee.h: New file.
+
+	New module 'cbrtf-ieee'.
+	* modules/cbrtf-ieee: New file.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	cbrtf: Work around bug in IRIX 6.5 system function.
+	* lib/math.in.h (cbrtf): Override if REPLACE_CBRTF is 1.
+	* m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): New macro.
+	(gl_FUNC_CBRTF): Invoke it. Set REPLACE_CBRTF to 1 if cbrtf() does not
+	work.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTF.
+	* modules/math (Makefile.am): Substitute REPLACE_CBRTF.
+	* modules/cbrtf (configure.ac): Consider REPLACE_CBRTF.
+	(Depends-on): Update conditions.
+	* doc/posix-functions/cbrtf.texi: Mention the IRIX 6.5 problem.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'cbrtl'.
+	* modules/cbrtl-tests: New file.
+	* tests/test-cbrtl.c: New file.
+
+	New module 'cbrtl'.
+	* lib/math.in.h (cbrtl): New declaration.
+	* lib/cbrtl.c: New file.
+	* m4/cbrtl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether cbrtl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTL, HAVE_CBRTL,
+	HAVE_DECL_CBRTL.
+	* modules/math (Makefile.am): Substitute GNULIB_CBRTL, HAVE_CBRTL,
+	HAVE_DECL_CBRTL.
+	* modules/cbrtl: New file.
+	* tests/test-math-c++.cc: Check the declaration of cbrtl.
+	* doc/posix-functions/cbrtl.texi: Mention the new module.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'cbrtf'.
+	* modules/cbrtf-tests: New file.
+	* tests/test-cbrtf.c: New file.
+
+	New module 'cbrtf'.
+	* lib/math.in.h (cbrtf): New declaration.
+	* lib/cbrtf.c: New file.
+	* m4/cbrtf.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether cbrtf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTF, HAVE_CBRTF,
+	HAVE_DECL_CBRTF.
+	* modules/math (Makefile.am): Substitute GNULIB_CBRTF, HAVE_CBRTF,
+	HAVE_DECL_CBRTF.
+	* modules/cbrtf: New file.
+	* tests/test-math-c++.cc: Check the declaration of cbrtf.
+	* doc/posix-functions/cbrtf.texi: Mention the new module.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	cbrt: Provide replacement on MSVC and Minix.
+	* lib/math.in.h (cbrt): New declaration.
+	* lib/cbrt.c: New file.
+	* m4/cbrt.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether cbrt is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRT, HAVE_CBRT.
+	* modules/math (Makefile.am): Substitute GNULIB_CBRT, HAVE_CBRT.
+	* modules/cbrt (Files): Add lib/cbrt.c, m4/cbrt.m4.
+	(Depends-on): Add dependencies.
+	(configure.ac): Arrange to compile replacement if HAVE_CBRT is 0.
+	* tests/test-math-c++.cc: Check the declaration of cbrt.
+	* doc/posix-functions/cbrt.texi: Mention that the module provides a
+	replacement.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	hypotl-ieee: Work around test failure on OSF/1 and native Windows.
+	* m4/hypotl-ieee.m4: New file.
+	* m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present,
+	test whether hypotl works with mixed NaN and Infinity arguments.
+	Replace it if not.
+	* lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL.
+	* modules/math (Makefile.am): Substitute REPLACE_HYPOTL.
+	* modules/hypotl (configure.ac): Consider REPLACE_HYPOTL.
+	(Depends-on): Update conditions.
+	* modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4.
+	(Depends-on): Add hypot-ieee.
+	(configure.ac): Invoke gl_FUNC_HYPOTL_IEEE.
+	* doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.
+
+	hypotf-ieee: Work around test failure on OSF/1 and native Windows.
+	* m4/hypotf-ieee.m4: New file.
+	* m4/hypotf.m4 (gl_FUNC_HYPOTF): If gl_FUNC_HYPOTF_IEEE is present,
+	test whether hypotf works with mixed NaN and Infinity arguments.
+	Replace it if not.
+	* modules/hypotf-ieee (Files): Add m4/hypotf-ieee.m4.
+	(Depends-on): Add hypot-ieee.
+	(configure.ac): Invoke gl_FUNC_HYPOTF_IEEE.
+	* doc/posix-functions/hypotf.texi: Mention the hypotf-ieee module.
+
+	hypot-ieee: Work around test failure on OSF/1 and native Windows.
+	* lib/math.in.h (hypot): New declaration.
+	* lib/hypot.c: New file.
+	* m4/hypot-ieee.m4: New file.
+	* m4/hypot.m4 (gl_FUNC_HYPOT): If gl_FUNC_HYPOT_IEEE is present, test
+	whether hypot works with mixed NaN and Infinity arguments. Replace it
+	if not.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOT,
+	REPLACE_HYPOT.
+	* modules/math (Makefile.am): Substitute GNULIB_HYPOT, REPLACE_HYPOT.
+	* modules/hypot (Files): Add lib/hypot.c.
+	(Depends-on): Add dependencies.
+	(configure.ac): Arrange to compile replacement if REPLACE_HYPOT is 1.
+	* modules/hypot-ieee (Files): Add m4/hypot-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_HYPOT_IEEE.
+	* tests/test-math-c++.cc: Check the declaration of hypot.
+	* doc/posix-functions/hypot.texi: Mention the hypot-ieee module.
+
+	Tests for module 'hypotl-ieee'.
+	* modules/hypotl-ieee-tests: New file.
+	* tests/test-hypotl-ieee.c: New file.
+
+	New module 'hypotl-ieee'.
+	* modules/hypotl-ieee: New file.
+
+	Tests for module 'hypot-ieee'.
+	* modules/hypot-ieee-tests: New file.
+	* tests/test-hypot-ieee.c: New file.
+
+	New module 'hypot-ieee'.
+	* modules/hypot-ieee: New file.
+
+	Tests for module 'hypotf-ieee'.
+	* modules/hypotf-ieee-tests: New file.
+	* tests/test-hypotf-ieee.c: New file.
+	* tests/test-hypot-ieee.h: New file.
+
+	New module 'hypotf-ieee'.
+	* modules/hypotf-ieee: New file.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	Remove unused variables.
+	* m4/fmod.m4 (gl_FUNC_FMOD): Remove unused variable 'i'.
+	* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
+	* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
+	* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
+
+2012-02-29  Eric Blake  <eblake@redhat.com>
+
+	termios: fix pid_t always, not just for tcgetsid
+	* doc/posix-headers/termios.texi (termios.h): Mention problem.
+	* lib/termios.in.h (include): Ensure pid_t on all platforms, not
+	just when building tcgetsid.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'hypotl'.
+	* modules/hypotl-tests: New file.
+	* tests/test-hypotl.c: New file.
+
+	New module 'hypotl'.
+	* lib/math.in.h (hypotl): New declaration.
+	* lib/hypotl.c: New file.
+	* m4/hypotl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTL, HAVE_HYPOTL.
+	* modules/math (Makefile.am): Substitute GNULIB_HYPOTL, HAVE_HYPOTL.
+	* modules/hypotl: New file.
+	* tests/test-math-c++.cc: Check the hypotl declaration.
+	* doc/posix-functions/hypotl.texi: Mention the new module.
+
+2012-02-29  Eric Blake  <eblake@redhat.com>
+
+	tcgetsid: fix cygwin header bug
+	* lib/termios.in.h (includes) [Cygwin]: Ensure pid_t is defined.
+
+	docs: update cygwin progress
+	* doc/posix-functions/llround.texi (llround): Added in cygwin
+	1.7.8.
+	* doc/posix-functions/llroundf.texi (llroundf): Likewise.
+	* doc/glibc-functions/program_invocation_name.texi
+	(program_invocation_name): Likewise.
+	* doc/glibc-functions/program_invocation_short_name.texi
+	(program_invocation_short_name): Likewise.
+	* doc/glibc-functions/madvise.texi (madvise): Likewise.
+	* doc/glibc-functions/pthread_yield.texi (pthread_yield):
+	Likewise.
+	* doc/posix-functions/pthread_spin_destroy.texi
+	(pthread_spin_destroy): Added in cygwin 1.7.10.
+	* doc/posix-functions/pthread_spin_init.texi (pthread_spin_init):
+	Likewise.
+	* doc/posix-functions/pthread_spin_lock.texi (pthread_spin_lock):
+	Likewise.
+	* doc/posix-functions/pthread_spin_trylock.texi
+	(pthread_spin_trylock): Likewise.
+	* doc/posix-functions/pthread_spin_unlock.texi
+	(pthread_spin_unlock): Likewise.
+	* doc/posix-functions/pthread_setschedprio.texi
+	(pthread_setschedprio): Likewise.
+	* doc/posix-functions/pthread_attr_getstack.texi
+	(pthread_attr_getstack): Likewise.
+	* doc/pastposix-functions/pthread_attr_getstackaddr.texi
+	(pthread_attr_getstackaddr): Likewise.
+	* doc/glibc-functions/pthread_getattr_np.texi
+	(pthread_getattr_np): Likewise.
+	* doc/glibc-functions/sys_siglist.texi (sys_siglist): Likewise.
+	* doc/glibc-functions/sysinfo.texi (sysinfo): Likewise.
+	* doc/posix-functions/clock_settime.texi (clock_settime):
+	Likewise.
+	* doc/posix-functions/pthread_attr_getguardsize.texi
+	(pthread_attr_getguardsize): Likewise.
+	* doc/posix-functions/pthread_attr_setguardsize.texi
+	(pthread_attr_setguardsize): Likewise.
+	* doc/posix-functions/pthread_attr_setstack.texi
+	(pthread_attr_setstack): Likewise.
+	* doc/pastposix-functions/pthread_attr_setstackaddr.texi
+	(pthread_attr_setstackaddr): Likewise.
+	* doc/posix-functions/clock_getcpuclockid.texi
+	(clock_getcpuclockid): Likewise.
+	* doc/posix-functions/pthread_getcpuclockid.texi
+	(pthread_getcpuclockid): Likewise.
+	* doc/glibc-functions/error.texi (error): Likewise.
+	* doc/glibc-functions/error_at_line.texi (error_at_line):
+	Likewise.
+	* doc/glibc-functions/error_message_count.texi
+	(error_message_count): Likewise.
+	* doc/glibc-functions/error_one_per_line.texi
+	(error_one_per_line): Likewise.
+	* doc/glibc-functions/error_print_progname.texi
+	(error_print_progname): Likewise.
+	* doc/posix-functions/pthread_condattr_getclock.texi
+	(pthread_condattr_getclock): Likewise.
+	* doc/posix-functions/pthread_condattr_setclock.texi
+	(pthread_condattr_setclock): Likewise.
+	* doc/posix-functions/clock_nanosleep.texi (clock_nanosleep):
+	Likewise.
+	* doc/glibc-functions/getgrouplist.texi (getgrouplist): Likewise.
+	* doc/glibc-functions/getpt.texi (getpt): Likewise.
+	* doc/glibc-functions/get_current_dir_name.texi
+	(get_current_dir_name): Likewise.
+	* doc/glibc-functions/pthread_sigqueue.texi (pthread_sigqueue):
+	Likewise.
+	* doc/posix-functions/tcgetsid.texi (tcgetsid): Likewise, but with
+	wrong return type.
+	* doc/glibc-functions/scandirat.texi (scandirat): Added in cygwin
+	1.7.11.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'hypotf'.
+	* modules/hypotf-tests: New file.
+	* tests/test-hypotf.c: New file.
+
+	New module 'hypotf'.
+	* lib/math.in.h (hypotf): New declaration.
+	* lib/hypotf.c: New file.
+	* m4/hypotf.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTF, HAVE_HYPOTF,
+	REPLACE_HYPOTF.
+	* modules/math (Makefile.am): Substitute GNULIB_HYPOTF, HAVE_HYPOTF,
+	REPLACE_HYPOTF.
+	* modules/hypotf: New file.
+	* tests/test-math-c++.cc: Check the hypotf declaration.
+	* doc/posix-functions/hypotf.texi: Mention the new module.
+
+	hypot: Prepare for hypotf module.
+	* m4/hypot.m4: New file.
+	* modules/hypot (Files): Add m4/hypot.m4.
+	(configure.ac): Invoke gl_FUNC_HYPOT.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	hypot tests: More tests.
+	* tests/test-hypot.c: Include <float.h>.
+	(main): Add tests about overflow and underflow.
+
+2012-02-29  Bruno Haible  <bruno@clisp.org>
+
+	math code: Add comments.
+	* lib/acosl.c: Add comment about related glibc source files.
+	* lib/asinl.c: Likewise.
+	* lib/atanl.c: Likewise.
+	* lib/expl.c: Likewise.
+	* lib/logl.c: Likewise.
+	* lib/sincosl.c: Likewise.
+	* lib/sinl.c: Likewise.
+	* lib/tanl.c: Likewise.
+	* lib/trigl.c: Likewise.
+	* lib/cosl.c: Likewise. Fix comments.
+
+2012-02-28  Bruno Haible  <bruno@clisp.org>
+
+	math: Ensure HUGE_VAL, HUGE_VALF, HUGE_VALL are defined.
+	* lib/math.in.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Define fallbacks.
+	* tests/test-math.c: Include macros.h. Check that HUGE_VAL, HUGE_VALF,
+	HUGE_VALL are defined.
+	(numeric_equald): Renamed from numeric_equal.
+	(numeric_equalf, numeric_equall): New functions.
+	(main): Check also HUGE_VALF, HUGE_VALL.
+	* modules/math-tests (Files): Add tests/macros.h.
+	* doc/posix-headers/math.texi: Document the problems with HUGE_VALF and
+	HUGE_VALL.
+
+2012-02-28  Bruno Haible  <bruno@clisp.org>
+
+	doc: Move ISO C11 feature notes into POSIX chapters.
+	* doc/posix-functions/aligned_alloc.texi: Renamed from
+	doc/glibc-functions/aligned_alloc.texi.
+	* doc/posix-functions/quick_exit.texi: Renamed from
+	doc/glibc-functions/quick_exit.texi.
+	* doc/posix-headers/uchar.texi: Renamed from
+	doc/glibc-headers/uchar.texi.
+	* doc/posix-functions/c16rtomb.texi: Renamed from
+	doc/glibc-functions/c16rtomb.texi.
+	* doc/posix-functions/c32rtomb.texi: Renamed from
+	doc/glibc-functions/c32rtomb.texi.
+	* doc/posix-functions/mbrtoc16.texi: Renamed from
+	doc/glibc-functions/mbrtoc16.texi.
+	* doc/posix-functions/mbrtoc32.texi: Renamed from
+	doc/glibc-functions/mbrtoc32.texi.
+	* doc/gnulib.texi: Update.
+	(Glibc uchar.h): Remove section.
+	Suggested by Eric Blake.
+
+2012-02-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdnoreturn: port to MSVC better
+	MSVC standard headers use __declspec(noreturn), so #define noreturn
+	to empty on that platform.  Reported by Bruno Haible in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-02/msg00152.html>.
+	* lib/stdnoreturn.in.h (noreturn): Define to empty on MSVC.
+	* doc/posix-headers/stdnoreturn.texi (stdnoreturn.h): Document this.
+
+2012-02-28  Bruno Haible  <bruno@clisp.org>
+
+	doc: Mention new glibc headers and functions.
+	* doc/glibc-headers/uchar.texi: New file.
+	* doc/glibc-functions/aligned_alloc.texi: New file.
+	* doc/glibc-functions/c16rtomb.texi: New file.
+	* doc/glibc-functions/c32rtomb.texi: New file.
+	* doc/glibc-functions/clock_adjtime.texi: New file.
+	* doc/glibc-functions/fanotify_init.texi: New file.
+	* doc/glibc-functions/fanotify_mark.texi: New file.
+	* doc/glibc-functions/inet6_opt_append.texi: New file.
+	* doc/glibc-functions/inet6_opt_find.texi: New file.
+	* doc/glibc-functions/inet6_opt_finish.texi: New file.
+	* doc/glibc-functions/inet6_opt_get_val.texi: New file.
+	* doc/glibc-functions/inet6_opt_init.texi: New file.
+	* doc/glibc-functions/inet6_opt_next.texi: New file.
+	* doc/glibc-functions/inet6_opt_set_val.texi: New file.
+	* doc/glibc-functions/inet6_rth_add.texi: New file.
+	* doc/glibc-functions/inet6_rth_getaddr.texi: New file.
+	* doc/glibc-functions/inet6_rth_init.texi: New file.
+	* doc/glibc-functions/inet6_rth_reverse.texi: New file.
+	* doc/glibc-functions/inet6_rth_segments.texi: New file.
+	* doc/glibc-functions/inet6_rth_space.texi: New file.
+	* doc/glibc-functions/login.texi: New file.
+	* doc/glibc-functions/mbrtoc16.texi: New file.
+	* doc/glibc-functions/mbrtoc32.texi: New file.
+	* doc/glibc-functions/name_to_handle_at.texi: New file.
+	* doc/glibc-functions/ntp_gettimex.texi: New file.
+	* doc/glibc-functions/open_by_handle_at.texi: New file.
+	* doc/glibc-functions/prlimit.texi: New file.
+	* doc/glibc-functions/process_vm_readv.texi: New file.
+	* doc/glibc-functions/process_vm_writev.texi: New file.
+	* doc/glibc-functions/recvmmsg.texi: New file.
+	* doc/glibc-functions/scandirat.texi: New file.
+	* doc/glibc-functions/sendmmsg.texi: New file.
+	* doc/glibc-functions/setns.texi: New file.
+	* doc/glibc-functions/timespec_get.texi: New file.
+	* doc/gnulib.texi: Include them.
+	(Glibc sys/fanotify.h, Glibc sys/resource.h, Glibc uchar.h): New
+	sections.
+	Reported by Eric Blake.
+
+2012-02-28  Bruno Haible  <bruno@clisp.org>
+
+	Avoid compilation errors with MSVC option -fp:strict.
+	* lib/floor.c: Use MSVC specific pragma fenv_access.
+	* lib/ceil.c: Likewise.
+	* lib/trunc.c: Likewise.
+	* lib/round.c: Likewise.
+	* lib/rint.c: Likewise.
+	* lib/fma.c: Likewise.
+	* lib/integer_length.c: Likewise.
+	* m4/round.m4 (gl_FUNC_ROUND): Likewise.
+	* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
+	* tests/test-floor2.c: Likewise.
+	* tests/test-floorf2.c: Likewise.
+	* tests/test-ceil2.c: Likewise.
+	* tests/test-ceilf2.c: Likewise.
+	* tests/test-trunc2.c: Likewise.
+	* tests/test-truncf2.c: Likewise.
+	Reported by Michael Goffioul <michael.goffioul@gmail.com>.
+
+2012-02-27  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'sqrtl-ieee'.
+	* modules/sqrtl-ieee-tests: New file.
+	* tests/test-sqrtl-ieee.c: New file.
+
+	New module 'sqrtl-ieee'.
+	* modules/sqrtl-ieee: New file.
+
+	Tests for module 'sqrt-ieee'.
+	* modules/sqrt-ieee-tests: New file.
+	* tests/test-sqrt-ieee.c: New file.
+
+	New module 'sqrt-ieee'.
+	* modules/sqrt-ieee: New file.
+
+	Tests for module 'sqrtf-ieee'.
+	* modules/sqrtf-ieee-tests: New file.
+	* tests/test-sqrtf-ieee.c: New file.
+	* tests/test-sqrt-ieee.h: New file.
+
+	New module 'sqrtf-ieee'.
+	* modules/sqrtf-ieee: New file.
+
+2012-02-27  Bruno Haible  <bruno@clisp.org>
+
+	remainderl-ieee: Work around test failure on OSF/1.
+	* m4/remainderl-ieee.m4: New file.
+	* m4/remainderl.m4 (gl_FUNC_REMAINDERL): If gl_FUNC_REMAINDERL_IEEE is
+	present, test whether remainderl works with a zero second argument.
+	Replace it if not.
+	* lib/math.in.h (remainderl): Override if REPLACE_REMAINDERL is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERL.
+	* modules/math (Makefile.am): Substitute REPLACE_REMAINDERL.
+	* modules/remainderl (configure.ac): Consider REPLACE_REMAINDERL.
+	(Depends-on): Update conditions.
+	* modules/remainderl-ieee (Files): Add m4/remainderl-ieee.m4.
+	(Depends-on): Add remainder-ieee.
+	(configure.ac): Invoke gl_FUNC_REMAINDERL_IEEE.
+	* doc/posix-functions/remainderl.texi: Mention the remainderl-ieee
+	module.
+
+	remainderf-ieee: Work around test failure on OSF/1.
+	* m4/remainderf-ieee.m4: New file.
+	* m4/remainderf.m4 (gl_FUNC_REMAINDERF): If gl_FUNC_REMAINDERF_IEEE is
+	present, test whether remainderf works with a zero second argument.
+	Replace it if not.
+	* lib/math.in.h (remainderf): Override if REPLACE_REMAINDERF is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERF.
+	* modules/math (Makefile.am): Substitute REPLACE_REMAINDERF.
+	* modules/remainderf (configure.ac): Consider REPLACE_REMAINDERF.
+	(Depends-on): Update conditions.
+	* modules/remainderf-ieee (Files): Add m4/remainderf-ieee.m4.
+	(Depends-on): Add remainder-ieee.
+	(configure.ac): Invoke gl_FUNC_REMAINDERF_IEEE.
+	* doc/posix-functions/remainderf.texi: Mention the remainderf-ieee
+	module.
+
+	remainder-ieee: Work around test failure on OSF/1.
+	* m4/remainder-ieee.m4: New file.
+	* m4/remainder.m4 (gl_FUNC_REMAINDER): If gl_FUNC_REMAINDER_IEEE is
+	present, test whether remainder works with a zero second argument.
+	Replace it if not.
+	* lib/math.in.h (remainder): Override if REPLACE_REMAINDER is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDER.
+	* modules/math (Makefile.am): Substitute REPLACE_REMAINDER.
+	* modules/remainder (configure.ac): Consider REPLACE_REMAINDER.
+	(Depends-on): Update dependencies.
+	* modules/remainder-ieee (Files): Add m4/remainder-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_REMAINDER_IEEE.
+	* doc/posix-functions/remainder.texi: Mention the remainder-ieee module.
+
+	Tests for module 'remainderl-ieee'.
+	* modules/remainderl-ieee-tests: New file.
+	* tests/test-remainderl-ieee.c: New file.
+
+	New module 'remainderl-ieee'.
+	* modules/remainderl-ieee: New file.
+
+	Tests for module 'remainder-ieee'.
+	* modules/remainder-ieee-tests: New file.
+	* tests/test-remainder-ieee.c: New file.
+
+	New module 'remainder-ieee'.
+	* modules/remainder-ieee: New file.
+
+	Tests for module 'remainderf-ieee'.
+	* modules/remainderf-ieee-tests: New file.
+	* tests/test-remainderf-ieee.c: New file.
+	* tests/test-remainder-ieee.h: New file.
+
+	New module 'remainderf-ieee'.
+	* modules/remainderf-ieee: New file.
+
+2012-02-27  Bruno Haible  <bruno@clisp.org>
+
+	modff, modfl: Fix configure syntax error.
+	* m4/modff.m4 (gl_FUNC_MODFF): Insert ':' command in 'if'.
+	* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
+
+2012-02-27  Bruno Haible  <bruno@clisp.org>
+
+	fmodl-ieee: Work around test failures on OSF/1, MSVC 9.
+	* m4/fmodl-ieee.m4: New file.
+	* m4/fmodl.m4 (gl_FUNC_FMODL): If gl_FUNC_FMODL_IEEE is present, test
+	whether fmodl works with zero arguments. Replace it if not.
+	* modules/fmodl-ieee (Files): Add m4/fmodl-ieee.m4.
+	(Depends-on): Add fmod-ieee.
+	(configure.ac): Invoke gl_FUNC_FMODL_IEEE.
+	* doc/posix-functions/fmodl.texi: Mention the fmodl-ieee module.
+
+	fmodf-ieee: Work around test failure on OSF/1.
+	* m4/fmodf-ieee.m4: New file.
+	* m4/fmodf.m4 (gl_FUNC_FMODF): If gl_FUNC_FMODF_IEEE is present, test
+	whether fmodf works with zero arguments. Replace it if not.
+	* lib/math.in.h (fmodf): Override if REPLACE_FMODF is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FMODF.
+	* modules/math (Makefile.am): Substitute REPLACE_FMODF.
+	* modules/fmodf (configure.ac): Consider REPLACE_FMODF.
+	(Depends-on): Update dependencies.
+	* modules/fmodf-ieee (Files): Add m4/fmodf-ieee.m4.
+	(configure.ac): Invoke gl_FUNC_FMODF_IEEE.
+	* doc/posix-functions/fmodf.texi: Mention the problem on OSF/1.
+
+	fmodf-ieee: Work around test failure on MSVC 9.
+	* modules/fmodf-ieee (Depends-on): Add fmod-ieee.
+	* doc/posix-functions/fmodf.texi: Mention the fmodf-ieee module.
+
+	fmod-ieee: Work around test failures on OSF/1, mingw.
+	* m4/fmod-ieee.m4: New file.
+	* m4/fmod.m4 (gl_FUNC_FMOD): If gl_FUNC_FMOD_IEEE is present, test
+	whether fmod works with zero arguments. Replace it if not.
+	* lib/math.in.h (fmod): New declaration.
+	* lib/fmod.c: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether fmod is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_FMOD, REPLACE_FMOD.
+	* modules/math (Makefile.am): Substitute GNULIB_FMOD, REPLACE_FMOD.
+	* modules/fmod (Files): Add lib/fmod.c.
+	(Depends-on): Add math, isinf, trunc, fma.
+	(configure.ac): Arrange to compile lib/fmod.c if needed.
+	* modules/fmod-ieee (Files): Add m4/fmod-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(configure.ac): Invoke gl_FUNC_FMOD_IEEE.
+	* tests/test-math-c++.cc: Check the declaration of fmod.
+	* doc/posix-functions/fmod.texi: Mention the fmod-ieee module.
+
+	fmodl-ieee: Fix test failures.
+	* lib/fmodl.c (fmodl): Treat Inf specially.
+	* modules/fmodl (Depends-on): Add isinf.
+
+	Tests for module 'fmodl-ieee'.
+	* modules/fmodl-ieee-tests: New file.
+	* tests/test-fmodl-ieee.c: New file.
+
+	New module 'fmodl-ieee'.
+	* modules/fmodl-ieee: New file.
+
+	Tests for module 'fmod-ieee'.
+	* modules/fmod-ieee-tests: New file.
+	* tests/test-fmod-ieee.c: New file.
+
+	New module 'fmod-ieee'.
+	* modules/fmod-ieee: New file.
+
+	Tests for module 'fmodf-ieee'.
+	* modules/fmodf-ieee-tests: New file.
+	* tests/test-fmodf-ieee.c: New file.
+	* tests/test-fmod-ieee.h: New file.
+
+	New module 'fmodf-ieee'.
+	* modules/fmodf-ieee: New file.
+
+2012-02-27  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'rintl-ieee'.
+	* modules/rintl-ieee-tests: New file.
+	* tests/test-rintl-ieee.c: New file.
+
+	New module 'rintl-ieee'.
+	* modules/rintl-ieee: New file.
+
+	Tests for module 'rint-ieee'.
+	* modules/rint-ieee-tests: New file.
+	* tests/test-rint-ieee.c: New file.
+
+	New module 'rint-ieee'.
+	* modules/rint-ieee: New file.
+
+	Tests for module 'rintf-ieee'.
+	* modules/rintf-ieee-tests: New file.
+	* tests/test-rintf-ieee.c: New file.
+	* tests/test-rint-ieee.h: New file.
+
+	New module 'rintf-ieee'.
+	* modules/rintf-ieee: New file.
+
+2012-02-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: re_search etc. should return -2 when memory exhausted
+	This bug was uncovered when testing 'grep'.  Without the fix,
+	re_search and friends return -1 when memory is exhausted, but -1
+	means no match, and this causes grep to falsely report no-match
+	instead of memory-exhaustion.  See
+	<http://sources.redhat.com/bugzilla/show_bug.cgi?id=13762>.
+	* lib/regexec.c (re_search_stub): Return -2 (not -1) if there is
+	trouble; this can occur if re_search_internal ran out of memory.
+
+2012-02-26  Bruno Haible  <bruno@clisp.org>
+
+	modfl-ieee: Work around test failures on IRIX, OSF/1, mingw.
+	* m4/modfl-ieee.m4: New file.
+	* m4/modfl.m4 (gl_FUNC_MODFL): If gl_FUNC_MODFL_IEEE is present, test
+	whether modfl works with Inf. Replace it if not.
+	* lib/math.in.h (modfl): Override if REPLACE_MODFF is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFL.
+	* modules/math (Makefile.am): Substitute REPLACE_MODFL.
+	* modules/modfl (configure.ac): Consider REPLACE_MODFL.
+	(Depends-on): Update dependencies.
+	* modules/modfl-ieee (Files): Add m4/modfl-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(configure.ac): Invoke gl_FUNC_MODFL_IEEE.
+	* doc/posix-functions/modfl.texi: Mention the modfl-ieee module.
+
+	modfl-ieee: Fix dependencies.
+	* modules/modfl-ieee (Depends-on): Add modf-ieee.
+
+	modfl-ieee: Fix test failures.
+	* lib/modfl.c (modfl): Treat NaN and Inf specially.
+	* modules/modfl (Depends-on): Add isfinite, isinf.
+
+	modff-ieee: Work around test failures on *BSD, IRIX, OSF/1, etc.
+	* m4/modff-ieee.m4: New file.
+	* m4/modff.m4 (gl_FUNC_MODFF): If gl_FUNC_MODFF_IEEE is present, test
+	whether modff works with NaN and Inf. Replace it if not.
+	* lib/math.in.h (modff): Override if REPLACE_MODFF is 1.
+	* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFF.
+	* modules/math (Makefile.am): Substitute REPLACE_MODFF.
+	* modules/modff (configure.ac): Consider REPLACE_MODFF.
+	(Depends-on): Update dependencies.
+	* modules/modff-ieee (Files): Add m4/modff-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(Depends-on): Add modf-ieee.
+	(configure.ac): Invoke gl_FUNC_MODFF_IEEE.
+	* doc/posix-functions/modff.texi: Mention the modff-ieee module.
+
+	modf-ieee: Work around test failures on *BSD, IRIX, OSF/1, Cygwin.
+	* m4/modf-ieee.m4: New file.
+	* m4/modf.m4 (gl_FUNC_MODF): If gl_FUNC_MODF_IEEE is present, test
+	whether modf works with NaN and Inf. Replace it if not.
+	* lib/math.in.h (modf): New declaration.
+	* lib/modf.c: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether modf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_MODF, REPLACE_MODF.
+	* modules/math (Makefile.am): Substitute GNULIB_MODF, REPLACE_MODF.
+	* modules/modf (Files): Add lib/modf.c.
+	(Depends-on): Add math, isfinite, trunc, isinf.
+	(configure.ac): Addrange to compile lib/modf.c if needed.
+	* modules/modf-ieee (Files): Add m4/modf-ieee.m4, m4/minus-zero.m4,
+	m4/signbit.m4.
+	(configure.ac): Invoke gl_FUNC_MODF_IEEE.
+	* tests/test-math-c++.cc: Check the declaration of modf.
+	* doc/posix-functions/modf.texi: Mention the modf-ieee module.
+
+	Tests for module 'modfl-ieee'.
+	* modules/modfl-ieee-tests: New file.
+	* tests/test-modfl-ieee.c: New file.
+
+	New module 'modfl-ieee'.
+	* modules/modfl-ieee: New file.
+
+	Tests for module 'modf-ieee'.
+	* modules/modf-ieee-tests: New file.
+	* tests/test-modf-ieee.c: New file.
+
+	New module 'modf-ieee'.
+	* modules/modf-ieee: New file.
+
+	Tests for module 'modff-ieee'.
+	* modules/modff-ieee-tests: New file.
+	* tests/test-modff-ieee.c: New file.
+	* tests/test-modf-ieee.h: New file.
+
+	New module 'modff-ieee'.
+	* modules/modff-ieee: New file.
+
+2012-02-26  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'fabsl-ieee'.
+	* modules/fabsl-ieee-tests: New file.
+	* tests/test-fabsl-ieee.c: New file.
+
+	New module 'fabsl-ieee'.
+	* modules/fabsl-ieee: New file.
+
+	Tests for module 'fabs-ieee'.
+	* modules/fabs-ieee-tests: New file.
+	* tests/test-fabs-ieee.c: New file.
+
+	New module 'fabs-ieee'.
+	* modules/fabs-ieee: New file.
+
+	Tests for module 'fabsf-ieee'.
+	* modules/fabsf-ieee-tests: New file.
+	* tests/test-fabsf-ieee.c: New file.
+	* tests/test-fabs-ieee.h: New file.
+
+	New module 'fabsf-ieee'.
+	* modules/fabsf-ieee: New file.
+
+2012-02-26  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'fmal-ieee'.
+	* modules/fmal-ieee-tests: New file.
+	* tests/test-fmal-ieee.c: New file.
+
+	New module 'fmal-ieee'.
+	* modules/fmal-ieee: New file.
+
+	Tests for module 'fma-ieee'.
+	* modules/fma-ieee-tests: New file.
+	* tests/test-fma-ieee.c: New file.
+
+	New module 'fma-ieee'.
+	* modules/fma-ieee: New file.
+
+	Tests for module 'fmaf-ieee'.
+	* modules/fmaf-ieee-tests: New file.
+	* tests/test-fmaf-ieee.c: New file.
+	* tests/test-fma-ieee.h: New file.
+
+	New module 'fmaf-ieee'.
+	* modules/fmaf-ieee: New file.
+
+2012-02-26  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'ldexpl-ieee'.
+	* modules/ldexpl-ieee-tests: New file.
+	* tests/test-ldexpl-ieee.c: New file.
+
+	New module 'ldexpl-ieee'.
+	* modules/ldexpl-ieee: New file.
+
+	Tests for module 'ldexp-ieee'.
+	* modules/ldexp-ieee-tests: New file.
+	* tests/test-ldexp-ieee.c: New file.
+
+	New module 'ldexp-ieee'.
+	* modules/ldexp-ieee: New file.
+
+	Tests for module 'ldexpf-ieee'.
+	* modules/ldexpf-ieee-tests: New file.
+	* tests/test-ldexpf-ieee.c: New file.
+	* tests/test-ldexp-ieee.h: New file.
+
+	New module 'ldexpf-ieee'.
+	* modules/ldexpf-ieee: New file.
+
+2012-02-26  Bruno Haible  <bruno@clisp.org>
+
+	Refactor frexp*-ieee tests.
+	* tests/test-frexp-ieee.h: New file.
+	* tests/test-frexpf-ieee.c: Include test-frexp-ieee.h.
+	(main): Just call test_function.
+	* tests/test-frexp-ieee.c: Include test-frexp-ieee.h.
+	(main): Just call test_function.
+	* tests/test-frexpl-ieee.c: Include test-frexp-ieee.h.
+	(main): Just call test_function.
+	* modules/frexpf-ieee-tests (Files): Add tests/test-frexp-ieee.h.
+	* modules/frexp-ieee-tests (Files): Likewise.
+	* modules/frexpl-ieee-tests (Files): Likewise.
+
+	Tests for module 'frexpl-ieee'.
+	* modules/frexpl-ieee-tests: New file.
+	* tests/test-frexpl-ieee.c: New file.
+
+	New module 'frexpl-ieee'.
+	* modules/frexpl-ieee: New file.
+
+	Tests for module 'frexp-ieee'.
+	* modules/frexp-ieee-tests: New file.
+	* tests/test-frexp-ieee.c: New file.
+
+	New module 'frexp-ieee'.
+	* modules/frexp-ieee: New file.
+
+	Tests for module 'frexpf-ieee'.
+	* modules/frexpf-ieee-tests: New file.
+	* tests/test-frexpf-ieee.c: New file.
+
+	New module 'frexpf-ieee'.
+	* modules/frexpf-ieee: New file.
+
+2012-02-26  Bruno Haible  <bruno@clisp.org>
+
+	roundl-ieee tests: More tests.
+	* tests/test-roundl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/roundl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanl-nolibm.
+
+	round-ieee tests: More tests.
+	* tests/test-round-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/round-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnand-nolibm.
+
+	roundf-ieee tests: More tests.
+	* tests/test-roundf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/roundf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanf-nolibm.
+
+	truncl-ieee tests: More tests.
+	* tests/test-truncl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/truncl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanl-nolibm.
+
+	trunc-ieee tests: More tests.
+	* tests/test-trunc-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/trunc-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnand-nolibm.
+
+	truncf-ieee tests: More tests.
+	* tests/test-truncf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/truncf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanf-nolibm.
+
+	ceill-ieee tests: More tests.
+	* tests/test-ceill-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/ceill-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanl-nolibm.
+
+	ceil-ieee tests: More tests.
+	* tests/test-ceil-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/ceil-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnand-nolibm.
+
+	ceilf-ieee tests: More tests.
+	* tests/test-ceilf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/ceilf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanf-nolibm.
+
+	floorl-ieee tests: More tests.
+	* tests/test-floorl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/floorl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanl-nolibm.
+
+	floor-ieee tests: More tests.
+	* tests/test-floor-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/floor-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnand-nolibm.
+
+	floorf-ieee tests: More tests.
+	* tests/test-floorf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
+	(main): Add tests for [MX] shaded specification in POSIX.
+	* modules/floorf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
+	(Depends-on): Add isnanf-nolibm.
+
+2012-02-26  Bruno Haible  <bruno@clisp.org>
+
+	fpieee: More comments.
+	* m4/fpieee.m4 (gl_FP_IEEE): Add more comments.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'log10l'.
+	* modules/log10l-tests: New file.
+	* tests/test-log10l.c: New file.
+	* tests/test-math-c++.cc: Check the declaration of log10l.
+
+	New module 'log10l'.
+	* lib/math.in.h (log10l): New declaration.
+	* lib/log10l.c: New file.
+	* m4/log10l.m4: New file.
+	* modules/log10l: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether log10l is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10L, HAVE_LOG10L,
+	HAVE_DECL_LOG10L.
+	* modules/math (Makefile.am): Substitute GNULIB_LOG10L, HAVE_LOG10L,
+	HAVE_DECL_LOG10L.
+	* doc/posix-functions/log10l.texi: Mention the new module.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	fmodl, remainder*: Avoid wrong results due to rounding errors.
+	* lib/fmodl.c (fmodl): Correct the result if it is not within the
+	expected bounds.
+	* lib/remainderf.c (remainderf): Likewise.
+	* lib/remainder.c (remainder): Likewise.
+	* lib/remainderl.c (remainderl): Likewise.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'remainderl'.
+	* modules/remainderl-tests: New file.
+	* tests/test-remainderl.c: New file.
+	* tests/test-math-c++.cc: Check the declaration of remainderl.
+
+	New module 'remainderl'.
+	* lib/math.in.h (remainderl): New declaration.
+	* lib/remainderl.c: New file.
+	* m4/remainderl.m4: New file.
+	* modules/remainderl: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether remainderl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERL, HAVE_REMAINDERL.
+	* modules/math (Makefile.am): Substitute GNULIB_REMAINDERL,
+	HAVE_REMAINDERL.
+	* doc/posix-functions/remainderl.texi: Mention the new module.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'remainderf'.
+	* modules/remainderf-tests: New file.
+	* tests/test-remainderf.c: New file.
+	* tests/test-math-c++.cc: Check the declaration of remainderf.
+
+	New module 'remainderf'.
+	* lib/math.in.h (remainderf): New declaration.
+	* lib/remainderf.c: New file.
+	* m4/remainderf.m4: New file.
+	* modules/remainderf: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether remainderf is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERF, HAVE_REMAINDERF.
+	* modules/math (Makefile.am): Substitute GNULIB_REMAINDERF,
+	HAVE_REMAINDERF.
+	* doc/posix-functions/remainderf.texi: Mention the new module.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	remainder: Support for MSVC.
+	* lib/math.in.h (remainder): New declaration.
+	* lib/remainder.c: New file.
+	* m4/remainder.m4: New file.
+	* modules/remainder (Files): Add lib/remainder.c, m4/remainder.m4.
+	(Depends-on): Add math, round, fma.
+	(configure.ac): Use results of gl_FUNC_REMAINDER.
+	* m4/math_h.m4 (gl_MATH_H): Test whether remainder is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDER, HAVE_REMAINDER,
+	HAVE_DECL_REMAINDER.
+	* modules/math (Makefile.am): Substitute GNULIB_REMAINDER,
+	HAVE_REMAINDER, HAVE_DECL_REMAINDER.
+	* tests/test-math-c++.cc: Check the declaration of remainder.
+	* doc/posix-functions/remainder.texi: Mention that the MSVC and IRIX 5
+	problems are fixed.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'fmodl'.
+	* modules/fmodl-tests: New file.
+	* tests/test-fmodl.c: New file.
+	* tests/test-math-c++.cc: Check the declaration of fmodl.
+
+	New module 'fmodl'.
+	* lib/math.in.h (fmodl): New declaration.
+	* lib/fmodl.c: New file.
+	* m4/fmodl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether fmodl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_FMODL, HAVE_FMODL,
+	REPLACE_FMODL.
+	* modules/math (Makefile.am): Substitute GNULIB_FMODL, HAVE_FMODL,
+	REPLACE_FMODL.
+	* modules/fmodl: New file.
+	* doc/posix-functions/fmodl.texi: Mention the new module.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'modfl'.
+	* modules/modfl-tests: New file.
+	* tests/test-modfl.c: New file.
+	* tests/test-math-c++.cc: Check the declaration of modfl.
+
+	New module 'modfl'.
+	* lib/math.in.h (modfl): New declaration.
+	* lib/modfl.c: New file.
+	* m4/modfl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether modfl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_MODFL, HAVE_MODFL.
+	* modules/math (Makefile.am): Substitute GNULIB_MODFL, HAVE_MODFL.
+	* modules/modfl: New file.
+	* doc/posix-functions/modfl.texi: Mention the new module.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'fabsl'.
+	* modules/fabsl-tests: New file.
+	* tests/test-fabsl.c: New file.
+	* tests/test-math-c++.cc: Check the declaration of fabsl.
+
+	New module 'fabsl'.
+	* lib/math.in.h (fabsl): New declaration.
+	* lib/fabsl.c: New file.
+	* m4/fabsl.m4: New file.
+	* m4/math_h.m4 (gl_MATH_H): Test whether fabsl is declared.
+	(gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSL, HAVE_FABSL,
+	REPLACE_FABSL.
+	* modules/math (Makefile.am): Substitute GNULIB_FABSL, HAVE_FABSL,
+	REPLACE_FABSL.
+	* modules/fabsl: New file.
+	* doc/posix-functions/fabsl.texi: Mention the new module.
+
+2012-02-25  Bruno Haible  <bruno@clisp.org>
+
+	fabs tests: More tests.
+	* tests/test-fabs.c: Include <string.h>, minus-zero.h.
+	(zero): New variable.
+	(main): Add tests for signed zero.
+	* modules/fabs-tests (Files): Add tests/minus-zero.h.
+
+	fabsf tests: More tests.
+	* tests/test-fabsf.c: Include <string.h>, minus-zero.h.
+	(zero): New variable.
+	(main): Add tests for signed zero.
+	* modules/fabsf-tests (Files): Add tests/minus-zero.h.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	atanl: Provide function definition on MSVC.
+	* m4/atanl.m4 (gl_FUNC_ATANL): Test also whether atanl can be used as a
+	function pointer.
+	* lib/math.in.h (atanl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	acosl: Provide function definition on MSVC.
+	* m4/acosl.m4 (gl_FUNC_ACOSL): Test also whether acosl can be used as a
+	function pointer.
+	* lib/math.in.h (acosl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	asinl: Provide function definition on MSVC.
+	* m4/asinl.m4 (gl_FUNC_ASINL): Test also whether asinl can be used as a
+	function pointer.
+	* lib/math.in.h (asinl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	tanl: Provide function definition on MSVC.
+	* m4/tanl.m4 (gl_FUNC_TANL): Test also whether tanl can be used as a
+	function pointer.
+	* lib/math.in.h (tanl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	cosl: Provide function definition on MSVC.
+	* m4/cosl.m4 (gl_FUNC_COSL): Test also whether cosl can be used as a
+	function pointer.
+	* lib/math.in.h (cosl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	sinl: Provide function definition on MSVC.
+	* m4/sinl.m4 (gl_FUNC_SINL): Test also whether sinl can be used as a
+	function pointer.
+	* lib/math.in.h (sinl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	logl: Provide function definition on MSVC.
+	* m4/logl.m4 (gl_FUNC_LOGL): Test also whether logl can be used as a
+	function pointer.
+	* lib/math.in.h (logl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	expl: Provide function definition on MSVC.
+	* m4/expl.m4 (gl_FUNC_EXPL): Test also whether expl can be used as a
+	function pointer.
+	* lib/math.in.h (expl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	sqrtl: Provide function definition on MSVC.
+	* m4/sqrtl.m4 (gl_FUNC_SQRTL): Test also whether sqrtl can be used as
+	a function pointer.
+	* lib/math.in.h (sqrtl): Undefine if it does not exist as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	ceill: Provide function definition on MSVC.
+	* m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Test also whether ceill can be
+	used as a function pointer.
+	* lib/math.in.h (ceill): Undefine if it is not declared as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	floorl: Provide function definition on MSVC.
+	* m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Test also whether floorl can be
+	used as a function pointer.
+	* lib/math.in.h (floorl): Undefine if it is not declared as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	ceilf: Provide function definition on MSVC.
+	* m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Test also whether ceilf can be
+	used as a function pointer.
+	* lib/math.in.h (ceilf): Undefine if it is not declared as a function.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	floorf: Provide function definition on MSVC.
+	* m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Test also whether floorf can be
+	used as a function pointer.
+	* lib/math.in.h (floorf): Undefine if it is not declared as a function.
+
+2012-02-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdnoreturn: new module
+	This implements a replacement for C11's <stdnoreturn.h>.
+	* doc/gnulib.texi (Header File Substitutes): Add stdnoreturn.
+	* doc/posix-headers/stdnoreturn.texi, lib/stdnoreturn.in.h:
+	* m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
+	* tests/test-stdnoreturn.c: New files.
+
+2012-02-24  Stanislav Brabec  <sbrabec@suse.cz>  (tiny change)
+
+	regex: fix false multibyte matches in some regular expressions
+	See <http://sourceware.org/bugzilla/show_bug.cgi?id=13637>
+	and <http://sourceware.org/ml/libc-alpha/2012-02/msg00521.html>.
+	* lib/regex_internal.c (re_string_skip_chars):
+	Fix miscomputation of remain_len that may cause incomplete
+	multi-byte character and false match.
+
+2012-02-24  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too
+	* top/maint.mk (sc_prohibit_strcmp): Also prohibit uses of strcmp
+	uses with "==" *before* the call, e.g., 0 == strcmp (...)
+	Remove now-unnecessary str''cmp obfuscation.
+	Suggested by Akim Demaille.
+
+2012-02-24  Bruno Haible  <bruno@clisp.org>
+
+	streq: Rename macro.
+	* lib/streq.h (STREQ_OPT): Renamed from STREQ.
+	* NEWS: Mention the change.
+	* lib/mbrtowc.c (mbrtowc): Update.
+	* lib/uniwidth/cjk.h (is_cjk_encoding): Update.
+	* lib/wcwidth.c (wcwidth): Update.
+	Suggested by Akim Demaille and Jim Meyering.
+
+2012-02-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: fix typo in definition of MIN
+	* lib/regex_internal.h (MIN): Fix typo.  Problem reported by Thomas
+	Schwinge in <http://sourceware.org/bugzilla/show_bug.cgi?id=11638#c4>.
+
+2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
+	    Bruno Haible  <bruno@clisp.org>
+
+	acl: Don't use ACL_CNT and similar ops, since they are unreliable.
+	* lib/file-has-acl.c (file_has_acl) [HP-UX, NonStop Kernel]: Read the
+	entries into a stack-allocated buffer directly.
+	* lib/copy-acl.c (qcopy_acl) [HP-UX, NonStop Kernel]: Likewise.
+
+2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
+	    Bruno Haible  <bruno@clisp.org>
+
+	acl: Don't use GETACLCNT and similar ops, since they are unreliable.
+
+	 - There were several instances of this pattern:
+
+	     for (;;) {
+	       n = acl (f, GETACLCNT, 0, NULL);
+	       [ allocate an array A of size N ]
+	       if (acl (f, GETACL, n, a) == n)
+		 break;
+	     }
+
+	   This loop might never terminate if some other process is constantly
+	   manipulating the file's ACL.  The loop should be rewritten to
+	   terminate.
+
+	 - The acl (... GETACLNT ...) call is merely an optimization; its value
+	   is merely a hint as to how big to make the array.  A better
+	   optimization is to avoid the acl (... GETACLNT ...)  call entirely,
+	   and just guess a reasonably-big size, growing the size and trying
+	   again if it's not large enough.  This guarantees termination, and
+	   saves a system call.
+
+	* lib/acl-internal.h: Include <limits.h>.
+	(MIN, SIZE_MAX): New macros.
+	* lib/file-has-acl.c (file_has_acl) [Solaris]: Read the entries into
+	a stack-allocated buffer, and use malloc if it does not fit. Don't
+	use GETACLCNT.
+	* lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
+
+2012-02-19  Bruno Haible  <bruno@clisp.org>
+
+	acl: Fix endless loop on Solaris with vxfs.
+	* lib/file-has-acl.c (file_has_acl) [Solaris]: Treat a failing
+	acl()/facl() call for ACE_GETACL like a failing call for ACE_GETACLCNT.
+	* lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
+	* lib/copy-acl.c (qcopy_acl)[Solaris]: Likewise.
+	* tests/test-sameacls.c (main)[Solaris]: Likewise.
+	Reported by Bill Jones in
+	<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10639>, via Paul Eggert.
+
+2012-02-19  Bruno Haible  <bruno@clisp.org>
+
+	acl: Fix copy-acl test failure on Solaris 11 2011-11.
+	* lib/file-has-acl.c (NEW_ACE_WRITEA_DATA): New macro.
+	(acl_ace_nontrivial): Relax the restrictions on access_masks[] so
+	that this function returns 0 in some more cases.
+
+2012-02-19  Bruno Haible  <bruno@clisp.org>
+
+	acl: Update doc references.
+	* doc/acl-resources.txt: Update links to Solaris documentation.
+
+2012-02-19  Bruno Haible  <bruno@clisp.org>
+
+	Fix test failure in many locales on Solaris 11.
+	* tests/test-pipe-filter-gi1.c (main): Don't use range expression in
+	'tr' arguments.
+	* tests/test-pipe-filter-ii1.c (main): Likewise.
+	* build-aux/bootstrap (check_versions): Run 'tr' command with range
+	expressions in the C locale.
+	* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
+	* m4/host-os.m4 (gl_HOST_OS): Likewise.
+
+2012-02-19  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Improve usage message.
+	* gnulib-tool (func_usage): Move doc of --help and --version to the
+	section "Operation modes".
+
+2012-02-18  Reuben Thomas  <rrt@sc3d.org>
+
+	README-release: make it easier to execute commands
+	* top/README-release: break commands out on to separate lines.
+
+2012-02-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	GNUmakefile: simplify detection of unconfigured trees
+	* top/GNUmakefile: Use $(wildcard) instead of $(shell) to determine
+	whether the tree make is being run from is already configured or
+	not.  Related simplifications.
+
+2012-02-13  Simon Josefsson  <simon@josefsson.org>
+
+	* gnulib-tool (func_usage): Document --help and --version.
+
+2012-02-11  Jim Meyering  <meyering@redhat.com>
+
+	bootstrap: don't exit 0 upon gnulib-tool failure
+	* build-aux/bootstrap (gnulib_tool): If gnulib-tool fails, exit with
+	its exit status, not 0.
+
+2011-12-19  Reuben Thomas  <rrt@sc3d.org>
+
+	README-release: various improvements
+	* top/README-release: Give a command to push changes for the
+	release.  Add "distcheck" to list of other pre-release checks.
+	Fix instance of "make stable" which should be "make TYPE".
+
+2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+	maint: replace FSF snail-mail addresses with URLs
+	* config/argz.mk, lib/accept4.c, lib/alignof.h, lib/alloca.in.h:
+	* lib/alphasort.c, lib/arcfour.c, lib/arcfour.h, lib/arctwo.c:
+	* lib/arctwo.h, lib/argz.c, lib/arpa_inet.in.h, lib/asnprintf.c:
+	* lib/asprintf.c, lib/assert.in.h, lib/base32.c, lib/base32.h:
+	* lib/base64.c, lib/base64.h, lib/c-ctype.c, lib/c-ctype.h:
+	* lib/c-strcase.h, lib/c-strcasecmp.c, lib/c-strncasecmp.c:
+	* lib/check-version.c, lib/check-version.h, lib/config.charset:
+	* lib/ctype.in.h, lib/des.c, lib/des.h, lib/dup3.c, lib/errno.in.h:
+	* lib/float+.h, lib/fnmatch.c, lib/fnmatch.in.h, lib/fnmatch_loop.c:
+	* lib/fseeko.c, lib/gai_strerror.c, lib/gc-gnulib.c:
+	* lib/gc-libgcrypt.c, lib/gc-pbkdf2-sha1.c, lib/gc.h:
+	* lib/getaddrinfo.c, lib/getdelim.c, lib/getfilecon.c, lib/getline.c:
+	* lib/getlogin_r.c, lib/getpass.c, lib/getpass.h, lib/gettext.h:
+	* lib/gettimeofday.c, lib/glob.in.h, lib/glthread/cond.c:
+	* lib/glthread/cond.h, lib/glthread/lock.c, lib/glthread/lock.h:
+	* lib/glthread/thread.c, lib/glthread/thread.h:
+	* lib/glthread/threadlib.c, lib/glthread/yield.h, lib/hmac-md5.c:
+	* lib/hmac-sha1.c, lib/hmac.h, lib/iconv.c, lib/iconv.in.h:
+	* lib/iconv_close.c, lib/iconv_open.c, lib/inet_ntop.c, lib/isfinite.c:
+	* lib/isinf.c, lib/iswblank.c, lib/langinfo.in.h, lib/link.c:
+	* lib/localcharset.c, lib/localcharset.h, lib/lseek.c, lib/malloc.c:
+	* lib/malloca.c, lib/malloca.h, lib/md2.c, lib/md2.h, lib/md4.c:
+	* lib/md4.h, lib/md5.c, lib/md5.h, lib/memmem.c, lib/mempcpy.c:
+	* lib/memset.c, lib/memxor.c, lib/memxor.h, lib/minmax.h, lib/mktime.c:
+	* lib/msvc-inval.c, lib/msvc-inval.h, lib/msvc-nothrow.c:
+	* lib/msvc-nothrow.h, lib/netdb.in.h, lib/netinet_in.in.h, lib/nproc.c:
+	* lib/nproc.h, lib/obstack_printf.c, lib/pathmax.h, lib/pipe.c:
+	* lib/pipe2.c, lib/poll.c, lib/poll.in.h, lib/printf-args.c:
+	* lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h:
+	* lib/pselect.c, lib/pthread.in.h, lib/pty-private.h, lib/pty.in.h:
+	* lib/read-file.c, lib/read-file.h, lib/ref-add.sin, lib/ref-del.sin:
+	* lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c:
+	* lib/regex_internal.h, lib/regexec.c, lib/rijndael-alg-fst.c:
+	* lib/rijndael-alg-fst.h, lib/rijndael-api-fst.c:
+	* lib/rijndael-api-fst.h, lib/rint.c, lib/rintf.c, lib/rintl.c:
+	* lib/round.c, lib/roundf.c, lib/roundl.c, lib/scandir.c, lib/select.c:
+	* lib/sha1.c, lib/sha1.h, lib/size_max.h, lib/snprintf.c:
+	* lib/stdalign.in.h, lib/stdarg.in.h, lib/stdbool.in.h:
+	* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/str-kmp.h:
+	* lib/str-two-way.h, lib/strcasecmp.c, lib/strcasestr.c, lib/strdup.c:
+	* lib/striconv.c, lib/striconv.h, lib/string.in.h, lib/strings.in.h:
+	* lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c, lib/strpbrk.c:
+	* lib/strptime.c, lib/strsep.c, lib/strstr.c, lib/strverscmp.c:
+	* lib/sys_file.in.h, lib/sys_ioctl.in.h, lib/sys_select.in.h:
+	* lib/sys_socket.in.h, lib/sys_stat.in.h, lib/sys_time.in.h:
+	* lib/sys_times.in.h, lib/sys_types.in.h, lib/sys_uio.in.h:
+	* lib/sys_utsname.in.h, lib/sys_wait.in.h, lib/tcgetsid.c:
+	* lib/termios.in.h, lib/time.in.h, lib/time_r.c, lib/timegm.c:
+	* lib/times.c, lib/unictype/3level.h, lib/unictype/3levelbit.h:
+	* lib/unistd.in.h, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c:
+	* lib/vsnprintf.c, lib/waitpid.c, lib/wchar.in.h, lib/wctype.in.h:
+	* lib/xsize.h, tests/test-closein.c, tests/test-des.c:
+	* tests/test-fclose.c, tests/test-fgetc.c, tests/test-filevercmp.c:
+	* tests/test-fputc.c, tests/test-fread.c, tests/test-fwrite.c:
+	* tests/test-gc-arcfour.c, tests/test-gc-arctwo.c, tests/test-gc-des.c:
+	* tests/test-gc-hmac-md5.c, tests/test-gc-hmac-sha1.c:
+	* tests/test-gc-md2.c, tests/test-gc-md4.c, tests/test-gc-md5.c:
+	* tests/test-gc-pbkdf2-sha1.c, tests/test-gc-rijndael.c:
+	* tests/test-gc-sha1.c, tests/test-gc.c, tests/test-getdelim.c:
+	* tests/test-getline.c, tests/test-getndelim2.c, tests/test-md2.c:
+	* tests/test-md4.c, tests/test-parse-datetime.c, tests/test-perror.c:
+	* tests/test-perror2.c, tests/test-pipe.c, tests/test-pipe2.c:
+	* tests/test-poll.c, tests/test-quotearg-simple.c:
+	* tests/test-quotearg.c, tests/test-quotearg.h:
+	* tests/test-round-ieee.c, tests/test-round1.c:
+	* tests/test-roundf-ieee.c, tests/test-roundf1.c:
+	* tests/test-roundl-ieee.c, tests/test-roundl.c:
+	* tests/test-safe-alloc.c, tests/test-sigpipe.c:
+	* tests/test-spawn-pipe-child.c, tests/test-spawn-pipe-main.c:
+	* tests/test-strerror.c, tests/test-strerror_r.c:
+	* tests/test-strsignal.c, tests/test-strverscmp.c:
+	* tests/test-xmemdup0.c:
+	Replace FSF snail mail addresses with URLs, as per GNU coding
+	standards.  See glibc bug
+	<http://sourceware.org/bugzilla/show_bug.cgi?id=13673>.
+
+2011-12-22  Reuben Thomas  <rrt@sc3d.org>
+
+	README-release: capitalize a word and split a line
+	* top/README-release: Fix punctuation and spacing.
+
+2012-02-08  Akim Demaille  <demaille@gostai.com>
+
+	fatal-signal: use C prototypes (with explicit void).
+	* lib/fatal-signal.c (uninstall_handlers, install_handlers)
+	(init_fatal_signal_set, block_fatal_signals): Fix signatures.
+
+2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: spelling fix
+	* lib/regexec.c: spelling fix
+
+	regex: rely on stdint.h for SIZE_MAX
+	* lib/regex_internal.h (SIZE_MAX): Remove; stdint.h supplies this now.
+
+2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+	regex: merge glibc changes
+
+	* lib/regcomp.c (init_dfa): Tighten overflow checks to test
+	for IDX_MAX too, since IDX_MAX can be much less than SIZE_MAX.
+	(init_word_char): Work even if bitset words are not exactly 32 or
+	64 bits wide.  Don't assume there are no padding bits.
+	* lib/regex.c [_LIBC]: Do not include <config.h>.
+	[!_LIBC]: Add pragmas to ignore -Wsuggest-attributes=pure
+	and -Wtype-limits.
+	* lib/regex.h (__USE_GNU): Renamed from __USE_GNU_REGEX, to avoid
+	needless disagreement with glibc.  All uses changed.  Define it to
+	1 only if _GNU_SOURCE, to match glibc.
+	(_REG_RM_NAME): Remove; no longer needed, since the names in
+	question are now all protected by __USE_GNU.
+	(_REG_RE_NAME): Remove; replaced by glibc's __REPB_PREFIX.
+	(REG_TRANSLATE_TYPE): Remove; replaced by glibc's __RE_TRANSLATE_TYPE.
+	* lib/regex_internal.h (MIN): New macro.
+
+	2012-01-03 Ulrich Drepper <drepper@gmail.com>
+	* lib/regcomp.c (init_word_char): Optimize regex a bit.
+
+	2011-12-30 Jakub Jelinek <jakub@redhat.com>
+	* lib/regex_internal.c (re_string_fetch_byte_case):
+	Fix up regcomp/regexec.  The problem is that parse_bracket_symbol
+	is miscompiled, and it turns out it is because of an incorrect
+	attribute on re_string_fetch_byte_case.  Unlike
+	re_string_peek_byte_case, this one is really not pure, it modifies
+	memory (increments pstr->cur_idx), and with the pure attribute GCC
+	assumed it doesn't and it cached the presumed value of
+	regexp->cur_idx in a variable across the
+	 for (;; ++i)
+	   {
+	     if (i >= BRACKET_NAME_BUF_SIZE)
+	       return REG_EBRACK;
+	     if (token->type == OP_OPEN_CHAR_CLASS)
+	       ch = re_string_fetch_byte_case (regexp);
+	     else
+	       ch = re_string_fetch_byte (regexp);
+	     if (re_string_eoi(regexp))
+	       return REG_EBRACK;
+	     if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
+	       break;
+	     elem->opr.name[i] = ch;
+	   }
+
+	2011-11-29 Andreas Schwab <schwab@redhat.com>
+	* lib/regcomp.c (build_equiv_class):
+	Fix access after end of search string in regex matcher.
+
+	2011-11-12 Ulrich Drepper <drepper@redhat.com>
+	* lib/regex_internal.c, lib/regex_internal.h: Fix warnings in regex.
+
+	2011-10-12 Ulrich Drepper <drepper@redhat.com>
+	* lib/regcomp.c (parse_branch): One more regex memory leak fixed.
+
+	2011-10-11 Ulrich Drepper <drepper@redhat.com>
+	* lib/regcomp.c (parse_branch, parse_sub_exp):
+	More regex memory leak fixes and tests.
+	(parse_sub_exp, parse_bracket_exp):
+	Fix memory leak for some invalid regular expressions.
+
+	2011-05-28 Ulrich Drepper <drepper@gmail.com>
+	* lib/regex_internal.c, lib/regexec.c:
+	Fix unnecessary overallocation due to incomplete character.  When
+	incomplete characters are found at the end of a string the code
+	ran amok and allocated lots of memory.  Stricter limits are now in
+	place.
+
+	2011-05-20 Reuben Thomas <rrt@sc3d.org>
+	* lib/regex.h: Update documentation.
+
+	2011-05-16 Aharon Robbins <arnold@skeeve.com>
+	* lib/regex.h: Update RE_SYNTAX*_AWK constants.
+
+	2010-05-05 Andreas Schwab <schwab@redhat.com>
+	* lib/regexec.c (find_collation_sequence_value):
+	Fix lookup of collation sequence value during regexp matching.
+
+	2010-01-22 Ulrich Drepper <drepper@redhat.com>
+	* lib/regex_internal.c (re_dfa_add_node): Extend overflow detection.
+
+	2008-01-16 Ulrich Drepper <drepper@redhat.com>
+	* lib/regex.h: Cleanup namespace.
+
+	2007-11-26 Ulrich Drepper <drepper@redhat.com>
+	* lib/regex.h (REG_ENOSYS): Define REG_ENOSYS also for __USE_XOPEN2K.
+
+	2007-08-26 Ulrich Drepper <drepper@redhat.com>
+	* lib/regex_internal.h: Prevent some declarations and definitions
+	to be seen when used in tests.
+
+	2005-05-06 Ulrich Drepper <drepper@redhat.com>
+	* lib/regex_internal.h: Include bits/libc-lock.h or define dummy
+	__libc_lock_* macros if not _LIBC.
+	(struct re_dfa_t): Add lock.
+
+2012-02-07  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: also prohibit lower-case @var@
+	* top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
+	lower case, like @top_srcdir@.
+
+2012-02-04  Eric Blake  <eblake@redhat.com>
+
+	canonicalize: avoid uninitialized memory use
+	* lib/canonicalize-lgpl.c (__realpath): Avoid possibility of
+	random '/' left in dest.
+	* lib/canonicalize.c (canonicalize_filename_mode): Likewise.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	isatty: Fix test failure of ptsname_r on native Windows.
+	* lib/isatty.c (_isatty_nothrow): Upon exception, return 0, not -1,
+	and don't set errno.
+	(isatty): Test first whether fd is valid. Set errno when returning 0.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	spawn-pipe tests: Fix a NULL program name in a diagnostic.
+	* tests/test-spawn-pipe-main.c: Include progname.h.
+	(main): Invoke set_program_name.
+	* modules/spawn-pipe-tests (Depends-on): Add progname.
+
+	nonblocking-socket tests: Fix a NULL program name in a diagnostic.
+	* tests/test-nonblocking-socket-main.c: Include progname.h.
+	(main): Invoke set_program_name.
+	* modules/nonblocking-socket-tests (Depends-on): Add progname.
+
+	nonblocking-pipe tests: Fix a NULL program name in a diagnostic.
+	* tests/test-nonblocking-pipe-main.c: Include progname.h.
+	(main): Invoke set_program_name.
+	* modules/nonblocking-pipe-tests (Depends-on): Add progname.
+
+2012-02-04  Eric Blake  <eblake@redhat.com>
+
+	canonicalize-lgpl: fix // handling
+	* lib/canonicalize-lgpl.c (__realpath): Don't convert /// to //.
+
+	canonicalize: fix // handling
+	* lib/canonicalize.c (canonicalize_filename_mode): Don't convert
+	/// to //, since only // is special.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	ioctl: Fix test failure on native Windows.
+	* lib/ioctl.c: Include msvc-nothrow.h.
+	(primary_ioctl): If fd is not a valid handle, set errno to EBADF.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	fsync: Avoid test failure on native Windows.
+	* lib/fsync.c (fsync) [Windows]: Don't fail if the handle is merely
+	read-only.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	sys_select: Avoid syntax error on OpenBSD 5.0.
+	* lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
+	currently being included, just include the system's <sys/select.h>.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	sys_select: Avoid syntax error on OpenBSD 5.0.
+	* lib/sys_select.in.h: Include <signal.h> only after the include_next
+	<sys/select.h>, not before.
+	Reported by Jiri B <jirib@devio.us>.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
+	* tests/test-get-rusage-as.c (main): Assign the malloc() results to
+	global variables.
+	* tests/test-get-rusage-data.c (main): Likewise.
+	Reported by Jim Meyering.
+
+2012-02-04  Bruno Haible  <bruno@clisp.org>
+
+	stdioext: Fix last commit.
+	* lib/fwritable.c [EPLAN9]: Include <fcntl.h>.
+
+2012-02-03  Bruno Haible  <bruno@clisp.org>
+
+	stdioext: Add tentative support for Plan9.
+	* lib/stdio-impl.h: Include <errno.h>.
+	* lib/fseterr.c (fseterr) [EPLAN9]: Add conditional code.
+	* lib/freadable.c (freadable): Likewise.
+	* lib/fwritable.c (fwritable): Likewise.
+	* lib/fbufmode.c (fbufmode): Likewise.
+	* lib/freading.c (freading): Likewise.
+	* lib/fwriting.c (fwriting): Likewise.
+	* lib/freadptr.c (freadptr): Likewise.
+	* lib/freadseek.c (freadptrinc): Likewise.
+	* lib/freadahead.c (freadahead): Likewise.
+	* lib/fpurge.c (fpurge): Likewise.
+	* lib/fseeko.c (rpl_fseeko): Likewise.
+	* m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Plan9.
+	Reported by Jens Staal <staal1978@gmail.com>.
+
+2012-02-02  Jim Meyering  <meyering@redhat.com>
+
+	file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
+	* lib/file-has-acl.c (file_has_acl): This function (for some #ifdefs)
+	would evoke a new gcc warning.  Given all of the #ifdefs, it is better
+	not even to try to add the attribute.  Instead, add a pragma to suppress
+	the suggestion/warning.
+
+2012-01-31  Karl Berry  <karl@gnu.org>
+
+	setstate doc: typo.
+	* doc/posix-functions/setstate.texi (setstate): { not (.
+
+2012-01-31  Bruno Haible  <bruno@clisp.org>
+
+	popen: Make more robust on Windows.
+	* lib/popen.c: On native Windows, use the _popen based code even if
+	HAVE_POPEN is set.
+	* doc/posix-functions/popen.texi: Mention necessity of COMSPEC
+	environment variable on native Windows.
+
+2012-01-30  Bruno Haible  <bruno@clisp.org>
+
+	pclose: Fix typo.
+	* lib/stdio.in.h (pclose): Fix typo in warning message.
+
+2012-01-30  Bruno Haible  <bruno@clisp.org>
+
+	doc about getlogin_r, setstate.
+	* doc/posix-functions/getlogin_r.texi: List the incompatible
+	declaration problem under "not fixed by gnulib".
+	* doc/posix-functions/setstate.texi: Mention incompatible declaration
+	problem on Solaris 11 and other platforms.
+
+2012-01-30  Chuanchang Jia  <chuanchang.jia@gmail.com>  (tiny change)
+	    Bruno Haible  <bruno@clisp.org>
+
+	poll tests: Make test more robust.
+	* tests/test-poll.c: Include macros.h.
+	(test_accept_first, test_pair, test_socket_pair, test_pipe): Verify
+	return value of various I/O operations.
+	* modules/poll-tests (Files): Add tests/macros.h.
+
+2012-01-30  Bruno Haible  <bruno@clisp.org>
+
+	sys_stat: Fix support for mingw64 and MSVC.
+	* lib/sys_stat.in.h (stat) [AIX]: Don't redefine 'stat' if the system
+	header files already do it.
+	(stat) [mingw, msvc]: Redefine the symbol to which stat is defined, not
+	stat itself.
+	Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
+
+2012-01-30  Bruno Haible  <bruno@clisp.org>
+
+	wcwidth: Work around bug in UTF-8 locale on OpenBSD 5.0.
+	* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test also wcwidth of U+05B0.
+	* doc/posix-functions/wcwidth.texi: Mention the OpenBSD 5.0 bug.
+
+2012-01-29  Bruno Haible  <bruno@clisp.org>
+
+	quotearg: Fix test failure on MacOS X 10.5.
+	* tests/test-quotearg-simple.c: Include localcharset.h.
+	(main): If the locale encoding is not ASCII, bypass the tests of
+	locale_quoting_style and clocale_quoting_style.
+	* modules/quotearg-tests (Depends-on): Add 'localcharset'.
+
+2012-01-29  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: sc_prohibit_canonicalize_without_use: avoid false positive
+	* top/maint.mk (sc_prohibit_canonicalize_without_use): Also
+	detect uses of canonicalize_file_name.
+
+2012-01-28  Bruno Haible  <bruno@clisp.org>
+
+	test-framework-sh: Fix test failure with AIX 7.1 diff.
+	* tests/init.sh (compare_): Don't use 'diff -u' if it inserts a space
+	in column 1, like 'diff -c' does.
+	* tests/test-init.sh (test_compare): Don't repeat the test from init.sh
+	whether 'diff -u' is used. Instead, test whether the output contains
+	some '@' character.
+
+2012-01-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+	strtoimax: eliminate need for stdint.h, inttypes.h checks
+	* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't use
+	gl_AC_HEADER_STDINT_H or gl_AC_HEADER_INTTYPES_H.  This reduces
+	the prerequisites for a recently-introduced strtoimax test.
+	I guess this might cause strtoimax to be replaced when not
+	strictly necessary on older hosts, but this shouldn't introduce
+	any bugs and it should make Emacs 'configure' faster on typical
+	modern hosts.  Problem discovered when importing the latest gnulib
+	to an Emacs test version.
+	* modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4.
+
+2012-01-28  Bruno Haible  <bruno@clisp.org>
+
+	sys_time: Override 'struct timeval' on some native Windows platforms.
+	* m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Test whether tv_sec
+	has the right type. Set REPLACE_STRUCT_TIMEVAL if not.
+	(gl_HEADER_SYS_TIME_H_DEFAULTS): Initialize REPLACE_STRUCT_TIMEVAL.
+	* lib/sys_time.in.h: Include <winsock2.h> also when 'struct timeval'
+	needs to be overridden.
+	(timeval): Override if REPLACE_STRUCT_TIMEVAL is set.
+	* modules/sys_time (Makefile.am): Substitute REPLACE_STRUCT_TIMEVAL.
+	* tests/test-sys_select.c: Check that the tv_sec member has the same
+	size as a 'time_t'.
+	* tests/test-sys_time.c: Likewise.
+	* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): If REPLACE_STRUCT_TIMEVAL
+	is set, set also REPLACE_GETTIMEOFDAY.
+	* lib/gettimeofday.c (gettimeofday): If 'struct timeval' is overridden,
+	convert the resulting 'struct timeval' before returning.
+	* lib/select.c: Include <sys/time.h>.
+	(select, timeval): Undefine at the right place.
+	* modules/select (Depends-on): Add sys_time.
+	* doc/posix-headers/sys_time.texi: Mention the problem with tv_sec on
+	some Windows platforms.
+	Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
+
+2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
+
+	accept4, fcntl, socket modules: Avoid warnings on x86_64 mingw64.
+	* lib/accept4.c (accept4): Use intptr_t to convert handle pointer to
+	an integer.
+	* lib/fcntl.c (dupfd): Likewise.
+	* lib/w32sock.h (SOCKET_TO_FD): Likewise.
+
+2012-01-28  Bruno Haible  <bruno@clisp.org>
+
+	fcntl: Avoid compilation error on native Windows.
+	* modules/fcntl (Depends-on): Add 'close'.
+
+2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
+
+	select, poll, isatty: Avoid warnings on x86_64 mingw64.
+	* lib/select.c (IsConsoleHandle): Use intptr_t to convert handle
+	pointer to an integer.
+	* lib/poll.c (IsConsoleHandle): Likewise.
+	* lib/isatty.c (IsConsoleHandle): Likewise.
+
+2012-01-28  Jim Meyering  <meyering@redhat.com>
+
+	doc: clarify README-release
+	* top/README-release: Clarify: you should make a point to have
+	the latest stable versions of build tools in your PATH, and the
+	reference to buildreq is solely for its list of tool names, not
+	for its minimal-functional version numbers.
+	Prompted by discussion with Reuben Thomas and Gary V. Vaughan.
+
+	maint.mk: use more readable (yet functionally equivalent) quoting
+	It is common to quote a single quote in a single quoted string like
+	this:  '...'\''...'.  Unless you know the idiom, that looks like
+	gibberish, so prefer to double-quote the string when possible.
+	Then you can use a more readable, lone single quote: "...'..."
+	* top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
+	"don't" is more readable than the equivalent 'don'\''t'.
+	(sc_cast_of_x_alloc_return_value): Likewise.
+	(sc_cast_of_alloca_return_value): Likewise.
+	(sc_makefile_path_separator_check): Similar: use ":" in '...',
+	rather than '\'':'\''.
+
+2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdalign: relax _Alignof and tighten _Alignas test
+	* m4/stdalign.m4 (gl_STDALIGN_H): Relax the _Alignof test,
+	as it was too strict: alignof must divide offsetof, but it need
+	not equal offsetof.  Inspired by Joseph S. Myers's comment
+	<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023#c10>.
+	Conversely, tighten the _Alignas test a bit, as the resulting
+	alignment must be exactly 8.
+
+2012-01-27  Bruno Haible  <bruno@clisp.org>
+
+	stdalign: Document the last change.
+	* doc/posix-headers/stdalign.texi: Mention GCC bug 52023.
+
+2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+	stdalign: check that alignof and offsetof are consistent
+	* m4/stdalign.m4 (gl_STDALIGN_H): Check for GCC bug 52023.
+	Problem reported for gnulib by Richard W.M. Jones in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00340.html>.
+
+2012-01-27  Jim Meyering  <meyering@redhat.com>
+
+	update-copyright: accept new option: UPDATE_COPYRIGHT_USE_INTERVALS=2
+	* build-aux/update-copyright: When UPDATE_COPYRIGHT_USE_INTERVALS=2,
+	convert a sequence with gaps to the minimal containing range.
+	For example, convert 2000, 2004-2007, 2009 to 2000-2009.
+	* tests/test-update-copyright.sh: Test for this.
+	The FSF confirmed it is ok to do this, assuming there is at
+	least one significant change per year in the affected range:
+	http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29554/focus=29860
+
+2012-01-26  Bruno Haible  <bruno@clisp.org>
+
+	pipe2: refine doc about thread-safety
+	* doc/glibc-functions/pipe2.texi: Clarify the extent of the
+	multithread-safety problem.
+	* doc/glibc-functions/accept4.texi: Likewise.
+
+2012-01-26  Bruno Haible  <bruno@clisp.org>
+
+	posix_spawn_file_actions_addopen: Fix 2012-01-08 commit.
+	* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN):
+	In the test program, include <fcntl.h>, for O_RDONLY.
+
+2012-01-26  Eric Blake  <eblake@redhat.com>
+
+	pipe2: document lack of thread-safety in replacement
+	* doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety
+	issue in replacement.
+	* doc/glibc-functions/accept4.texi (accept4): Likewise.
+	Based on a report by Eric Wong.
+
+2012-01-24  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
+	    Bruno Haible  <bruno@clisp.org>
+
+	malloca: Avoid warnings on x86_64 mingw64.
+	* lib/malloca.c: Include <stdint.h>.
+	(mmalloca, freea): Use uintptr_t to convert pointers to integers.
+	* modules/malloca (Depends-on): Add stdint.
+	* modules/relocatable-prog-wrapper (Depends-on): Likewise.
+
+2012-01-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+	obstack: remove __STDC__ conditionals
+	* lib/obstack.h: Remove __STDC__ conditionals, as suggested by Joseph
+	S. Myers in <http://cygwin.com/ml/libc-alpha/2012-01/msg00104.html>.
+	This leaves lib/localcharset.c, m4/iconv.m4, and a confusing comment in
+	m4/include_next.m4 as the only gnulib-maintained places that still
+	refer to __STDC__.
+
+2012-01-24  Bruno Haible  <bruno@clisp.org>
+
+	havelib: Modern quoting.
+	* build-aux/config.rpath: Quote 'like this', not `like this', as per
+	the recent change to the GNU coding standards.
+
+2012-01-24  Bruno Haible  <bruno@clisp.org>
+
+	stdint: Improve support for Android.
+	* lib/stdint.in.h: Test __ANDROID__, not __BIONIC__.
+	Reported by Simon Josefsson <simon@josefsson.org>.
+
+2012-01-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+	doc: omit trailing empty lines from INSTALL etc.
+	* doc/Makefile (INSTALL): Omit trailing empty lines.
+	(INSTALL.ISO, INSTALL.UTF-8): Build from INSTALL, so that these also
+	omit trailing empty lines.  This simplifies the build procedure.
+
+2012-01-23  Jim Meyering  <meyering@redhat.com>
+
+	tests: avoid spurious warnings about gl_sockets_startup
+	Fedora rawhide's gcc version 4.7.0 20120119 with -Wunused-value
+	would warn about every use of "gl_sockets_startup (SOCKETS_1_1);"
+	reporting a "statement with no effect".
+	* tests/test-accept.c (main): Mark as "(void)".
+	* tests/test-accept4.c (main): Likewise.
+	* tests/test-bind.c (main): Likewise.
+	* tests/test-connect.c (main): Likewise.
+	* tests/test-getpeername.c (main): Likewise.
+	* tests/test-getsockname.c (main): Likewise.
+	* tests/test-getsockopt.c (main): Likewise.
+	* tests/test-listen.c (main): Likewise.
+	* tests/test-recv.c (main): Likewise.
+	* tests/test-recvfrom.c (main): Likewise.
+	* tests/test-send.c (main): Likewise.
+	* tests/test-sendto.c (main): Likewise.
+	* tests/test-setsockopt.c (main): Likewise.
+	* tests/test-shutdown.c (main): Likewise.
+
+2012-01-21  Bruno Haible  <bruno@clisp.org>
+
+	locale-fr.m4: Fix for Android.
+	* m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Avoid compilation
+	failure of the test program on Bionic libc.
+
+2012-01-21  Jim Meyering  <meyering@redhat.com>
+
+	bootstrap: fail when bootstrap_post_import_hook fails
+	Otherwise, it's far too easy to miss diagnostics emitted
+	between gnulib-tool's output and that of running configure.
+	* build-aux/bootstrap: Fail when bootstrap_post_import_hook fails.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: enable sc_trailing_blank
+	* build-aux/pmccabe.css: Remove trailing blanks.
+	* doc/acl-cygwin.txt: Likewise.
+	* doc/gnu-oids.texi: Likewise
+	* cfg.mk: Enable sc_trailing_blank.
+	Exempt build-aux/texinfo.tex and doc/Copyright/assign.future.manual.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: enable sc_prohibit_openat_without_use
+	* cfg.mk: Enable sc_prohibit_openat_without_use.
+	Exempt lib/selinux-at.c.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: enable sc_prohibit_cloexec_without_use
+	* cfg.mk: Enable sc_prohibit_cloexec_without_use.
+	* lib/dup-safer-flag.c: Don't include "cloexec.h".  Not needed.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: enable sc_prohibit_intprops_without_use
+	* cfg.mk: Enable sc_prohibit_intprops_without_use
+	* tests/test-nanosleep.c: Don't include "intprops.h".  Not needed.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: enable sc_prohibit_hash_pjw_without_use
+	* cfg.mk: Enable sc_prohibit_hash_pjw_without_use.
+	* top/maint.mk (sc_prohibit_hash_pjw_without_use): Adjust regexp
+	to match any use of \<hash_pjw\>, i.e., not necessarily with a
+	following " (".
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: enable double-word-prohibiting rule
+	* cfg.mk (local-checks-to-skip): Enable sc_prohibit_doubled_word.
+	Exempt three files.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: remove empty lines at EOF, but excluding modules/*
+	Apply syntax rules at home as well as abroad.  Most changes
+	were induced by running this:
+	  make srcdir=. _build-aux=build-aux -f top/maint.mk \
+	    sc_prohibit_empty_lines_at_EOF | grep -v modules/ \
+	    | xargs perl -pi -0777 -e 's/\n\n+$/\n/'
+	* cfg.mk (local-checks-to-skip): Enable sc_prohibit_empty_lines_at_EOF.
+	Exempt modules/* and two binary files.
+	Also exempt doc/INSTALL*, per request from Bruno Haible.
+	* doc/regexprops-generic.texi: *Add* a newline at EOF.  There was none.
+	* doc/Copyright/assign.translation.manual: Remove empty lines at EOF.
+	* doc/Copyright/request-assign.future: Likewise.
+	* doc/Copyright/request-disclaim.changes: Likewise.
+	* doc/INSTALL: Likewise.
+	* doc/INSTALL.ISO: Likewise.
+	* doc/INSTALL.UTF-8: Likewise.
+	* doc/acl-cygwin.txt: Likewise.
+	* doc/acl-resources.txt: Likewise.
+	* doc/fdl-1.2.texi: Likewise.
+	* doc/fdl-1.3.texi: Likewise.
+	* doc/fdl.texi: Likewise.
+	* lib/argp-pin.c: Likewise.
+	* lib/round.c: Likewise.
+	* lib/unicase/u16-totitle.c: Likewise.
+	* lib/unictype/block_test.c: Likewise.
+	* lib/uninorm/canonical-decomposition.c: Likewise.
+	* m4/README: Likewise.
+	* m4/relocatable-lib.m4: Likewise.
+	* tests/test-isnand-nolibm.c: Likewise.
+	* tests/test-isnand.c: Likewise.
+	* tests/uninorm/NormalizationTest.txt: Likewise.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: add framework to run syntax-check rules against gnulib sources
+	* cfg.mk: New file, to disable all currently-failing tests.
+	We'll enable them one by one, as they are made to pass.
+	* Makefile (sc_maint): New rule.
+
+2012-01-21  Bruno Haible  <bruno@clisp.org>
+
+	stdint: Add support for Android.
+	* lib/stdint.in.h: When included from Bionic <sys/types.h>, just
+	include the system's <stdint.h>.
+	Reported by Simon Josefsson <simon@josefsson.org>.
+
+2012-01-19  Jim Meyering  <meyering@redhat.com>
+
+	bootstrap: add bootstrap_post_import_hook
+	Bison does still need something like the gnulib_mk_hook whose
+	invocation I had to remove along with slurp in commit 767ccd40.
+	Technically, we could get along without it, but doing so would
+	have required living with a warning and a mandatory post-bootstrap
+	automake rerun.
+	* build-aux/bootstrap (gnulib_mk_hook): Remove definition, too.
+	(bootstrap_post_import_hook): New function.
+	Invoke it after gnulib-tool --import and before autoreconf.
+
+2012-01-18  Jim Meyering  <meyering@redhat.com>
+
+	gitlog-to-changelog: don't use "no_"-prefixed variable name
+	* build-aux/gitlog-to-changelog (main): Use getopt's "!" attribute
+	to enable both --cluster and --no-cluster.  Change variable name,
+	s/\$no_cluster/$cluster/, and reverse usage to match.
+
+	gitlog-to-changelog: use "||", not "or" in expressions
+	* build-aux/gitlog-to-changelog (main): Use "||", not "or" in
+	expressions.
+
+2012-01-17  Joel E. Denny  <joeldenny@joeldenny.org>
+
+	gitlog-to-changelog: new option --no-cluster
+	* build-aux/gitlog-to-changelog: New option --no-cluster, disables
+	clustering of adjacent commit messages.
+
+2012-01-17  Jim Meyering  <meyering@redhat.com>
+
+	maint: spell file systems with two words, not one
+	* m4/ls-mntd-fs.m4 (MOUNTED_INTERIX_STATVFS): Spell file systems with
+	two words, not one.
+
+2012-01-16  Jim Meyering  <meyering@redhat.com>
+
+	bootstrap: add a FIXME comment to ensure we eventually remove the hack
+	* build-aux/bootstrap (gnulib_tool_options): Add comment.
+
+2012-01-16  Eric Blake  <eblake@redhat.com>
+
+	bootstrap: cater to autoconf 2.59
+	* build-aux/bootstrap (AUTORECONF): Work even when --no-recursive
+	is not available.
+
+	bootstrap: properly check for libtool
+	* build-aux/bootstrap (libtoolize): Also run libtool when older
+	usage is detected.
+
+2012-01-15  Bruno Haible  <bruno@clisp.org>
+
+	Improve support for MSVC 9.
+	* lib/unistd.in.h: Include <io.h> when needed to avoid redefinition
+	clashes on MSVC.
+	* lib/fcntl.in.h: Likewise.
+	* lib/stdlib.in.h: Likewise.
+	* lib/sys_stat.in.h: Likewise.
+
+2011-01-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	gnupload: we hold the master copy of this script now
+	For motivation and more information, see:
+	<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00222.html>
+	* build-aux/gnupload: Make it clear in the heading comments that the
+	master copy of this file is maintained by gnulib.  Since we are at
+	it, bump its copyright year and ...
+	($scriptversion): ... the date in its version.
+	($usage): Patches and bug reports should be sent to the gnulib list,
+	not the automake one.
+	* config/srclist.txt: Don't try to sync 'gnupload' from automake
+	anymore.
+
+2012-01-15  Bruno Haible  <bruno@clisp.org>
+
+	Fix module 'random'.
+	* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether random, srandom,
+	initstate, setstate are declared.
+
+2012-01-14  Bruno Haible  <bruno@clisp.org>
+
+	Tests for module 'random'.
+	* modules/random-tests: New file.
+	* tests/test-random.c: New file, based on tests/test-random_r.c.
+
+	New module 'random'.
+	* lib/stdlib.in.h (random, srandom, initstate, setstate): New
+	declarations.
+	* lib/random.c: New file, based on glibc/stdlib/random.c.
+	* m4/random.m4: New file.
+	* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RANDOM,
+	HAVE_RANDOM.
+	* modules/stdlib (Makefile.am): Substitute GNULIB_RANDOM, HAVE_RANDOM.
+	* modules/random: New file.
+	* config/srclist.txt: Add an entry for random.c.
+	* doc/posix-functions/random.texi: Mention the 'random' module.
+	* doc/posix-functions/initstate.texi: Likewise.
+	* doc/posix-functions/setstate.texi: Likewise.
+	* doc/posix-functions/srandom.texi: Likewise.
+
+2012-01-12  Bruno Haible  <bruno@clisp.org>
+
+	random_r: Use common idioms.
+	* lib/random_r.c: Include <stdlib.h> first.
+
+	random_r: Override incompatible API on AIX, OSF/1.
+	* lib/stdlib.in.h (random_r, srandom_r, initstate_r, setstate_r):
+	Override the system function if REPLACE_RANDOM_R is 1.
+	* m4/random_r.m4 (gl_FUNC_RANDOM_R): Require AC_CANONICAL_HOST. On AIX
+	and OSF/1, set REPLACE_RANDOM_R.
+	* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RANDOM_R.
+	* modules/stdlib (Makefile.am): Substitute REPLACE_RANDOM_R.
+	* modules/random_r (configure.ac): Test REPLACE_RANDOM_R.
+	* doc/glibc-functions/initstate_r.texi: Mention the AIX, OSF/1 problem.
+	* doc/glibc-functions/random_r.texi: Likewise.
+	* doc/glibc-functions/setstate_r.texi: Likewise.
+
+	random_r: Support for MSVC 9.
+	* lib/random_r.c: Include stdint.h, not inttypes.h.
+
+2012-01-12  Eric Blake  <eblake@redhat.com>
+
+	inet_ntop: guard extra work by IF_LINT
+	* lib/inet_ntop.c (inet_ntop6): Mark spurious initialization, for
+	better code generation when not checking for warnings.
+	Suggested by Paul Eggert and Jim Meyering.
+
+	strptime: fix regression on mingw
+	* lib/strptime.c (__strptime_internal) [!_LIBC && !HAVE_TM_GMTOFF]:
+	Fix regression.  Reported by Bruno Haible.
+
+2012-01-11  Reuben Thomas  <rrt@sc3d.org>
+	    Bruno Haible  <bruno@clisp.org>
+
+	copy-file: add error-code-returning variant.
+	* lib/copy-file.h (GL_COPY_ERR_*): New enumeration items.
+	(qcopy_file_preserving): New declaration.
+	* lib/copy-file.c (qcopy_file_preserving): Renamed from
+	copy_file_preserving. Change return type to 'int'. Don't emit an error
+	message here.
+	(copy_file_preserving): New function.
+	* tests/test-copy-file.c: Include <stdlib.h>.
+	(main): Test qcopy_file_preserving if the environment variable
+	NO_STDERR_OUTPUT is set.
+	* tests/test-copy-file-1.sh: Invoke test-copy-file.sh a second time,
+	with NO_STDERR_OUTPUT
+	* tests/test-copy-file-2.sh: Likewise.
+
+2012-01-10  Bruno Haible  <bruno@clisp.org>
+
+	copy-file: Use 'quote' module consistently.
+	* lib/copy-file.c (copy_file_preserving): Use quote().
+
+	copy-file: Refactor.
+	* lib/copy-file.c: Include quote.h.
+	(copy_file_preserving): Call qcopy_acl instead of copy_acl. Emit error
+	message here.
+	* modules/copy-file (Depends-on): Add quote.
+
+	acl: Export qcopy_acl.
+	* lib/acl.h (qcopy_acl): New declaration.
+	* lib/copy-acl.c (qcopy_acl): Make non-static.
+
+	acl: Rename a local variable.
+	* lib/set-mode-acl.c (set_acl): Use same variable name as in copy_acl.
+
+	acl: Align return values of copy_acl and qcopy_acl.
+	* lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl,
+	maybe < -1.
+
+2012-01-11  Eric Blake  <eblake@redhat.com>
+
+	strptime: silence gcc warnings
+	* lib/strptime.c (__strptime_internal) [!_NL_CURRENT],
+	[!_LIBC && !HAVE_TM_GMTOFF]: Avoid unused variables.
+	Reported by Daniel P. Berrange.
+
+	inet_ntop: silence gcc warning
+	* lib/inet_ntop.c (inet_ntop6): Initialize best.base.
+	Reported by Daniel P. Berrange.
+
+2012-01-11  Dmitry V. Levin  <ldv@altlinux.org>
+
+	getloadavg test: skip the test on GNU/Linux without /proc mounted
+	GNU libc implements getloadavg(3) on Linux by parsing /proc/loadavg
+	file.  When /proc is not mounted, it always fails with ENOENT.
+	* tests/test-getloadavg.c (main): Treat ENOENT return code from
+	getloadavg(3) the same way as ENOSYS and ENOTSUP.
+
+2012-01-10  Bruno Haible  <bruno@clisp.org>
+
+	regex: Avoid link error on MSVC 9.
+	* modules/regex (Depends-on): Add wctype.
+
+2012-01-10  Bruno Haible  <bruno@clisp.org>
+
+	doc: Mention --with-tests option.
+	* gnulib-tool (func_usage): Suggest --with-tests for --test etc.
+	* doc/gnulib.texi (Extra tests modules): Mention the need to pass
+	--with-tests.
+	Reported by Reuben Thomas.
+
+2012-01-10  Reuben Thomas  <rrt@sc3d.org>
+
+	users.txt: order package names lexicographically.
+	* users.txt: Order package names lexicographically.
+
 2012-01-10  Jim Meyering  <meyering@redhat.com>
 
 	maint.mk: fix description in comment
@@ -16593,7 +23928,7 @@
 	behavior match Linux.
 	* tests/test-c-stack.c (main): Prefer NULL for pointers.
 
-	stdbool-tests: accomodate Haiku
+	stdbool-tests: accommodate Haiku
 	* tests/test-stdbool.c: Haiku's gcc 2.95 lacks native _Bool.
 
 	binary-io: fix O_TEXT on Haiku
@@ -21046,7 +28381,7 @@
 	* tests/test-sys_wait.c (main): Relax test.
 	* tests/test-stdlib.c (main): Likewise.
 
-	init.sh: accomodate directory with no .exes
+	init.sh: accommodate directory with no .exes
 	* tests/init.sh: Accomodate directory containing only scripts.
 
 	tests: avoid compiler warning
@@ -34162,7 +41497,7 @@
 
 2009-11-14  John W. Eaton  <jwe@gnu.org>
 
-	strftime.h: wrap funtion declaration in extern "C" block
+	strftime.h: wrap function declaration in extern "C" block
 	* lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration.
 
 2009-11-13  Eric Blake  <ebb9@byu.net>
@@ -36909,7 +44244,7 @@
 	reversed sense of yes and no in prior patch.  Avoid confusing
 	compilation failure with desired semantics.
 
-	link-follow: accomodate mingw and cross-compilation
+	link-follow: accommodate mingw and cross-compilation
 	* m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename...
 	(gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this.  Change
 	cross-compilation results to -1, to make linkat easier to
@@ -41922,7 +49257,7 @@
 
 	test-getaddrinfo: fix usage of skip return code 77
 	* tests/test-gettaddrinfo.c: Return skip code 77 only
-	for first occurance of skip (4x77 is not 77)
+	for first occurrence of skip (4x77 is not 77)
 
 2009-02-25  Gary V. Vaughan  <gary@gnu.org>
 
@@ -54376,7 +61711,7 @@
 2007-12-01  Eric Blake  <ebb9@byu.net>
 
 	* m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Rewrite to
-	accomodate fix in cygwin 1.5.25.
+	accommodate fix in cygwin 1.5.25.
 
 2007-12-01  Jim Meyering  <meyering@redhat.com>
 
@@ -62353,7 +69688,7 @@
 	(SIZE): New macro.
 	(FUNC): Compare only SIZE bytes of the value.
 	* lib/vasnprintf.c: Include float+.h.
-	(VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
+	(VASNPRINTF): When comparing against +0.0L or +0.0, compare only
 	SIZEOF_LDBL or SIZEOF_DBL bytes.
 	* modules/isnan-nolibm (Files): Add lib/float+.h.
 	* modules/isnanl-nolibm (Files): Add lib/float+.h.
@@ -78756,7 +86091,7 @@
 	(local_zone): Accumulate dsts_seen rather than relying on tm_isdst
 	not being INT_MAX.
 	(get_date): Initialize dsts_seen, and check that it doesn't go over 1.
-	Use pc_rels_seen to decide whther a date is absolute.
+	Use pc_rels_seen to decide whether a date is absolute.
 
 	* lib/getdate.y (number): Don't overwrite year.
 	(get_date): Initialize pc.year.digits to 0, not 4, to enable above
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -101,8 +101,13 @@
     ftp://ftp.gnu.org/gnu/grep/
 
 * GNU gettext.
-  + Always use the newest available gettext release, see
-    <http://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html>.
+  + If your project wants to follow GNU Coding Standards:
+    + Always use the newest available gettext release, see
+      <http://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html>.
+    + Use the 'gettext' module.
+  + If your project cares more about ease of development on older platforms:
+    + gettext 0.17 or newer.
+    + Use the 'gettext-h' module.
   + Recommended.
     Needed if you use modules that use internationalization (many do).
   + Homepage:
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -1755,6 +1755,7 @@
   func_echo "$element"
 
   func_begin_table
+  func_module count-leading-zeros
   func_module count-one-bits
   func_module ffs
   func_module ffsl
@@ -1999,6 +2000,7 @@
   func_module crc
   func_module diacrit
   func_module diffseq
+  func_module execinfo
   func_module getline
   func_module getdelim
   func_module getnline
@@ -2009,6 +2011,7 @@
   func_module obstack-printf
   func_module obstack-printf-posix
   func_module hash-pjw
+  func_module hash-pjw-bare
   func_module hash
   func_module readline
   func_module readtokens
@@ -2428,6 +2431,7 @@
   func_module mkfifo
   func_module mknod
   func_module mkstemp
+  func_module net_if
   func_module netdb
   func_module netinet_in
   func_module nl_langinfo
@@ -3471,7 +3475,6 @@
   func_module config-h
   func_module configmake
   func_module dummy
-  func_module elisp-comp
   func_module gperf
   func_module havelib
   func_module include_next
@@ -3525,6 +3528,7 @@
   func_module gnupload
   func_module maintainer-makefile
   func_module mktempd
+  func_module non-recursive-gnulib-prefix-hack
   func_module readme-release
   func_module test-framework-sh
   func_module update-copyright
--- a/Makefile
+++ b/Makefile
@@ -26,14 +26,14 @@
 check: $(syntax-check-rules)
 
 sc_prefer_ac_check_funcs_once:
-	if test -d .git; then						\
+	@if test -d .git; then						\
 	  git grep -w -l AC_CHECK_FUNCS modules				\
 	    && { echo use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS	\
 		   in modules/ 1>&2; exit 1; } || :			\
 	else :; fi
 
 sc_prohibit_leading_TABs:
-	if test -d .git; then						\
+	@if test -d .git; then						\
 	  git grep -l '^ *	' lib m4 tests				\
 	    | grep -Ev '^lib/reg|Makefile|test-update-copyright'	\
 	    | grep .							\
@@ -42,13 +42,32 @@
 	else :; fi
 
 sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT:
-	if test -d .git; then						\
+	@if test -d .git; then						\
 	  url=http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/22874;	\
 	  git grep '^[	 ]*TESTS_ENVIRONMENT += PATH=' modules		\
 	    && { printf '%s\n' 'Do not augment PATH via TESTS_ENVIRONMENT;' \
 		 "  see <$$url>" 1>&2; exit 1; } || :			\
 	else :; fi
 
+# It's easy to forget the noise-suppressing "@" at the beginning
+# of each sc_ rule.  Check for it both in maint.mk and in this file.
+sc_prohibit_sc_omitted_at:
+	@if test -d .git; then						\
+	  git grep -n -A1 '^sc_[[:alnum:]_-]*:' top/maint.mk Makefile	\
+            | grep -vE ':sc_|[0-9][-]	@|--$$'				\
+            | sed 's/-\([0-9][0-9]*\)-/:\1:/'				\
+	    | grep .							\
+	    && { printf '*** %s\n' 'oops; missing "@"'			\
+		 1>&2; exit 1; } || :					\
+	else :; fi
+
+# Run all maint.mk syntax-check tests on gnulib's sources.
+sc_maint:
+	@rm -f maint.mk; ln -s top/maint.mk maint.mk
+	$(MAKE) -s srcdir=. gnulib_dir=. _build-aux=build-aux \
+            -f cfg.mk -f maint.mk syntax-check
+	rm -f maint.mk
+
 # Files in m4/ that (exceptionally) may use AC_LIBOBJ.
 # Do not include their ".m4" suffix.
 allow_AC_LIBOBJ =	\
@@ -76,7 +95,7 @@
 allow_AC_LIBOBJ_or := $(shell echo $(allow_AC_LIBOBJ) | tr -s ' ' '|')
 
 sc_prohibit_AC_LIBOBJ_in_m4:
-	url=http://article.gmane.org/gmane.comp.lib.gnulib.bugs/26995;	\
+	@url=http://article.gmane.org/gmane.comp.lib.gnulib.bugs/26995;	\
 	if test -d .git; then						\
 	  git ls-files m4						\
 	     | grep -Ev '^m4/($(allow_AC_LIBOBJ_or))\.m4$$'		\
@@ -86,7 +105,7 @@
 	else :; fi
 
 sc_pragma_columns:
-	if test -d .git; then						\
+	@if test -d .git; then						\
 	  git ls-files|grep '\.in\.h$$'					\
 	      | xargs grep -l '^@PRAGMA_SYSTEM_HEADER@'			\
 	      | xargs grep -L '^@PRAGMA_COLUMNS@'			\
@@ -100,7 +119,7 @@
 # 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 \
+	@./gnulib-tool --extract-filelist \
 	    $$(cd ./modules; grep -ilrE '(meyering|blake)' .) \
 	  | sort -u \
 	  | grep '\.c$$' \
@@ -112,7 +131,7 @@
 # Extract the symbols from the .h file and compare with the list of
 # symbols extracted from the rule in maint.mk.
 sc_check_sym_list:
-	i=lib/intprops.h; \
+	@i=lib/intprops.h; \
 	diff -u <(perl -lne '/^# *define ([A-Z]\w+)\(/ and print $$1' $$i|fmt) \
 	  <(sed -n /^_intprops_name/,/^_intprops_syms_re/p top/maint.mk \
 	    |sed '/^_/d;s/^  //;s/	*\\$$//')
@@ -120,7 +139,7 @@
 # Ensure that the copyright statements in files and in the module descriptions
 # are consistent.
 sc_check_copyright:
-	./check-copyright
+	@./check-copyright
 
 # Regenerate some files that are stored in the repository.
 regen: MODULES.html
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,13 @@
 
 Date        Modules         Changes
 
+2012-06-27  elisp-comp      The module 'elisp-comp' is removed; the script is
+                            not independently useful outside of automake.
+
+2012-06-21  gnulib-tool     The option --with-tests is now implied by the
+                            options --create-testdir, --test,
+                            --create-megatestdir, --megatest.
+
 2012-01-07  quotearg        In the C locale, the function will no longer use
                             the grave accent character to begin a quoted
                             string (`like this').  It will use apostrophes
@@ -21,6 +28,14 @@
 
 Date        Modules         Changes
 
+2012-06-26  getopt-posix    This module no longer guarantees that option
+                            processing is resettable.  If your code uses
+                            'optreset' or 'optind = 0;', rewrite it to make
+                            only one pass over the argument array.
+
+2012-02-24  streq           This module no longer provides the STREQ macro.
+                            Use STREQ_OPT instead.
+
 2012-01-10  ignore-value    This module no longer provides the ignore_ptr
                             function.  It was deprecated a year ago, but existed
                             so briefly before then that it never came into use.
@@ -543,12 +558,12 @@
                             <unistd.h>.
 
 2007-06-09  xallocsa        Renamed to xmalloca. The include file "xallocsa.h"
-                            was remamed to "xmalloca.h". The function was
+                            was renamed to "xmalloca.h". The function was
                             renamed:
                               xallocsa -> xmalloca
 
 2007-06-09  allocsa         Renamed to malloca. The include file "allocsa.h"
-                            was remamed to "malloca.h". The function-like
+                            was renamed to "malloca.h". The function-like
                             macros were renamed:
                               allocsa -> malloca
                               freesa -> freea
--- a/README
+++ b/README
@@ -149,7 +149,7 @@
       set noexpandtab
 
   * For Eclipse: In the "Window|Preferences" dialog (or "Eclipse|Preferences"
-    dialog on MacOS),
+    dialog on Mac OS),
     1. Under "General|Editors|Text Editors", select the "Insert spaces for tabs"
        checkbox.
     2. Under "C/C++|Code Style", select a code style profile that has the
@@ -258,15 +258,19 @@
  * There are no "holes" in integer values: all the bits of an integer
    contribute to its value in the usual way.
 
- * If two nonoverlapping objects have sizes S and T represented as
-   size_t values, then S + T cannot overflow.  This assumption is true
-   for all practical hosts with flat address spaces, but it is not
-   always true for hosts with segmented address spaces.
+ * Addresses and sizes behave as if objects reside in a flat address space.
+   In particular:
+
+   - If two nonoverlapping objects have sizes S and T represented as
+     size_t values, then S + T cannot overflow.
 
- * If an existing object has size S, and if T is sufficiently small
-   (e.g., 8 KiB), then S + T cannot overflow.  Overflow in this case
-   would mean that the rest of your program fits into T bytes, which
-   can't happen in realistic flat-address-space hosts.
+   - A pointer P points within an object O if and only if
+     (char *) &O <= (char *) P && (char *) P < (char *) (&O + 1).
+
+   - If an existing object has size S, and if T is sufficiently small
+     (e.g., 8 KiB), then S + T cannot overflow.  Overflow in this case
+     would mean that the rest of your program fits into T bytes, which
+     can't happen in realistic flat-address-space hosts.
 
  * Objects with all bits zero are treated as 0 or NULL.  For example,
    memset (A, 0, sizeof A) initializes an array A of pointers to NULL.
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -3,7 +3,7 @@
     if 0;
 # Generate a release announcement message.
 
-my $VERSION = '2012-01-06 07:46'; # UTC
+my $VERSION = '2012-06-08 06:53'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -30,13 +30,15 @@
 
 use Getopt::Long;
 use Digest::MD5;
-use Digest::SHA1;
+eval { require Digest::SHA; }
+  or eval 'use Digest::SHA1';
 use POSIX qw(strftime);
 
 (my $ME = $0) =~ s|.*/||;
 
 my %valid_release_types = map {$_ => 1} qw (alpha beta stable);
 my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz');
+my $srcdir = '.';
 
 sub usage ($)
 {
@@ -51,7 +53,7 @@
       my @types = sort keys %valid_release_types;
       print $STREAM <<EOF;
 Usage: $ME [OPTIONS]
-Generate an announcement message.
+Generate an announcement message.  Run this from builddir.
 
 OPTIONS:
 
@@ -66,7 +68,9 @@
 
 The following are optional:
 
-   --news=NEWS_FILE
+   --news=NEWS_FILE             include the NEWS section about this release
+                                from this NEWS_FILE; accumulates.
+   --srcdir=DIR                 where to find the NEWS_FILEs (default: $srcdir)
    --bootstrap-tools=TOOL_LIST  a comma-separated list of tools, e.g.,
                                 autoconf,automake,bison,gnulib
    --gnulib-version=VERSION     report VERSION as the gnulib version, where
@@ -102,13 +106,13 @@
   my %res;
   foreach my $f (@file)
     {
-      my $cmd = "du --human $f";
+      my $cmd = "du -h $f";
       my $t = `$cmd`;
       # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS
       $@
-        and (warn "$ME: command failed: '$cmd'\n"), $fail = 1;
+        and (warn "command failed: '$cmd'\n"), $fail = 1;
       chomp $t;
-      $t =~ s/^([\d.]+[MkK]).*/${1}B/;
+      $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/;
       $res{$f} = $t;
     }
   return $fail ? undef : %res;
@@ -181,7 +185,7 @@
   my ($news_file, $prev_version, $curr_version) = @_;
 
   my $news_name = $news_file;
-  $news_name =~ s|^\./||;
+  $news_name =~ s|^\Q$srcdir\E/||;
 
   print "\n$news_name\n\n";
 
@@ -310,7 +314,7 @@
   # The exit code should be 1.
   # Allow in case there are no modified ChangeLog entries.
   $? == 256 || $? == 128
-    or warn "$ME: warning: '$cmd' had unexpected exit code or signal ($?)\n";
+    or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n";
 }
 
 sub get_tool_versions ($$)
@@ -340,7 +344,7 @@
         {
           defined $first_line
             and $first_line = '';
-          warn "$ME: $t: unexpected --version output\n:$first_line";
+          warn "$t: unexpected --version output\n:$first_line";
           $fail = 1;
         }
     }
@@ -368,6 +372,15 @@
   my $gnulib_version;
   my $print_checksums_p = 1;
 
+  # Reformat the warnings before displaying them.
+  local $SIG{__WARN__} = sub
+    {
+      my ($msg) = @_;
+      # Warnings from GetOptions.
+      $msg =~ s/Option (\w)/option --$1/;
+      warn "$ME: $msg";
+    };
+
   GetOptions
     (
      'mail-headers=s'     => \$mail_headers,
@@ -378,6 +391,7 @@
      'gpg-key-id=s'       => \$gpg_key_id,
      'url-directory=s'    => \@url_dir_list,
      'news=s'             => \@news_file,
+     'srcdir=s'           => \$srcdir,
      'bootstrap-tools=s'  => \$bootstrap_tools,
      'gnulib-version=s'   => \$gnulib_version,
      'print-checksums!'   => \$print_checksums_p,
@@ -388,32 +402,32 @@
     ) or usage 1;
 
   my $fail = 0;
-  # Ensure that sure each required option is specified.
+  # Ensure that each required option is specified.
   $release_type
-    or (warn "$ME: release type not specified\n"), $fail = 1;
+    or (warn "release type not specified\n"), $fail = 1;
   $package_name
-    or (warn "$ME: package name not specified\n"), $fail = 1;
+    or (warn "package name not specified\n"), $fail = 1;
   $prev_version
-    or (warn "$ME: previous version string not specified\n"), $fail = 1;
+    or (warn "previous version string not specified\n"), $fail = 1;
   $curr_version
-    or (warn "$ME: current version string not specified\n"), $fail = 1;
+    or (warn "current version string not specified\n"), $fail = 1;
   $gpg_key_id
-    or (warn "$ME: GnuPG key ID not specified\n"), $fail = 1;
+    or (warn "GnuPG key ID not specified\n"), $fail = 1;
   @url_dir_list
-    or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1;
+    or (warn "URL directory name(s) not specified\n"), $fail = 1;
 
   my @tool_list = split ',', $bootstrap_tools;
 
   grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version
-    and (warn "$ME: when specifying gnulib as a tool, you must also specify\n"
+    and (warn "when specifying gnulib as a tool, you must also specify\n"
         . "--gnulib-version=V, where V is the result of running git describe\n"
         . "in the gnulib source directory.\n"), $fail = 1;
 
   exists $valid_release_types{$release_type}
-    or (warn "$ME: '$release_type': invalid release type\n"), $fail = 1;
+    or (warn "'$release_type': invalid release type\n"), $fail = 1;
 
   @ARGV
-    and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"),
+    and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"),
       $fail = 1;
   $fail
     and usage 1;
--- a/build-aux/ar-lib
+++ b/build-aux/ar-lib
@@ -2,9 +2,9 @@
 # Wrapper for Microsoft lib.exe
 
 me=ar-lib
-scriptversion=2012-01-04.17; # UTC
+scriptversion=2012-03-01.08; # UTC
 
-# Copyright (C) 2010, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2012 Free Software Foundation, Inc.
 # Written by Peter Rosin <peda@lysator.liu.se>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -153,7 +153,9 @@
 delete=
 extract=
 list=
+quick=
 replace=
+index=
 create=
 
 while test -n "$action"
@@ -162,9 +164,13 @@
     d*) delete=yes  ;;
     x*) extract=yes ;;
     t*) list=yes    ;;
+    q*) quick=yes   ;;
     r*) replace=yes ;;
+    s*) index=yes   ;;
+    S*)             ;; # the index is always updated implicitly
     c*) create=yes  ;;
     u*)             ;; # TODO: don't ignore the update modifier
+    v*)             ;; # TODO: don't ignore the verbose modifier
     *)
       func_error "unknown action specified"
       ;;
@@ -172,8 +178,8 @@
   action=${action#?}
 done
 
-case $delete$extract$list$replace in
-  yes)
+case $delete$extract$list$quick$replace,$index in
+  yes,* | ,yes)
     ;;
   yesyes*)
     func_error "more than one action specified"
@@ -224,7 +230,7 @@
     done
   fi
 
-elif test -n "$replace"; then
+elif test -n "$quick$replace"; then
   if test ! -f "$orig_archive"; then
     if test -z "$create"; then
       echo "$me: creating $orig_archive"
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2012-01-06.07; # UTC
+scriptversion=2012-07-19.14; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -36,6 +36,10 @@
 LC_ALL=C
 export LC_ALL
 
+# Ensure that CDPATH is not set.  Otherwise, the output from cd
+# would cause trouble in at least one use below.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
 local_gl_dir=gl
 
 me=$0
@@ -73,6 +77,33 @@
 EOF
 }
 
+# warnf_ FORMAT-STRING ARG1...
+warnf_ ()
+{
+  warnf_format_=$1
+  shift
+  nl='
+'
+  case $* in
+    *$nl*) me_=$(printf "$me"|tr "$nl|" '??')
+       printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
+    *) printf "$me: $warnf_format_" "$@" ;;
+  esac >&2
+}
+
+# warn_ WORD1...
+warn_ ()
+{
+  # If IFS does not start with ' ', set it and emit the warning in a subshell.
+  case $IFS in
+    ' '*) warnf_ '%s\n' "$*";;
+    *)    (IFS=' '; warn_ "$@");;
+  esac
+}
+
+# die WORD1...
+die() { warn_ "$@"; exit 1; }
+
 # Configuration.
 
 # Name of the Makefile.am
@@ -87,9 +118,9 @@
 : ${AUTOPOINT=autopoint}
 : ${AUTORECONF=autoreconf}
 
-# A function to be called to edit gnulib.mk right after it's created.
+# A function to be called right after gnulib-tool is run.
 # Override it via your own definition in bootstrap.conf.
-gnulib_mk_hook() { :; }
+bootstrap_post_import_hook() { :; }
 
 # A function to be called after everything else in this script.
 # Override it via your own definition in bootstrap.conf.
@@ -126,7 +157,8 @@
      p
   }
 '
-package=`sed -n "$extract_package_name" configure.ac` || exit
+package=$(sed -n "$extract_package_name" configure.ac) \
+  || die 'cannot find package name in configure.ac'
 gnulib_name=lib$package
 
 build_aux=build-aux
@@ -182,6 +214,8 @@
 # otherwise find the first of the NAMES that can be run (i.e.,
 # supports --version).  If found, set ENVVAR to the program name,
 # die otherwise.
+#
+# FIXME: code duplication, see also gnu-web-doc-update.
 find_tool ()
 {
   find_tool_envvar=$1
@@ -199,19 +233,15 @@
   else
     find_tool_error_prefix="\$$find_tool_envvar: "
   fi
-  if test x"$find_tool_res" = x; then
-    echo >&2 "$me: one of these is required: $find_tool_names"
-    exit 1
-  fi
-  ($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
-    echo >&2 "$me: ${find_tool_error_prefix}cannot run $find_tool_res --version"
-    exit 1
-  }
+  test x"$find_tool_res" != x \
+    || die "one of these is required: $find_tool_names"
+  ($find_tool_res --version </dev/null) >/dev/null 2>&1 \
+    || die "${find_tool_error_prefix}cannot run $find_tool_res --version"
   eval "$find_tool_envvar=\$find_tool_res"
   eval "export $find_tool_envvar"
 }
 
-# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6.
+# Find sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6.
 find_tool SHA1SUM sha1sum gsha1sum shasum
 
 # Override the default configuration, if necessary.
@@ -226,7 +256,6 @@
 test -z "${gnulib_extra_files}" && \
   gnulib_extra_files="
         $build_aux/install-sh
-        $build_aux/missing
         $build_aux/mdate-sh
         $build_aux/texinfo.tex
         $build_aux/depcomp
@@ -252,7 +281,7 @@
     usage
     exit;;
   --gnulib-srcdir=*)
-    GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
+    GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
   --skip-po)
     SKIP_PO=t;;
   --force)
@@ -266,21 +295,15 @@
   --no-git)
     use_git=false;;
   *)
-    echo >&2 "$0: $option: unknown option"
-    exit 1;;
+    die "$option: unknown option";;
   esac
 done
 
-if $use_git || test -d "$GNULIB_SRCDIR"; then
-  :
-else
-  echo "$0: Error: --no-git requires --gnulib-srcdir" >&2
-  exit 1
-fi
+$use_git || test -d "$GNULIB_SRCDIR" \
+  || die "Error: --no-git requires --gnulib-srcdir"
 
 if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
-  echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
-  exit 1
+  die "Bootstrapping from a non-checked-out distribution is risky."
 fi
 
 # Ensure that lines starting with ! sort last, per gitignore conventions
@@ -303,10 +326,10 @@
   file=$1
   str=$2
   test -f $file || touch $file
-  echo "$str" | sort_patterns - $file | cmp - $file > /dev/null \
+  echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
     || { echo "$str" | sort_patterns - $file > $file.bak \
       && mv $file.bak $file; } \
-    || exit 1
+    || die "insert_sorted_if_absent $file $str: failed"
 }
 
 # Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
@@ -319,7 +342,7 @@
     # A .gitignore entry that does not start with '/' applies
     # recursively to subdirectories, so prepend '/' to every
     # .gitignore entry.
-    pattern=`echo "$pattern" | sed s,^,/,`;;
+    pattern=$(echo "$pattern" | sed s,^,/,);;
   esac
   insert_sorted_if_absent "$vc_ignore_file" "$pattern"
 }
@@ -330,11 +353,8 @@
     >/dev/null && found_aux_dir=yes
 grep '^[	 ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
     >/dev/null && found_aux_dir=yes
-if test $found_aux_dir = no; then
-  echo "$0: expected line not found in configure.ac. Add the following:" >&2
-  echo "  AC_CONFIG_AUX_DIR([$build_aux])" >&2
-  exit 1
-fi
+test $found_aux_dir = yes \
+  || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
 
 # If $build_aux doesn't exist, create it now, otherwise some bits
 # below will malfunction.  If creating it, also mark it as ignored.
@@ -423,31 +443,48 @@
       $use_git || continue
     fi
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
-    appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
+    appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
     test "$appvar" = TAR && appvar=AMTAR
     case $appvar in
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
         *) eval "app=\${$appvar-$app}" ;;
     esac
+
+    # Handle the still-experimental Automake-NG programs specially.
+    # They remain named as the mainstream Automake programs ("automake",
+    # and "aclocal") to avoid gratuitous incompatibilities with
+    # pre-existing usages (by, say, autoreconf, or custom autogen.sh
+    # scripts), but correctly identify themselves (as being part of
+    # "GNU automake-ng") when asked their version.
+    case $app in
+      automake-ng|aclocal-ng)
+        app=${app%-ng}
+        ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
+          warn_ "Error: '$app' not found or not from Automake-NG"
+          ret=1
+          continue
+        } ;;
+    esac
     if [ "$req_ver" = "-" ]; then
       # Merely require app to exist; not all prereq apps are well-behaved
       # so we have to rely on $? rather than get_version.
       $app --version >/dev/null 2>&1
       if [ 126 -le $? ]; then
-        echo "$me: Error: '$app' not found" >&2
+        warn_ "Error: '$app' not found"
         ret=1
       fi
     else
       # Require app to produce a new enough version string.
       inst_ver=$(get_version $app)
       if [ ! "$inst_ver" ]; then
-        echo "$me: Error: '$app' not found" >&2
+        warn_ "Error: '$app' not found"
         ret=1
       else
         latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
         if [ ! "$latest_ver" = "$inst_ver" ]; then
-          echo "$me: Error: '$app' version == $inst_ver is too old" >&2
-          echo "       '$app' version >= $req_ver is required" >&2
+          warnf_ '%s\n'                                        \
+              "Error: '$app' version == $inst_ver is too old"  \
+              "       '$app' version >= $req_ver is required"
           ret=1
         fi
       fi
@@ -492,10 +529,8 @@
 
 # When we can deduce that gnulib-tool will require patch,
 # and when patch is not already listed as a prerequisite, add it, too.
-if test ! -d "$local_gl_dir" \
-    || find "$local_gl_dir" -name '*.diff' -exec false {} +; then
-  :
-else
+if test -d "$local_gl_dir" \
+    && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
   case $buildreq in
     *patch*) ;;
     *) buildreq="patch -
@@ -506,11 +541,10 @@
 if ! printf "$buildreq" | check_versions; then
   echo >&2
   if test -f README-prereq; then
-    echo "$0: See README-prereq for how to get the prerequisite programs" >&2
+    die "See README-prereq for how to get the prerequisite programs"
   else
-    echo "$0: Please install the prerequisite programs" >&2
+    die "Please install the prerequisite programs"
   fi
-  exit 1
 fi
 
 echo "$0: Bootstrapping from checked-out $package sources..."
@@ -539,7 +573,7 @@
   test -f .gitmodules && git config --file .gitmodules "$@"
 }
 
-gnulib_path=`git_modules_config submodule.gnulib.path`
+gnulib_path=$(git_modules_config submodule.gnulib.path)
 test -z "$gnulib_path" && gnulib_path=gnulib
 
 # Get gnulib files.
@@ -604,7 +638,7 @@
 fi
 
 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit
+<$gnulib_tool || exit $?
 
 # Get translations.
 
@@ -612,10 +646,10 @@
   subdir=$1
   domain=$2
   echo "$me: getting translations into $subdir for $domain..."
-  cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+  cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
   eval "$cmd" && return
   # Fallback to HTTP.
-  cmd=`printf "$po_download_command_format2" "$subdir" "$domain"`
+  cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
   eval "$cmd"
 }
 
@@ -638,7 +672,7 @@
     && ls "$ref_po_dir"/*.po 2>/dev/null |
       sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
 
-  langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
+  langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g')
   test "$langs" = '*' && langs=x
   for po in $langs; do
     case $po in x) continue;; esac
@@ -675,18 +709,18 @@
 
     # If the destination directory doesn't exist, create it.
     # This is required at least for "lib/uniwidth/cjk.h".
-    dst_dir=`dirname "$dst"`
+    dst_dir=$(dirname "$dst")
     if ! test -d "$dst_dir"; then
       mkdir -p "$dst_dir"
 
       # If we've just created a directory like lib/uniwidth,
       # tell version control system(s) it's ignorable.
       # FIXME: for now, this does only one level
-      parent=`dirname "$dst_dir"`
+      parent=$(dirname "$dst_dir")
       for dot_ig in x $vc_ignore; do
         test $dot_ig = x && continue
         ig=$parent/$dot_ig
-        insert_vc_ignore $ig `echo "$dst_dir"|sed 's,.*/,,'`
+        insert_vc_ignore $ig "${dst_dir##*/}"
       done
     fi
 
@@ -710,10 +744,10 @@
       # so that broken tools aren't confused into skipping needed builds.  See
       # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
       test -h "$dst" &&
-      src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
-      dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
+      src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
+      dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
       test "$src_i" = "$dst_i" &&
-      both_ls=`ls -dt "$src" "$dst"` &&
+      both_ls=$(ls -dt "$src" "$dst") &&
       test "X$both_ls" = "X$dst$nl$src" || {
         dot_dots=
         case $src in
@@ -721,11 +755,10 @@
         *)
           case /$dst/ in
           *//* | */../* | */./* | /*/*/*/*/*/)
-             echo >&2 "$me: invalid symlink calculation: $src -> $dst"
-             exit 1;;
-          /*/*/*/*/)	dot_dots=../../../;;
-          /*/*/*/)	dot_dots=../../;;
-          /*/*/)	dot_dots=../;;
+             die "invalid symlink calculation: $src -> $dst";;
+          /*/*/*/*/)    dot_dots=../../../;;
+          /*/*/*/)      dot_dots=../../;;
+          /*/*/)        dot_dots=../;;
           esac;;
         esac
 
@@ -736,6 +769,22 @@
   }
 }
 
+version_controlled_file() {
+  parent=$1
+  file=$2
+  if test -d .git; then
+    git rm -n "$file" > /dev/null 2>&1
+  elif test -d .svn; then
+    svn log -r HEAD "$file" > /dev/null 2>&1
+  elif test -d CVS; then
+    grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
+             grep '^/[^/]*/[0-9]' > /dev/null
+  else
+    warn_ "no version control for $file?"
+    false
+  fi
+}
+
 # NOTE: we have to be careful to run both autopoint and libtoolize
 # before gnulib-tool, since gnulib-tool is likely to provide newer
 # versions of files "installed" by these two programs.
@@ -748,37 +797,54 @@
 grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
     with_gettext=no
 
-if test $with_gettext = yes; then
-  # Released autopoint has the tendency to install macros that have been
-  # obsoleted in current gnulib, so run this before gnulib-tool.
-  echo "$0: $AUTOPOINT --force"
-  $AUTOPOINT --force || exit
-fi
+if test $with_gettext = yes || test $use_libtool = 1; then
+
+  tempbase=.bootstrap$$
+  trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
 
-# Autoreconf runs aclocal before libtoolize, which causes spurious
-# warnings if the initial aclocal is confused by the libtoolized
-# (or worse out-of-date) macro directory.
-if grep '^[    ]*LT_INIT' configure.ac >/dev/null; then
-  echo "running: $LIBTOOLIZE --copy --install"
-  $LIBTOOLIZE --copy --install
-fi
+  > $tempbase.0 > $tempbase.1 &&
+  find . ! -type d -print | sort > $tempbase.0 || exit
+
+  if test $with_gettext = yes; then
+    # Released autopoint has the tendency to install macros that have been
+    # obsoleted in current gnulib, so run this before gnulib-tool.
+    echo "$0: $AUTOPOINT --force"
+    $AUTOPOINT --force || exit
+  fi
 
-version_controlled_file() {
-  dir=$1
-  file=$2
-  found=no
-  if test -d CVS; then
-    grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
-             grep '^/[^/]*/[0-9]' > /dev/null && found=yes
-  elif test -d .git; then
-    git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
-  elif test -d .svn; then
-    svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
-  else
-    echo "$me: no version control for $dir/$file?" >&2
+  # Autoreconf runs aclocal before libtoolize, which causes spurious
+  # warnings if the initial aclocal is confused by the libtoolized
+  # (or worse out-of-date) macro directory.
+  # libtoolize 1.9b added the --install option; but we support back
+  # to libtoolize 1.5.22, where the install action was default.
+  if test $use_libtool = 1; then
+    install=
+    case $($LIBTOOLIZE --help) in
+      *--install*) install=--install ;;
+    esac
+    echo "running: $LIBTOOLIZE $install --copy"
+    $LIBTOOLIZE $install --copy
   fi
-  test $found = yes
-}
+
+  find . ! -type d -print | sort >$tempbase.1
+  old_IFS=$IFS
+  IFS=$nl
+  for file in $(comm -13 $tempbase.0 $tempbase.1); do
+    IFS=$old_IFS
+    parent=${file%/*}
+    version_controlled_file "$parent" "$file" || {
+      for dot_ig in x $vc_ignore; do
+        test $dot_ig = x && continue
+        ig=$parent/$dot_ig
+        insert_vc_ignore "$ig" "${file##*/}"
+      done
+    }
+  done
+  IFS=$old_IFS
+
+  rm -f $tempbase.0 $tempbase.1
+  trap - 1 2 13 15
+fi
 
 # Import from gnulib.
 
@@ -804,9 +870,13 @@
 $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
 
 for file in $gnulib_files; do
-  symlink_to_dir "$GNULIB_SRCDIR" $file || exit
+  symlink_to_dir "$GNULIB_SRCDIR" $file \
+    || die "failed to symlink $file"
 done
 
+bootstrap_post_import_hook \
+  || die "bootstrap_post_import_hook failed"
+
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual
@@ -819,21 +889,31 @@
   -depth \( -name '*.m4' -o -name '*.[ch]' \) \
   -type l -xtype l -delete > /dev/null 2>&1
 
+# Some systems (RHEL 5) are using ancient autotools, for which the
+# --no-recursive option had not been invented.  Detect that lack and
+# omit the option when it's not supported.  FIXME in 2017: remove this
+# hack when RHEL 5 autotools are updated, or when they become irrelevant.
+no_recursive=
+case $($AUTORECONF --help) in
+  *--no-recursive*) no_recursive=--no-recursive;;
+esac
+
 # Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
 echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
-    "$AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS"
+    "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
 AUTOPOINT=true LIBTOOLIZE=true \
-    $AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS \
-  || exit 1
+    $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
+  || die "autoreconf failed"
 
 # Get some extra files from gnulib, overriding existing files.
 for file in $gnulib_extra_files; do
   case $file in
   */INSTALL) dst=INSTALL;;
-  build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
+  build-aux/*) dst=$build_aux/${file#build-aux/};;
   *) dst=$file;;
   esac
-  symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit
+  symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
+    || die "failed to symlink $file"
 done
 
 if test $with_gettext = yes; then
@@ -849,7 +929,19 @@
       a\
           '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
     }
-  ' po/Makevars.template >po/Makevars || exit 1
+  ' po/Makevars.template >po/Makevars \
+    || die 'cannot generate po/Makevars'
+
+  # If the 'gettext' module is in use, grab the latest Makefile.in.in.
+  # If only the 'gettext-h' module is in use, assume autopoint already
+  # put the correct version of this file into place.
+  case $gnulib_modules in
+  *gettext-h*) ;;
+  *gettext*)
+    cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
+      || die "cannot create po/Makefile.in.in"
+    ;;
+  esac
 
   if test -d runtime-po; then
     # Similarly for runtime-po/Makevars, but not quite the same.
@@ -863,7 +955,8 @@
         a\
             '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
       }
-    ' po/Makevars.template >runtime-po/Makevars || exit 1
+    ' po/Makevars.template >runtime-po/Makevars \
+    || die 'cannot generate runtime-po/Makevars'
 
     # Copy identical files from po to runtime-po.
     (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
--- a/build-aux/bootstrap.conf
+++ b/build-aux/bootstrap.conf
@@ -1,6 +1,6 @@
 # Bootstrap configuration.
 
-# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 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
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,10 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-01-04.17; # UTC
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -79,6 +78,53 @@
   esac
 }
 
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
 # func_cl_wrapper cl arg...
 # Adjust compile command to suit cl
 func_cl_wrapper ()
@@ -109,43 +155,34 @@
 	      ;;
 	  esac
 	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
 	-I*)
 	  func_file_conv "${1#-I}" mingw
 	  set x "$@" -I"$file"
 	  shift
 	  ;;
-	-l*)
-	  lib=${1#-l}
-	  found=no
-	  save_IFS=$IFS
-	  IFS=';'
-	  for dir in $lib_path $LIB
-	  do
-	    IFS=$save_IFS
-	    if $shared && test -f "$dir/$lib.dll.lib"; then
-	      found=yes
-	      set x "$@" "$dir/$lib.dll.lib"
-	      break
-	    fi
-	    if test -f "$dir/$lib.lib"; then
-	      found=yes
-	      set x "$@" "$dir/$lib.lib"
-	      break
-	    fi
-	  done
-	  IFS=$save_IFS
-
-	  test "$found" != yes && set x "$@" "$lib.lib"
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
 	  shift
 	  ;;
+	-l*)
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
 	-L*)
-	  func_file_conv "${1#-L}"
-	  if test -z "$lib_path"; then
-	    lib_path=$file
-	  else
-	    lib_path="$lib_path;$file"
-	  fi
-	  linker_opts="$linker_opts -LIBPATH:$file"
+	  func_cl_dashL "${1#-L}"
 	  ;;
 	-static)
 	  shared=false
--- 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, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-01-01'
+timestamp='2012-09-25'
 
 # 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
@@ -17,9 +17,7 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -202,6 +200,10 @@
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +306,7 @@
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
 	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -803,6 +805,9 @@
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
@@ -863,6 +868,13 @@
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -1196,6 +1208,9 @@
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
 	echo i586-pc-haiku
 	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1251,7 +1266,7 @@
     NEO-?:NONSTOP_KERNEL:*:*)
 	echo neo-tandem-nsk${UNAME_RELEASE}
 	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NSE-*:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1320,11 +1335,11 @@
     i*86:AROS:*:*)
 	echo ${UNAME_MACHINE}-pc-aros
 	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -25,7 +25,7 @@
 #   known workaround is to choose shorter directory names for the build
 #   directory and/or the installation directory.
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 shrext=.so
--- 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, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-01-01'
+timestamp='2012-10-10'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@
 # 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, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -125,13 +123,17 @@
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -154,7 +156,7 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray | -microblaze)
+	-apple | -axis | -knuth | -cray | -microblaze*)
 		os=
 		basic_machine=$1
 		;;
@@ -223,6 +225,12 @@
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -247,11 +255,14 @@
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-        | be32 | be64 \
+	| arc \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
@@ -264,7 +275,7 @@
 	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -319,7 +330,7 @@
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -332,7 +343,10 @@
 	strongarm | thumb | xscale)
 		basic_machine=arm-unknown
 		;;
-
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
 	xscaleeb)
 		basic_machine=armeb-unknown
 		;;
@@ -355,6 +369,7 @@
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
@@ -376,7 +391,8 @@
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -775,9 +791,13 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-	microblaze)
+	microblaze*)
 		basic_machine=microblaze-xilinx
 		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -1339,15 +1359,15 @@
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-uclibc* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1530,6 +1550,9 @@
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
+	hexagon-*)
+		os=-elf
+		;;
 	tic54x-*)
 		os=-coff
 		;;
--- a/build-aux/csharpcomp.sh.in
+++ b/build-aux/csharpcomp.sh.in
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Compile a C# program.
 
-# Copyright (C) 2003-2006, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 # Written by Bruno Haible <bruno@clisp.org>, 2003.
 #
 # This program is free software: you can redistribute it and/or modify
--- a/build-aux/csharpexec.sh.in
+++ b/build-aux/csharpexec.sh.in
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Execute a C# program.
 
-# Copyright (C) 2003, 2005, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 # Written by Bruno Haible <bruno@clisp.org>, 2003.
 #
 # This program is free software: you can redistribute it and/or modify
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,10 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2011-12-04.11; # UTC
+scriptversion=2012-10-18.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 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
@@ -28,9 +27,9 @@
 
 case $1 in
   '')
-     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
   -h | --h*)
     cat <<\EOF
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -57,6 +56,66 @@
     ;;
 esac
 
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
@@ -69,6 +128,9 @@
 
 rm -f "$tmpdepfile"
 
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
 # Some modes work just like other modes, but use different flags.  We
 # parameterize here, but still list the modes in the big case below,
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
@@ -80,26 +142,32 @@
 fi
 
 if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
 fi
 
 cygpath_u="cygpath -u -f -"
 if test "$depmode" = msvcmsys; then
-   # This is just like msvisualcpp but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u='sed s,\\\\,/,g'
-   depmode=msvisualcpp
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
 fi
 
 if test "$depmode" = msvc7msys; then
-   # This is just like msvc7 but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u='sed s,\\\\,/,g'
-   depmode=msvc7
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
 fi
 
 case "$depmode" in
@@ -122,8 +190,7 @@
   done
   "$@"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -131,13 +198,17 @@
   ;;
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
 ## why we pick this rather obscure method:
 ## - Don't want to use -MD because we'd like the dependencies to end
 ##   up in a subdir.  Having to rename by hand is ugly.
 ##   (We might end up doing this anyway to support other compilers.)
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -145,15 +216,14 @@
   fi
   "$@" -Wp,"$gccflag$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+  # The second -e expression handles DOS-style file names with drive
+  # letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
 ## This next piece of magic avoids the "deleted header file" problem.
@@ -162,16 +232,15 @@
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
 ## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
 ## well.  hp depmode also adds that space, but also prefixes the VPATH
 ## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
-      | sed -e 's/$/ :/' >> "$depfile"
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -189,8 +258,7 @@
     "$@" -MDupdate "$tmpdepfile"
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -198,43 +266,41 @@
 
   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
     echo "$object : \\" > "$depfile"
-
     # Clip off the initial element (the dependent).  Don't try to be
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
     # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
-
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> "$depfile"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+      >> "$depfile"
   else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
   # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.u
     tmpdepfile2=$base.u
@@ -247,9 +313,7 @@
     "$@" -M
   fi
   stat=$?
-
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
@@ -258,57 +322,113 @@
   do
     test -f "$tmpdepfile" && break
   done
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form 'foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # '$object: dependent.h' and one to simply 'dependent.h:'.
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
+  aix_post_process_depfile
   ;;
 
-icc)
-  # Intel's C compiler understands '-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
-  #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
-  #    foo.o: sub/foo.c ... \
-  #     sub/foo.h ... \
-  #     ...
-
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
   "$@" -MD -MF "$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
   rm -f "$depfile"
-  # Each line is of the form 'foo.o: dependent.h',
-  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using '\' :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
+
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
   # Do two passes, one to just change these to
-  # '$object: dependent.h' and one to simply 'dependent.h:'.
+  # `$object: dependent.h' and one to simply `dependent.h:'.
   sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
   # Some versions of the HPUX 10.20 sed can't process this invocation
   # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -319,9 +439,8 @@
   # 'foo.d', which lands next to the object file, wherever that
   # happens to be.
   # Much of this is similar to the tru64 case; see comments there.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from  "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.d
     tmpdepfile2=$dir.libs/$base.d
@@ -332,8 +451,7 @@
     "$@" +Maked
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
      rm -f "$tmpdepfile1" "$tmpdepfile2"
      exit $stat
   fi
@@ -343,77 +461,61 @@
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
     # Add 'dependent.h:' lines.
     sed -ne '2,${
-	       s/^ *//
-	       s/ \\*$//
-	       s/$/:/
-	       p
-	     }' "$tmpdepfile" >> "$depfile"
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
   else
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile" "$tmpdepfile2"
   ;;
 
 tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in 'foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  # The Tru64 compiler uses -MD to generate dependencies as a side
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+  # dependencies in 'foo.d' instead, so we check for that too.
+  # Subdirectories are respected.
+  set_dir_from  "$object"
+  set_base_from "$object"
 
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mechanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies in $dir.libs/$base.o.d and
+    # in $dir$base.o.d.  We have to check for both files, because
+    # one of the two compilations can be disabled.  We should prefer
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+    # automatically cleaned when .libs/ is deleted, while ignoring
+    # the former would cause a distcleancheck panic.
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
 
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
 
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
 
 msvc7)
   if test "$libtool" = yes; then
@@ -424,8 +526,7 @@
   "$@" $showIncludes > "$tmpdepfile"
   stat=$?
   grep -v '^Note: including file: ' "$tmpdepfile"
-  if test "$stat" = 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -443,11 +544,11 @@
   p
 }' | $cygpath_u | sort -u | sed -n '
 s/ /\\ /g
-s/\(.*\)/	\1 \\/p
+s/\(.*\)/'"$tab"'\1 \\/p
 s/.\(.*\) \\/\1:/
 H
 $ {
-  s/.*/	/
+  s/.*/'"$tab"'/
   G
   p
 }' >> "$depfile"
@@ -502,14 +603,14 @@
   # in the target name.  This is to cope with DOS-style filenames:
   # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -562,11 +663,12 @@
   # makedepend may prepend the VPATH from the source file name to the object.
   # No need to regex-escape $object, excess matching of '.' is harmless.
   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile" "$tmpdepfile".bak
   ;;
 
@@ -602,10 +704,10 @@
     esac
   done
 
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
+  "$@" -E \
+    | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+    | sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   cat < "$tmpdepfile" >> "$depfile"
@@ -637,23 +739,23 @@
       shift
       ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-	set fnord "$@"
-	shift
-	shift
-	;;
+        set fnord "$@"
+        shift
+        shift
+        ;;
     *)
-	set fnord "$@" "$arg"
-	shift
-	shift
-	;;
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
     esac
   done
   "$@" -E 2>/dev/null |
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
--- a/build-aux/do-release-commit-and-tag
+++ b/build-aux/do-release-commit-and-tag
@@ -3,7 +3,7 @@
 # controlled .prev-version file, automate the procedure by which we record
 # the date, release-type and version string in the NEWS file.  That commit
 # will serve to identify the release, so apply a signed tag to it as well.
-VERSION=2011-05-04.11 # UTC
+VERSION=2012-08-01.09 # UTC
 
 # Note: this is a bash script (could be zsh or dash)
 
@@ -24,31 +24,32 @@
 
 # Written by Jim Meyering
 
-ME=`basename "$0"`
+ME=$(basename "$0")
 warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
 die() { warn "$*"; exit 1; }
 
-help_version()
+help()
 {
-  case $1 in
-    --help) cat <<EOF
+  cat <<EOF
 Usage: $ME [OPTION...] VERSION RELEASE_TYPE
 
-Run this script to perform the final pre-release NEWS update
-in which the date, release-type and version string are recorded.
-Commit that result with a log entry marking the release, and apply
-a signed tag.  Run it from your project's top-level directory.
+Run this script from top_srcdir to perform the final pre-release NEWS
+update in which the date, release-type and version string are
+recorded.  Commit that result with a log entry marking the release,
+and apply a signed tag.  Run it from your project's top-level
+directory.
 
 Requirements:
 - you use git for version-control
+- a version-controlled .prev-version file
 - a NEWS file, with line 3 identical to this:
-* Noteworthy changes in release ?.? (????-??-??) [?]
-- a version-controlled .prev-version file
+$noteworthy_stub
 
 Options:
-  --branch BRANCH            set release branch (default: master)
-  --help                     print this help, then exit
-  --version                  print version number, then exit
+  --branch=BRANCH     set release branch (default: $branch)
+  -C, --builddir=DIR  location of (configured) Makefile (default: $builddir)
+  --help              print this help, then exit
+  --version           print version number, then exit
 
 EXAMPLE:
 To update NEWS and tag the beta 8.1 release of coreutils, I would run this:
@@ -57,37 +58,66 @@
 
 Report bugs and patches to <bug-gnulib@gnu.org>.
 EOF
-      exit ;;
+  exit
+}
 
-    --version)
-      year=`echo "$VERSION" | sed 's/[^0-9].*//'`
-      cat <<EOF
+version()
+{
+  year=$(echo "$VERSION" | sed 's/[^0-9].*//')
+  cat <<EOF
 $ME $VERSION
 Copyright (C) $year Free Software Foundation, Inc,
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
 EOF
-      exit ;;
-
-  *) die "unrecognized option: $1";;
-  esac
+  exit
 }
 
-branch=master
-case $1 in
-  --branch) shift; branch=$1; shift ;;
-esac
+## ------ ##
+## Main.  ##
+## ------ ##
+
+# Constants.
+noteworthy='* Noteworthy changes in release'
+noteworthy_stub="$noteworthy ?.? (????-??-??) [?]"
+
+# Variables.
+branch=$(git branch | sed -ne '/^\* /{s///;p;q;}')
+builddir=.
 
-case $# in
-  1) help_version $1; exit 0;;
-  2) ;;
-  *) warn "Usage: $ME [OPTION...] VERSION TYPE"; exit 1;;
-esac
+while test $# != 0
+do
+  # Handle --option=value by splitting apart and putting back on argv.
+  case $1 in
+    --*=*)
+      opt=$(echo "$1" | sed -e 's/=.*//')
+      val=$(echo "$1" | sed -e 's/[^=]*=//')
+      shift
+      set dummy "$opt" "$val" ${1+"$@"}; shift
+      ;;
+  esac
+
+  case $1 in
+    --help|--version) ${1#--};;
+    --branch) shift; branch=$1; shift ;;
+    -C|--builddir) shift; builddir=$1; shift ;;
+    --*) die "unrecognized option: $1";;
+    *) break;;
+  esac
+done
+
+test $# = 2 \
+  || die "Usage: $ME [OPTION...] VERSION TYPE"
 
 ver=$1
 type=$2
 
+
+## ---------------------- ##
+## First, sanity checks.  ##
+## ---------------------- ##
+
 # Verify that $ver looks like a version number, and...
 echo "$ver"|grep -E '^[0-9][0-9.]*[0-9]$' > /dev/null \
   || die "invalid version: $ver"
@@ -97,7 +127,7 @@
 # Verify that $ver is sensible (> .prev-version).
 case $(printf "$prev_ver\n$ver\n"|sort -V -u|tr '\n' ':') in
   "$prev_ver:$ver:") ;;
-  *) die "invalid version: $ver";;
+  *) die "invalid version: $ver (<= $prev_ver)";;
 esac
 
 case $type in
@@ -105,32 +135,36 @@
   *) die "invalid release type: $type";;
 esac
 
-# Extract package name from Makefile.
-pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) \
-  || die 'failed to determine package name from Makefile'
-
-# simple check: no question marks on line 3 of NEWS
-noteworthy='* Noteworthy changes in release'
-test "$(sed -n 3p NEWS)" = "$noteworthy ?.? (????-??-??) [?]" \
-  || die 'line 3 of NEWS looks fishy!'
-
-# No dirt allowed.
+# No local modifications allowed.
 case $(git diff-index --name-only HEAD) in
   '') ;;
   *) die 'this tree is dirty; commit your changes first';;
 esac
 
-# update NEWS to have today's date, plus desired version number and $type
+# Ensure the current branch name is correct:
+curr_br=$(git rev-parse --symbolic-full-name HEAD)
+test "$curr_br" = refs/heads/$branch || die not on branch $branch
+
+# Extract package name from Makefile.
+Makefile=$builddir/Makefile
+pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' "$Makefile") \
+  || die "failed to determine package name from $Makefile"
+
+# Check that line 3 of NEWS is the stub line about to be replaced.
+test "$(sed -n 3p NEWS)" = "$noteworthy_stub" \
+  || die "line 3 of NEWS must be exactly '$noteworthy_stub'"
+
+## --------------- ##
+## Then, changes.  ##
+## --------------- ##
+
+# Update NEWS to have today's date, plus desired version number and $type.
 perl -MPOSIX -ni -e 'my $today = strftime "%F", localtime time;' \
  -e 'my ($type, $ver) = qw('"$type $ver"');' \
  -e 'my $pfx = "'"$noteworthy"'";' \
  -e 'print $.==3 ? "$pfx $ver ($today) [$type]\n" : $_' \
      NEWS || die 'failed to update NEWS'
 
-# Ensure the current branch name is correct:
-curr_br=$(git rev-parse --symbolic-full-name HEAD)
-test "$curr_br" = refs/heads/$branch || die not on branch $branch
-
 printf "version $ver\n\n* NEWS: Record release date.\n" \
     | git commit -F -  -a || die 'git commit failed'
 git tag -s -m "$pkg $ver" v$ver HEAD || die 'git tag failed'
deleted file mode 100755
--- a/build-aux/elisp-comp
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1995, 2000, 2003, 2004, 2005, 2009, 2010 Free Software
-# Foundation, Inc.
-
-scriptversion=2010-02-06.18; # UTC
-
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1995.
-#
-# 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 2, 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/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No files.  Try '$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: elisp-comp [--help] [--version] FILES...
-
-This script byte-compiles all '.el' files listed as FILES using GNU
-Emacs, and put the resulting '.elc' files into the current directory,
-so disregarding the original directories used in '.el' arguments.
-
-This script manages in such a way that all Emacs LISP files to
-be compiled are made visible between themselves, in the event
-they require or load-library one another.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "elisp-comp $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test -z "$EMACS" || test "$EMACS" = "t"; then
-  # Value of "t" means we are running in a shell under Emacs.
-  # Just assume Emacs is called "emacs".
-  EMACS=emacs
-fi
-
-tempdir=elc.$$
-
-# Cleanup the temporary directory on exit.
-trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
-do_exit='(exit $ret); exit $ret'
-trap "ret=129; $do_exit" 1
-trap "ret=130; $do_exit" 2
-trap "ret=141; $do_exit" 13
-trap "ret=143; $do_exit" 15
-
-mkdir $tempdir
-cp "$@" $tempdir
-
-(
-  cd $tempdir
-  echo "(setq load-path (cons nil load-path))" > script
-  $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
-  mv *.elc ..
-) || exit $?
-
-(exit 0); exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
new file mode 100644
--- /dev/null
+++ b/build-aux/gcc-warning.spec
@@ -0,0 +1,85 @@
+# options to filter out, and why
+--all-warnings				alias for -Wall
+--extra-warnings			alias for -Wextra
+-Waggregate-return			obsolescent
+-Waliasing				fortran
+-Walign-commons				fortran
+-Wampersand				fortran
+-Warray-temporaries			fortran
+-Wassign-intercept			objc/objc++
+-Wc++-compat				FIXME maybe? borderline.  some will want this
+-Wc++0x-compat				c++
+-Wc++11-compat				c++
+-Wc-binding-type			fortran
+-Wc-binding-type                        fortran
+-Wcast-qual				FIXME maybe? too much noise; encourages bad changes
+-Wcharacter-truncation			fortran
+-Wcompare-reals                         fortran
+-Wconversion				FIXME maybe? too much noise; encourages bad changes
+-Wconversion-extra			fortran
+-Wconversion-null			c++ and objc++
+-Wctor-dtor-privacy			c++
+-Wdeclaration-after-statement		FIXME: do not want.  others may
+-Wdeclaration-after-statement           obsolescent
+-Wdelete-non-virtual-dtor		c++
+-Weffc++				c++
+-Werror-implicit-function-declaration	deprecated
+-Wfloat-equal				FIXME maybe? borderline.  some will want this
+-Wformat				covered by -Wformat=2
+-Wformat=				gcc --help=warnings artifact
+-Wfunction-elimination			fortran
+-Wimplicit-interface			fortran
+-Wimplicit-procedure			fortran
+-Wintrinsic-shadow			fortran
+-Wintrinsics-std			fortran
+-Winvalid-offsetof			c++ and objc++
+-Wlarger-than-				gcc --help=warnings artifact
+-Wlarger-than=<number>			FIXME: choose something sane?
+-Wline-truncation			fortran
+-Wliteral-suffix			c++ and objc++
+-Wliteral-suffix                        c++ and objc++
+-Wlong-long				obsolescent
+-Wnoexcept				c++
+-Wnon-template-friend			c++
+-Wnon-virtual-dtor			c++
+-Wnormalized=<id|nfc|nfkc>		FIXME: choose something sane?
+-Wold-style-cast			c++ and objc++
+-Woverloaded-virtual			c++
+-Wpadded				FIXME: dunno
+-Wpadded                                FIXME maybe?  warns about "stabil" member in /usr/include/bits/timex.h
+-Wpedantic				FIXME: too strict?
+-Wpmf-conversions			c++ and objc++
+-Wproperty-assign-default		objc++
+-Wprotocol				objc++
+-Wreal-q-constant			fortran
+-Wrealloc-lhs				fortran
+-Wrealloc-lhs                           fortran
+-Wrealloc-lhs-all			fortran
+-Wrealloc-lhs-all                       fortran
+-Wredundant-decls			FIXME maybe? many _gl_cxxalias_dummy FPs
+-Wreorder				c++ and objc++
+-Wselector				objc and objc++
+-Wsign-compare				FIXME maybe? borderline.  some will want this
+-Wsign-conversion			FIXME maybe? borderline.  some will want this
+-Wsign-promo				c++ and objc++
+-Wstack-usage=				FIXME: choose something sane?
+-Wstrict-aliasing=			FIXME: choose something sane?
+-Wstrict-null-sentinel			c++ and objc++
+-Wstrict-overflow=			FIXME: choose something sane?
+-Wstrict-selector-match			objc and objc++
+-Wsurprising				fortran
+-Wswitch-enum				FIXME maybe? borderline.  some will want this
+-Wsynth					deprecated
+-Wtabs					fortran
+-Wtarget-lifetime                       fortran
+-Wtraditional				obsolescent
+-Wtraditional-conversion		obsolescent
+-Wundeclared-selector			objc and objc++
+-Wundef					FIXME maybe? too many false positives
+-Wunderflow				fortran
+-Wunsuffixed-float-constants            triggers warning in gnulib's timespec.h
+-Wunused-dummy-argument			fortran
+-Wuseless-cast				c++ and objc++
+-Wuseless-cast                          c++ and objc++
+-Wzero-as-null-pointer-constant		c++ and objc++
+-frequire-return-statement		go
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,10 +2,10 @@
 # gendocs.sh -- generate a GNU manual in many formats.  This script is
 #   mentioned in maintain.texi.  See the help message below for usage details.
 
-scriptversion=2011-04-08.14
+scriptversion=2012-10-27.11
 
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+# 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
@@ -30,6 +30,12 @@
 #
 # An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
 
+# TODO:
+# - image importation was only implemented for HTML generated by
+#   makeinfo.  But it should be simple enough to adjust.
+# - images are not imported in the source tarball.  All the needed
+#   formats (PDF, PNG, etc.) should be included.
+
 prog=`basename "$0"`
 srcdir=`pwd`
 
@@ -39,35 +45,37 @@
 : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
 : ${MAKEINFO="makeinfo"}
 : ${TEXI2DVI="texi2dvi -t @finalout"}
-: ${DVIPS="dvips"}
 : ${DOCBOOK2HTML="docbook2html"}
 : ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2PS="docbook2ps"}
 : ${DOCBOOK2TXT="docbook2txt"}
 : ${GENDOCS_TEMPLATE_DIR="."}
+: ${PERL='perl'}
 : ${TEXI2HTML="texi2html"}
 unset CDPATH
 unset use_texi2html
 
 version="gendocs.sh $scriptversion
 
-Copyright 2010 Free Software Foundation, Inc.
+Copyright 2012 Free Software Foundation, Inc.
 There is NO warranty.  You may redistribute this software
 under the terms of the GNU General Public License.
 For more information about these matters, see the files named COPYING."
 
 usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
 
-Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
-See the GNU Maintainers document for a more extensive discussion:
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source.  See the GNU Maintainers document for a more extensive
+discussion:
   http://www.gnu.org/prep/maintain_toc.html
 
 Options:
   -s SRCFILE  read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
   -o OUTDIR   write files into OUTDIR, instead of manual/.
+  -I DIR      append DIR to the Texinfo search path.
   --email ADR use ADR as contact in generated web pages.
-  --docbook   convert to DocBook too (xml, txt, html, pdf and ps).
+  --docbook   convert through DocBook too (xml, txt, html, pdf).
   --html ARG  pass indicated ARG to makeinfo or texi2html for HTML targets.
+  --info ARG  pass indicated ARG to makeinfo for Info, instead of --no-split.
   --texi2html use texi2html to generate HTML targets.
   --help      display this help and exit successfully.
   --version   display version information and exit successfully.
@@ -80,11 +88,11 @@
   wget \"$templateurl\"
   $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
 
-Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
-to override).  Move all the new files into your web CVS tree, as
-explained in the Web Pages node of maintain.texi.
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override).  Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
 
-Please use the --email ADDRESS option to specify your bug-reporting
+Please do use the --email ADDRESS option to specify your bug-reporting
 address in the generated HTML pages.
 
 MANUAL-TITLE is included as part of the HTML <title> of the overall
@@ -102,11 +110,14 @@
 first copy or symlink all Texinfo sources into a single directory.
 (Part of the script's work is to make a tar.gz of the sources.)
 
-You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and
-DVIPS to control the programs that get executed, and
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
+and PERL to control the programs that get executed, and
 GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
 looked for.  With --docbook, the environment variables DOCBOOK2HTML,
-DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected.
+DOCBOOK2PDF, and DOCBOOK2TXT are also respected.
 
 By default, makeinfo and texi2dvi are run in the default (English)
 locale, since that's the language of most Texinfo manuals.  If you
@@ -116,16 +127,13 @@
 Email bug reports or enhancement requests to bug-texinfo@gnu.org.
 "
 
-calcsize()
-{
-  size=`ls -ksl $1 | awk '{print $1}'`
-  echo $size
-}
-
 MANUAL_TITLE=
 PACKAGE=
 EMAIL=webmasters@gnu.org  # please override with --email
+commonarg= # Options passed to all the tools (-I dir).
+dirs=      # -I's directories.
 htmlarg=
+infoarg=--no-split
 outdir=manual
 srcfile=
 
@@ -136,8 +144,10 @@
     --version) echo "$version"; exit 0;;
     -s) shift; srcfile=$1;;
     -o) shift; outdir=$1;;
+    -I) shift; commonarg="$commonarg -I '$1'"; dirs="$dirs $1";;
     --docbook) docbook=yes;;
     --html) shift; htmlarg=$1;;
+    --info) shift; infoarg=$1;;
     --texi2html) use_texi2html=1;;
     -*)
       echo "$0: Unknown option \`$1'." >&2
@@ -183,15 +193,64 @@
   exit 1
 fi
 
+# Function to return size of $1 in something resembling kilobytes.
+calcsize()
+{
+  size=`ls -ksl $1 | awk '{print $1}'`
+  echo $size
+}
+
+# copy_images OUTDIR HTML-FILE...
+# -------------------------------
+# Copy all the images needed by the HTML-FILEs into OUTDIR.  Look
+# for them in the -I directories.
+copy_images()
+{
+  local odir
+  odir=$1
+  shift
+  $PERL -n -e "
+BEGIN {
+  \$me = '$prog';
+  \$odir = '$odir';
+  @dirs = qw($dirs);
+}
+" -e '
+/<img src="(.*?)"/g && ++$need{$1};
+
+END {
+  #print "$me: @{[keys %need]}\n";  # for debugging, show images found.
+  FILE: for my $f (keys %need) {
+    for my $d (@dirs) {
+      if (-f "$d/$f") {
+        use File::Basename;
+        my $dest = dirname ("$odir/$f");
+        #
+        use File::Path;
+        -d $dest || mkpath ($dest)
+          || die "$me: cannot mkdir $dest: $!\n";
+        #
+        use File::Copy;
+        copy ("$d/$f", $dest)
+          || die "$me: cannot copy $d/$f to $dest: $!\n";
+        next FILE;
+      }
+    }
+    die "$me: $ARGV: cannot find image $f\n";
+  }
+}
+' -- "$@" || exit 1
+}
+
 case $outdir in
   /*) abs_outdir=$outdir;;
   *)  abs_outdir=$srcdir/$outdir;;
 esac
 
-echo Generating output formats for $srcfile
+echo "Generating output formats for $srcfile"
 
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
-echo "Generating info files... ($cmd)"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+echo "Generating info file(s)... ($cmd)"
 eval "$cmd"
 mkdir -p "$outdir/"
 tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
@@ -199,29 +258,23 @@
 # do not mv the info files, there's no point in having them available
 # separately on the web.
 
-cmd="$SETLANG ${TEXI2DVI} \"$srcfile\""
+cmd="$SETLANG $TEXI2DVI $commonarg \"$srcfile\""
 echo "Generating dvi ... ($cmd)"
 eval "$cmd"
 
-# now, before we compress dvi:
-echo Generating postscript...
-${DVIPS} $PACKAGE -o
-gzip -f -9 $PACKAGE.ps
-ps_gz_size=`calcsize $PACKAGE.ps.gz`
-mv $PACKAGE.ps.gz "$outdir/"
-
 # compress/finish dvi:
 gzip -f -9 $PACKAGE.dvi
 dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
 mv $PACKAGE.dvi.gz "$outdir/"
 
-cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\""
+cmd="$SETLANG $TEXI2DVI --pdf $commonarg \"$srcfile\""
 echo "Generating pdf ... ($cmd)"
 eval "$cmd"
 pdf_size=`calcsize $PACKAGE.pdf`
 mv $PACKAGE.pdf "$outdir/"
 
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
+opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
+cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
 echo "Generating ASCII... ($cmd)"
 eval "$cmd"
 ascii_size=`calcsize $PACKAGE.txt`
@@ -231,7 +284,7 @@
 
 html_split()
 {
-  opt="--split=$1 $htmlarg --node-files"
+  opt="--split=$1 $commonarg $htmlarg --node-files"
   cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
   echo "Generating html by $1... ($cmd)"
   eval "$cmd"
@@ -249,7 +302,7 @@
 }
 
 if test -z "$use_texi2html"; then
-  opt="--no-split --html -o $PACKAGE.html $htmlarg"
+  opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
   cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
   echo "Generating monolithic html... ($cmd)"
   rm -rf $PACKAGE.html  # in case a directory is left over
@@ -257,23 +310,25 @@
   html_mono_size=`calcsize $PACKAGE.html`
   gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
   html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+  copy_images "$outdir/" $PACKAGE.html
   mv $PACKAGE.html "$outdir/"
 
-  cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\""
+  opt="--html -o $PACKAGE.html $commonarg $htmlarg"
+  cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
   echo "Generating html by node... ($cmd)"
   eval "$cmd"
   split_html_dir=$PACKAGE.html
+  copy_images $split_html_dir/ $split_html_dir/*.html
   (
-   cd ${split_html_dir} || exit 1
-   tar -czf "$abs_outdir/${PACKAGE}.html_node.tar.gz" -- *.html
+    cd $split_html_dir || exit 1
+    tar -czf "$abs_outdir/$PACKAGE.html_node.tar.gz" -- *
   )
-  html_node_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node.tar.gz"`
-  rm -f "$outdir"/html_node/*.html
-  mkdir -p "$outdir/html_node/"
-  mv ${split_html_dir}/*.html "$outdir/html_node/"
-  rmdir ${split_html_dir}
+  html_node_tgz_size=`calcsize "$outdir/$PACKAGE.html_node.tar.gz"`
+  rm -rf "$outdir/html_node/"
+  mv $split_html_dir "$outdir/html_node/"
 else
-  cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\""
+  opt="--output $PACKAGE.html $commonarg $htmlarg"
+  cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
   echo "Generating monolithic html... ($cmd)"
   rm -rf $PACKAGE.html  # in case a directory is left over
   eval "$cmd"
@@ -297,7 +352,8 @@
 texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
 
 if test -n "$docbook"; then
-  cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
+  opt="-o - --docbook $commonarg"
+  cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
   echo "Generating docbook XML... ($cmd)"
   eval "$cmd"
   docbook_xml_size=`calcsize $PACKAGE-db.xml`
@@ -306,7 +362,8 @@
   mv $PACKAGE-db.xml "$outdir/"
 
   split_html_db_dir=html_node_db
-  cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\""
+  opt="$commonarg -o $split_html_db_dir"
+  cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
   echo "Generating docbook HTML... ($cmd)"
   eval "$cmd"
   (
@@ -319,20 +376,13 @@
   mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
   rmdir ${split_html_db_dir}
 
-  cmd="${DOCBOOK2TXT} \"${outdir}/$PACKAGE-db.xml\""
+  cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
   echo "Generating docbook ASCII... ($cmd)"
   eval "$cmd"
   docbook_ascii_size=`calcsize $PACKAGE-db.txt`
   mv $PACKAGE-db.txt "$outdir/"
 
-  cmd="${DOCBOOK2PS} \"${outdir}/$PACKAGE-db.xml\""
-  echo "Generating docbook PS... ($cmd)"
-  eval "$cmd"
-  gzip -f -9 -c $PACKAGE-db.ps >"$outdir/$PACKAGE-db.ps.gz"
-  docbook_ps_gz_size=`calcsize "$outdir/$PACKAGE-db.ps.gz"`
-  mv $PACKAGE-db.ps "$outdir/"
-
-  cmd="${DOCBOOK2PDF} \"${outdir}/$PACKAGE-db.xml\""
+  cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
   echo "Generating docbook PDF... ($cmd)"
   eval "$cmd"
   docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
@@ -346,6 +396,7 @@
 else
    CONDS="/%%ENDIF.*%%/d;/%%IF  *HTML_SECTION%%/d;/%%IF  *HTML_CHAPTER%%/d"
 fi
+
 curdate=`$SETLANG date '+%B %d, %Y'`
 sed \
    -e "s!%%TITLE%%!$MANUAL_TITLE!g" \
@@ -360,13 +411,11 @@
    -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
    -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
    -e "s!%%PDF_SIZE%%!$pdf_size!g" \
-   -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \
    -e "s!%%ASCII_SIZE%%!$ascii_size!g" \
    -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
    -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
    -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
    -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
-   -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \
    -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
    -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
    -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2012-01-06.07; # UTC
+scriptversion=2012-03-18.17; # UTC
 
 # Copyright (C) 2007-2012 Free Software Foundation, Inc.
 #
@@ -92,6 +92,8 @@
 
 Running without arguments will suffice in most cases."
 
+prefix=v
+
 while test $# -gt 0; do
   case $1 in
     --help) echo "$usage"; exit 0;;
@@ -120,7 +122,6 @@
 fi
 
 tag_sed_script="${tag_sed_script:-s/x/x/}"
-prefix="${prefix:-v}"
 
 nl='
 '
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -3,7 +3,7 @@
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2012-01-06 07:14'; # UTC
+my $VERSION = '2012-07-29 06:11'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -64,12 +64,21 @@
                   makes a change to SHA1's commit log text or metadata.
    --append-dot append a dot to the first line of each commit message if
                   there is no other punctuation or blank at the end.
+   --no-cluster never cluster commit messages under the same date/author
+                  header; the default is to cluster adjacent commit messages
+                  if their headers are the same and neither commit message
+                  contains multiple paragraphs.
+   --srcdir=DIR the root of the source tree, from which the .git/
+                  directory can be derived.
    --since=DATE convert only the logs since DATE;
                   the default is to convert all log entries.
    --format=FMT set format string for commit subject and body;
                   see 'man git-log' for the list of format metacharacters;
                   the default is '%s%n%b%n'
-
+   --strip-tab  remove one additional leading TAB from commit message lines.
+   --strip-cherry-pick  remove data inserted by "git cherry-pick";
+                  this includes the "cherry picked from commit ..." line,
+                  and the possible final "Conflicts:" paragraph.
    --help       display this help and exit
    --version    output version information and exit
 
@@ -185,11 +194,39 @@
   return $h;
 }
 
+# git_dir_option $SRCDIR
+#
+# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR
+# is undef).  Return as a list (0 or 1 element).
+sub git_dir_option($)
+{
+  my ($srcdir) = @_;
+  my @res = ();
+  if (defined $srcdir)
+    {
+      my $qdir = shell_quote $srcdir;
+      my $cmd = "cd $qdir && git rev-parse --show-toplevel";
+      my $qcmd = shell_quote $cmd;
+      my $git_dir = qx($cmd);
+      defined $git_dir
+        or die "$ME: cannot run $qcmd: $!\n";
+      $? == 0
+        or die "$ME: $qcmd had unexpected exit code or signal ($?)\n";
+      chomp $git_dir;
+      push @res, "--git-dir=$git_dir/.git";
+    }
+  @res;
+}
+
 {
   my $since_date;
   my $format_string = '%s%n%b%n';
   my $amend_file;
   my $append_dot = 0;
+  my $cluster = 1;
+  my $strip_tab = 0;
+  my $strip_cherry_pick = 0;
+  my $srcdir;
   GetOptions
     (
      help => sub { usage 0 },
@@ -198,9 +235,12 @@
      'format=s' => \$format_string,
      'amend=s' => \$amend_file,
      'append-dot' => \$append_dot,
+     'cluster!' => \$cluster,
+     'strip-tab' => \$strip_tab,
+     'strip-cherry-pick' => \$strip_cherry_pick,
+     'srcdir=s' => \$srcdir,
     ) or usage 1;
 
-
   defined $since_date
     and unshift @ARGV, "--since=$since_date";
 
@@ -208,7 +248,9 @@
   # that makes a correction in the log or attribution of that commit.
   my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
 
-  my @cmd = (qw (git log --log-size),
+  my @cmd = ('git',
+             git_dir_option $srcdir,
+             qw(log --log-size),
              '--pretty=format:%H:%ct  %an  <%ae>%n%n'.$format_string, @ARGV);
   open PIPE, '-|', @cmd
     or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
@@ -257,6 +299,13 @@
           $rest = $_;
         }
 
+      # Remove lines inserted by "git cherry-pick".
+      if ($strip_cherry_pick)
+        {
+          $rest =~ s/^\s*Conflicts:\n.*//sm;
+          $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m;
+        }
+
       my @line = split "\n", $rest;
       my $author_line = shift @line;
       defined $author_line
@@ -302,13 +351,15 @@
               . substr ($_, 5) . "\n";
         }
 
-      # If this header would be different from the previous date/name/email/
-      # coauthors header, or if this or the previous entry consists of two
-      # or more paragraphs, then print the header.
-      if ($date_line ne $prev_date_line
-          or "@coauthors" ne "@prev_coauthors"
-          or $multi_paragraph
-          or $prev_multi_paragraph)
+      # If clustering of commit messages has been disabled, if this header
+      # would be different from the previous date/name/email/coauthors header,
+      # or if this or the previous entry consists of two or more paragraphs,
+      # then print the header.
+      if ( ! $cluster
+          || $date_line ne $prev_date_line
+          || "@coauthors" ne "@prev_coauthors"
+          || $multi_paragraph
+          || $prev_multi_paragraph)
         {
           $prev_date_line eq ''
             or print "\n";
@@ -339,6 +390,10 @@
                 }
             }
 
+          # Remove one additional leading TAB from each line.
+          $strip_tab
+            and map { s/^\t// } @line;
+
           # Prefix each non-empty line with a TAB.
           @line = map { length $_ ? "\t$_" : '' } @line;
 
--- a/build-aux/gnu-web-doc-update
+++ b/build-aux/gnu-web-doc-update
@@ -24,63 +24,125 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Requirements: everything required to bootstrap your package,
-# plus these: git, cvs, cvsu, rsync, mktemp
-
-ME=`basename "$0"`
+ME=$(basename "$0")
 warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
 die() { warn "$*"; exit 1; }
 
-help_version()
+help()
 {
-  case $1 in
-    --help) cat <<EOF
+  cat <<EOF
 Usage: $ME
 
-Run this script (no options or arguments) after each non-alpha release,
-to update the web documentation at http://www.gnu.org/software/\$pkg/manual/
-Run it from your project's the top-level directory.
+Run this script from top_srcdir (no arguments) after each non-alpha
+release, to update the web documentation at
+http://www.gnu.org/software/\$pkg/manual/
 
 Options:
-  --help     print this help, then exit
-  --version  print version number, then exit
+  -C, --builddir=DIR  location of (configured) Makefile (default: .)
+  --help              print this help, then exit
+  --version           print version number, then exit
 
 Report bugs and patches to <bug-gnulib@gnu.org>.
 EOF
-      exit ;;
+  exit
+}
 
-    --version)
-      year=`echo "$VERSION" | sed 's/[^0-9].*//'`
-      cat <<EOF
+version()
+{
+  year=$(echo "$VERSION" | sed 's/[^0-9].*//')
+  cat <<EOF
 $ME $VERSION
 Copyright (C) $year Free Software Foundation, Inc,
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
 EOF
-      exit ;;
+  exit
+}
 
-  *) die "unrecognized option: $1";;
-  esac
+# find_tool ENVVAR NAMES...
+# -------------------------
+# Search for a required program.  Use the value of ENVVAR, if set,
+# otherwise find the first of the NAMES that can be run (i.e.,
+# supports --version).  If found, set ENVVAR to the program name,
+# die otherwise.
+#
+# FIXME: code duplication, see also bootstrap.
+find_tool ()
+{
+  find_tool_envvar=$1
+  shift
+  find_tool_names=$@
+  eval "find_tool_res=\$$find_tool_envvar"
+  if test x"$find_tool_res" = x; then
+    for i
+    do
+      if ($i --version </dev/null) >/dev/null 2>&1; then
+       find_tool_res=$i
+       break
+      fi
+    done
+  else
+    find_tool_error_prefix="\$$find_tool_envvar: "
+  fi
+  test x"$find_tool_res" != x \
+    || die "one of these is required: $find_tool_names"
+  ($find_tool_res --version </dev/null) >/dev/null 2>&1 \
+    || die "${find_tool_error_prefix}cannot run $find_tool_res --version"
+  eval "$find_tool_envvar=\$find_tool_res"
+  eval "export $find_tool_envvar"
 }
 
-case $# in
-  0) ;;
-  1) help_version $1 ;;
-  *) die "$ME: too many options" ;;
-esac
+## ------ ##
+## Main.  ##
+## ------ ##
+
+# Requirements: everything required to bootstrap your package, plus
+# these.
+find_tool CVS cvs
+find_tool CVSU cvsu
+find_tool GIT git
+find_tool RSYNC rsync
+find_tool XARGS gxargs xargs
+
+builddir=.
+while test $# != 0
+do
+  # Handle --option=value by splitting apart and putting back on argv.
+  case $1 in
+    --*=*)
+      opt=$(echo "$1" | sed -e 's/=.*//')
+      val=$(echo "$1" | sed -e 's/[^=]*=//')
+      shift
+      set dummy "$opt" "$val" ${1+"$@"}; shift
+      ;;
+  esac
+
+  case $1 in
+    --help|--version) ${1#--};;
+    -C|--builddir) shift; builddir=$1; shift ;;
+    --*) die "unrecognized option: $1";;
+    *) break;;
+  esac
+done
+
+test $# = 0 \
+  || die "too many arguments"
 
 prev=.prev-version
-version=$(cat $prev) || die "$ME: no $prev file?"
-pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) || die "$ME: no Makefile?"
+version=$(cat $prev) || die "no $prev file?"
+pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' $builddir/Makefile) \
+  || die "no Makefile?"
 tmp_branch=web-doc-$version-$$
+current_branch=$($GIT branch | sed -ne '/^\* /{s///;p;q;}')
 
 cleanup()
 {
-  __st=$?;
+  __st=$?
   rm -rf "$tmp"
-  git checkout master
-  git branch -d $tmp_branch
+  $GIT checkout "$current_branch"
+  $GIT submodule update --recursive
+  $GIT branch -d $tmp_branch
   exit $__st
 }
 trap cleanup 0
@@ -89,23 +151,33 @@
 # We must build using sources for which --version reports the
 # just-released version number, not some string like 7.6.18-20761.
 # That version string propagates into all documentation.
-git checkout -b $tmp_branch v$version
-ok=0
-./bootstrap && ./configure && make && make web-manual && ok=1
-test $ok = 1 || exit 1
+set -e
+$GIT checkout -b $tmp_branch v$version
+$GIT submodule update --recursive
+./bootstrap
+srcdir=$(pwd)
+cd "$builddir"
+  ./config.status --recheck
+  ./config.status
+  make
+  make web-manual
+cd "$srcdir"
+set +e
 
-tmp=$(mktemp -d --tmpdir=. web-doc-update.XXXXXX) || exit 1
+tmp=$(mktemp -d web-doc-update.XXXXXX) || exit 1
 ( cd $tmp \
-    && cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
-rsync -avP doc/manual/ $tmp/$pkg/manual
+    && $CVS -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
+$RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
 
 (
   cd $tmp/$pkg/manual
 
   # Add any new files:
-  cvsu --types='?'|sed s/..// | xargs --no-run-if-empty -- cvs add -ko
+  $CVSU --types='?'                             \
+    | sed s/..//                                \
+    | $XARGS --no-run-if-empty -- $CVS add -ko
 
-  cvs ci -m $version
+  $CVS ci -m $version
 )
 
 # Local variables:
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,10 +1,9 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2010-05-23.15; # UTC
+scriptversion=2012-06-11.00; # UTC
 
-# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2012 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
@@ -20,6 +19,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Originally written by Alexandre Duret-Lutz <adl@gnu.org>.
+# The master copy of this file is maintained in the gnulib Git repository.
+# Please send bug reports and feature requests to bug-gnulib@gnu.org.
 
 set -e
 
@@ -27,6 +28,7 @@
 conffile=.gnuploadrc
 to=
 dry_run=false
+replace=
 symlink_files=
 delete_files=
 delete_symlinks=
@@ -52,8 +54,10 @@
   --to DEST                specify one destination for FILES
                            (multiple --to options are allowed)
   --user NAME              sign with key NAME
+  --replace                allow replacements of existing files
   --symlink-regex[=EXPR]   use sed script EXPR to compute symbolic link names
   --dry-run                do nothing, show what would have been done
+                           (including the constructed directive file)
   --version                output version information and exit
 
 If --symlink-regex is given without EXPR, then the link target name
@@ -105,8 +109,7 @@
 the build-aux/ directory of the gnulib package
 (http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
 
-Report bugs to <bug-automake@gnu.org>.
-Send patches to <automake-patches@gnu.org>."
+Send patches and bug reports to <bug-gnulib@gnu.org>."
 
 # Read local configuration file
 if test -r "$conffile"; then
@@ -146,6 +149,9 @@
     --delete)
       collect_var=delete_files
       ;;
+    --replace)
+      replace="replace: true"
+      ;;
     --rmsymlink)
       collect_var=delete_symlinks
       ;;
@@ -243,11 +249,13 @@
 # listings with their arguments...).
 # Remember this script runs with 'set -e', so if echo is not built-in
 # it will exit now.
-PATH=/empty echo -n "Enter GPG passphrase: "
-stty -echo
-read -r passphrase
-stty echo
-echo
+if $dry_run; then :; else
+  PATH=/empty echo -n "Enter GPG passphrase: "
+  stty -echo
+  read -r passphrase
+  stty echo
+  echo
+fi
 
 if test $# -ne 0; then
   for file
@@ -270,7 +278,7 @@
   fi
 
   cat >${2}.directive<<EOF
-version: 1.1
+version: 1.2
 directory: $1
 comment: gnupload v. $scriptversion$stmt
 EOF
@@ -393,6 +401,12 @@
   do
     echo "Uploading $file to $dest ..."
     stmt=
+    #
+    # allowing file replacement is all or nothing.
+    if test -n "$replace"; then stmt="$stmt
+$replace"
+    fi
+    #
     files="$file $file.sig"
     destdir=`echo $dest | sed 's/[^:]*://'`
     if test -n "$symlink_expr"; then
--- a/build-aux/install-reloc
+++ b/build-aux/install-reloc
@@ -1,6 +1,6 @@
 #!/bin/sh
 # install-reloc - install a program including a relocating wrapper
-# Copyright (C) 2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 # Written by Bruno Haible <bruno@clisp.org>, 2003.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -183,7 +183,7 @@
       strerror.o \
       c-ctype.o
 test $rc = 0 || exit $?
-# Clean up debugging information left over by the native C compiler on MacOS X.
+# Clean up debugging information left over by the native C compiler on Mac OS X.
 rm -rf "$destprog.wrapper$exeext.dSYM"
 test $rc = 0 || exit $?
 
--- a/build-aux/javacomp.sh.in
+++ b/build-aux/javacomp.sh.in
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Compile a Java program.
 
-# Copyright (C) 2001-2002, 2006, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 # Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 #
 # This program is free software: you can redistribute it and/or modify
--- a/build-aux/javaexec.sh.in
+++ b/build-aux/javaexec.sh.in
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Execute a Java program.
 
-# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 # Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 #
 # This program is free software: you can redistribute it and/or modify
--- a/build-aux/ldd.sh.in
+++ b/build-aux/ldd.sh.in
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Determine the dynamically linked dependencies of a program.
 
-# Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
 # Written by Bruno Haible <bruno@clisp.org>, 2006.
 #
 # This program is free software: you can redistribute it and/or modify
--- a/build-aux/mdate-sh
+++ b/build-aux/mdate-sh
@@ -3,8 +3,7 @@
 
 scriptversion=2010-08-21.06; # UTC
 
-# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1995-2012 Free Software Foundation, Inc.
 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
 #
 # This program is free software; you can redistribute it and/or modify
deleted file mode 100755
--- a/build-aux/missing
+++ /dev/null
@@ -1,331 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2012-01-06.18; # UTC
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# 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 2, 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/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try '$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file 'aclocal.m4'
-  autoconf     touch file 'configure'
-  autoheader   touch file 'config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all 'Makefile.in' files
-  bison        create 'y.tab.[ch]', if possible, from existing .[ch]
-  flex         create 'lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create 'lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  yacc         create 'y.tab.[ch]', if possible, from existing .[ch]
-
-Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
-'g' are ignored when checking the name.
-
-Send bug reports to <bug-automake@gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown '$1' option"
-    echo 1>&2 "Try '$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).  This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
-  lex*|yacc*)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running '$TOOL --version' or '$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'acinclude.m4' or '${configure_ac}'.  You might want
-         to install the Automake and Perl packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified '${configure_ac}'.  You might want to install the
-         Autoconf and GNU m4 packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'acconfig.h' or '${configure_ac}'.  You might want
-         to install the Autoconf and GNU m4 packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
-         You might want to install the Automake and Perl packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te*)
-    echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get '$1' as part of Autoconf from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison*|yacc*)
-    echo 1>&2 "\
-WARNING: '$1' $msg.  You should only need it if
-         you modified a '.y' file.  You may need the Bison package
-         in order for those modifications to take effect.  You can get
-         Bison from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-	case $LASTARG in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f y.tab.h; then
-	echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex*|flex*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified a '.l' file.  You may need the Flex package
-         in order for those modifications to take effect.  You can get
-         Flex from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-	case $LASTARG in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f lex.yy.c; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 Help2man package in order for those modifications to take
-	 effect.  You can get Help2man from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit $?
-    fi
-    ;;
-
-  makeinfo*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified a '.texi' or '.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy 'make' (AIX,
-         DU, IRIX).  You might want to install the Texinfo package or
-         the GNU make package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-	/^@setfilename/{
-	  s/.* \([^ ]*\) *$/\1/
-	  p
-	  q
-	}' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the 'README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing '$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
--- a/build-aux/move-if-change
+++ b/build-aux/move-if-change
@@ -8,7 +8,7 @@
 # If you change this file with Emacs, please let the write hook
 # do its job.  Otherwise, update this string manually.
 
-# Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 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
--- a/build-aux/pmccabe.css
+++ b/build-aux/pmccabe.css
@@ -56,7 +56,7 @@
 }
 
 .ranges_entry_simple {
-    background: #87ff75; 
+    background: #87ff75;
 }
 
 .ranges_entry_moderate {
@@ -105,7 +105,7 @@
 
 
 .function_entry_simple {
-    background: #87ff75; 
+    background: #87ff75;
 }
 
 .function_entry_moderate {
--- a/build-aux/po/Makefile.in.in
+++ b/build-aux/po/Makefile.in.in
@@ -266,6 +266,7 @@
 
 install-strip: install
 
+install-dvi install-html install-info install-pdf install-ps:
 installdirs: installdirs-exec installdirs-data
 installdirs-exec:
 installdirs-data: installdirs-data-@USE_NLS@
new file mode 100755
--- /dev/null
+++ b/build-aux/prefix-gnulib-mk
@@ -0,0 +1,247 @@
+eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
+  & eval 'exec perl -wS "$0" $argv:q'
+    if 0;
+
+use strict;
+use IO::File;
+use Getopt::Long;
+use File::Basename; # for dirname
+
+my $VERSION = '2012-01-21 17:13'; # UTC
+(my $ME = $0) =~ s|.*/||;
+
+my $prefix;
+my $lib_name;
+
+sub usage ($)
+{
+  my ($exit_code) = @_;
+  my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+  if ($exit_code != 0)
+    {
+      print $STREAM "Try '$ME --help' for more information.\n";
+    }
+  else
+    {
+      print $STREAM <<EOF;
+Usage: $ME --lib-name=NAME FILE
+   or: $ME [--help|--version]
+Rewrite a gnulib-tool-generated FILE like lib/gnulib.mk to work with
+automake's subdir-objects.
+
+OPTIONS:
+
+This option must be specified:
+
+   --lib-name=NAME    library name, often "lib\$project"
+
+The following are optional:
+
+   --help             display this help and exit
+   --version          output version information and exit
+
+EOF
+    }
+  exit $exit_code;
+}
+
+# contents ($FILE_NAME)
+# ---------------------
+sub contents ($)
+{
+  my ($file) = @_;
+  local $/;                     # Turn on slurp-mode.
+  my $f = new IO::File "< $file" or die "$file";
+  my $contents = $f->getline or die "$file";
+  $f->close;
+  return $contents;
+}
+
+# prefix_word ($WORD)
+# -------------------
+# Do not prefix special words such as variable dereferences.  Also,
+# "Makefile" is really "Makefile", since precisely there is no
+# lib/Makefile.
+sub prefix_word ($)
+{
+  local ($_) = @_;
+  $_ = $prefix . $_
+    unless (/^-/ || m{^\$\(\w+\)} || $_ eq "Makefile" || $_ eq '\\'
+            || $_ eq '@ALLOCA@');
+  return $_;
+}
+
+
+# prefix_words ($TEXT)
+# --------------------
+sub prefix_words ($)
+{
+  local ($_) = @_;
+  s{(\S+)}{prefix_word($1)}gem;
+  return $_;
+}
+
+
+# prefix_assignment ($LHS-AND-ASSIGN-OP, $RHS)
+# --------------------------------------------
+sub prefix_assignment ($$)
+{
+  my ($lhs_and_assign_op, $rhs) = @_;
+  my $res;
+
+  # Some variables are initialized by gnulib.mk, and we don't want
+  # that.  Change '=' to '+='.
+  if ($lhs_and_assign_op =~ /^GPERF =$/)
+    {
+      # Do not change the RHS, which specifies the GPERF program.
+    }
+  elsif ($lhs_and_assign_op =~
+      /^(SUBDIRS|EXTRA_DIST|BUILT_SOURCES|SUFFIXES|MOSTLYCLEANFILES
+         |CLEANFILES|DISTCLEANFILES|MAINTAINERCLEANFILES|AM_CFLAGS
+         |AM_CPPFLAGS|AM_GNU_GETTEXT)\ =/x)
+    {
+      $lhs_and_assign_op =~ s/=/+=/;
+    }
+  # We don't want to inherit gnulib's AUTOMAKE_OPTIONS, comment them.
+  elsif ($lhs_and_assign_op =~ /^AUTOMAKE_OPTIONS =/)
+    {
+      $lhs_and_assign_op =~ s/^/# /;
+    }
+  elsif ($lhs_and_assign_op =~ /^SUFFIXES /)
+    {
+      # Elide any SUFFIXES assignment or concatenation.
+      $lhs_and_assign_op =~ s/^/# /;
+    }
+  # The words are (probably) paths to files in lib/: prefix them.
+  else
+    {
+      $rhs = prefix_words($rhs)
+    }
+
+  # Variables which name depend on the location: libbison_a_SOURCES =>
+  # lib_libbison_a_SOURCES.
+  $lhs_and_assign_op =~ s/($lib_name)/lib_$1/g;
+
+  return $lhs_and_assign_op . $rhs;
+}
+
+# prefix $CONTENTS
+# ----------------
+# $CONTENTS is a Makefile content.  Post-process it so that each file-name
+# is prefixed with $prefix (e.g., "lib/").
+#
+# Relies heavily on the regularity of the file generated by gnulib-tool.
+sub prefix ($)
+{
+  # Work on $_.
+  local ($_) = @_;
+
+  # Prefix all the occurrence of files in rules.  If there is nothing
+  # after in the :, it's probably a phony target, or a suffix rule.
+  # Don't touch it.
+  s{^([-\w+/]+\.[-\w.]+ *: *\S.*)$}
+   {prefix_words($1)}gem;
+
+  # Prefix files in variables.
+  s{^([\w.]+\s*\+?=)(.*)$}
+   {prefix_assignment($1, $2)}gem;
+
+  # These three guys escape all the other regular rules.
+  # Require the leading white space to avoid inserting the prefix
+  # on a line like this:
+  # charset_alias = $(DESTDIR)$(libdir)/charset.alias
+  # With $(libdir), it would be erroneous.
+  s{(\s)(charset\.alias|ref-add\.sed|ref-del\.sed)}{$1$prefix$2}g;
+  # Unfortunately, as a result we sometimes have lib/lib.
+  s{($prefix){2}}{$1}g;
+
+  # lib_libcoreutils_a_SOURCES += \
+  #   imaxtostr.c \
+  #   inttostr.c \
+  #   offtostr.c \
+  #   uinttostr.c \
+  #   umaxtostr.c
+  # The above are not handled since they're on continued lines, so
+  # deal with them manually:
+  s{^(\s*)((?:[ui]max|u?int|off)tostr\.c(:? \\)?)$}{$1$prefix$2}gm;
+
+  # $(srcdir)/ is actually $(top_srcdir)/$prefix/.
+  # The trailing slash is required to avoid matching this rule:
+  #   test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
+  s{\$\(srcdir\)/}{\$(top_srcdir)/$prefix}g;
+
+  # Sometimes, t-$@ is used instead of $@-t, which, of course, does
+  # not work when we have a $@ with a directory in it.
+  s{t-\$\@}{\$\@-t}g;
+
+  # Some AC_SUBST patterns remain and would better be Make macros.
+  s{\@(MKDIR_P)\@}{\$($1)}g;
+
+  # Adjust paths in mkdir.
+  s{(\$\(MKDIR_P\))\s*(\w+)}{$1 $prefix$2}g;
+
+  return $_;
+}
+
+# process ($IN)
+# -------------
+sub process ($)
+{
+  my ($file) = @_;
+  my ($bak) = "$file.bak";
+  rename ($file, $bak) or die;
+  my $contents = contents ($bak);
+  $contents = prefix ($contents);
+  my $out = new IO::File(">$file") or die;
+  print $out $contents;
+}
+
+{
+  GetOptions
+    (
+     'lib-name=s' => \$lib_name,
+     help => sub { usage 0 },
+     version => sub { print "$ME version $VERSION\n"; exit },
+    ) or usage 1;
+
+  my $fail = 0;
+  defined $lib_name
+    or (warn "$ME: no library name; use --lib-name=NAME\n"), $fail = 1;
+
+  # There must be exactly one argument.
+  @ARGV == 0
+    and (warn "$ME: missing FILE argument\n"), $fail = 1;
+  1 < @ARGV
+    and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"),
+      $fail = 1;
+  $fail
+    and usage 1;
+
+  my $file = $ARGV[0];
+  $prefix = (dirname $file) . '/';
+  warn "prefix=$prefix\n";
+
+  process $file;
+}
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## eval: (add-hook 'write-file-hooks 'time-stamp)
+## time-stamp-start: "my $VERSION = '"
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+## time-stamp-time-zone: "UTC"
+## time-stamp-end: "'; # UTC"
+## End:
--- a/build-aux/reloc-ldflags
+++ b/build-aux/reloc-ldflags
@@ -2,7 +2,7 @@
 # Output a system dependent linker command for putting a relocatable library
 # search path into an executable.
 #
-#   Copyright 2003, 2009-2012 Free Software Foundation, Inc.
+#   Copyright 2003-2012 Free Software Foundation, Inc.
 #   Written by Bruno Haible <bruno@clisp.org>, 2003.
 #
 #   This program is free software: you can redistribute it and/or modify
@@ -54,7 +54,7 @@
 esac
 
 case "$host_os" in
-  linux*) # Supported since Linux 2.1 and glibc 2.1.
+  linux* | kfreebsd*)
     rpath=
     save_IFS="$IFS"; IFS=":"
     for dir in $library_path_value; do
--- a/build-aux/relocatable.sh.in
+++ b/build-aux/relocatable.sh.in
@@ -6,7 +6,7 @@
 # package by hand; see doc/relocatable-maint.texi (in Gnulib) for
 # details.
 #
-# Copyright (C) 2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 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
--- a/build-aux/snippet/_Noreturn.h
+++ b/build-aux/snippet/_Noreturn.h
@@ -1,4 +1,4 @@
-#ifndef _Noreturn
+#if !defined _Noreturn && __STDC_VERSION__ < 201112
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
--- a/build-aux/snippet/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -55,7 +55,7 @@
    rather than issue the nice warning, but the end result of informing
    the developer about their portability problem is still achieved):
    #if HAVE_RAW_DECL_ENVIRON
-   static inline char ***rpl_environ (void) { return &environ; }
+   static char ***rpl_environ (void) { return &environ; }
    _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
    # undef environ
    # define environ (*rpl_environ ())
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,11 +3,11 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2012-01-04.16}
+\def\texinfoversion{2012-11-08.11}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -28,9 +28,9 @@
 %
 % Please try the latest version of texinfo.tex before submitting bug
 % reports; you can get the latest version from:
-%   http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
-%   ftp://tug.org/tex/texinfo.tex
-%     (and all CTAN mirrors, see http://www.ctan.org).
+%   http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
+%   http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
+%   http://www.gnu.org/software/texinfo/ (the Texinfo home page)
 % The texinfo.tex in any given distribution could well be out
 % of date, so if that's what you're using, please check.
 %
@@ -594,7 +594,7 @@
 \def\:{\spacefactor=1000 }
 
 % @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
+\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
 
 % @/ allows a line break.
 \let\/=\allowbreak
@@ -887,7 +887,7 @@
 \def\popthisfilestack{\errthisfilestackempty}
 \def\errthisfilestackempty{\errmessage{Internal error:
   the stack of filenames is empty.}}
-
+%
 \def\thisfile{}
 
 % @center line
@@ -895,36 +895,46 @@
 %
 \parseargdef\center{%
   \ifhmode
-    \let\next\centerH
+    \let\centersub\centerH
   \else
-    \let\next\centerV
+    \let\centersub\centerV
   \fi
-  \next{\hfil \ignorespaces#1\unskip \hfil}%
-}
-\def\centerH#1{%
-  {%
-    \hfil\break
-    \advance\hsize by -\leftskip
-    \advance\hsize by -\rightskip
-    \line{#1}%
-    \break
-  }%
-}
-\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
+  \centersub{\hfil \ignorespaces#1\unskip \hfil}%
+  \let\centersub\relax % don't let the definition persist, just in case
+}
+\def\centerH#1{{%
+  \hfil\break
+  \advance\hsize by -\leftskip
+  \advance\hsize by -\rightskip
+  \line{#1}%
+  \break
+}}
+%
+\newcount\centerpenalty
+\def\centerV#1{%
+  % The idea here is the same as in \startdefun, \cartouche, etc.: if
+  % @center is the first thing after a section heading, we need to wipe
+  % out the negative parskip inserted by \sectionheading, but still
+  % prevent a page break here.
+  \centerpenalty = \lastpenalty
+  \ifnum\centerpenalty>10000 \vskip\parskip \fi
+  \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
+  \line{\kern\leftskip #1\kern\rightskip}%
+}
 
 % @sp n   outputs n lines of vertical space
-
+%
 \parseargdef\sp{\vskip #1\baselineskip}
 
 % @comment ...line which is ignored...
 % @c is the same as @comment
 % @ignore ... @end ignore  is another way to write a comment
-
+%
 \def\comment{\begingroup \catcode`\^^M=\other%
 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
 \commentxxx}
 {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
+%
 \let\c=\comment
 
 % @paragraphindent NCHARS
@@ -1107,7 +1117,7 @@
 % #1 is a control sequence in which to do the replacements,
 % which we \xdef.
 \def\txiescapepdf#1{%
-  \ifx\pdfescapestring\relax
+  \ifx\pdfescapestring\thisisundefined
     % No primitive available; should we give a warning or log?
     % Many times it won't matter.
   \else
@@ -1173,8 +1183,8 @@
   %
   % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
   \def\dopdfimage#1#2#3{%
-    \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
-    \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+    \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+    \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
     %
     % pdftex (and the PDF format) support .pdf, .png, .jpg (among
     % others).  Let's try in that order, PDF first since if
@@ -1212,8 +1222,8 @@
     \else
       \immediate\pdfximage
     \fi
-      \ifdim \wd0 >0pt width \imagewidth \fi
-      \ifdim \wd2 >0pt height \imageheight \fi
+      \ifdim \wd0 >0pt width \pdfimagewidth \fi
+      \ifdim \wd2 >0pt height \pdfimageheight \fi
       \ifnum\pdftexversion<13
          #1.\pdfimgext
        \else
@@ -1357,12 +1367,17 @@
   \def\skipspaces#1{\def\PP{#1}\def\D{|}%
     \ifx\PP\D\let\nextsp\relax
     \else\let\nextsp\skipspaces
-      \ifx\p\space\else\addtokens{\filename}{\PP}%
-        \advance\filenamelength by 1
-      \fi
+      \addtokens{\filename}{\PP}%
+      \advance\filenamelength by 1
     \fi
     \nextsp}
-  \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+  \def\getfilename#1{%
+    \filenamelength=0
+    % If we don't expand the argument now, \skipspaces will get
+    % snagged on things like "@value{foo}".
+    \edef\temp{#1}%
+    \expandafter\skipspaces\temp|\relax
+  }
   \ifnum\pdftexversion < 14
     \let \startlink \pdfannotlink
   \else
@@ -1459,9 +1474,6 @@
 \def\ttsl{\setfontstyle{ttsl}}
 
 
-% Default leading.
-\newdimen\textleading  \textleading = 13.2pt
-
 % Set the baselineskip to #1, and the lineskip and strut size
 % correspondingly.  There is no deep meaning behind these magic numbers
 % used as factors; they just match (closely enough) what Knuth defined.
@@ -1473,6 +1485,7 @@
 % can get a sort of poor man's double spacing by redefining this.
 \def\baselinefactor{1}
 %
+\newdimen\textleading
 \def\setleading#1{%
   \dimen0 = #1\relax
   \normalbaselineskip = \baselinefactor\dimen0
@@ -1745,18 +1758,24 @@
 \fi\fi
 
 
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
+% Set the font macro #1 to the font named \fontprefix#2.
 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
-% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
-% empty to omit).
+% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
+% Example:
+% #1 = \textrm
+% #2 = \rmshape
+% #3 = 10
+% #4 = \mainmagstep
+% #5 = OT1
+%
 \def\setfont#1#2#3#4#5{%
   \font#1=\fontprefix#2#3 scaled #4
   \csname cmap#5\endcsname#1%
 }
 % This is what gets called when #5 of \setfont is empty.
 \let\cmap\gobble
-% emacs-page end of cmaps
+%
+% (end of cmaps)
 
 % Use cm as the default font prefix.
 % To specify the font prefix, you must define \fontprefix
@@ -1766,7 +1785,7 @@
 \fi
 % Support font families that don't use the same naming scheme as CM.
 \def\rmshape{r}
-\def\rmbshape{bx}               %where the normal face is bold
+\def\rmbshape{bx}               % where the normal face is bold
 \def\bfshape{b}
 \def\bxshape{bx}
 \def\ttshape{tt}
@@ -1781,8 +1800,7 @@
 \def\scshape{csc}
 \def\scbshape{csc}
 
-% Definitions for a main text size of 11pt.  This is the default in
-% Texinfo.
+% Definitions for a main text size of 11pt.  (The default in Texinfo.)
 %
 \def\definetextfontsizexi{%
 % Text fonts (11.2pt, magstep1).
@@ -1907,7 +1925,7 @@
 \textleading = 13.2pt % line spacing for 11pt CM
 \textfonts            % reset the current fonts
 \rm
-} % end of 11pt text font size definitions
+} % end of 11pt text font size definitions, \definetextfontsizexi
 
 
 % Definitions to make the main text be 10pt Computer Modern, with
@@ -2039,7 +2057,7 @@
 \textleading = 12pt   % line spacing for 10pt CM
 \textfonts            % reset the current fonts
 \rm
-} % end of 10pt text font size definitions
+} % end of 10pt text font size definitions, \definetextfontsizex
 
 
 % We provide the user-level command
@@ -2254,8 +2272,6 @@
 
 \gdef\markupsetcodequoteleft{\let`\codequoteleft}
 \gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
 }
 
 \let\markupsetuplqcode \markupsetcodequoteleft
@@ -2264,6 +2280,9 @@
 \let\markupsetuplqexample \markupsetcodequoteleft
 \let\markupsetuprqexample \markupsetcodequoteright
 %
+\let\markupsetuplqkbd     \markupsetcodequoteleft
+\let\markupsetuprqkbd     \markupsetcodequoteright
+%
 \let\markupsetuplqsamp \markupsetcodequoteleft
 \let\markupsetuprqsamp \markupsetcodequoteright
 %
@@ -2273,8 +2292,6 @@
 \let\markupsetuplqverbatim \markupsetcodequoteleft
 \let\markupsetuprqverbatim \markupsetcodequoteright
 
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
 % 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
@@ -2364,8 +2381,7 @@
   \aftersmartic
 }
 
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
-% @var is set to this for defun arguments.
+% Unconditional use \ttsl, and no ic.  @var is set to this for defuns.
 \def\ttslanted#1{{\ttsl #1}}
 
 % @cite is like \smartslanted except unconditionally use \sl.  We never want
@@ -2430,34 +2446,12 @@
 % @samp.
 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
 
-% definition of @key that produces a lozenge.  Doesn't adjust to text size.
-%\setfont\keyrm\rmshape{8}{1000}{OT1}
-%\font\keysy=cmsy9
-%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-%    \vbox{\hrule\kern-0.4pt
-%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-%    \kern-0.4pt\hrule}%
-%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-
-% definition of @key with no lozenge.  If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle.  But
-% if it isn't monospace, then use \tt.
-%
-\def\key#1{{\setupmarkupstyle{key}%
-  \nohyphenation
-  \ifmonospace\else\tt\fi
-  #1}\null}
-
-% ctrl is no longer a Texinfo command.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
+
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
 \def\tclose#1{%
   {%
     % Change normal interword space to be same as for the current font.
@@ -2482,7 +2476,7 @@
 % We *must* turn on hyphenation at `-' and `_' in @code.
 % Otherwise, it is too hard to avoid overfull hboxes
 % in the Emacs manual, the Library manual, etc.
-
+%
 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
 % both hyphenation at - and hyphenation within words.
 % We must therefore turn them both off (\tclose does that)
@@ -2546,6 +2540,13 @@
   \fi\fi
 }
 
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
+\let\command=\code
+\let\env=\code
+\let\file=\code
+\let\option=\code
+
 % @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
@@ -2692,10 +2693,6 @@
   \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}}
-
 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
 %   `example' (@kbd uses ttsl only inside of @example and friends),
 %   or `code' (@kbd uses normal tty font always).
@@ -2719,16 +2716,36 @@
 % Default is `distinct'.
 \kbdinputstyle distinct
 
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
 \def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
-
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
+\def\kbdsub#1#2#3\par{%
+  \def\one{#1}\def\three{#3}\def\threex{??}%
+  \ifx\one\xkey\ifx\threex\three \key{#2}%
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
+
+% definition of @key that produces a lozenge.  Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+%    \vbox{\hrule\kern-0.4pt
+%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+%    \kern-0.4pt\hrule}%
+%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge.  If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle.  But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+  \nohyphenation
+  \ifmonospace\else\tt\fi
+  #1}\null}
 
 % @clicksequence{File @click{} Open ...}
 \def\clicksequence#1{\begingroup #1\endgroup}
@@ -2836,6 +2853,9 @@
   }
 }
 
+% ctrl is no longer a Texinfo command, but leave this definition for fun.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
 % except specified as a normal braced arg, so no newlines to worry about.
@@ -3126,12 +3146,17 @@
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifx\curfontstyle\bfstylename
-    % bold:
-    \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+  \ifmonospace
+    % typewriter:
+    \font\thisecfont = ectt\ecsize \space at \nominalsize
   \else
-    % regular:
-    \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \ifx\curfontstyle\bfstylename
+      % bold:
+      \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+    \else
+      % regular:
+      \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \fi
   \fi
   \thisecfont
 }
@@ -3244,6 +3269,20 @@
   \finishedtitlepagetrue
 }
 
+% Settings used for typesetting titles: no hyphenation, no indentation,
+% don't worry much about spacing, ragged right.  This should be used
+% inside a \vbox, and fonts need to be set appropriately first.  Because
+% it is always used for titles, nothing else, we call \rmisbold.  \par
+% should be specified before the end of the \vbox, since a vbox is a group.
+% 
+\def\raggedtitlesettings{%
+  \rmisbold
+  \hyphenpenalty=10000
+  \parindent=0pt
+  \tolerance=5000
+  \ptexraggedright
+}
+
 % Macros to be used within @titlepage:
 
 \let\subtitlerm=\tenrm
@@ -3251,7 +3290,7 @@
 
 \parseargdef\title{%
   \checkenv\titlepage
-  \leftline{\titlefonts\rmisbold #1}
+  \vbox{\titlefonts \raggedtitlesettings #1\par}%
   % print a rule at the page bottom also.
   \finishedtitlepagefalse
   \vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -4188,7 +4227,7 @@
 }
 \def\ifsetfail{\doignore{ifset}}
 
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% @ifclear VAR ... @end executes the `...' iff VAR has never been
 % defined with @set, or has been undefined with @clear.
 %
 % The `\else' inside the `\doifset' parameter is a trick to reuse the
@@ -4199,6 +4238,35 @@
 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
 \def\ifclearfail{\doignore{ifclear}}
 
+% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
+% without the @) is in fact defined.  We can only feasibly check at the
+% TeX level, so something like `mathcode' is going to considered
+% defined even though it is not a Texinfo command.
+% 
+\makecond{ifcommanddefined}
+\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
+%
+\def\doifcmddefined#1#2{{%
+    \makevalueexpandable
+    \let\next=\empty
+    \expandafter\ifx\csname #2\endcsname\relax
+      #1% If not defined, \let\next as above.
+    \fi
+    \expandafter
+  }\next
+}
+\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
+
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
+\makecond{ifcommandnotdefined}
+\def\ifcommandnotdefined{%
+  \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
+\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
+
+% Set the `txicommandconditionals' variable, so documents have a way to
+% test if the @ifcommand...defined conditionals are available.
+\set txicommandconditionals
+
 % @dircategory CATEGORY  -- specify a category of the dir file
 % which this file should belong to.  Ignore this in TeX.
 \let\dircategory=\comment
@@ -4435,6 +4503,7 @@
   \definedummyword\guillemetright
   \definedummyword\guilsinglleft
   \definedummyword\guilsinglright
+  \definedummyword\lbracechar
   \definedummyword\leq
   \definedummyword\minus
   \definedummyword\ogonek
@@ -4447,6 +4516,7 @@
   \definedummyword\quoteleft
   \definedummyword\quoteright
   \definedummyword\quotesinglbase
+  \definedummyword\rbracechar
   \definedummyword\result
   \definedummyword\textdegree
   %
@@ -4498,6 +4568,7 @@
   \definedummyword\t
   %
   % Commands that take arguments.
+  \definedummyword\abbr
   \definedummyword\acronym
   \definedummyword\anchor
   \definedummyword\cite
@@ -4509,7 +4580,9 @@
   \definedummyword\emph
   \definedummyword\env
   \definedummyword\file
+  \definedummyword\image
   \definedummyword\indicateurl
+  \definedummyword\inforef
   \definedummyword\kbd
   \definedummyword\key
   \definedummyword\math
@@ -4556,7 +4629,10 @@
   % content at all.  So for index sorting, we map @{ and @} to strings
   % starting with |, since that ASCII character is between ASCII { and }.
   \def\{{|a}%
+  \def\lbracechar{|a}%
+  %
   \def\}{|b}%
+  \def\rbracechar{|b}%
   %
   % Non-English letters.
   \def\AA{AA}%
@@ -4732,10 +4808,9 @@
 %
 % ..., ready, GO:
 %
-\def\safewhatsit#1{%
-\ifhmode
+\def\safewhatsit#1{\ifhmode
   #1%
-\else
+ \else
   % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
   \whatsitskip = \lastskip
   \edef\lastskipmacro{\the\lastskip}%
@@ -4759,7 +4834,6 @@
     % to re-insert the same penalty (values >10000 are used for various
     % signals); since we just inserted a non-discardable item, any
     % following glue (such as a \parskip) would be a breakpoint.  For example:
-    %
     %   @deffn deffn-whatever
     %   @vindex index-whatever
     %   Description.
@@ -4772,8 +4846,7 @@
     % (the whatsit from the \write), so we must insert a \nobreak.
     \nobreak\vskip\whatsitskip
   \fi
-\fi
-}
+\fi}
 
 % The index entry written in the file actually looks like
 %  \entry {sortstring}{page}{topic}
@@ -5520,14 +5593,6 @@
 
 % Define @majorheading, @heading and @subheading
 
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-%       1) We use \vbox rather than the earlier \line to permit
-%          overlong headings to fold.
-%       2) \hyphenpenalty is set to 10000 because hyphenation in a
-%          heading is obnoxious; this forbids it.
-%       3) Likewise, headings look best if no \parindent is used, and
-%          if justification is not attempted.  Hence \raggedright.
-
 \def\majorheading{%
   {\advance\chapheadingskip by 10pt \chapbreak }%
   \parsearg\chapheadingzzz
@@ -5535,10 +5600,8 @@
 
 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
 \def\chapheadingzzz#1{%
-  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                    \parindent=0pt\ptexraggedright
-                    \rmisbold #1\hfill}}%
-  \bigskip \par\penalty 200\relax
+  \vbox{\chapfonts \raggedtitlesettings #1\par}%
+  \nobreak\bigskip \nobreak
   \suppressfirstparagraphindent
 }
 
@@ -5697,8 +5760,7 @@
     %
     % Typeset the actual heading.
     \nobreak % Avoid page breaks at the interline glue.
-    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
-          \hangindent=\wd0 \centerparametersmaybe
+    \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
           \unhbox0 #1\par}%
   }%
   \nobreak\bigskip % no page break after a chapter title
@@ -5720,18 +5782,18 @@
 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
 %
 \def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt\ptexraggedright
-                       \rmisbold #1\hfill}}\bigskip \par\nobreak
+  \chapoddpage
+  \vbox{\chapfonts \raggedtitlesettings #1\par}%
+  \nobreak\bigskip\nobreak
 }
 \def\chfopen #1#2{\chapoddpage {\chapfonts
 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
 \par\penalty 5000 %
 }
 \def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt
-                       \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
+  \chapoddpage
+  \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
+  \nobreak\bigskip \nobreak
 }
 \def\CHAPFopen{%
   \global\let\chapmacro=\chfopen
@@ -5876,14 +5938,15 @@
   %
   % We'll almost certainly start a paragraph next, so don't let that
   % glue accumulate.  (Not a breakpoint because it's preceded by a
-  % discardable item.)
+  % discardable item.)  However, when a paragraph is not started next
+  % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
+  % or the negative glue will cause weirdly wrong output, typically
+  % obscuring the section heading with something else.
   \vskip-\parskip
   %
-  % This is purely so the last item on the list is a known \penalty >
-  % 10000.  This is so \startdefun can avoid allowing breakpoints after
-  % section headings.  Otherwise, it would insert a valid breakpoint between:
-  %   @section sec-whatever
-  %   @deffn def-whatever
+  % This is so the last item on the main vertical list is a known
+  % \penalty > 10000, so \startdefun, etc., can recognize the situation
+  % and do the needful.
   \penalty 10001
 }
 
@@ -6303,7 +6366,7 @@
   % If this cartouche directly follows a sectioning command, we need the
   % \parskip glue (backspaced over by default) or the cartouche can
   % collide with the section heading.
-  \ifnum\lastpenalty>10000 \vskip\parskip \fi
+  \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
   %
   \vbox\bgroup
       \baselineskip=0pt\parskip=0pt\lineskip=0pt
@@ -6496,16 +6559,9 @@
 \makedispenvdef{quotation}{\quotationstart}
 %
 \def\quotationstart{%
-  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
-  \parindent=0pt
-  %
-  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \indentedblockstart % same as \indentedblock, but increase right margin too.
   \ifx\nonarrowing\relax
-    \advance\leftskip by \lispnarrowing
     \advance\rightskip by \lispnarrowing
-    \exdentamount = \lispnarrowing
-  \else
-    \let\nonarrowing = \relax
   \fi
   \parsearg\quotationlabel
 }
@@ -6531,6 +6587,32 @@
   \fi
 }
 
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+% 
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+  \parindent=0pt
+  %
+  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \ifx\nonarrowing\relax
+    \advance\leftskip by \lispnarrowing
+    \exdentamount = \lispnarrowing
+  \else
+    \let\nonarrowing = \relax
+  \fi
+}
+
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+  \par
+  {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallindentedblock{\Eindentedblock}
+
 
 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
 % If we want to allow any <char> as delimiter,
@@ -7009,7 +7091,10 @@
   \df \sl \hyphenchar\font=0
   %
   % On the other hand, if an argument has two dashes (for instance), we
-  % want a way to get ttsl.  Let's try @var for that.
+  % want a way to get ttsl.  We used to recommend @var for that, so
+  % leave the code in, but it's strange for @var to lead to typewriter.
+  % Nowadays we recommend @code, since the difference between a ttsl hyphen
+  % and a tt hyphen is pretty tiny.  @code also disables ?` !`.
   \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
@@ -7793,7 +7878,7 @@
   \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
@@ -7802,26 +7887,41 @@
 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
 \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
 \def\ref#1{\xrefX[#1,,,,,,,]}
+%
+\newbox\toprefbox
+\newbox\printedrefnamebox
+\newbox\infofilenamebox
+\newbox\printedmanualbox
+%
 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
   \unsepspaces
-  \def\printedmanual{\ignorespaces #5}%
+  %
+  % Get args without leading/trailing spaces.
   \def\printedrefname{\ignorespaces #3}%
-  \setbox1=\hbox{\printedmanual\unskip}%
-  \setbox0=\hbox{\printedrefname\unskip}%
-  \ifdim \wd0 = 0pt
+  \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+  %
+  \def\infofilename{\ignorespaces #4}%
+  \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
+  %
+  \def\printedmanual{\ignorespaces #5}%
+  \setbox\printedmanualbox  = \hbox{\printedmanual\unskip}%
+  %
+  % If the printed reference name (arg #3) was not explicitly given in
+  % the @xref, figure out what we want to use.
+  \ifdim \wd\printedrefnamebox = 0pt
     % No printed node name was explicitly given.
     \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
-      % Use the node name inside the square brackets.
+      % Not auto section-title: use node name inside the square brackets.
       \def\printedrefname{\ignorespaces #1}%
     \else
-      % Use the actual chapter/section title appear inside
-      % the square brackets.  Use the real section title if we have it.
-      \ifdim \wd1 > 0pt
-        % It is in another manual, so we don't have it.
+      % Auto section-title: use chapter/section title inside
+      % the square brackets if we have it.
+      \ifdim \wd\printedmanualbox > 0pt
+        % It is in another manual, so we don't have it; use node name.
         \def\printedrefname{\ignorespaces #1}%
       \else
         \ifhavexrefs
-          % We know the real title if we have the xref values.
+          % We (should) know the real title if we have the xref values.
           \def\printedrefname{\refx{#1-title}{}}%
         \else
           % Otherwise just copy the Info node name.
@@ -7835,12 +7935,20 @@
   \ifpdf
     {\indexnofonts
      \turnoffactive
+     \makevalueexpandable
      % This expands tokens, so do it after making catcode changes, so _
-     % etc. don't get their TeX definitions.
+     % etc. don't get their TeX definitions.  This ignores all spaces in
+     % #4, including (wrongly) those in the middle of the filename.
      \getfilename{#4}%
      %
+     % This (wrongly) does not take account of leading or trailing
+     % spaces in #1, which should be ignored.
      \edef\pdfxrefdest{#1}%
-     \txiescapepdf\pdfxrefdest
+     \ifx\pdfxrefdest\empty
+       \def\pdfxrefdest{Top}% no empty targets
+     \else
+       \txiescapepdf\pdfxrefdest  % escape PDF special chars
+     \fi
      %
      \leavevmode
      \startlink attr{/Border [0 0 0]}%
@@ -7867,29 +7975,42 @@
   \iffloat\Xthisreftitle
     % If the user specified the print name (third arg) to the ref,
     % print it instead of our usual "Figure 1.2".
-    \ifdim\wd0 = 0pt
+    \ifdim\wd\printedrefnamebox = 0pt
       \refx{#1-snt}{}%
     \else
       \printedrefname
     \fi
     %
-    % if the user also gave the printed manual name (fifth arg), append
+    % If the user also gave the printed manual name (fifth arg), append
     % "in MANUALNAME".
-    \ifdim \wd1 > 0pt
+    \ifdim \wd\printedmanualbox > 0pt
       \space \putwordin{} \cite{\printedmanual}%
     \fi
   \else
     % node/anchor (non-float) references.
+    % 
+    % If we use \unhbox to print the node names, TeX does not insert
+    % empty discretionaries after hyphens, which means that it will not
+    % find a line break at a hyphen in a node names.  Since some manuals
+    % are best written with fairly long node names, containing hyphens,
+    % this is a loss.  Therefore, we give the text of the node name
+    % again, so it is as if TeX is seeing it for the first time.
+    % 
+    \ifdim \wd\printedmanualbox > 0pt
+      % Cross-manual reference with a printed manual name.
+      % 
+      \crossmanualxref{\cite{\printedmanual\unskip}}%
     %
-    % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
-    % insert empty discretionaries after hyphens, which means that it will
-    % not find a line break at a hyphen in a node names.  Since some manuals
-    % are best written with fairly long node names, containing hyphens, this
-    % is a loss.  Therefore, we give the text of the node name again, so it
-    % is as if TeX is seeing it for the first time.
-    \ifdim \wd1 > 0pt
-      \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+    \else\ifdim \wd\infofilenamebox > 0pt
+      % Cross-manual reference with only an info filename (arg 4), no
+      % printed manual name (arg 5).  This is essentially the same as
+      % the case above; we output the filename, since we have nothing else.
+      % 
+      \crossmanualxref{\code{\infofilename\unskip}}%
+    %
     \else
+      % Reference within this manual.
+      %
       % _ (for example) has to be the character _ for the purposes of the
       % control sequence corresponding to the node, but it has to expand
       % into the usual \leavevmode...\vrule stuff for purposes of
@@ -7901,7 +8022,7 @@
        \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
        \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
       }%
-      % output the `[mynode]' via a macro so it can be overridden.
+      % output the `[mynode]' via the macro below so it can be overridden.
       \xrefprintnodename\printedrefname
       %
       % But we always want a comma and a space:
@@ -7909,11 +8030,37 @@
       %
       % output the `page 3'.
       \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
-    \fi
+    \fi\fi
   \fi
   \endlink
 \endgroup}
 
+% Output a cross-manual xref to #1.  Used just above (twice).
+% 
+% Only include the text "Section ``foo'' in" if the foo is neither
+% missing or Top.  Thus, @xref{,,,foo,The Foo Manual} outputs simply
+% "see The Foo Manual", the idea being to refer to the whole manual.
+% 
+% But, this being TeX, we can't easily compare our node name against the
+% string "Top" while ignoring the possible spaces before and after in
+% the input.  By adding the arbitrary 7sp below, we make it much less
+% likely that a real node name would have the same width as "Top" (e.g.,
+% in a monospaced font).  Hopefully it will never happen in practice.
+% 
+% For the same basic reason, we retypeset the "Top" at every
+% reference, since the current font is indeterminate.
+% 
+\def\crossmanualxref#1{%
+  \setbox\toprefbox = \hbox{Top\kern7sp}%
+  \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+  \ifdim \wd2 > 7sp  % nonempty?
+    \ifdim \wd2 = \wd\toprefbox \else  % same as Top?
+      \putwordSection{} ``\printedrefname'' \putwordin{}\space
+    \fi
+  \fi
+  #1%
+}
+
 % This macro is called from \xrefX for the `[nodename]' part of xref
 % output.  It's a separate macro only so it can be changed more easily,
 % since square brackets don't work well in some documents.  Particularly
@@ -8281,7 +8428,7 @@
   it from ftp://tug.org/tex/epsf.tex.}
 %
 \def\image#1{%
-  \ifx\epsfbox\thisiundefined
+  \ifx\epsfbox\thisisundefined
     \ifwarnednoepsf \else
       \errhelp = \noepsfhelp
       \errmessage{epsf.tex not found, images will be ignored}%
@@ -8305,6 +8452,13 @@
   % If the image is by itself, center it.
   \ifvmode
     \imagevmodetrue
+  \else \ifx\centersub\centerV
+    % for @center @image, we need a vbox so we can have our vertical space
+    \imagevmodetrue
+    \vbox\bgroup % vbox has better behavior than vtop herev
+  \fi\fi
+  %
+  \ifimagevmode
     \nobreak\medskip
     % Usually we'll have text after the image which will insert
     % \parskip glue, so insert it here too to equalize the space
@@ -8314,9 +8468,13 @@
   \fi
   %
   % Leave vertical mode so that indentation from an enclosing
-  % environment such as @quotation is respected.  On the other hand, if
-  % it's at the top level, we don't want the normal paragraph indentation.
-  \noindent
+  %  environment such as @quotation is respected.
+  % However, if we're at the top level, we don't want the
+  %  normal paragraph indentation.
+  % On the other hand, if we are in the case of @center @image, we don't
+  %  want to start a paragraph, which will create a hsize-width box and
+  %  eradicate the centering.
+  \ifx\centersub\centerV\else \noindent \fi
   %
   % Output the image.
   \ifpdf
@@ -8328,7 +8486,10 @@
     \epsfbox{#1.eps}%
   \fi
   %
-  \ifimagevmode \medskip \fi  % space after the standalone image
+  \ifimagevmode
+    \medskip  % space after a standalone image
+  \fi  
+  \ifx\centersub\centerV \egroup \fi
 \endgroup}
 
 
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -3,7 +3,7 @@
     if 0;
 # Update an FSF copyright year list to include the current year.
 
-my $VERSION = '2011-01-02.20:59'; # UTC
+my $VERSION = '2012-02-05.21:39'; # UTC
 
 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
@@ -24,7 +24,7 @@
 
 # The arguments to this script should be names of files that contain
 # copyright statements to be updated.  The copyright holder's name
-# defaults to "Free Softward Foundation, Inc." but may be changed to
+# defaults to "Free Software Foundation, Inc." but may be changed to
 # any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
 # variable.
 #
@@ -43,7 +43,7 @@
 # A warning is printed for every file for which no copyright
 # statement is recognized.
 #
-# Each file's copyright statement must be formated correctly in
+# Each file's copyright statement must be formatted correctly in
 # order to be recognized.  For example, each of these is fine:
 #
 #   Copyright @copyright{} 1990-2005, 2007-2009 Free Software
@@ -110,6 +110,9 @@
 #      interval (such as 1990-2008).  If unset or set to 0, all existing
 #      copyright year intervals in a reformatted FSF copyright statement
 #      are expanded instead.
+#      If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
+#      to the minimal containing range.  For example, convert
+#      2000, 2004-2007, 2009 to 2000-2009.
 #   3. For testing purposes, you can set the assumed current year in
 #      UPDATE_COPYRIGHT_YEAR.
 #   4. The default maximum line length for a copyright line is 72.
@@ -221,6 +224,10 @@
                   }))
                 )+
               /$1-$3/gx;
+
+            # When it's 2, emit a single range encompassing all year numbers.
+            $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
+              and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
           }
 
         # Format within margin.
--- a/build-aux/x-to-1.in
+++ b/build-aux/x-to-1.in
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2001, 2003, 2006, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 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
deleted file mode 100644
--- a/build-aux/ylwrap
+++ /dev/null
@@ -1,226 +0,0 @@
-#! /bin/sh
-# ylwrap - wrapper for lex/yacc invocations.
-
-scriptversion=2011-08-25.18; # UTC
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
-#
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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 2, 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/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case "$1" in
-  '')
-    echo "$0: No files given.  Try '$0 --help' for more information." 1>&2
-    exit 1
-    ;;
-  --basedir)
-    basedir=$2
-    shift 2
-    ;;
-  -h|--h*)
-    cat <<\EOF
-Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
-
-Wrapper for lex/yacc invocations, renaming files as desired.
-
-  INPUT is the input file
-  OUTPUT is one file PROG generates
-  DESIRED is the file we actually want instead of OUTPUT
-  PROGRAM is program to run
-  ARGS are passed to PROG
-
-Any number of OUTPUT,DESIRED pairs may be used.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v|--v*)
-    echo "ylwrap $scriptversion"
-    exit $?
-    ;;
-esac
-
-
-# The input.
-input="$1"
-shift
-case "$input" in
-  [\\/]* | ?:[\\/]*)
-    # Absolute path; do nothing.
-    ;;
-  *)
-    # Relative path.  Make it absolute.
-    input="`pwd`/$input"
-    ;;
-esac
-
-pairlist=
-while test "$#" -ne 0; do
-  if test "$1" = "--"; then
-    shift
-    break
-  fi
-  pairlist="$pairlist $1"
-  shift
-done
-
-# The program to run.
-prog="$1"
-shift
-# Make any relative path in $prog absolute.
-case "$prog" in
-  [\\/]* | ?:[\\/]*) ;;
-  *[\\/]*) prog="`pwd`/$prog" ;;
-esac
-
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines.  But that might take us over the 14-char limit.
-dirname=ylwrap$$
-do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
-trap "ret=129; $do_exit" 1
-trap "ret=130; $do_exit" 2
-trap "ret=141; $do_exit" 13
-trap "ret=143; $do_exit" 15
-mkdir $dirname || exit 1
-
-cd $dirname
-
-case $# in
-  0) "$prog" "$input" ;;
-  *) "$prog" "$@" "$input" ;;
-esac
-ret=$?
-
-if test $ret -eq 0; then
-  set X $pairlist
-  shift
-  first=yes
-  # Since DOS filename conventions don't allow two dots,
-  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
-  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
-  y_tab_nodot="no"
-  if test -f y_tab.c || test -f y_tab.h; then
-    y_tab_nodot="yes"
-  fi
-
-  # The directory holding the input.
-  input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
-  # Quote $INPUT_DIR so we can use it in a regexp.
-  # FIXME: really we should care about more than '.' and '\'.
-  input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
-
-  while test "$#" -ne 0; do
-    from="$1"
-    # Handle y_tab.c and y_tab.h output by DOS
-    if test $y_tab_nodot = "yes"; then
-      if test $from = "y.tab.c"; then
-        from="y_tab.c"
-      else
-        if test $from = "y.tab.h"; then
-          from="y_tab.h"
-        fi
-      fi
-    fi
-    if test -f "$from"; then
-      # If $2 is an absolute path name, then just use that,
-      # otherwise prepend '../'.
-      case "$2" in
-        [\\/]* | ?:[\\/]*) target="$2";;
-        *) target="../$2";;
-      esac
-
-      # We do not want to overwrite a header file if it hasn't
-      # changed.  This avoid useless recompilations.  However the
-      # parser itself (the first file) should always be updated,
-      # because it is the destination of the .y.c rule in the
-      # Makefile.  Divert the output of all other files to a temporary
-      # file so we can compare them to existing versions.
-      if test $first = no; then
-        realtarget="$target"
-        target="tmp-`echo $target | sed s/.*[\\/]//g`"
-      fi
-      # Edit out '#line' or '#' directives.
-      #
-      # We don't want the resulting debug information to point at
-      # an absolute srcdir; it is better for it to just mention the
-      # .y file with no path.
-      #
-      # We want to use the real output file name, not yy.lex.c for
-      # instance.
-      #
-      # We want the include guards to be adjusted too.
-      FROM=`echo "$from" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-      TARGET=`echo "$2" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-
-      sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
-          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
-
-      # Check whether header files must be updated.
-      if test $first = no; then
-        if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
-          echo "$2" is unchanged
-          rm -f "$target"
-        else
-          echo updating "$2"
-          mv -f "$target" "$realtarget"
-        fi
-      fi
-    else
-      # A missing file is only an error for the first file.  This
-      # is a blatant hack to let us support using "yacc -d".  If -d
-      # is not specified, we don't want an error when the header
-      # file is "missing".
-      if test $first = yes; then
-        ret=1
-      fi
-    fi
-    shift
-    shift
-    first=no
-  done
-else
-  ret=$?
-fi
-
-# Remove the directory.
-cd ..
-rm -rf $dirname
-
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
new file mode 100644
--- /dev/null
+++ b/cfg.mk
@@ -0,0 +1,82 @@
+# This file is used via the maint.mk-using rule in Makefile.
+
+local-checks-to-skip =			\
+  sc_GFDL_version			\
+  sc_GPL_version			\
+  sc_bindtextdomain			\
+  sc_cast_of_alloca_return_value	\
+  sc_cast_of_argument_to_free		\
+  sc_cast_of_x_alloc_return_value	\
+  sc_error_message_period		\
+  sc_error_message_uppercase		\
+  sc_immutable_NEWS			\
+  sc_m4_quote_check			\
+  sc_makefile_TAB_only_indentation	\
+  sc_makefile_at_at_check		\
+  sc_makefile_path_separator_check	\
+  sc_obsolete_symbols			\
+  sc_program_name			\
+  sc_prohibit_HAVE_MBRTOWC		\
+  sc_prohibit_S_IS_definition		\
+  sc_prohibit_always_true_header_tests	\
+  sc_prohibit_always-defined_macros	\
+  sc_prohibit_atoi_atof			\
+  sc_prohibit_c_ctype_without_use	\
+  sc_prohibit_dirent_without_use	\
+  sc_prohibit_error_without_use		\
+  sc_prohibit_getopt_without_use	\
+  sc_prohibit_have_config_h		\
+  sc_prohibit_inttostr_without_use	\
+  sc_prohibit_magic_number_exit		\
+  sc_prohibit_path_max_allocation	\
+  sc_prohibit_reversed_compare_failure	\
+  sc_prohibit_safe_read_without_use	\
+  sc_prohibit_signal_without_use	\
+  sc_prohibit_stat_st_blocks		\
+  sc_prohibit_stddef_without_use	\
+  sc_prohibit_stdio--_without_use	\
+  sc_prohibit_strcmp			\
+  sc_prohibit_strings_without_use	\
+  sc_prohibit_undesirable_word_seq	\
+  sc_prohibit_xalloc_without_use	\
+  sc_require_config_h			\
+  sc_require_config_h_first		\
+  sc_space_tab				\
+  sc_texinfo_acronym			\
+  sc_two_space_separator_in_usage	\
+  sc_unmarked_diagnostics		\
+  sc_useless_cpp_parens
+
+empty-at-EOF = /fr/LC_MESSAGES/test-quotearg\.mo$$|^doc/INSTALL(\.(ISO|UTF-8))?
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
+  ^modules/|^lib/javaversion\.class$$|$(empty-at-EOF)
+exclude_file_name_regexp--sc_prohibit_doubled_word = \
+  ^(tests/test-init\.sh|lib/base(32|64)\.c)$$
+exclude_file_name_regexp--sc_prohibit_openat_without_use = ^lib/selinux-at\.c$$
+exclude_file_name_regexp--sc_trailing_blank = \
+  ^(.*\.class|build-aux/texinfo\.tex|doc/Copyright/assign\.future\.manual)$$
+
+# Disable strncpy prohibition completely, for now.
+exclude_file_name_regexp--sc_prohibit_strncpy = .*
+
+if_before_free_offenders_ =	\
+  clean-temp.c			\
+  csharpcomp.c			\
+  free.c			\
+  fstrcmp.c			\
+  gl_carray_list.c		\
+  glob.c			\
+  glthread/lock.c		\
+  propername.c			\
+  relocatable.c			\
+  vasnprintf.c
+
+if_before_free_basename_re_ = \
+  $(shell printf '%s\n' '$(if_before_free_offenders_)' \
+    |sed 's|\.c\>||g'|tr -s '[\n[:space:]]' '|')
+
+exclude_file_name_regexp--sc_avoid_if_before_free = \
+  ^lib/($(if_before_free_basename_re_))\.c$$
+
+exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests = \
+  ^lib/((error|getopt|strtoimax)\.c|(argp-namefrob)\.h)$$
--- a/config/argz.mk
+++ b/config/argz.mk
@@ -26,8 +26,7 @@
 "   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, write to the Free Software Foundation,"	\
-"   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */"\
+"   with this program; if not, see <http://www.gnu.org/licenses/>.  */"	\
 ""									\
 "#include <config.h>"							\
 ""									\
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -7,13 +7,9 @@
 $AUTOMAKE/lib/ar-lib		build-aux
 $AUTOMAKE/lib/compile		build-aux
 $AUTOMAKE/lib/depcomp		build-aux
-$AUTOMAKE/lib/elisp-comp	build-aux
-$AUTOMAKE/lib/gnupload		build-aux
 $AUTOMAKE/lib/install-sh	build-aux
 $AUTOMAKE/lib/mdate-sh		build-aux
-$AUTOMAKE/lib/missing		build-aux
 $AUTOMAKE/lib/mkinstalldirs	build-aux
-$AUTOMAKE/lib/ylwrap		build-aux
 #
 $TEXINFOSRC/doc/texinfo.tex		build-aux
 $TEXINFOSRC/util/gendocs.sh		build-aux
@@ -35,7 +31,8 @@
 $GNUWWWLICENSES/old-licenses/gpl-2.0.txt	doc/COPYINGv2
 $GNUWWWLICENSES/old-licenses/lgpl-2.1.texi	doc
 $GNUWWWLICENSES/old-licenses/gpl-2.0.texi	doc
-$GNUWWWLICENSES/old-licenses/fdl-1.2.texi	doc
+# no longer used or maintained and fails @acronym checks
+#$GNUWWWLICENSES/old-licenses/fdl-1.2.texi	doc
 $GNUWWWLICENSES/agpl-3.0.texi			doc
 $GNUWWWLICENSES/fdl-1.3.texi			doc
 $GNUWWWLICENSES/gpl-3.0.texi			doc
@@ -164,6 +161,8 @@
 #tab changes $LIBCSRC/stdlib/strtoul.c		lib gpl
 # (no more strtok_r.h) $LIBCSRC/string/strtok_r.c		lib gpl
 # (gnulib needs config.h?) $LIBCSRC/string/memmem.c		lib gpl
+# still sync-able, but it's the only one left in libc. not worth it.
+# paul e will do by hand.
 #$LIBCSRC/time/mktime.c			lib gpl
 
 #
@@ -198,6 +197,7 @@
 #$LIBCSRC/posix/glob.h			lib gpl (glob-libc.h in gnulib)
 #
 #$LIBCSRC/stdlib/putenv.c		lib gpl
+#$LIBCSRC/stdlib/random.c		lib gpl
 #$LIBCSRC/stdlib/random_r.c		lib gpl
 #$LIBCSRC/stdlib/rpmatch.c		lib gpl
 #$LIBCSRC/stdlib/strtol.c		lib gpl
--- a/doc/Copyright/assign.changes.manual
+++ b/doc/Copyright/assign.changes.manual
@@ -32,9 +32,10 @@
 Below is the assignment contract that we usually use.  You would need
 to print it out, sign it, and snail it to:
 
-Richard Stallman
-77 Mass Ave rm 32-381
-Cambridge MA 02139
+Assignment Coordinator
+Free Software Foundation
+51 Franklin Street, Suite 500
+Boston, MA 02110-1335
 USA
 
 Snail a copy of the employer's disclaimer as well.
--- a/doc/Copyright/assign.future.manual
+++ b/doc/Copyright/assign.future.manual
@@ -32,9 +32,10 @@
 Below is the assignment contract that we usually use.  You would need
 to print it out, sign it, and snail it to:
 
-Richard Stallman
-77 Mass Ave rm 32-381
-Cambridge MA 02139
+Assignment Coordinator
+Free Software Foundation
+51 Franklin Street, Suite 500
+Boston, MA 02110-1335
 USA
 
 Snail a copy of the employer's disclaimer as well.
--- a/doc/Copyright/assign.manual
+++ b/doc/Copyright/assign.manual
@@ -29,9 +29,10 @@
 Below is the assignment contract that we usually use.  You would need
 to print it out, sign it, and snail it to me:
 
-Richard Stallman
-77 Mass Ave rm 32-381
-Cambridge MA 02139
+Assignment Coordinator
+Free Software Foundation
+51 Franklin Street, Suite 500
+Boston, MA 02110-1335
 USA
 
 Snail me a copy of the employer's disclaimer as well.
--- a/doc/Copyright/assign.translation.manual
+++ b/doc/Copyright/assign.translation.manual
@@ -31,9 +31,10 @@
 Below is the assignment contract that we usually use.  You would need
 to print it out, sign it, and snail it to:
 
-Richard Stallman
-545 Tech Sq rm 425
-Cambridge, MA 02139
+Assignment Coordinator
+Free Software Foundation
+51 Franklin Street, Suite 500
+Boston, MA 02110-1335
 USA
 
 Snail a copy of the employer's disclaimer as well.
@@ -103,5 +104,3 @@
 
 
 [Please write your snail address here, so we can snail a copy back to you.]
-
-
--- a/doc/Copyright/disclaim.manual
+++ b/doc/Copyright/disclaim.manual
@@ -3,7 +3,7 @@
 worth our trying to assert a copyleft.)
 
     I, <name of person>, hereby disclaim all copyright interest in my
-    manual <manual> which does <one-line desription>.
+    manual <manual> which does <one-line description>.
 
     I affirm that I have no other intellectual property interest
     that would undermine this release, and will do nothing to undermine
--- a/doc/Copyright/disclaim.program
+++ b/doc/Copyright/disclaim.program
@@ -3,7 +3,7 @@
 worth our trying to assert a copyleft.)
 
     I, <name of person>, hereby disclaim all copyright interest in my
-    program <program> which does <one-line desription>.
+    program <program> which does <one-line description>.
 
     I affirm that I have no other intellectual property interest
     that would undermine this release, and will do nothing to undermine
--- a/doc/Copyright/request-assign.future
+++ b/doc/Copyright/request-assign.future
@@ -34,9 +34,3 @@
 
 [Which files have you changed so far, and which new files have you written
 so far?]
-
-
-
-
-
-
--- a/doc/Copyright/request-disclaim.changes
+++ b/doc/Copyright/request-disclaim.changes
@@ -39,9 +39,3 @@
 
 [Please list the files involved, or give a brief description of the changes
 being disclaimed.]
-
-
-
-
-
-
--- a/doc/INSTALL
+++ b/doc/INSTALL
@@ -368,4 +368,3 @@
 
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
-
--- a/doc/INSTALL.ISO
+++ b/doc/INSTALL.ISO
@@ -368,4 +368,3 @@
 
 'configure' also accepts some other, not widely useful, options.  Run
 'configure --help' for more details.
-
--- a/doc/INSTALL.UTF-8
+++ b/doc/INSTALL.UTF-8
@@ -368,4 +368,3 @@
 
 ‘configure’ also accepts some other, not widely useful, options.  Run
 ‘configure --help’ for more details.
-
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -37,25 +37,22 @@
 
 INSTALL_PRELUDE = echo '@firstparagraphindent insert'
 
+OMIT_TRAILING_EMPTY_LINES = /^$$/H; /^$$/d; x; s/\n//p; s/\n*//; x
+
 # INSTALL file with old ASCII quotation marks (looks ugly on modern machines).
 INSTALL: install.texi
 	$(INSTALL_PRELUDE) | cat - $< > tmp.texi
-	$(MAKEINFO) --plaintext --no-validate tmp.texi > $@
+	$(MAKEINFO) --plaintext --no-validate tmp.texi \
+	  | sed -e '$(OMIT_TRAILING_EMPTY_LINES)' > $@
 	rm -f tmp.texi
 
 # INSTALL file with ISO 646 or ISO 8859 quotation marks.
-INSTALL.ISO: install.texi
-	$(INSTALL_PRELUDE) | cat - $< > tmpi.texi
-	$(MAKEINFO) --plaintext --no-validate tmpi.texi \
-	  | sed -e "s/\`\([^']*\)'/'\1'/g" > $@
-	rm -f tmpi.texi
+INSTALL.ISO: INSTALL
+	sed -e "s/\`\([^']*\)'/'\1'/g" $< > $@
 
-# INSTALL file wit ISO 10646 (Unicode) quotation marks.
-INSTALL.UTF-8: install.texi
-	$(INSTALL_PRELUDE) | cat - $< > tmpu.texi
-	$(MAKEINFO) --plaintext --no-validate tmpu.texi \
-	  | sed -e "s/\`\([^']*\)'/‘\1’/g" > $@
-	rm -f tmpu.texi
+# INSTALL file with ISO 10646 (Unicode) quotation marks.
+INSTALL.UTF-8: INSTALL
+	sed -e "s/\`\([^']*\)'/‘\1’/g" $< > $@
 
 GNULIB_TEXI_FILES = $(filter-out maintain.texi make-stds.texi standards.texi,$(wildcard *.texi)) $(wildcard posix-headers/*.texi) $(wildcard posix-functions/*.texi) $(wildcard glibc-headers/*.texi) $(wildcard glibc-functions/*.texi)
 
--- a/doc/acl-cygwin.txt
+++ b/doc/acl-cygwin.txt
@@ -57,7 +57,7 @@
 
 At least one of (-d, -f, -m, -s) must be specified
 
-     Acl_entries are one or more comma-separated ACL entries 
+     Acl_entries are one or more comma-separated ACL entries
      from the following list:
 
          u[ser]::perm
@@ -68,7 +68,7 @@
          o[ther]:perm
 
      Default entries are like the above with the additional
-     default identifier. For example: 
+     default identifier. For example:
 
          d[efault]:u[ser]:uid:perm
 
@@ -116,7 +116,7 @@
      - One default other entry.
 
 -m   Add or modify one or more specified ACL entries.
-     Acl_entries is a comma-separated list of entries from the 
+     Acl_entries is a comma-separated list of entries from the
      same list as above.
 
 -r   Causes the permissions specified in the mask entry to be
@@ -135,4 +135,3 @@
 the explicit permissions requested and the default ACL entries
 Note: Under Cygwin, the default ACL entries are not taken into
 account currently.
-
--- a/doc/acl-resources.txt
+++ b/doc/acl-resources.txt
@@ -72,10 +72,10 @@
   http://www.softpanorama.org/Solaris/ACL/index.shtml
   http://www.cs.duke.edu/csl/faqs/solaris-acls.php
 Manual pages:
-  http://docs.sun.com/app/docs/doc/816-5167/acl-2?l=en&a=view
-  http://docs.sun.com/app/docs/doc/816-5165/getfacl-1?l=en&a=view
-  http://docs.sun.com/app/docs/doc/816-5165/setfacl-1?l=en&a=view
-  http://docs.sun.com/app/docs/doc/816-5167/pathconf-2?l=en&a=view
+  http://docs.oracle.com/cd/E23823_01/html/816-5167/acl-2.html
+  http://docs.oracle.com/cd/E23823_01/html/816-5165/getfacl-1.html
+  http://docs.oracle.com/cd/E23823_01/html/816-5165/setfacl-1.html
+  http://docs.oracle.com/cd/E23823_01/html/816-5167/pathconf-2.html
 Includes:
   <sys/acl.h>
 Library:
@@ -182,7 +182,7 @@
 Not available.
 
 
-MacOS X ACLs
+Mac OS X ACLs
 
 Manual pages:
   http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/acl.3.html
@@ -493,4 +493,3 @@
   ...
 Utilities:
   cacls
-
deleted file mode 100644
--- a/doc/fdl-1.2.texi
+++ /dev/null
@@ -1,451 +0,0 @@
-@c The GNU Free Documentation License.
-@center Version 1.2, November 2002
-
-@c This file is intended to be included within another document,
-@c hence no sectioning command or @node.
-
-@display
-Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
-51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-@end display
-
-@enumerate 0
-@item
-PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-functional and useful document @dfn{free} in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it,
-with or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible
-for modifications made by others.
-
-This License is a kind of ``copyleft'', which means that derivative
-works of the document must themselves be free in the same sense.  It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does.  But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book.  We recommend this License
-principally for works whose purpose is instruction or reference.
-
-@item
-APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work, in any medium, that
-contains a notice placed by the copyright holder saying it can be
-distributed under the terms of this License.  Such a notice grants a
-world-wide, royalty-free license, unlimited in duration, to use that
-work under the conditions stated herein.  The ``Document'', below,
-refers to any such manual or work.  Any member of the public is a
-licensee, and is addressed as ``you''.  You accept the license if you
-copy, modify or distribute the work in a way requiring permission
-under copyright law.
-
-A ``Modified Version'' of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A ``Secondary Section'' is a named appendix or a front-matter section
-of the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall
-subject (or to related matters) and contains nothing that could fall
-directly within that overall subject.  (Thus, if the Document is in
-part a textbook of mathematics, a Secondary Section may not explain
-any mathematics.)  The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The ``Invariant Sections'' are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.  If a
-section does not fit the above definition of Secondary then it is not
-allowed to be designated as Invariant.  The Document may contain zero
-Invariant Sections.  If the Document does not identify any Invariant
-Sections then there are none.
-
-The ``Cover Texts'' are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.  A Front-Cover Text may
-be at most 5 words, and a Back-Cover Text may be at most 25 words.
-
-A ``Transparent'' copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, that is suitable for revising the document
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters.  A copy made in an otherwise Transparent file
-format whose markup, or absence of markup, has been arranged to thwart
-or discourage subsequent modification by readers is not Transparent.
-An image format is not Transparent if used for any substantial amount
-of text.  A copy that is not ``Transparent'' is called ``Opaque''.
-
-Examples of suitable formats for Transparent copies include plain
-@sc{ascii} without markup, Texinfo input format, La@TeX{} input
-format, @acronym{SGML} or @acronym{XML} using a publicly available
-@acronym{DTD}, and standard-conforming simple @acronym{HTML},
-PostScript or @acronym{PDF} designed for human modification.  Examples
-of transparent image formats include @acronym{PNG}, @acronym{XCF} and
-@acronym{JPG}.  Opaque formats include proprietary formats that can be
-read and edited only by proprietary word processors, @acronym{SGML} or
-@acronym{XML} for which the @acronym{DTD} and/or processing tools are
-not generally available, and the machine-generated @acronym{HTML},
-PostScript or @acronym{PDF} produced by some word processors for
-output purposes only.
-
-The ``Title Page'' means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page.  For works in
-formats which do not have any title page as such, ``Title Page'' means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
-A section ``Entitled XYZ'' means a named subunit of the Document whose
-title either is precisely XYZ or contains XYZ in parentheses following
-text that translates XYZ in another language.  (Here XYZ stands for a
-specific section name mentioned below, such as ``Acknowledgements'',
-``Dedications'', ``Endorsements'', or ``History''.)  To ``Preserve the Title''
-of such a section when you modify the Document means that it remains a
-section ``Entitled XYZ'' according to this definition.
-
-The Document may include Warranty Disclaimers next to the notice which
-states that this License applies to the Document.  These Warranty
-Disclaimers are considered to be included by reference in this
-License, but only as regards disclaiming warranties: any other
-implication that these Warranty Disclaimers may have is void and has
-no effect on the meaning of this License.
-
-@item
-VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License.  You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute.  However, you may accept
-compensation in exchange for copies.  If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
-@item
-COPYING IN QUANTITY
-
-If you publish printed copies (or copies in media that commonly have
-printed covers) of the Document, numbering more than 100, and the
-Document's license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover.  Both covers must also clearly and legibly identify
-you as the publisher of these copies.  The front cover must present
-the full title with all words of the title equally prominent and
-visible.  You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a computer-network location from which the general network-using
-public has access to download using public-standard network protocols
-a complete Transparent copy of the Document, free of added material.
-If you use the latter option, you must take reasonably prudent steps,
-when you begin distribution of Opaque copies in quantity, to ensure
-that this Transparent copy will remain thus accessible at the stated
-location until at least one year after the last time you distribute an
-Opaque copy (directly or through your agents or retailers) of that
-edition to the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
-@item
-MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it.  In addition, you must do these things in the Modified Version:
-
-@enumerate A
-@item
-Use in the Title Page (and on the covers, if any) a title distinct
-from that of the Document, and from those of previous versions
-(which should, if there were any, be listed in the History section
-of the Document).  You may use the same title as a previous version
-if the original publisher of that version gives permission.
-
-@item
-List on the Title Page, as authors, one or more persons or entities
-responsible for authorship of the modifications in the Modified
-Version, together with at least five of the principal authors of the
-Document (all of its principal authors, if it has fewer than five),
-unless they release you from this requirement.
-
-@item
-State on the Title page the name of the publisher of the
-Modified Version, as the publisher.
-
-@item
-Preserve all the copyright notices of the Document.
-
-@item
-Add an appropriate copyright notice for your modifications
-adjacent to the other copyright notices.
-
-@item
-Include, immediately after the copyright notices, a license notice
-giving the public permission to use the Modified Version under the
-terms of this License, in the form shown in the Addendum below.
-
-@item
-Preserve in that license notice the full lists of Invariant Sections
-and required Cover Texts given in the Document's license notice.
-
-@item
-Include an unaltered copy of this License.
-
-@item
-Preserve the section Entitled ``History'', Preserve its Title, and add
-to it an item stating at least the title, year, new authors, and
-publisher of the Modified Version as given on the Title Page.  If
-there is no section Entitled ``History'' in the Document, create one
-stating the title, year, authors, and publisher of the Document as
-given on its Title Page, then add an item describing the Modified
-Version as stated in the previous sentence.
-
-@item
-Preserve the network location, if any, given in the Document for
-public access to a Transparent copy of the Document, and likewise
-the network locations given in the Document for previous versions
-it was based on.  These may be placed in the ``History'' section.
-You may omit a network location for a work that was published at
-least four years before the Document itself, or if the original
-publisher of the version it refers to gives permission.
-
-@item
-For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
-the Title of the section, and preserve in the section all the
-substance and tone of each of the contributor acknowledgements and/or
-dedications given therein.
-
-@item
-Preserve all the Invariant Sections of the Document,
-unaltered in their text and in their titles.  Section numbers
-or the equivalent are not considered part of the section titles.
-
-@item
-Delete any section Entitled ``Endorsements''.  Such a section
-may not be included in the Modified Version.
-
-@item
-Do not retitle any existing section to be Entitled ``Endorsements'' or
-to conflict in title with any Invariant Section.
-
-@item
-Preserve any Warranty Disclaimers.
-@end enumerate
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant.  To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section Entitled ``Endorsements'', provided it contains
-nothing but endorsements of your Modified Version by various
-parties---for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version.  Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity.  If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
-@item
-COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice, and that you preserve all their Warranty Disclaimers.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy.  If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections Entitled ``History''
-in the various original documents, forming one section Entitled
-``History''; likewise combine any sections Entitled ``Acknowledgements'',
-and any sections Entitled ``Dedications''.  You must delete all
-sections Entitled ``Endorsements.''
-
-@item
-COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
-@item
-AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, is called an ``aggregate'' if the copyright
-resulting from the compilation is not used to limit the legal rights
-of the compilation's users beyond what the individual works permit.
-When the Document is included in an aggregate, this License does not
-apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document's Cover Texts may be placed on
-covers that bracket the Document within the aggregate, or the
-electronic equivalent of covers if the Document is in electronic form.
-Otherwise they must appear on printed covers that bracket the whole
-aggregate.
-
-@item
-TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections.  You may include a
-translation of this License, and all the license notices in the
-Document, and any Warranty Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers.  In case of a disagreement between
-the translation and the original version of this License or a notice
-or disclaimer, the original version will prevail.
-
-If a section in the Document is Entitled ``Acknowledgements'',
-``Dedications'', or ``History'', the requirement (section 4) to Preserve
-its Title (section 1) will typically require changing the actual
-title.
-
-@item
-TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License.  Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License.  However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-@item
-FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time.  Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.  See
-@uref{http://www.gnu.org/copyleft/}.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License ``or any later version'' applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation.  If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-@end enumerate
-
-@page
-@heading ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
-@smallexample
-@group
-  Copyright (C)  @var{year}  @var{your name}.
-  Permission is granted to copy, distribute and/or modify this document
-  under the terms of the GNU Free Documentation License, Version 1.2
-  or any later version published by the Free Software Foundation;
-  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
-  Texts.  A copy of the license is included in the section entitled ``GNU
-  Free Documentation License''.
-@end group
-@end smallexample
-
-If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the ``with@dots{}Texts.'' line with this:
-
-@smallexample
-@group
-    with the Invariant Sections being @var{list their titles}, with
-    the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
-    being @var{list}.
-@end group
-@end smallexample
-
-If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-
-@c Local Variables:
-@c ispell-local-pdict: "ispell-dict"
-@c End:
-
--- a/doc/fdl-1.3.texi
+++ b/doc/fdl-1.3.texi
@@ -503,4 +503,3 @@
 @c Local Variables:
 @c ispell-local-pdict: "ispell-dict"
 @c End:
-
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -503,4 +503,3 @@
 @c Local Variables:
 @c ispell-local-pdict: "ispell-dict"
 @c End:
-
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -45,8 +45,6 @@
     (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
 <li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
     (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
-<li><a href="%%PACKAGE%%.ps.gz">PostScript file
-    (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
 <li><a href="%%PACKAGE%%.pdf">PDF file
     (%%PDF_SIZE%%K bytes)</a>.</li>
 <li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
--- a/doc/gendocs_template_min
+++ b/doc/gendocs_template_min
@@ -7,7 +7,6 @@
 <title>%%TITLE%% - GNU Project - Free Software Foundation (FSF)</title>
 <meta http-equiv="content-type" content='text/html; charset=utf-8' />
 <link rel="stylesheet" type="text/css" href="/gnu.css" />
-<link rev="made" href="webmasters@gnu.org" />
 </head>
 
 <body>
@@ -63,8 +62,6 @@
     (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
 <li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
     (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
-<li><a href="%%PACKAGE%%.ps.gz">PostScript file
-    (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
 <li><a href="%%PACKAGE%%.pdf">PDF file
     (%%PDF_SIZE%%K bytes)</a>.</li>
 <li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
--- a/doc/glibc-functions/accept4.texi
+++ b/doc/glibc-functions/accept4.texi
@@ -8,8 +8,10 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5, BeOS.
+But the replacement function is not atomic; this matters in multi-threaded
+programs that spawn child processes.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/addmntent.texi
+++ b/doc/glibc-functions/addmntent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/addseverity.texi
+++ b/doc/glibc-functions/addseverity.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/adjtimex.texi
+++ b/doc/glibc-functions/adjtimex.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/advance.texi
+++ b/doc/glibc-functions/advance.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/aio_init.texi
+++ b/doc/glibc-functions/aio_init.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_err_exit_status.texi
+++ b/doc/glibc-functions/argp_err_exit_status.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_error.texi
+++ b/doc/glibc-functions/argp_error.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_failure.texi
+++ b/doc/glibc-functions/argp_failure.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_help.texi
+++ b/doc/glibc-functions/argp_help.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_parse.texi
+++ b/doc/glibc-functions/argp_parse.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_program_bug_address.texi
+++ b/doc/glibc-functions/argp_program_bug_address.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_program_version.texi
+++ b/doc/glibc-functions/argp_program_version.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_program_version_hook.texi
+++ b/doc/glibc-functions/argp_program_version_hook.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_state_help.texi
+++ b/doc/glibc-functions/argp_state_help.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argp_usage.texi
+++ b/doc/glibc-functions/argp_usage.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/argz_add.texi
+++ b/doc/glibc-functions/argz_add.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_add_sep.texi
+++ b/doc/glibc-functions/argz_add_sep.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_append.texi
+++ b/doc/glibc-functions/argz_append.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_count.texi
+++ b/doc/glibc-functions/argz_count.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_create.texi
+++ b/doc/glibc-functions/argz_create.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_create_sep.texi
+++ b/doc/glibc-functions/argz_create_sep.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_delete.texi
+++ b/doc/glibc-functions/argz_delete.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_extract.texi
+++ b/doc/glibc-functions/argz_extract.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_insert.texi
+++ b/doc/glibc-functions/argz_insert.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_next.texi
+++ b/doc/glibc-functions/argz_next.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_replace.texi
+++ b/doc/glibc-functions/argz_replace.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/argz_stringify.texi
+++ b/doc/glibc-functions/argz_stringify.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
--- a/doc/glibc-functions/asprintf.texi
+++ b/doc/glibc-functions/asprintf.texi
@@ -27,7 +27,7 @@
 @item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, Solaris 11 2011-11, Cygwin 1.5.x, BeOS.
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, Solaris 11 2011-11, Cygwin 1.5.x, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
 NetBSD 3.0, Cygwin 1.5.x, BeOS.
@@ -48,14 +48,14 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, Solaris 11 2011-11, Cygwin 1.5.x.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, Solaris 11 2011-11, Cygwin 1.5.x.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
 BeOS.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/authdes_create.texi
+++ b/doc/glibc-functions/authdes_create.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/authdes_getucred.texi
+++ b/doc/glibc-functions/authdes_getucred.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/authdes_pk_create.texi
+++ b/doc/glibc-functions/authdes_pk_create.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/backtrace.texi
+++ b/doc/glibc-functions/backtrace.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/backtrace_symbols.texi
+++ b/doc/glibc-functions/backtrace_symbols.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/backtrace_symbols_fd.texi
+++ b/doc/glibc-functions/backtrace_symbols_fd.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/bdflush.texi
+++ b/doc/glibc-functions/bdflush.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/bind_textdomain_codeset.texi
+++ b/doc/glibc-functions/bind_textdomain_codeset.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/bindtextdomain.texi
+++ b/doc/glibc-functions/bindtextdomain.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/bswap_16.texi
+++ b/doc/glibc-functions/bswap_16.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/bswap_32.texi
+++ b/doc/glibc-functions/bswap_32.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/bswap_64.texi
+++ b/doc/glibc-functions/bswap_64.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/canonicalize_file_name.texi
+++ b/doc/glibc-functions/canonicalize_file_name.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function fails to detect trailing slashes on non-directories on
--- a/doc/glibc-functions/capget.texi
+++ b/doc/glibc-functions/capget.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/capset.texi
+++ b/doc/glibc-functions/capset.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/cbc_crypt.texi
+++ b/doc/glibc-functions/cbc_crypt.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/cfree.texi
+++ b/doc/glibc-functions/cfree.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/clearenv.texi
+++ b/doc/glibc-functions/clearenv.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/clntunix_create.texi
+++ b/doc/glibc-functions/clntunix_create.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/clock_adjtime.texi
@@ -0,0 +1,16 @@
+@node clock_adjtime
+@subsection @code{clock_adjtime}
+@findex clock_adjtime
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.13, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/clog10.texi
+++ b/doc/glibc-functions/clog10.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/clog10f.texi
+++ b/doc/glibc-functions/clog10f.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/clog10l.texi
+++ b/doc/glibc-functions/clog10l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/clone.texi
+++ b/doc/glibc-functions/clone.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/crypt_r.texi
+++ b/doc/glibc-functions/crypt_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/cuserid.texi
+++ b/doc/glibc-functions/cuserid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/dcgettext.texi
+++ b/doc/glibc-functions/dcgettext.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dcngettext.texi
+++ b/doc/glibc-functions/dcngettext.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/des_setparity.texi
+++ b/doc/glibc-functions/des_setparity.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dgettext.texi
+++ b/doc/glibc-functions/dgettext.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dl_iterate_phdr.texi
+++ b/doc/glibc-functions/dl_iterate_phdr.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dladdr1.texi
+++ b/doc/glibc-functions/dladdr1.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dlinfo.texi
+++ b/doc/glibc-functions/dlinfo.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dlmopen.texi
+++ b/doc/glibc-functions/dlmopen.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dlvsym.texi
+++ b/doc/glibc-functions/dlvsym.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dngettext.texi
+++ b/doc/glibc-functions/dngettext.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/drand48_r.texi
+++ b/doc/glibc-functions/drand48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/dremf.texi
+++ b/doc/glibc-functions/dremf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/dreml.texi
+++ b/doc/glibc-functions/dreml.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/dup3.texi
+++ b/doc/glibc-functions/dup3.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/glibc-functions/dysize.texi
+++ b/doc/glibc-functions/dysize.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ecb_crypt.texi
+++ b/doc/glibc-functions/ecb_crypt.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ecvt_r.texi
+++ b/doc/glibc-functions/ecvt_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/encrypt_r.texi
+++ b/doc/glibc-functions/encrypt_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/endaliasent.texi
+++ b/doc/glibc-functions/endaliasent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/endmntent.texi
+++ b/doc/glibc-functions/endmntent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/endsgent.texi
+++ b/doc/glibc-functions/endsgent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/endspent.texi
+++ b/doc/glibc-functions/endspent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/endutent.texi
+++ b/doc/glibc-functions/endutent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/envz_add.texi
+++ b/doc/glibc-functions/envz_add.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/envz_entry.texi
+++ b/doc/glibc-functions/envz_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/envz_get.texi
+++ b/doc/glibc-functions/envz_get.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/envz_merge.texi
+++ b/doc/glibc-functions/envz_merge.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/envz_remove.texi
+++ b/doc/glibc-functions/envz_remove.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/envz_strip.texi
+++ b/doc/glibc-functions/envz_strip.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/epoll_create.texi
+++ b/doc/glibc-functions/epoll_create.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/epoll_ctl.texi
+++ b/doc/glibc-functions/epoll_ctl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/epoll_wait.texi
+++ b/doc/glibc-functions/epoll_wait.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/erand48_r.texi
+++ b/doc/glibc-functions/erand48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/error.texi
+++ b/doc/glibc-functions/error.texi
@@ -7,8 +7,8 @@
 Portability problems fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This function is missing on many non-glibc platforms:
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/error_at_line.texi
+++ b/doc/glibc-functions/error_at_line.texi
@@ -11,6 +11,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This function is missing on many non-glibc platforms:
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/error_message_count.texi
+++ b/doc/glibc-functions/error_message_count.texi
@@ -11,6 +11,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This variable is missing on many non-glibc platforms:
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/error_one_per_line.texi
+++ b/doc/glibc-functions/error_one_per_line.texi
@@ -11,6 +11,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This variable is missing on many non-glibc platforms:
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/error_print_progname.texi
+++ b/doc/glibc-functions/error_print_progname.texi
@@ -11,6 +11,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This variable is missing on many non-glibc platforms:
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ether_aton_r.texi
+++ b/doc/glibc-functions/ether_aton_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ether_ntoa_r.texi
+++ b/doc/glibc-functions/ether_ntoa_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/euidaccess.texi
+++ b/doc/glibc-functions/euidaccess.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/glibc-functions/execvpe.texi
+++ b/doc/glibc-functions/execvpe.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.10, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.10, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw,
 Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/exp10.texi
+++ b/doc/glibc-functions/exp10.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/exp10f.texi
+++ b/doc/glibc-functions/exp10f.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/exp10l.texi
+++ b/doc/glibc-functions/exp10l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fallocate.texi
+++ b/doc/glibc-functions/fallocate.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on older glibc versions and all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
 work correctly across the entire data range of files larger than 2 GB.
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/fanotify_init.texi
@@ -0,0 +1,16 @@
+@node fanotify_init
+@subsection @code{fanotify_init}
+@findex fanotify_init
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.12, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/fanotify_mark.texi
@@ -0,0 +1,16 @@
+@node fanotify_mark
+@subsection @code{fanotify_mark}
+@findex fanotify_mark
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.12, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/fcloseall.texi
+++ b/doc/glibc-functions/fcloseall.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/fcvt_r.texi
+++ b/doc/glibc-functions/fcvt_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/fedisableexcept.texi
+++ b/doc/glibc-functions/fedisableexcept.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX
+Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX
 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.7, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/feenableexcept.texi
+++ b/doc/glibc-functions/feenableexcept.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX
+Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX
 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.7, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fegetexcept.texi
+++ b/doc/glibc-functions/fegetexcept.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.7, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fflush_unlocked.texi
+++ b/doc/glibc-functions/fflush_unlocked.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/ffsl.texi
+++ b/doc/glibc-functions/ffsl.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/ffsll.texi
+++ b/doc/glibc-functions/ffsll.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/fgetc_unlocked.texi
+++ b/doc/glibc-functions/fgetc_unlocked.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetgrent.texi
+++ b/doc/glibc-functions/fgetgrent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetgrent_r.texi
+++ b/doc/glibc-functions/fgetgrent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetpwent.texi
+++ b/doc/glibc-functions/fgetpwent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetpwent_r.texi
+++ b/doc/glibc-functions/fgetpwent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgets_unlocked.texi
+++ b/doc/glibc-functions/fgets_unlocked.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/fgetsgent.texi
+++ b/doc/glibc-functions/fgetsgent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetsgent_r.texi
+++ b/doc/glibc-functions/fgetsgent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetspent.texi
+++ b/doc/glibc-functions/fgetspent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetspent_r.texi
+++ b/doc/glibc-functions/fgetspent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fgetwc_unlocked.texi
+++ b/doc/glibc-functions/fgetwc_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/fgetws_unlocked.texi
+++ b/doc/glibc-functions/fgetws_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/fgetxattr.texi
+++ b/doc/glibc-functions/fgetxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/finitef.texi
+++ b/doc/glibc-functions/finitef.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/finitel.texi
+++ b/doc/glibc-functions/finitel.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/flistxattr.texi
+++ b/doc/glibc-functions/flistxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fopencookie.texi
+++ b/doc/glibc-functions/fopencookie.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fputc_unlocked.texi
+++ b/doc/glibc-functions/fputc_unlocked.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/fputs_unlocked.texi
+++ b/doc/glibc-functions/fputs_unlocked.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fputwc_unlocked.texi
+++ b/doc/glibc-functions/fputwc_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/fputws_unlocked.texi
+++ b/doc/glibc-functions/fputws_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/fread_unlocked.texi
+++ b/doc/glibc-functions/fread_unlocked.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/fremovexattr.texi
+++ b/doc/glibc-functions/fremovexattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fsetxattr.texi
+++ b/doc/glibc-functions/fsetxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/fstatfs.texi
+++ b/doc/glibc-functions/fstatfs.texi
@@ -17,5 +17,5 @@
 On platforms where @code{f_blocks} in @samp{struct statfs} is a 32-bit
 value, this function may not work correctly on files systems larger than
 4 TiB.  The fix is to use the @code{AC_SYS_LARGEFILE} macro.  This affects
-MacOS X.
+Mac OS X.
 @end itemize
--- a/doc/glibc-functions/fts_children.texi
+++ b/doc/glibc-functions/fts_children.texi
@@ -19,5 +19,5 @@
 may not work correctly on huge directories larger than 2 GB.  Also, on
 platforms where @code{ino_t} is a 32-bit type, this function may report
 inode numbers incorrectly.  The fix is to use the @code{AC_SYS_LARGEFILE}
-macro (only on MacOS X systems).
+macro (only on Mac OS X systems).
 @end itemize
--- a/doc/glibc-functions/fts_read.texi
+++ b/doc/glibc-functions/fts_read.texi
@@ -19,5 +19,5 @@
 may not work correctly on huge directories larger than 2 GB.  Also, on
 platforms where @code{ino_t} is a 32-bit type, this function may report
 inode numbers incorrectly.  The fix is to use the @code{AC_SYS_LARGEFILE}
-macro (only on MacOS X systems).
+macro (only on Mac OS X systems).
 @end itemize
--- a/doc/glibc-functions/futimesat.texi
+++ b/doc/glibc-functions/futimesat.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 8, Cygwin 1.5.x, mingw, MSVC 9,
 Interix 3.5, BeOS.
 @item
--- a/doc/glibc-functions/fwrite_unlocked.texi
+++ b/doc/glibc-functions/fwrite_unlocked.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/gammaf.texi
+++ b/doc/glibc-functions/gammaf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/gammal.texi
+++ b/doc/glibc-functions/gammal.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/get_avphys_pages.texi
+++ b/doc/glibc-functions/get_avphys_pages.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/get_current_dir_name.texi
+++ b/doc/glibc-functions/get_current_dir_name.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/get_nprocs.texi
+++ b/doc/glibc-functions/get_nprocs.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/glibc-functions/get_nprocs_conf.texi
+++ b/doc/glibc-functions/get_nprocs_conf.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/get_phys_pages.texi
+++ b/doc/glibc-functions/get_phys_pages.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getaliasbyname.texi
+++ b/doc/glibc-functions/getaliasbyname.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getaliasbyname_r.texi
+++ b/doc/glibc-functions/getaliasbyname_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getaliasent.texi
+++ b/doc/glibc-functions/getaliasent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getaliasent_r.texi
+++ b/doc/glibc-functions/getaliasent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getdate_r.texi
+++ b/doc/glibc-functions/getdate_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getdomainname.texi
+++ b/doc/glibc-functions/getdomainname.texi
@@ -19,7 +19,7 @@
 OSF/1 5.1.
 @item
 The second argument is of type @code{int}, not @code{size_t}, on some platforms:
-MacOS X 10.5, FreeBSD 6.4, AIX 7.1, IRIX 6.5.
+Mac OS X 10.5, FreeBSD 6.4, AIX 7.1, IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/getfilecon-desc.texi
+++ b/doc/glibc-functions/getfilecon-desc.texi
@@ -5,7 +5,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 On those platforms, this module provides a stub that always sets
 @code{errno} to @code{ENOTSUP} and returns @samp{-1}.
 @item
--- a/doc/glibc-functions/getgrent_r.texi
+++ b/doc/glibc-functions/getgrent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getgrouplist.texi
+++ b/doc/glibc-functions/getgrouplist.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, BeOS.
+Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/gethostbyaddr_r.texi
+++ b/doc/glibc-functions/gethostbyaddr_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gethostbyname2_r.texi
+++ b/doc/glibc-functions/gethostbyname2_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gethostbyname_r.texi
+++ b/doc/glibc-functions/gethostbyname_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gethostent_r.texi
+++ b/doc/glibc-functions/gethostent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getipv4sourcefilter.texi
+++ b/doc/glibc-functions/getipv4sourcefilter.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getmntent.texi
+++ b/doc/glibc-functions/getmntent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/getmntent_r.texi
+++ b/doc/glibc-functions/getmntent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getnetbyaddr_r.texi
+++ b/doc/glibc-functions/getnetbyaddr_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getnetbyname_r.texi
+++ b/doc/glibc-functions/getnetbyname_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getnetent_r.texi
+++ b/doc/glibc-functions/getnetent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getnetgrent_r.texi
+++ b/doc/glibc-functions/getnetgrent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getnetname.texi
+++ b/doc/glibc-functions/getnetname.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getopt_long.texi
+++ b/doc/glibc-functions/getopt_long.texi
@@ -20,11 +20,11 @@
 @item
 The function @code{getopt_long} does not support the @samp{+} flag in
 the options string on some platforms:
-MacOS X 10.5, AIX 5.2, OSF/1 5.1, Solaris 10.
+Mac OS X 10.5, AIX 5.2, OSF/1 5.1, Solaris 10.
 @item
 The value of @code{optind} after a missing required argument is wrong
 on some platforms:
-MacOS 10.5.
+Mac OS X 10.5.
 @item
 The function @code{getopt_long} does not obey the @samp{-} flag in the
 options string when @env{POSIXLY_CORRECT} is set on some platforms:
@@ -36,7 +36,7 @@
 @item
 The function @code{getopt_long} does not support options with optional
 arguments on some platforms:
-MacOS X 10.5, OpenBSD 4.0, AIX 5.2, IRIX 6.5, Solaris 11 2010-11, Cygwin 1.5.x.
+Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, IRIX 6.5, Solaris 11 2010-11, Cygwin 1.5.x.
 @item
 This function crashes if the option string includes @code{W;} but
 there are no long options, on some platforms:
--- a/doc/glibc-functions/getopt_long_only.texi
+++ b/doc/glibc-functions/getopt_long_only.texi
@@ -17,11 +17,11 @@
 @item
 The function @code{getopt_long_only} does not support the @samp{+}
 flag in the options string on some platforms:
-MacOS X 10.5, AIX 5.2, OSF/1 5.1, Solaris 10.
+Mac OS X 10.5, AIX 5.2, OSF/1 5.1, Solaris 10.
 @item
 The value of @code{optind} after a missing required argument is wrong
 on some platforms:
-MacOS 10.5.
+Mac OS X 10.5.
 @item
 The function @code{getopt_long_only} does not obey the @samp{-} flag
 in the options string when @env{POSIXLY_CORRECT} is set on some platforms:
@@ -33,10 +33,10 @@
 @item
 The function @code{getopt_long_only} does not support options with
 optional arguments on some platforms:
-MacOS X 10.5, OpenBSD 4.0, AIX 5.2, Solaris 11 2010-11, Cygwin 1.5.x.
+Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, Solaris 11 2010-11, Cygwin 1.5.x.
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5,
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5,
 OSF/1 5.1, mingw, MSVC 9, Interix 3.5.
 @item
 This function crashes if the option string includes @code{W;} but
--- a/doc/glibc-functions/getpass.texi
+++ b/doc/glibc-functions/getpass.texi
@@ -15,7 +15,7 @@
 @itemize
 @item
 The returned password is truncated to PASS_MAX characters on some platforms:
-MacOS X 10.5 (128), FreeBSD 6.2 (128), NetBSD 3.0 (128), OpenBSD 4.0 (128), AIX 5.1 (32), HP-UX 11 (8), IRIX 6.5 (32), OSF/1 5.1 (80), Solaris 11 2010-11 (8, even less than PASS_MAX), Cygwin (128).
+Mac OS X 10.5 (128), FreeBSD 6.2 (128), NetBSD 3.0 (128), OpenBSD 4.0 (128), AIX 5.1 (32), HP-UX 11 (8), IRIX 6.5 (32), OSF/1 5.1 (80), Solaris 11 2010-11 (8, even less than PASS_MAX), Cygwin (128).
 The gnulib implementation returns the password untruncated.
 @end itemize
 
--- a/doc/glibc-functions/getprotobyname_r.texi
+++ b/doc/glibc-functions/getprotobyname_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getprotobynumber_r.texi
+++ b/doc/glibc-functions/getprotobynumber_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getprotoent_r.texi
+++ b/doc/glibc-functions/getprotoent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getpt.texi
+++ b/doc/glibc-functions/getpt.texi
@@ -11,6 +11,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This function is missing on many non-glibc platforms:
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getpublickey.texi
+++ b/doc/glibc-functions/getpublickey.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getpw.texi
+++ b/doc/glibc-functions/getpw.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getpwent_r.texi
+++ b/doc/glibc-functions/getpwent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getresgid.texi
+++ b/doc/glibc-functions/getresgid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getresuid.texi
+++ b/doc/glibc-functions/getresuid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getrpcbyname_r.texi
+++ b/doc/glibc-functions/getrpcbyname_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getrpcbynumber_r.texi
+++ b/doc/glibc-functions/getrpcbynumber_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getrpcent_r.texi
+++ b/doc/glibc-functions/getrpcent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getsecretkey.texi
+++ b/doc/glibc-functions/getsecretkey.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getservbyname_r.texi
+++ b/doc/glibc-functions/getservbyname_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getservbyport_r.texi
+++ b/doc/glibc-functions/getservbyport_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getservent_r.texi
+++ b/doc/glibc-functions/getservent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, HP-UX 11, IRIX 5.3, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getsgent.texi
+++ b/doc/glibc-functions/getsgent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getsgent_r.texi
+++ b/doc/glibc-functions/getsgent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getsgnam.texi
+++ b/doc/glibc-functions/getsgnam.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getsgnam_r.texi
+++ b/doc/glibc-functions/getsgnam_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getsourcefilter.texi
+++ b/doc/glibc-functions/getsourcefilter.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getspent.texi
+++ b/doc/glibc-functions/getspent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getspent_r.texi
+++ b/doc/glibc-functions/getspent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getspnam.texi
+++ b/doc/glibc-functions/getspnam.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getspnam_r.texi
+++ b/doc/glibc-functions/getspnam_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 5.3, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gettext.texi
+++ b/doc/glibc-functions/gettext.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutent.texi
+++ b/doc/glibc-functions/getutent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutent_r.texi
+++ b/doc/glibc-functions/getutent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutid.texi
+++ b/doc/glibc-functions/getutid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutid_r.texi
+++ b/doc/glibc-functions/getutid_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutline.texi
+++ b/doc/glibc-functions/getutline.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutline_r.texi
+++ b/doc/glibc-functions/getutline_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutmp.texi
+++ b/doc/glibc-functions/getutmp.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getutmpx.texi
+++ b/doc/glibc-functions/getutmpx.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/getwc_unlocked.texi
+++ b/doc/glibc-functions/getwc_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/getwchar_unlocked.texi
+++ b/doc/glibc-functions/getwchar_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/getxattr.texi
+++ b/doc/glibc-functions/getxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/glob_pattern_p.texi
+++ b/doc/glibc-functions/glob_pattern_p.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on most non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gnu_dev_major.texi
+++ b/doc/glibc-functions/gnu_dev_major.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gnu_dev_makedev.texi
+++ b/doc/glibc-functions/gnu_dev_makedev.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gnu_dev_minor.texi
+++ b/doc/glibc-functions/gnu_dev_minor.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/gnu_get_libc_release.texi
+++ b/doc/glibc-functions/gnu_get_libc_release.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/gnu_get_libc_version.texi
+++ b/doc/glibc-functions/gnu_get_libc_version.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/group_member.texi
+++ b/doc/glibc-functions/group_member.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/gsignal.texi
+++ b/doc/glibc-functions/gsignal.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/hasmntopt.texi
+++ b/doc/glibc-functions/hasmntopt.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/hcreate_r.texi
+++ b/doc/glibc-functions/hcreate_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/hdestroy_r.texi
+++ b/doc/glibc-functions/hdestroy_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/host2netname.texi
+++ b/doc/glibc-functions/host2netname.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/hsearch_r.texi
+++ b/doc/glibc-functions/hsearch_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/in6addr_any.texi
+++ b/doc/glibc-functions/in6addr_any.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This constant is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/in6addr_loopback.texi
+++ b/doc/glibc-functions/in6addr_loopback.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This constant is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 4.3.2, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, AIX 4.3.2, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_opt_append.texi
@@ -0,0 +1,16 @@
+@node inet6_opt_append
+@subsection @code{inet6_opt_append}
+@findex inet6_opt_append
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_opt_find.texi
@@ -0,0 +1,16 @@
+@node inet6_opt_find
+@subsection @code{inet6_opt_find}
+@findex inet6_opt_find
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_opt_finish.texi
@@ -0,0 +1,16 @@
+@node inet6_opt_finish
+@subsection @code{inet6_opt_finish}
+@findex inet6_opt_finish
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_opt_get_val.texi
@@ -0,0 +1,16 @@
+@node inet6_opt_get_val
+@subsection @code{inet6_opt_get_val}
+@findex inet6_opt_get_val
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_opt_init.texi
@@ -0,0 +1,16 @@
+@node inet6_opt_init
+@subsection @code{inet6_opt_init}
+@findex inet6_opt_init
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_opt_next.texi
@@ -0,0 +1,16 @@
+@node inet6_opt_next
+@subsection @code{inet6_opt_next}
+@findex inet6_opt_next
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_opt_set_val.texi
@@ -0,0 +1,16 @@
+@node inet6_opt_set_val
+@subsection @code{inet6_opt_set_val}
+@findex inet6_opt_set_val
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_rth_add.texi
@@ -0,0 +1,16 @@
+@node inet6_rth_add
+@subsection @code{inet6_rth_add}
+@findex inet6_rth_add
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_rth_getaddr.texi
@@ -0,0 +1,16 @@
+@node inet6_rth_getaddr
+@subsection @code{inet6_rth_getaddr}
+@findex inet6_rth_getaddr
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_rth_init.texi
@@ -0,0 +1,16 @@
+@node inet6_rth_init
+@subsection @code{inet6_rth_init}
+@findex inet6_rth_init
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_rth_reverse.texi
@@ -0,0 +1,16 @@
+@node inet6_rth_reverse
+@subsection @code{inet6_rth_reverse}
+@findex inet6_rth_reverse
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_rth_segments.texi
@@ -0,0 +1,16 @@
+@node inet6_rth_segments
+@subsection @code{inet6_rth_segments}
+@findex inet6_rth_segments
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/inet6_rth_space.texi
@@ -0,0 +1,16 @@
+@node inet6_rth_space
+@subsection @code{inet6_rth_space}
+@findex inet6_rth_space
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.4, Mac OS X 10.5, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/initstate_r.texi
+++ b/doc/glibc-functions/initstate_r.texi
@@ -8,7 +8,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+@item
+This function has an incompatible declaration on some platforms:
+AIX 7.1, OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/ioperm.texi
+++ b/doc/glibc-functions/ioperm.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/iopl.texi
+++ b/doc/glibc-functions/iopl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/isctype.texi
+++ b/doc/glibc-functions/isctype.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/isfdtype.texi
+++ b/doc/glibc-functions/isfdtype.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/isinff.texi
+++ b/doc/glibc-functions/isinff.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/isinfl.texi
+++ b/doc/glibc-functions/isinfl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/isnanf.texi
+++ b/doc/glibc-functions/isnanf.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/isnanl.texi
+++ b/doc/glibc-functions/isnanl.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, MSVC 9, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/j0f.texi
+++ b/doc/glibc-functions/j0f.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/j0l.texi
+++ b/doc/glibc-functions/j0l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/j1f.texi
+++ b/doc/glibc-functions/j1f.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/j1l.texi
+++ b/doc/glibc-functions/j1l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/jnf.texi
+++ b/doc/glibc-functions/jnf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/jnl.texi
+++ b/doc/glibc-functions/jnl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/jrand48_r.texi
+++ b/doc/glibc-functions/jrand48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/key_decryptsession.texi
+++ b/doc/glibc-functions/key_decryptsession.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/key_decryptsession_pk.texi
+++ b/doc/glibc-functions/key_decryptsession_pk.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/key_encryptsession.texi
+++ b/doc/glibc-functions/key_encryptsession.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/key_encryptsession_pk.texi
+++ b/doc/glibc-functions/key_encryptsession_pk.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/key_gendes.texi
+++ b/doc/glibc-functions/key_gendes.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/key_get_conv.texi
+++ b/doc/glibc-functions/key_get_conv.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/key_secretkey_is_set.texi
+++ b/doc/glibc-functions/key_secretkey_is_set.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/key_setsecret.texi
+++ b/doc/glibc-functions/key_setsecret.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/klogctl.texi
+++ b/doc/glibc-functions/klogctl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/lchmod.texi
+++ b/doc/glibc-functions/lchmod.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/lckpwdf.texi
+++ b/doc/glibc-functions/lckpwdf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/lcong48_r.texi
+++ b/doc/glibc-functions/lcong48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/lgamma_r.texi
+++ b/doc/glibc-functions/lgamma_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5 x86, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
+Mac OS X 10.5 x86, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/lgammaf_r.texi
+++ b/doc/glibc-functions/lgammaf_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/lgammal_r.texi
+++ b/doc/glibc-functions/lgammal_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/lgetxattr.texi
+++ b/doc/glibc-functions/lgetxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/listxattr.texi
+++ b/doc/glibc-functions/listxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/llistxattr.texi
+++ b/doc/glibc-functions/llistxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/loc1.texi
+++ b/doc/glibc-functions/loc1.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/loc2.texi
+++ b/doc/glibc-functions/loc2.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/locs.texi
+++ b/doc/glibc-functions/locs.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/login.texi
@@ -0,0 +1,16 @@
+@node login
+@subsection @code{login}
+@findex login
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11 2011-11, mingw, MSVC 9, BeOS.
+@end itemize
--- a/doc/glibc-functions/login_tty.texi
+++ b/doc/glibc-functions/login_tty.texi
@@ -13,7 +13,7 @@
 This function requires linking with @code{-lutil} on some platforms:
 glibc 2.3.6, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8.
 It is available without link options on other platforms:
-MacOS X 10.5, OSF/1 5.1, Cygwin, Interix 3.5.
+Mac OS X 10.5, OSF/1 5.1, Cygwin, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
@@ -23,7 +23,7 @@
 mingw, MSVC 9.
 @item
 This function is declared in @code{<utmp.h>} on glibc, Cygwin,
-in @code{<util.h>} on MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8,
+in @code{<util.h>} on Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8,
 in @code{<libutil.h>} on FreeBSD 6.0, Haiku, and not declared at all
 on OSF/1 5.1, Interix 3.5.  Also note that @code{<sys/types.h>} is
 a prerequisite of @code{<utmp.h>} on FreeBSD 8.0, OpenBSD 4.6 and
--- a/doc/glibc-functions/lrand48_r.texi
+++ b/doc/glibc-functions/lrand48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/lremovexattr.texi
+++ b/doc/glibc-functions/lremovexattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/lsetxattr.texi
+++ b/doc/glibc-functions/lsetxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/lutimes.texi
+++ b/doc/glibc-functions/lutimes.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1,
+Mac OS X 10.4, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1,
 Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function cannot set full timestamp resolution.  Use
--- a/doc/glibc-functions/madvise.texi
+++ b/doc/glibc-functions/madvise.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, Cygwin, mingw, MSVC 9, BeOS.
+Minix 3.1.8, AIX 5.1, Cygwin 1.7.7, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/mallinfo.texi
+++ b/doc/glibc-functions/mallinfo.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Solaris 11 2010-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Solaris 11 2010-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/malloc_get_state.texi
+++ b/doc/glibc-functions/malloc_get_state.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/malloc_info.texi
+++ b/doc/glibc-functions/malloc_info.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/malloc_set_state.texi
+++ b/doc/glibc-functions/malloc_set_state.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/malloc_stats.texi
+++ b/doc/glibc-functions/malloc_stats.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/malloc_trim.texi
+++ b/doc/glibc-functions/malloc_trim.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/malloc_usable_size.texi
+++ b/doc/glibc-functions/malloc_usable_size.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/mallopt.texi
+++ b/doc/glibc-functions/mallopt.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Solaris 11 2010-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Solaris 11 2010-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/mcheck.texi
+++ b/doc/glibc-functions/mcheck.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/mcheck_check_all.texi
+++ b/doc/glibc-functions/mcheck_check_all.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/mcheck_pedantic.texi
+++ b/doc/glibc-functions/mcheck_pedantic.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/memalign.texi
+++ b/doc/glibc-functions/memalign.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.00, OSF/1 5.1, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.00, OSF/1 5.1, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/memfrob.texi
+++ b/doc/glibc-functions/memfrob.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/memmem.texi
+++ b/doc/glibc-functions/memmem.texi
@@ -13,7 +13,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 4.0, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 4.0, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function has reversed arguments on some older platforms:
 Linux libc 5.0.9
--- a/doc/glibc-functions/mempcpy.texi
+++ b/doc/glibc-functions/mempcpy.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/memrchr.texi
+++ b/doc/glibc-functions/memrchr.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/mkostemp.texi
+++ b/doc/glibc-functions/mkostemp.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.5, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, @code{mkostemp} may not work
--- a/doc/glibc-functions/mkostemps.texi
+++ b/doc/glibc-functions/mkostemps.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.10, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.10, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.5, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, @code{mkostemps} may not work
--- a/doc/glibc-functions/mkstemps.texi
+++ b/doc/glibc-functions/mkstemps.texi
@@ -13,7 +13,7 @@
 @item
 This function is declared in @code{<unistd.h>} instead of @code{<stdlib.h>}
 on some platforms:
-MacOS X 10.5.
+Mac OS X 10.5.
 @item
 On platforms where @code{off_t} is a 32-bit type, @code{mkstemps} may not work
 correctly to create files larger than 2 GB.  (Cf. @code{AC_SYS_LARGEFILE}.)
--- a/doc/glibc-functions/mprobe.texi
+++ b/doc/glibc-functions/mprobe.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/mrand48_r.texi
+++ b/doc/glibc-functions/mrand48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/mremap.texi
+++ b/doc/glibc-functions/mremap.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/mtrace.texi
+++ b/doc/glibc-functions/mtrace.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/muntrace.texi
+++ b/doc/glibc-functions/muntrace.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/name_to_handle_at.texi
@@ -0,0 +1,16 @@
+@node name_to_handle_at
+@subsection @code{name_to_handle_at}
+@findex name_to_handle_at
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.13, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/netname2host.texi
+++ b/doc/glibc-functions/netname2host.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/netname2user.texi
+++ b/doc/glibc-functions/netname2user.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ngettext.texi
+++ b/doc/glibc-functions/ngettext.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_add.texi
+++ b/doc/glibc-functions/nis_add.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_add_entry.texi
+++ b/doc/glibc-functions/nis_add_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_addmember.texi
+++ b/doc/glibc-functions/nis_addmember.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_checkpoint.texi
+++ b/doc/glibc-functions/nis_checkpoint.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_clone_object.texi
+++ b/doc/glibc-functions/nis_clone_object.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_creategroup.texi
+++ b/doc/glibc-functions/nis_creategroup.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_destroy_object.texi
+++ b/doc/glibc-functions/nis_destroy_object.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_destroygroup.texi
+++ b/doc/glibc-functions/nis_destroygroup.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_dir_cmp.texi
+++ b/doc/glibc-functions/nis_dir_cmp.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_domain_of.texi
+++ b/doc/glibc-functions/nis_domain_of.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_domain_of_r.texi
+++ b/doc/glibc-functions/nis_domain_of_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_first_entry.texi
+++ b/doc/glibc-functions/nis_first_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_freenames.texi
+++ b/doc/glibc-functions/nis_freenames.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_freeresult.texi
+++ b/doc/glibc-functions/nis_freeresult.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_freeservlist.texi
+++ b/doc/glibc-functions/nis_freeservlist.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_freetags.texi
+++ b/doc/glibc-functions/nis_freetags.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_getnames.texi
+++ b/doc/glibc-functions/nis_getnames.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_getservlist.texi
+++ b/doc/glibc-functions/nis_getservlist.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_ismember.texi
+++ b/doc/glibc-functions/nis_ismember.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_leaf_of.texi
+++ b/doc/glibc-functions/nis_leaf_of.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_leaf_of_r.texi
+++ b/doc/glibc-functions/nis_leaf_of_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_lerror.texi
+++ b/doc/glibc-functions/nis_lerror.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_list.texi
+++ b/doc/glibc-functions/nis_list.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_local_directory.texi
+++ b/doc/glibc-functions/nis_local_directory.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_local_group.texi
+++ b/doc/glibc-functions/nis_local_group.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_local_host.texi
+++ b/doc/glibc-functions/nis_local_host.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_local_principal.texi
+++ b/doc/glibc-functions/nis_local_principal.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_lookup.texi
+++ b/doc/glibc-functions/nis_lookup.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_mkdir.texi
+++ b/doc/glibc-functions/nis_mkdir.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_modify.texi
+++ b/doc/glibc-functions/nis_modify.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_modify_entry.texi
+++ b/doc/glibc-functions/nis_modify_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_name_of.texi
+++ b/doc/glibc-functions/nis_name_of.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_name_of_r.texi
+++ b/doc/glibc-functions/nis_name_of_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_next_entry.texi
+++ b/doc/glibc-functions/nis_next_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_perror.texi
+++ b/doc/glibc-functions/nis_perror.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_ping.texi
+++ b/doc/glibc-functions/nis_ping.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_directory.texi
+++ b/doc/glibc-functions/nis_print_directory.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_entry.texi
+++ b/doc/glibc-functions/nis_print_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_group.texi
+++ b/doc/glibc-functions/nis_print_group.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_group_entry.texi
+++ b/doc/glibc-functions/nis_print_group_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_link.texi
+++ b/doc/glibc-functions/nis_print_link.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_object.texi
+++ b/doc/glibc-functions/nis_print_object.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_result.texi
+++ b/doc/glibc-functions/nis_print_result.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_rights.texi
+++ b/doc/glibc-functions/nis_print_rights.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_print_table.texi
+++ b/doc/glibc-functions/nis_print_table.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_remove.texi
+++ b/doc/glibc-functions/nis_remove.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_remove_entry.texi
+++ b/doc/glibc-functions/nis_remove_entry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_removemember.texi
+++ b/doc/glibc-functions/nis_removemember.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_rmdir.texi
+++ b/doc/glibc-functions/nis_rmdir.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_servstate.texi
+++ b/doc/glibc-functions/nis_servstate.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_sperrno.texi
+++ b/doc/glibc-functions/nis_sperrno.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_sperror.texi
+++ b/doc/glibc-functions/nis_sperror.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_sperror_r.texi
+++ b/doc/glibc-functions/nis_sperror_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_stats.texi
+++ b/doc/glibc-functions/nis_stats.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nis_verifygroup.texi
+++ b/doc/glibc-functions/nis_verifygroup.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/nrand48_r.texi
+++ b/doc/glibc-functions/nrand48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/ntp_adjtime.texi
+++ b/doc/glibc-functions/ntp_adjtime.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ntp_gettime.texi
+++ b/doc/glibc-functions/ntp_gettime.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/ntp_gettimex.texi
@@ -0,0 +1,16 @@
+@node ntp_gettimex
+@subsection @code{ntp_gettimex}
+@findex ntp_gettimex
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/obstack_alloc_failed_handler.texi
+++ b/doc/glibc-functions/obstack_alloc_failed_handler.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/obstack_exit_failure.texi
+++ b/doc/glibc-functions/obstack_exit_failure.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/obstack_free.texi
+++ b/doc/glibc-functions/obstack_free.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/obstack_printf.texi
+++ b/doc/glibc-functions/obstack_printf.texi
@@ -9,7 +9,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{ostack-printf-posix}:
@@ -28,7 +28,7 @@
 @item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -58,14 +58,14 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
 Solaris 10/x86, mingw, MSVC 9, BeOS.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @item
 This function does not fully support the @samp{n} directive on some platforms:
 HP-UX 11, mingw, MSVC 9.
--- a/doc/glibc-functions/obstack_vprintf.texi
+++ b/doc/glibc-functions/obstack_vprintf.texi
@@ -9,7 +9,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{ostack-printf-posix}:
@@ -28,7 +28,7 @@
 @item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -58,14 +58,14 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
 Solaris 10/x86, mingw, MSVC 9, BeOS.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @item
 This function does not fully support the @samp{n} directive on some platforms:
 HP-UX 11, mingw, MSVC 9.
--- a/doc/glibc-functions/on_exit.texi
+++ b/doc/glibc-functions/on_exit.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/open_by_handle_at.texi
@@ -0,0 +1,16 @@
+@node open_by_handle_at
+@subsection @code{open_by_handle_at}
+@findex open_by_handle_at
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.13, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/openpty.texi
+++ b/doc/glibc-functions/openpty.texi
@@ -34,5 +34,5 @@
 After a successful call to @code{openpty}, the application needs to close
 the master's file descriptor before closing the slave's file descriptor,
 otherwise the process may hang in a state where it cannot be killed, on
-some platforms: MacOS X 10.4.11.
+some platforms: Mac OS X 10.4.11.
 @end itemize
--- a/doc/glibc-functions/parse_printf_format.texi
+++ b/doc/glibc-functions/parse_printf_format.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/personality.texi
+++ b/doc/glibc-functions/personality.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pipe2.texi
+++ b/doc/glibc-functions/pipe2.texi
@@ -8,8 +8,10 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5, BeOS.
+But the replacement function is not atomic; this matters in multi-threaded
+programs that spawn child processes.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/pow10.texi
+++ b/doc/glibc-functions/pow10.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/pow10f.texi
+++ b/doc/glibc-functions/pow10f.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/pow10l.texi
+++ b/doc/glibc-functions/pow10l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/prctl.texi
+++ b/doc/glibc-functions/prctl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/preadv.texi
+++ b/doc/glibc-functions/preadv.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 5.2.1, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 5.2.1, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
 work correctly on files larger than 2 GB.  The fix is to use the
--- a/doc/glibc-functions/printf_size.texi
+++ b/doc/glibc-functions/printf_size.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/printf_size_info.texi
+++ b/doc/glibc-functions/printf_size_info.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/prlimit.texi
@@ -0,0 +1,16 @@
+@node prlimit
+@subsection @code{prlimit}
+@findex prlimit
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.12, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/process_vm_readv.texi
@@ -0,0 +1,16 @@
+@node process_vm_readv
+@subsection @code{process_vm_readv}
+@findex process_vm_readv
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.14, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/process_vm_writev.texi
@@ -0,0 +1,16 @@
+@node process_vm_writev
+@subsection @code{process_vm_writev}
+@findex process_vm_writev
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.14, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/program_invocation_name.texi
+++ b/doc/glibc-functions/program_invocation_name.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.7, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/program_invocation_short_name.texi
+++ b/doc/glibc-functions/program_invocation_short_name.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.7, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/pthread_attr_getaffinity_np.texi
+++ b/doc/glibc-functions/pthread_attr_getaffinity_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.3.2, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.2, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function has a different signature on some platforms:
 glibc 2.3.3.
--- a/doc/glibc-functions/pthread_attr_setaffinity_np.texi
+++ b/doc/glibc-functions/pthread_attr_setaffinity_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.3.2, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.2, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function has a different signature on some platforms:
 glibc 2.3.3.
--- a/doc/glibc-functions/pthread_getaffinity_np.texi
+++ b/doc/glibc-functions/pthread_getaffinity_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.3.2, MacOS X 10.5, FreeBSD 6.4, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.2, Mac OS X 10.5, FreeBSD 6.4, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function has a different signature on some platforms:
 glibc 2.3.3.
--- a/doc/glibc-functions/pthread_getattr_np.texi
+++ b/doc/glibc-functions/pthread_getattr_np.texi
@@ -11,6 +11,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This function is missing on many non-glibc platforms:
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_getname_np.texi
+++ b/doc/glibc-functions/pthread_getname_np.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.4, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.4, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_kill_other_threads_np.texi
+++ b/doc/glibc-functions/pthread_kill_other_threads_np.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_mutex_consistent_np.texi
+++ b/doc/glibc-functions/pthread_mutex_consistent_np.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_mutexattr_getrobust_np.texi
+++ b/doc/glibc-functions/pthread_mutexattr_getrobust_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 This function has now been standardized by POSIX under the name
--- a/doc/glibc-functions/pthread_mutexattr_setrobust_np.texi
+++ b/doc/glibc-functions/pthread_mutexattr_setrobust_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 7, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 This function has now been standardized by POSIX under the name
--- a/doc/glibc-functions/pthread_rwlockattr_getkind_np.texi
+++ b/doc/glibc-functions/pthread_rwlockattr_getkind_np.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_rwlockattr_setkind_np.texi
+++ b/doc/glibc-functions/pthread_rwlockattr_setkind_np.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_setaffinity_np.texi
+++ b/doc/glibc-functions/pthread_setaffinity_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.3.2, MacOS X 10.5, FreeBSD 6.4, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.2, Mac OS X 10.5, FreeBSD 6.4, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function has a different signature on some platforms:
 glibc 2.3.3.
--- a/doc/glibc-functions/pthread_setname_np.texi
+++ b/doc/glibc-functions/pthread_setname_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.4, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.4, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function has a different signature on some platforms:
 NetBSD 5.0, OSF/1 5.1.
--- a/doc/glibc-functions/pthread_sigqueue.texi
+++ b/doc/glibc-functions/pthread_sigqueue.texi
@@ -11,6 +11,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-glibc 2.10, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+This function is missing on many non-glibc platforms:
+glibc 2.10, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_timedjoin_np.texi
+++ b/doc/glibc-functions/pthread_timedjoin_np.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.3.2, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.2, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 FreeBSD 6.4 has a function of this name in @code{libthr} but not in
 @code{libpthread}, and it also is missing a declaration.
--- a/doc/glibc-functions/pthread_tryjoin_np.texi
+++ b/doc/glibc-functions/pthread_tryjoin_np.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.3.2, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.2, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pthread_yield.texi
+++ b/doc/glibc-functions/pthread_yield.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin 1.7.7, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ptsname_r.texi
+++ b/doc/glibc-functions/ptsname_r.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin 1.7.9, mingw,
 MSVC 9, BeOS.
 @item
--- a/doc/glibc-functions/putgrent.texi
+++ b/doc/glibc-functions/putgrent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/putpwent.texi
+++ b/doc/glibc-functions/putpwent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/putsgent.texi
+++ b/doc/glibc-functions/putsgent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/putspent.texi
+++ b/doc/glibc-functions/putspent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pututline.texi
+++ b/doc/glibc-functions/pututline.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/putwc_unlocked.texi
+++ b/doc/glibc-functions/putwc_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/putwchar_unlocked.texi
+++ b/doc/glibc-functions/putwchar_unlocked.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/pvalloc.texi
+++ b/doc/glibc-functions/pvalloc.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/pwritev.texi
+++ b/doc/glibc-functions/pwritev.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 5.2.1, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 5.2.1, Minix 3.1.8, AIX 5.2, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
 work correctly on files larger than 2 GB.  The fix is to use the
--- a/doc/glibc-functions/qecvt.texi
+++ b/doc/glibc-functions/qecvt.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/qecvt_r.texi
+++ b/doc/glibc-functions/qecvt_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/qfcvt.texi
+++ b/doc/glibc-functions/qfcvt.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/qfcvt_r.texi
+++ b/doc/glibc-functions/qfcvt_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/qgcvt.texi
+++ b/doc/glibc-functions/qgcvt.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
deleted file mode 100644
--- a/doc/glibc-functions/quick_exit.texi
+++ /dev/null
@@ -1,16 +0,0 @@
-@node quick_exit
-@subsection @code{quick_exit}
-@findex quick_exit
-
-Gnulib module: ---
-
-Portability problems fixed by Gnulib:
-@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
-@item
-This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
-@end itemize
--- a/doc/glibc-functions/random_r.texi
+++ b/doc/glibc-functions/random_r.texi
@@ -8,7 +8,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+@item
+This function has an incompatible declaration on some platforms:
+AIX 7.1, OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/rawmemchr.texi
+++ b/doc/glibc-functions/rawmemchr.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/re_comp.texi
+++ b/doc/glibc-functions/re_comp.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_compile_fastmap.texi
+++ b/doc/glibc-functions/re_compile_fastmap.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_compile_pattern.texi
+++ b/doc/glibc-functions/re_compile_pattern.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_exec.texi
+++ b/doc/glibc-functions/re_exec.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_match.texi
+++ b/doc/glibc-functions/re_match.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_match_2.texi
+++ b/doc/glibc-functions/re_match_2.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_search.texi
+++ b/doc/glibc-functions/re_search.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_search_2.texi
+++ b/doc/glibc-functions/re_search_2.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_set_registers.texi
+++ b/doc/glibc-functions/re_set_registers.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_set_syntax.texi
+++ b/doc/glibc-functions/re_set_syntax.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/re_syntax_options.texi
+++ b/doc/glibc-functions/re_syntax_options.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/readahead.texi
+++ b/doc/glibc-functions/readahead.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/recvmmsg.texi
@@ -0,0 +1,16 @@
+@node recvmmsg
+@subsection @code{recvmmsg}
+@findex recvmmsg
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/register_printf_function.texi
+++ b/doc/glibc-functions/register_printf_function.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/register_printf_modifier.texi
+++ b/doc/glibc-functions/register_printf_modifier.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/register_printf_specifier.texi
+++ b/doc/glibc-functions/register_printf_specifier.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/register_printf_type.texi
+++ b/doc/glibc-functions/register_printf_type.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/remap_file_pages.texi
+++ b/doc/glibc-functions/remap_file_pages.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/removexattr.texi
+++ b/doc/glibc-functions/removexattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/rexec.texi
+++ b/doc/glibc-functions/rexec.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/glibc-functions/rexec_af.texi
+++ b/doc/glibc-functions/rexec_af.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 4.0, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 4.0, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/rpmatch.texi
+++ b/doc/glibc-functions/rpmatch.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/rtime.texi
+++ b/doc/glibc-functions/rtime.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ruserok_af.texi
+++ b/doc/glibc-functions/ruserok_af.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/scalbf.texi
+++ b/doc/glibc-functions/scalbf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/scalbl.texi
+++ b/doc/glibc-functions/scalbl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/scandirat.texi
@@ -0,0 +1,16 @@
+@node scandirat
+@subsection @code{scandirat}
+@findex scandirat
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on many non-glibc platforms:
+glibc 2.14, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.10, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/sched_getaffinity.texi
+++ b/doc/glibc-functions/sched_getaffinity.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sched_setaffinity.texi
+++ b/doc/glibc-functions/sched_setaffinity.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/seed48_r.texi
+++ b/doc/glibc-functions/seed48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/semtimedop.texi
+++ b/doc/glibc-functions/semtimedop.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sendfile.texi
+++ b/doc/glibc-functions/sendfile.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 4.0, Solaris 11 2010-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 4.0, Solaris 11 2010-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
 work correctly on files larger than 2 GB.  The fix is to use the
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/sendmmsg.texi
@@ -0,0 +1,16 @@
+@node sendmmsg
+@subsection @code{sendmmsg}
+@findex sendmmsg
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.13, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/setaliasent.texi
+++ b/doc/glibc-functions/setaliasent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setfsgid.texi
+++ b/doc/glibc-functions/setfsgid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setfsuid.texi
+++ b/doc/glibc-functions/setfsuid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setipv4sourcefilter.texi
+++ b/doc/glibc-functions/setipv4sourcefilter.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setkey_r.texi
+++ b/doc/glibc-functions/setkey_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setmntent.texi
+++ b/doc/glibc-functions/setmntent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/setns.texi
@@ -0,0 +1,16 @@
+@node setns
+@subsection @code{setns}
+@findex setns
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.13, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/setresgid.texi
+++ b/doc/glibc-functions/setresgid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setresuid.texi
+++ b/doc/glibc-functions/setresuid.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setsgent.texi
+++ b/doc/glibc-functions/setsgent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setsourcefilter.texi
+++ b/doc/glibc-functions/setsourcefilter.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setspent.texi
+++ b/doc/glibc-functions/setspent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setstate_r.texi
+++ b/doc/glibc-functions/setstate_r.texi
@@ -8,7 +8,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+@item
+This function has an incompatible declaration on some platforms:
+AIX 7.1, OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/setutent.texi
+++ b/doc/glibc-functions/setutent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/setxattr.texi
+++ b/doc/glibc-functions/setxattr.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sgetsgent.texi
+++ b/doc/glibc-functions/sgetsgent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sgetsgent_r.texi
+++ b/doc/glibc-functions/sgetsgent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sgetspent.texi
+++ b/doc/glibc-functions/sgetspent.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sgetspent_r.texi
+++ b/doc/glibc-functions/sgetspent_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sigandset.texi
+++ b/doc/glibc-functions/sigandset.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/siggetmask.texi
+++ b/doc/glibc-functions/siggetmask.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sigisemptyset.texi
+++ b/doc/glibc-functions/sigisemptyset.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/significandf.texi
+++ b/doc/glibc-functions/significandf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/significandl.texi
+++ b/doc/glibc-functions/significandl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sigorset.texi
+++ b/doc/glibc-functions/sigorset.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sigstack.texi
+++ b/doc/glibc-functions/sigstack.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sincos.texi
+++ b/doc/glibc-functions/sincos.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/sincosf.texi
+++ b/doc/glibc-functions/sincosf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/sincosl.texi
+++ b/doc/glibc-functions/sincosl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sprofil.texi
+++ b/doc/glibc-functions/sprofil.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.11, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.11, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/srand48_r.texi
+++ b/doc/glibc-functions/srand48_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/srandom_r.texi
+++ b/doc/glibc-functions/srandom_r.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/ssignal.texi
+++ b/doc/glibc-functions/ssignal.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/statfs.texi
+++ b/doc/glibc-functions/statfs.texi
@@ -17,5 +17,5 @@
 On platforms where @code{f_blocks} in @samp{struct statfs} is a 32-bit
 value, this function may not work correctly on files systems larger than
 4 TiB.  The fix is to use the @code{AC_SYS_LARGEFILE} macro.  This affects
-MacOS X.
+Mac OS X.
 @end itemize
--- a/doc/glibc-functions/step.texi
+++ b/doc/glibc-functions/step.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/stime.texi
+++ b/doc/glibc-functions/stime.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/strchrnul.texi
+++ b/doc/glibc-functions/strchrnul.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.7.8, mingw, MSVC 9, Interix 3.5,
 BeOS.
 @item
--- a/doc/glibc-functions/strfry.texi
+++ b/doc/glibc-functions/strfry.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strptime_l.texi
+++ b/doc/glibc-functions/strptime_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strtod_l.texi
+++ b/doc/glibc-functions/strtod_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strtof_l.texi
+++ b/doc/glibc-functions/strtof_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strtol_l.texi
+++ b/doc/glibc-functions/strtol_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strtold_l.texi
+++ b/doc/glibc-functions/strtold_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strtoll_l.texi
+++ b/doc/glibc-functions/strtoll_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strtoul_l.texi
+++ b/doc/glibc-functions/strtoul_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strtoull_l.texi
+++ b/doc/glibc-functions/strtoull_l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/strverscmp.texi
+++ b/doc/glibc-functions/strverscmp.texi
@@ -8,7 +8,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/svc_exit.texi
+++ b/doc/glibc-functions/svc_exit.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/svc_getreq_common.texi
+++ b/doc/glibc-functions/svc_getreq_common.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/svc_getreq_poll.texi
+++ b/doc/glibc-functions/svc_getreq_poll.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/svc_max_pollfd.texi
+++ b/doc/glibc-functions/svc_max_pollfd.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/svc_pollfd.texi
+++ b/doc/glibc-functions/svc_pollfd.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/svcunix_create.texi
+++ b/doc/glibc-functions/svcunix_create.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/swapoff.texi
+++ b/doc/glibc-functions/swapoff.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/syncfs.texi
+++ b/doc/glibc-functions/syncfs.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-glibc 2.13, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.13, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sys_errlist.texi
+++ b/doc/glibc-functions/sys_errlist.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-Minix 3.1.8, MacOS X 10.5, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, Interix 3.5, BeOS.
+Minix 3.1.8, Mac OS X 10.5, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sys_nerr.texi
+++ b/doc/glibc-functions/sys_nerr.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sys_siglist.texi
+++ b/doc/glibc-functions/sys_siglist.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This constant is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/sysinfo.texi
+++ b/doc/glibc-functions/sysinfo.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/sysv_signal.texi
+++ b/doc/glibc-functions/sysv_signal.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-functions/tdestroy.texi
+++ b/doc/glibc-functions/tdestroy.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/textdomain.texi
+++ b/doc/glibc-functions/textdomain.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/glibc-functions/timespec_get.texi
@@ -0,0 +1,16 @@
+@node timespec_get
+@subsection @code{timespec_get}
+@findex timespec_get
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/glibc-functions/tmpnam_r.texi
+++ b/doc/glibc-functions/tmpnam_r.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ulckpwdf.texi
+++ b/doc/glibc-functions/ulckpwdf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/umount.texi
+++ b/doc/glibc-functions/umount.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/umount2.texi
+++ b/doc/glibc-functions/umount2.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/updwtmp.texi
+++ b/doc/glibc-functions/updwtmp.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/updwtmpx.texi
+++ b/doc/glibc-functions/updwtmpx.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1,
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1,
 Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/user2netname.texi
+++ b/doc/glibc-functions/user2netname.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ustat.texi
+++ b/doc/glibc-functions/ustat.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/utmpname.texi
+++ b/doc/glibc-functions/utmpname.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/utmpxname.texi
+++ b/doc/glibc-functions/utmpxname.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/vasprintf.texi
+++ b/doc/glibc-functions/vasprintf.texi
@@ -27,7 +27,7 @@
 @item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, Solaris 11 2011-11, Cygwin 1.5.x, BeOS.
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, Solaris 11 2011-11, Cygwin 1.5.x, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
 NetBSD 3.0, Cygwin 1.5.x, BeOS.
@@ -48,14 +48,14 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, Solaris 11 2011-11, Cygwin 1.5.x.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, Solaris 11 2011-11, Cygwin 1.5.x.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
 BeOS.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-functions/versionsort.texi
+++ b/doc/glibc-functions/versionsort.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/vhangup.texi
+++ b/doc/glibc-functions/vhangup.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/vlimit.texi
+++ b/doc/glibc-functions/vlimit.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/vm86.texi
+++ b/doc/glibc-functions/vm86.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/vtimes.texi
+++ b/doc/glibc-functions/vtimes.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/wcschrnul.texi
+++ b/doc/glibc-functions/wcschrnul.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcsftime_l.texi
+++ b/doc/glibc-functions/wcsftime_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstod_l.texi
+++ b/doc/glibc-functions/wcstod_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstof_l.texi
+++ b/doc/glibc-functions/wcstof_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstol_l.texi
+++ b/doc/glibc-functions/wcstol_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstold_l.texi
+++ b/doc/glibc-functions/wcstold_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstoll_l.texi
+++ b/doc/glibc-functions/wcstoll_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstoq.texi
+++ b/doc/glibc-functions/wcstoq.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstoul_l.texi
+++ b/doc/glibc-functions/wcstoul_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstoull_l.texi
+++ b/doc/glibc-functions/wcstoull_l.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wcstouq.texi
+++ b/doc/glibc-functions/wcstouq.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/wmempcpy.texi
+++ b/doc/glibc-functions/wmempcpy.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/glibc-functions/xdr_cback_data.texi
+++ b/doc/glibc-functions/xdr_cback_data.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_cryptkeyarg.texi
+++ b/doc/glibc-functions/xdr_cryptkeyarg.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_cryptkeyarg2.texi
+++ b/doc/glibc-functions/xdr_cryptkeyarg2.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_cryptkeyres.texi
+++ b/doc/glibc-functions/xdr_cryptkeyres.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_getcredres.texi
+++ b/doc/glibc-functions/xdr_getcredres.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_hyper.texi
+++ b/doc/glibc-functions/xdr_hyper.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_int16_t.texi
+++ b/doc/glibc-functions/xdr_int16_t.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_int32_t.texi
+++ b/doc/glibc-functions/xdr_int32_t.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_int64_t.texi
+++ b/doc/glibc-functions/xdr_int64_t.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1,
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1,
 Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_int8_t.texi
+++ b/doc/glibc-functions/xdr_int8_t.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_key_netstarg.texi
+++ b/doc/glibc-functions/xdr_key_netstarg.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_key_netstres.texi
+++ b/doc/glibc-functions/xdr_key_netstres.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_keybuf.texi
+++ b/doc/glibc-functions/xdr_keybuf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_keystatus.texi
+++ b/doc/glibc-functions/xdr_keystatus.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_longlong_t.texi
+++ b/doc/glibc-functions/xdr_longlong_t.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_netnamestr.texi
+++ b/doc/glibc-functions/xdr_netnamestr.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_obj_p.texi
+++ b/doc/glibc-functions/xdr_obj_p.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_quad_t.texi
+++ b/doc/glibc-functions/xdr_quad_t.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_sizeof.texi
+++ b/doc/glibc-functions/xdr_sizeof.texi
@@ -12,6 +12,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5,
 OSF/1 5.1, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_u_hyper.texi
+++ b/doc/glibc-functions/xdr_u_hyper.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_u_longlong_t.texi
+++ b/doc/glibc-functions/xdr_u_longlong_t.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_u_quad_t.texi
+++ b/doc/glibc-functions/xdr_u_quad_t.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_uint16_t.texi
+++ b/doc/glibc-functions/xdr_uint16_t.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Cygwin 1.7.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared in the header on some platforms:
--- a/doc/glibc-functions/xdr_uint32_t.texi
+++ b/doc/glibc-functions/xdr_uint32_t.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared in the header on some platforms:
 Cygwin 1.7.5.
--- a/doc/glibc-functions/xdr_uint64_t.texi
+++ b/doc/glibc-functions/xdr_uint64_t.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared in the header on some platforms:
 Cygwin 1.7.5.
--- a/doc/glibc-functions/xdr_uint8_t.texi
+++ b/doc/glibc-functions/xdr_uint8_t.texi
@@ -12,7 +12,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared in the header on some platforms:
 Cygwin 1.7.5.
--- a/doc/glibc-functions/xdr_unixcred.texi
+++ b/doc/glibc-functions/xdr_unixcred.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_yp_buf.texi
+++ b/doc/glibc-functions/xdr_yp_buf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_ypall.texi
+++ b/doc/glibc-functions/xdr_ypall.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_ypdelete_args.texi
+++ b/doc/glibc-functions/xdr_ypdelete_args.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_ypmap_parms.texi
+++ b/doc/glibc-functions/xdr_ypmap_parms.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_yppush_status.texi
+++ b/doc/glibc-functions/xdr_yppush_status.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_yppushresp_xfr.texi
+++ b/doc/glibc-functions/xdr_yppushresp_xfr.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_ypreq_xfr.texi
+++ b/doc/glibc-functions/xdr_ypreq_xfr.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_ypresp_xfr.texi
+++ b/doc/glibc-functions/xdr_ypresp_xfr.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_ypupdate_args.texi
+++ b/doc/glibc-functions/xdr_ypupdate_args.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/xdr_ypxfrstat.texi
+++ b/doc/glibc-functions/xdr_ypxfrstat.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/y0f.texi
+++ b/doc/glibc-functions/y0f.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/y0l.texi
+++ b/doc/glibc-functions/y0l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/y1f.texi
+++ b/doc/glibc-functions/y1f.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/y1l.texi
+++ b/doc/glibc-functions/y1l.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ynf.texi
+++ b/doc/glibc-functions/ynf.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 9.
 @end itemize
--- a/doc/glibc-functions/ynl.texi
+++ b/doc/glibc-functions/ynl.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/yp_update.texi
+++ b/doc/glibc-functions/yp_update.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-functions/ypbinderr_string.texi
+++ b/doc/glibc-functions/ypbinderr_string.texi
@@ -12,5 +12,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-headers/a.out.texi
+++ b/doc/glibc-headers/a.out.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This header file is useless because most executables and object files are
 in ELF format on some platforms:
--- a/doc/glibc-headers/aliases.texi
+++ b/doc/glibc-headers/aliases.texi
@@ -22,5 +22,5 @@
 @itemize
 @item
 This header file is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-headers/argp.texi
+++ b/doc/glibc-headers/argp.texi
@@ -18,7 +18,7 @@
 @itemize
 @item
 This header file is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-headers/argz.texi
+++ b/doc/glibc-headers/argz.texi
@@ -20,7 +20,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 The argz functions do not work on some platforms:
 Cygwin.
--- a/doc/glibc-headers/byteswap.texi
+++ b/doc/glibc-headers/byteswap.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-headers/crypt.texi
+++ b/doc/glibc-headers/crypt.texi
@@ -32,7 +32,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 The functions @code{crypt}, @code{setkey}, @code{encrypt} are missing on some
 platforms:
--- a/doc/glibc-headers/endian.texi
+++ b/doc/glibc-headers/endian.texi
@@ -15,5 +15,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-headers/envz.texi
+++ b/doc/glibc-headers/envz.texi
@@ -24,5 +24,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-headers/error.texi
+++ b/doc/glibc-headers/error.texi
@@ -24,7 +24,7 @@
 @itemize
 @item
 This header file is missing on many platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, Interix 3.5, BeOS.
 @item
 This header file contains unrelated definitions on some platforms:
 MSVC 9.
--- a/doc/glibc-headers/execinfo.texi
+++ b/doc/glibc-headers/execinfo.texi
@@ -21,11 +21,14 @@
 
 Portability problems fixed by Gnulib:
 @itemize
+This header file is missing on some platforms:
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This header file is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+On platforms where the header file is missing,
+the Gnulib substitute implementation is just a stub,
+and does nothing.
 @end itemize
--- a/doc/glibc-headers/fpu_control.texi
+++ b/doc/glibc-headers/fpu_control.texi
@@ -15,5 +15,5 @@
 @itemize
 @item
 This header file is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-headers/getopt.texi
+++ b/doc/glibc-headers/getopt.texi
@@ -30,7 +30,7 @@
 IRIX 6.5, OSF/1 5.1, Solaris 9.
 @item
 The function @code{getopt_long_only} is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw.
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw.
 @item
 The method to reset options is incompatible on some platforms:
 FreeBSD 6.0, NetBSD 5.0(?), OpenBSD 3.8, Cygwin 1.5.x, mingw.
--- a/doc/glibc-headers/gshadow.texi
+++ b/doc/glibc-headers/gshadow.texi
@@ -16,5 +16,5 @@
 @itemize
 @item
 This header file is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-headers/ieee754.texi
+++ b/doc/glibc-headers/ieee754.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This header file is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-headers/libintl.texi
+++ b/doc/glibc-headers/libintl.texi
@@ -31,7 +31,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 The functions cannot deal with GNU .mo files with system-dependent strings
 (of major version 1 or of minor version 1) on some non-glibc platforms:
--- a/doc/glibc-headers/mcheck.texi
+++ b/doc/glibc-headers/mcheck.texi
@@ -26,5 +26,5 @@
 @itemize
 @item
 This header file is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/glibc-headers/mntent.texi
+++ b/doc/glibc-headers/mntent.texi
@@ -29,7 +29,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 The function @code{getmntent_r} is missing on all non-glibc platforms:
 AIX 5.1, HP-UX 11, IRIX 6.5, Cygwin.
--- a/doc/glibc-headers/obstack.texi
+++ b/doc/glibc-headers/obstack.texi
@@ -18,7 +18,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/glibc-headers/printf.texi
+++ b/doc/glibc-headers/printf.texi
@@ -28,5 +28,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/glibc-headers/pty.texi
+++ b/doc/glibc-headers/pty.texi
@@ -23,7 +23,7 @@
 @item
 This header file is missing on some platforms that declare the
 @code{forkpty} and @code{openpty} functions in @code{util.h} or
-@code{libutil.h} instead: MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0,
+@code{libutil.h} instead: Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0,
 OpenBSD 3.8.
 @item
 This header file is missing on some platforms:
--- a/doc/glibc-headers/shadow.texi
+++ b/doc/glibc-headers/shadow.texi
@@ -26,7 +26,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 The functions @code{getspent_r}, @code{getspnam_r}, @code{sgetspent_r},
 @code{fgetspent}, @code{fgetspent_r}, @code{putspent} are missing on some
--- a/doc/gnu-oids.texi
+++ b/doc/gnu-oids.texi
@@ -15,7 +15,7 @@
 
 1.3.6.1.4.1.11591.1 GNU Radius
 
-1.3.6.1.4.1.11591.2 GnuPG 
+1.3.6.1.4.1.11591.2 GnuPG
   1.3.6.1.4.1.11591.2.1   notation
   1.3.6.1.4.1.11591.2.1.1 pkaAddress
 
--- a/doc/gnulib-intro.texi
+++ b/doc/gnulib-intro.texi
@@ -111,7 +111,7 @@
 glibc systems.  With glibc 2.8 or newer, they are frequently tested.  With
 glibc 2.3 or newer, they are occasionally tested.
 @item
-MacOS X.  In versions 10.5 and 10.6, it's frequently tested.  In version
+Mac OS X.  In versions 10.5 and 10.6, it's frequently tested.  In version
 10.4, it's rarely tested.
 @item
 FreeBSD 6.0 or newer is occasionally tested.  FreeBSD 5.x is rarely tested.
--- a/doc/gnulib-tool.texi
+++ b/doc/gnulib-tool.texi
@@ -471,7 +471,9 @@
 new @code{gettext} release is made, the copies of the files in Gnulib will
 be updated immediately.
 
-The solution is therefore:
+The choice of which version of gettext to require depends on the needs
+of your package.  For a package that wants to comply to GNU Coding
+Standards, the steps are:
 
 @enumerate
 @item
@@ -479,12 +481,13 @@
 matching GNU gettext release.  For the most recent Gnulib checkout, this is
 the newest release found on @url{http://ftp.gnu.org/gnu/gettext/}.  For an
 older Gnulib snapshot, it is the release that was the most recent release
-at the time the Gnulib snapshot was taken.  Then, after @code{gettextize},
-invoke @code{gnulib-tool}.
+at the time the Gnulib snapshot was taken.
 
 @item
-When a script of yours run @code{autopoint}, invoke @code{gnulib-tool}
-afterwards.
+After running @code{gettextize}, invoke @code{gnulib-tool} and import
+the @code{gettext} module.  Also, copy the latest version of gnulib's
+@file{build-aux/po/Makefile.in.in} to your @file{po/} directory (this
+is done for you if you use gnulib's @file{bootstrap} script).
 
 @item
 If you get an error message like
@@ -495,6 +498,32 @@
 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}.
+@end enumerate
+
+On the other hand, if your package is not as concerned with compliance
+to the latest standards, but instead favors development on stable
+environments, the steps are:
+
+@enumerate
+@item
+Determine the oldest version of @code{gettext} that you intend to
+support during development (at this time, gnulib recommends going no
+older than version 0.17).  Run @code{autopoint} (not
+@code{gettextize}) to copy infrastructure into place (newer versions
+of gettext will install the older infrastructure that you requested).
+
+@item
+Invoke @code{gnulib-tool}, and import the @code{gettext-h} module.
+@end enumerate
+
+Regardless of which approach you used to get the infrastructure in
+place, the following steps must then be used to preserve that
+infrastructure (gnulib's @file{bootstrap} script follows these rules):
+
+@enumerate
+@item
+When a script of yours run @code{autopoint}, invoke @code{gnulib-tool}
+afterwards.
 
 @item
 When you invoke @code{autoreconf} after @code{gnulib-tool}, make sure to
--- a/doc/gnulib.texi
+++ b/doc/gnulib.texi
@@ -90,7 +90,7 @@
 @node Introduction
 @chapter Introduction
 
-Gnulib is a source code library. It provides basic functionalities to
+Gnulib is a source code library. It provides basic functionality to
 programs and libraries.  Currently (as of October 2006) more than 30
 packages make use of Gnulib.
 
@@ -389,7 +389,7 @@
 @code{--avoid} or it is marked as obsolete and the option
 @code{--with-obsolete} is not given.
 
-A test modules @code{foo-tests} implicity depends on the corresponding non-test
+A test modules @code{foo-tests} implicitly depends on the corresponding non-test
 module @code{foo}.  @code{foo} implicitly depends on @code{foo-tests} if the
 latter exists and if the option @code{--with-tests} has been given.
 
@@ -825,17 +825,17 @@
 release that is made for the general public.
 @end table
 
-@code{gnulib-tool --import} will not include tests marked with these
-attributes by default.  When @code{gnulib-tool} is invoked with one
+@code{gnulib-tool --import --with-tests} will not include tests marked with
+these attributes by default.  When @code{gnulib-tool} is invoked with one
 of the options @code{--with-c++-tests}, @code{--with-longrunning-tests},
 @code{--with-privileged-tests}, @code{--with-unportable-tests}, it
 will include tests despite the corresponding special status attribute.
 When @code{gnulib-tool} receives the option @code{--with-all-tests},
 it will include all tests regardless of their status attributes.
 
-@code{gnulib-tool --create-testdir} and
-@code{gnulib-tool --create-megatestdir} by default include all tests of
-modules specified on the command line, regardless of their status
+@code{gnulib-tool --create-testdir --with-tests} and
+@code{gnulib-tool --create-megatestdir --with-tests} by default include all
+tests of modules specified on the command line, regardless of their status
 attributes.  Tests of modules occurring as dependencies are not included
 by default if they have one of these status attributes.  The options
 @code{--with-c++-tests}, @code{--with-longrunning-tests},
@@ -1194,6 +1194,7 @@
 * stdint.h::
 * stdio.h::
 * stdlib.h::
+* stdnoreturn.h::
 * string.h::
 * strings.h::
 * stropts.h::
@@ -1221,6 +1222,7 @@
 * tgmath.h::
 * time.h::
 * trace.h::
+* uchar.h::
 * ucontext.h::
 * ulimit.h::
 * unistd.h::
@@ -1281,6 +1283,7 @@
 @include posix-headers/stdint.texi
 @include posix-headers/stdio.texi
 @include posix-headers/stdlib.texi
+@include posix-headers/stdnoreturn.texi
 @include posix-headers/string.texi
 @include posix-headers/strings.texi
 @include posix-headers/stropts.texi
@@ -1308,6 +1311,7 @@
 @include posix-headers/tgmath.texi
 @include posix-headers/time.texi
 @include posix-headers/trace.texi
+@include posix-headers/uchar.texi
 @include posix-headers/ucontext.texi
 @include posix-headers/ulimit.texi
 @include posix-headers/unistd.texi
@@ -1357,6 +1361,7 @@
 * aio_suspend::
 * aio_write::
 * alarm::
+* aligned_alloc::
 * alphasort::
 * asctime::
 * asctime_r::
@@ -1385,6 +1390,8 @@
 * bind::
 * bsearch::
 * btowc::
+* c16rtomb::
+* c32rtomb::
 * cabs::
 * cabsf::
 * cabsl::
@@ -1870,6 +1877,8 @@
 * malloc::
 * mblen::
 * mbrlen::
+* mbrtoc16::
+* mbrtoc32::
 * mbrtowc::
 * mbsinit::
 * mbsnrtowcs::
@@ -2158,6 +2167,7 @@
 * putwchar::
 * pwrite::
 * qsort::
+* quick_exit::
 * raise::
 * rand::
 * rand_r::
@@ -2550,6 +2560,7 @@
 @include posix-functions/aio_suspend.texi
 @include posix-functions/aio_write.texi
 @include posix-functions/alarm.texi
+@include posix-functions/aligned_alloc.texi
 @include posix-functions/alphasort.texi
 @include posix-functions/asctime.texi
 @include posix-functions/asctime_r.texi
@@ -2578,6 +2589,8 @@
 @include posix-functions/bind.texi
 @include posix-functions/bsearch.texi
 @include posix-functions/btowc.texi
+@include posix-functions/c16rtomb.texi
+@include posix-functions/c32rtomb.texi
 @include posix-functions/cabs.texi
 @include posix-functions/cabsf.texi
 @include posix-functions/cabsl.texi
@@ -3063,6 +3076,8 @@
 @include posix-functions/malloc.texi
 @include posix-functions/mblen.texi
 @include posix-functions/mbrlen.texi
+@include posix-functions/mbrtoc16.texi
+@include posix-functions/mbrtoc32.texi
 @include posix-functions/mbrtowc.texi
 @include posix-functions/mbsinit.texi
 @include posix-functions/mbsnrtowcs.texi
@@ -3351,6 +3366,7 @@
 @include posix-functions/putwchar.texi
 @include posix-functions/pwrite.texi
 @include posix-functions/qsort.texi
+@include posix-functions/quick_exit.texi
 @include posix-functions/raise.texi
 @include posix-functions/rand.texi
 @include posix-functions/rand_r.texi
@@ -3943,6 +3959,7 @@
 * Glibc string.h::
 * Glibc sys/capability.h::
 * Glibc sys/epoll.h::
+* Glibc sys/fanotify.h::
 * Glibc sys/file.h::
 * Glibc sys/fsuid.h::
 * Glibc sys/gmon.h::
@@ -3957,6 +3974,7 @@
 * Glibc sys/ptrace.h::
 * Glibc sys/quota.h::
 * Glibc sys/reboot.h::
+* Glibc sys/resource.h::
 * Glibc sys/sem.h::
 * Glibc sys/sendfile.h::
 * Glibc sys/socket.h::
@@ -4166,10 +4184,12 @@
 
 @menu
 * getdirentries::
+* scandirat::
 * versionsort::
 @end menu
 
 @include glibc-functions/getdirentries.texi
+@include glibc-functions/scandirat.texi
 @include glibc-functions/versionsort.texi
 
 @node Glibc dlfcn.h
@@ -4280,11 +4300,15 @@
 
 @menu
 * fallocate::
+* name_to_handle_at::
 * readahead::
+* open_by_handle_at::
 @end menu
 
 @include glibc-functions/fallocate.texi
+@include glibc-functions/name_to_handle_at.texi
 @include glibc-functions/readahead.texi
+@include glibc-functions/open_by_handle_at.texi
 
 @node Glibc fenv.h
 @section Glibc Extensions to @code{<fenv.h>}
@@ -4772,6 +4796,19 @@
 * inet6_option_init::
 * inet6_option_next::
 * inet6_option_space::
+* inet6_opt_append::
+* inet6_opt_find::
+* inet6_opt_finish::
+* inet6_opt_get_val::
+* inet6_opt_init::
+* inet6_opt_next::
+* inet6_opt_set_val::
+* inet6_rth_add::
+* inet6_rth_getaddr::
+* inet6_rth_init::
+* inet6_rth_reverse::
+* inet6_rth_segments::
+* inet6_rth_space::
 * setipv4sourcefilter::
 * setsourcefilter::
 @end menu
@@ -4787,6 +4824,19 @@
 @include glibc-functions/inet6_option_init.texi
 @include glibc-functions/inet6_option_next.texi
 @include glibc-functions/inet6_option_space.texi
+@include glibc-functions/inet6_opt_append.texi
+@include glibc-functions/inet6_opt_find.texi
+@include glibc-functions/inet6_opt_finish.texi
+@include glibc-functions/inet6_opt_get_val.texi
+@include glibc-functions/inet6_opt_init.texi
+@include glibc-functions/inet6_opt_next.texi
+@include glibc-functions/inet6_opt_set_val.texi
+@include glibc-functions/inet6_rth_add.texi
+@include glibc-functions/inet6_rth_getaddr.texi
+@include glibc-functions/inet6_rth_init.texi
+@include glibc-functions/inet6_rth_reverse.texi
+@include glibc-functions/inet6_rth_segments.texi
+@include glibc-functions/inet6_rth_space.texi
 @include glibc-functions/setipv4sourcefilter.texi
 @include glibc-functions/setsourcefilter.texi
 
@@ -5601,11 +5651,13 @@
 * clone::
 * sched_getaffinity::
 * sched_setaffinity::
+* setns::
 @end menu
 
 @include glibc-functions/clone.texi
 @include glibc-functions/sched_getaffinity.texi
 @include glibc-functions/sched_setaffinity.texi
+@include glibc-functions/setns.texi
 
 @node Glibc search.h
 @section Glibc Extensions to @code{<search.h>}
@@ -5806,7 +5858,6 @@
 * qfcvt_r::
 * qgcvt::
 * qsort_r::
-* quick_exit::
 * random_r::
 * rpmatch::
 * seed48_r::
@@ -5851,7 +5902,6 @@
 @include glibc-functions/qfcvt_r.texi
 @include glibc-functions/qgcvt.texi
 @include glibc-functions/qsort_r.texi
-@include glibc-functions/quick_exit.texi
 @include glibc-functions/random_r.texi
 @include glibc-functions/rpmatch.texi
 @include glibc-functions/seed48_r.texi
@@ -5930,6 +5980,17 @@
 @include glibc-functions/epoll_ctl.texi
 @include glibc-functions/epoll_wait.texi
 
+@node Glibc sys/fanotify.h
+@section Glibc @code{<sys/fanotify.h>}
+
+@menu
+* fanotify_init::
+* fanotify_mark::
+@end menu
+
+@include glibc-functions/fanotify_init.texi
+@include glibc-functions/fanotify_mark.texi
+
 @node Glibc sys/file.h
 @section Glibc @code{<sys/file.h>}
 
@@ -6079,8 +6140,14 @@
 
 @include glibc-functions/reboot.texi
 
-@c @node Glibc sys/resource.h
-@c @section Glibc Extensions to @code{<sys/resource.h>}
+@node Glibc sys/resource.h
+@section Glibc Extensions to @code{<sys/resource.h>}
+
+@menu
+* prlimit::
+@end menu
+
+@include glibc-functions/prlimit.texi
 
 @c @node Glibc sys/select.h
 @c @section Glibc Extensions to @code{<sys/select.h>}
@@ -6112,10 +6179,14 @@
 @menu
 * accept4::
 * isfdtype::
+* recvmmsg::
+* sendmmsg::
 @end menu
 
 @include glibc-functions/accept4.texi
 @include glibc-functions/isfdtype.texi
+@include glibc-functions/recvmmsg.texi
+@include glibc-functions/sendmmsg.texi
 
 @node Glibc sys/stat.h
 @section Glibc Extensions to @code{<sys/stat.h>}
@@ -6229,11 +6300,13 @@
 * adjtimex::
 * ntp_adjtime::
 * ntp_gettime::
+* ntp_gettimex::
 @end menu
 
 @include glibc-functions/adjtimex.texi
 @include glibc-functions/ntp_adjtime.texi
 @include glibc-functions/ntp_gettime.texi
+@include glibc-functions/ntp_gettimex.texi
 
 @c @node Glibc sys/types.h
 @c @section Glibc Extensions to @code{<sys/types.h>}
@@ -6243,10 +6316,14 @@
 
 @menu
 * preadv::
+* process_vm_readv::
+* process_vm_writev::
 * pwritev::
 @end menu
 
 @include glibc-functions/preadv.texi
+@include glibc-functions/process_vm_readv.texi
+@include glibc-functions/process_vm_writev.texi
 @include glibc-functions/pwritev.texi
 
 @c @node Glibc sys/un.h
@@ -6360,20 +6437,24 @@
 @section Glibc Extensions to @code{<time.h>}
 
 @menu
+* clock_adjtime::
 * dysize::
 * getdate_r::
 * stime::
 * strptime_l::
 * timegm::
 * timelocal::
+* timespec_get::
 @end menu
 
+@include glibc-functions/clock_adjtime.texi
 @include glibc-functions/dysize.texi
 @include glibc-functions/getdate_r.texi
 @include glibc-functions/stime.texi
 @include glibc-functions/strptime_l.texi
 @include glibc-functions/timegm.texi
 @include glibc-functions/timelocal.texi
+@include glibc-functions/timespec_get.texi
 
 @c @node Glibc trace.h
 @c @section Glibc Extensions to @code{<trace.h>}
@@ -6393,6 +6474,9 @@
 @include glibc-functions/getttynam.texi
 @include glibc-functions/setttyent.texi
 
+@c @node Glibc uchar.h
+@c @section Glibc Extensions to @code{<uchar.h>}
+
 @c @node Glibc ucontext.h
 @c @section Glibc Extensions to @code{<ucontext.h>}
 
@@ -6488,6 +6572,7 @@
 * setutent::
 * updwtmp::
 * utmpname::
+* login::
 * login_tty::
 @end menu
 
@@ -6502,6 +6587,7 @@
 @include glibc-functions/setutent.texi
 @include glibc-functions/updwtmp.texi
 @include glibc-functions/utmpname.texi
+@include glibc-functions/login.texi
 @include glibc-functions/login_tty.texi
 
 @node Glibc utmpx.h
--- a/doc/inet_ntoa.texi
+++ b/doc/inet_ntoa.texi
@@ -17,6 +17,6 @@
 If two threads call @code{inet_ntoa} at roughly the same time, you
 might end up with the wrong date in one of the threads, or some
 undefined string.  Further, @code{inet_ntoa} is specific for
-@acronym{IPv4} addresses.
+IPv4 addresses.
 
 A protocol independent function is @code{inet_ntop}.
--- a/doc/intprops.texi
+++ b/doc/intprops.texi
@@ -143,7 +143,7 @@
 These macros yield 1 if the corresponding C operators might not yield
 numerically correct answers due to arithmetic overflow.  They do not
 rely on undefined or implementation-defined behavior.  They expand to
-integer constant expresssions if their arguments are.  Their
+integer constant expressions if their arguments are.  Their
 implementations are simple and straightforward, but they are typically
 harder to use than the integer type overflow macros.  @xref{Integer
 Type Overflow}.
@@ -257,7 +257,7 @@
 numerically correct answers due to arithmetic overflow of an integer
 type.  They work correctly on all known practical hosts, and do not
 rely on undefined behavior due to signed arithmetic overflow.  They
-expand to integer constant expresssions if their arguments are.  They
+expand to integer constant expressions if their arguments are.  They
 are easier to use than the integer range overflow macros
 (@pxref{Integer Range Overflow}).
 
--- a/doc/maintain.texi
+++ b/doc/maintain.texi
@@ -5,7 +5,7 @@
 @c For double-sided printing, uncomment:
 @c @setchapternewpage odd
 @c This date is automagically updated when you save this file:
-@set lastupdate December 23, 2011
+@set lastupdate November 15, 2012
 @c %**end of header
 
 @dircategory GNU organization
@@ -24,7 +24,7 @@
 
 Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-2010, 2011 Free Software Foundation, Inc.
+2010, 2011, 2012 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -57,7 +57,7 @@
 @menu
 * Preface::
 * Getting Help::
-* Getting a GNU Account::
+* GNU Accounts and Resources::
 * Stepping Down::
 * Recruiting Developers::
 * Legal Matters::
@@ -69,6 +69,7 @@
 * Web Pages::
 * Ethical and Philosophical Consideration::
 * Terminology::
+* Interviews and Speeches::
 * Hosting::
 * Donations::
 * Free Software Directory::
@@ -161,10 +162,12 @@
 try not to burden them unnecessarily.
 
 
-@node Getting a GNU Account
-@chapter Getting a GNU Account
+@node GNU Accounts and Resources
+@chapter GNU Accounts and Resources
 @cindex shell account, on fencepost
-@cindex @code{fencepost.gnu.org} GNU machine
+@cindex @code{fencepost.gnu.org} GNU login host
+@cindex resources for GNU developers
+@cindex development resources
 
 @c We want to repeat this text later, so define a macro.
 @macro gdgnuorgtext
@@ -179,6 +182,28 @@
 
 @gdgnuorgtext{}
 
+Other resources available to GNU maintainers are described at
+@url{http://www.gnu.org/software/devel.html}, as well as throughout
+this document.  In brief:
+
+@itemize @bullet
+@item Login accounts (see above).
+
+@item Version control (@pxref{Old Versions}).
+
+@item Mailing lists (@pxref{Mail}).
+
+@item Web pages (@pxref{Web Pages}).
+
+@item Mirrored release areas (@pxref{Distributions}).
+
+@cindex Hydra
+@cindex @code{platform-testers} mailing list
+@item Pre-release portability testing, both automated (via Hydra) and
+on request (via volunteers).
+
+@end itemize
+
 
 @node Stepping Down
 @chapter Stepping Down
@@ -263,6 +288,8 @@
 @node Copyright Papers
 @section Copyright Papers
 @cindex copyright papers
+@cindex assignments, copyright
+@cindex disclaimers
 
 If you maintain an FSF-copyrighted package
 certain legal procedures are required when incorporating legally significant
@@ -272,8 +299,18 @@
 
 @strong{Before} incorporating significant changes, make sure that the
 person who wrote the changes has signed copyright papers and that the
-Free Software Foundation has received and signed them.  We may also need
-an employer's disclaimer from the person's employer.
+Free Software Foundation has received and signed them.  We may also
+need an employer's disclaimer from the person's employer, which
+confirms that the work was not part of the person's job and the
+employer makes no claim on it.  However, a copy of the person's
+employment contract, showing that the employer can't claim any rights
+to this work, is often sufficient.
+
+If the employer does claim the work was part of the person's job, and
+there is no clear basis to say that claim is invalid, then we have to
+consider it valid.  Then the person cannot assign copyright, but the
+employer can.  Many companies have done this.  Please ask the
+appropriate managers to contact @code{assign@@gnu.org}.
 
 @cindex data base of GNU copyright assignments
 To check whether papers have been received, look in
@@ -344,13 +381,19 @@
 getting an employer's disclaimer from the contributor's employer.
 
 When the contributor emails the form to the FSF, the FSF sends per an
-electronic (usually PDF) copy of the assignment.  All contributors
-then print the assignment and sign it.  Contributors residing outside
-the U.S. must mail the signed form to the FSF via the post.
-Contributors located in the U.S. can then email or fax a scanned copy
-back to the FSF (or use postal mail, if they prefer).  (To emphasize,
-the necessary distinction is between US residents and non-residents,
-citizenship does not matter.)
+electronic (usually PDF) copy of the assignment.  This, or whatever
+response is required, should happen within five business days of the
+initial request.  If no reply from the FSF comes after that time,
+please send a reminder.  If you still get no response after an
+additional week, please write to @email{maintainers@@gnu.org} about it.
+
+After receiving the necessary form, all contributors then print it and
+sign it.  Contributors located in the USA or Germany can then email or
+fax a scanned copy back to the FSF (or use postal mail, if they
+prefer).  Contributors residing outside the USA or Germany must mail
+the signed form to the FSF via postal mail.  To emphasize, the
+necessary distinction is between residents and non-residents of these
+countries; citizenship does not matter.
 
 For less common cases, we have template files you should send to the
 contributor.  Be sure to fill in the name of the person and the name
@@ -534,6 +577,21 @@
 @node Copying from Other Packages
 @section Copying from Other Packages
 
+This section explains legal considerations when merging code from
+other packages into your package.  Using an entire module as a whole,
+and maintaining its separate identity, is a different issue;
+see @ref{External Libraries}.
+
+@menu
+* Non-FSF-Copyrighted Package::
+* FSF-Copyrighted Package::
+@end menu
+
+@node Non-FSF-Copyrighted Package
+@subsection Non-FSF-Copyrighted Package
+
+Here we suppose that your package is not FSF-copyrighted.
+
 When you copy legally significant code from another free software
 package with a GPL-compatible license, you should look in the
 package's records to find out the authors of the part you are copying,
@@ -541,12 +599,11 @@
 you did was copy it, not write it, then for copyright purposes you are
 @emph{not} one of the contributors of @emph{this} code.
 
-Especially when code has been released into the public domain, authors
-sometimes fail to write a license statement in each file.  In this
-case, please first be sure that all the authors of the code have
-disclaimed copyright interest.  Then, when copying the new files into
-your project, add a brief note at the beginning of the files recording
-the authors, the public domain status, and anything else relevant.
+If the code is supposed to be in the public domain, make sure that is
+really true: that all the authors of the code have disclaimed
+copyright interest.  Then, when copying the new files into your
+project, add a brief note at the beginning of the files recording the
+authors, the public domain status, and anything else relevant.
 
 On the other hand, when merging some public domain code into an
 existing file covered by the GPL (or LGPL or other free software
@@ -554,13 +611,18 @@
 domain.  The notice saying that the whole file is under the GPL (or
 other license) is legally sufficient.
 
-Using code that is released under a GPL-compatible free license,
-rather than being in the public domain, may require preserving
-copyright notices or other steps.  Of course, you should do what is
-needed.
-
-If you are maintaining an FSF-copyrighted package, please verify we
-have papers for the code you are copying, @emph{before} copying it.
+Using code that is not in the public domain, but rather released under
+a GPL-compatible free license, may require preserving copyright
+notices or other steps.  Of course, you should follow the requirements
+stated.
+
+@node FSF-Copyrighted Package
+@subsection FSF-Copyrighted Package
+
+If you are maintaining an FSF-copyrighted package, please don't copy
+in any code without verifying first that we have suitable legal papers
+for that code.
+
 If you are copying from another FSF-copyrighted package, then we
 presumably have papers for that package's own code, but you must check
 whether the code you are copying is part of an external library; if
@@ -924,15 +986,33 @@
 useful functionality, as a ``library'' facility (though the module is
 not always packaged technically as a library).
 
-In a case like this, it would be unreasonable to ask the author of that
-module to assign the copyright to the FSF.  After all, person did not
-write it specifically as a contribution to your package, so it would be
+Make sure the license of the module is compatible with current @emph{and
+future} GPL versions.  ``GNU GPL version 3 or later'' is good, and
+so is anything which includes permission for use under those GPL
+versions (including ``GNU GPL version 2 or later'', ``LGPL version
+@var{n} or later'', ``LGPL version 2.1'', ``GNU Affero GPL version 3
+or later'').  Lax permissive licenses are ok too, since they are
+compatible with all GPL versions.
+
+``GPL version 2 only'' is obviously unacceptable because it is
+incompatble with GPL version 3.  ``GPL version 3 only'' and ``GPL
+version 2 or 3 only'' have a subtler problem: they will be incompatble
+with GPL version 4, if we ever make one, so the module would become an
+obstacle to upgrading your package's license to ``GPL version 4 or
+later''.
+
+One package you need to avoid is @code{goffice}, since it allows only
+GPL versions 2 and 3.
+
+It would be unreasonable to ask the author of the external module to
+assign its the copyright to the FSF.  After all, person did not write
+it specifically as a contribution to your package, so it would be
 impertinent to ask per, out of the blue, ``Please give the FSF your
 copyright.''
 
-So the thing to do in this case is to make your program use the module,
-but not consider it a part of your program.  There are two reasonable
-methods of doing this:
+So make your program use the module but without treating the module as
+a part of your program.  There are two reasonable methods of doing
+this:
 
 @enumerate
 @item
@@ -1117,8 +1197,8 @@
 To create and maintain simple aliases and unmanaged lists, you can
 edit @file{/com/mailer/aliases} on the main GNU server.  If you don't
 have an account there, please read
-@url{http://www.gnu.org/software/README.accounts.html} (@pxref{Getting
-a GNU Account}).
+@url{http://www.gnu.org/software/README.accounts.html} (@pxref{GNU
+Accounts and Resources}).
 
 But if you don't want to learn how to do those things, you can
 alternatively ask @email{alias-file@@gnu.org} to add you to the
@@ -1238,7 +1318,7 @@
 @node Distributions
 @chapter Distributions
 
-It is important to follow the GNU conventions when making GNU software
+Please follow the GNU conventions when making GNU software
 distributions.
 
 @menu
@@ -1337,18 +1417,21 @@
 It's wise to test your patch by applying it to a copy of the old
 version, and checking that the result exactly matches the new version.
 
+
 @node Distribution on ftp.gnu.org
 @section Distribution on @code{ftp.gnu.org}
 @cindex GNU ftp site
 @cindex @code{ftp.gnu.org}, the GNU release site
 
-GNU packages are distributed through the directory @file{/gnu} on
-@code{ftp.gnu.org}, via both HTTP and FTP.  Each package should have a
-subdirectory named after the package, and all the distribution files
-for the package should go in that subdirectory.
-
-@xref{Automated FTP Uploads}, for procedural details of putting new
-versions on @code{ftp.gnu.org}.
+We strongly recommend using @code{ftp.gnu.org} to distribute official
+releases.  If you want to also distribute the package from a site of
+your own, that is fine.  To use some other site instead of
+@code{ftp.gnu.org} is acceptable, provided it allows connections from
+anyone anywhere.
+
+@xref{Automated FTP Uploads}, for the procedural details of putting
+new versions on @code{ftp.gnu.org}.
+
 
 @node Test Releases
 @section Test Releases
@@ -1363,8 +1446,8 @@
 a suitable GNU mailing list/newsgroup to recruit them.)
 
 We normally use the server @code{alpha.gnu.org} for pretests and
-prerelease versions.  @xref{Automated FTP Uploads}, for procedural details
-of putting new versions on @code{alpha.gnu.org}.
+prerelease versions.  @xref{Automated FTP Uploads}, for the procedural
+details of putting new versions on @code{alpha.gnu.org}.
 
 Once a program gets to be widely used and people expect it to work
 solidly, it is a good idea to do pretest releases before each ``real''
@@ -1407,12 +1490,13 @@
 information.  Then, you can perform uploads yourself, with no
 intervention needed by the system administrators.
 
-The general idea is that releases should be crytographically signed
+The general idea is that releases should be cryptographically signed
 before they are made publicly available.
 
 @menu
 * Automated Upload Registration::
 * Automated Upload Procedure::
+* FTP Upload Directive File - v1.2::
 * FTP Upload Directive File - v1.1::
 * FTP Upload Directive File - v1.0::
 @end menu
@@ -1428,7 +1512,6 @@
 for your GNU package:
 
 @enumerate
-
 @item
 Create an account for yourself at @url{http://savannah.gnu.org}, if
 you don't already have one.  By the way, this is also needed to
@@ -1439,7 +1522,7 @@
 In the @samp{My Account Conf} page on @code{savannah}, upload the GPG
 key you will use to sign your packages.  If you haven't created one
 before, you can do so with the command @code{gpg --gen-key} (you can
-accept all the default answers to its questions).
+accept and/or confirm the default answers to its questions).
 
 Optional but recommended: Send your key to a GPG public key server:
 @code{gpg --keyserver keys.gnupg.net --send-keys @var{keyid}}, where
@@ -1516,7 +1599,7 @@
 extension. If you do not follow this naming convention, the upload
 @emph{will not be processed}.
 
-Since v1.1 of the upload script, it is also possible to upload a
+Since v1.1 of the upload directives, it is also possible to upload a
 clearsigned directive file on its own (no accompanying @file{.sig} or
 any other file) to perform certain operations on the server.
 @xref{FTP Upload Directive File - v1.1}, for more information.
@@ -1557,6 +1640,43 @@
 @url{https://lists.gnu.org/archive/html/ftp-upload-report}.
 
 
+@node FTP Upload Directive File - v1.2
+@subsection FTP Upload Directive File - v1.2
+
+All the directives and documentation for v1.1 of the protocol still
+apply.  @xref{FTP Upload Directive File - v1.1}, for more information.
+
+@subheading New directive @code{replace}
+
+@cindex replacing uploaded files
+@cindex uploads, replacing
+As part of an uploaded triplet, a @file{foo.tar.gz.directive.asc} file
+might contain these lines (before being GPG-clearsigned):
+
+@example
+version: 1.2
+directory: bar/v1
+filename: foo.tar.gz
+comment: hello world!
+@end example
+
+If @file{foo.tar.gz} exists prior to upload, this directive file will
+result in an error.  Prior to May 2012, the behavior (of v1.1) was
+different: any existing files were automatically archived and replaced
+with the new upload.  Since May 2012, no files are replaced unless the
+(new) @code{replace} directive is set to @code{true} in the directive
+file.  That directive requires version 1.2 of the protocol.  For
+example:
+
+@example
+version: 1.2
+directory: bar/v1
+filename: foo.tar.gz
+replace: true
+comment: hello world!
+@end example
+
+
 @node FTP Upload Directive File - v1.1
 @subsection FTP Upload Directive File - v1.1
 
@@ -1564,7 +1684,7 @@
 
 When part of a triplet, the directive file must always contain the
 directives @code{version}, @code{directory} and @code{filename}, as
-described. In addition, a 'comment' directive is allowed.
+described. In addition, a @code{comment} directive is allowed.
 
 The @code{version} directive must always have the value @samp{1.1}.
 
@@ -1594,17 +1714,19 @@
 @file{gnu/bar/v1} of the @code{ftp.gnu.org} site.
 
 The directive file can be used to create currently non-existent
-directory trees, as long as they are under the package directory for
-your package (in the example above, that is @code{bar}).
+directory trees, as long as they are under the directory for your
+package (in the example above, the package directory is @code{bar}).
 
 If you upload a file that already exists in the FTP directory, the
 original will simply be archived and replaced with the new upload.
+There is no automated or online access to archived files; if you want
+to retrieve or view them, please email sysadmin.
 
 @subheading Standalone directives
 
-When uploaded by itself, the directive file must contain one or more
-of the directives @code{symlink}, @code{rmsymlink} or @code{archive},
-in addition to the obligatory @code{directory} and @code{version}
+When uploaded by itself, a directive file must contain one or more of
+the directives @code{symlink}, @code{rmsymlink} or @code{archive}, in
+addition to the obligatory @code{directory} and @code{version}
 directives.  A @code{filename} directive is not allowed, and a
 @code{comment} directive remains optional.
 
@@ -1676,11 +1798,8 @@
 @node FTP Upload Directive File - v1.0
 @subsection FTP Upload Directive File - v1.0
 
-@dfn{As of June 2006, the upload script is running in compatibility
-mode, allowing uploads with either version@tie{}1.1 or
-version@tie{}1.0 of the directive file syntax.  Support for v1.0
-uploads will be phased out by the end of 2006, so please upgrade
-to@tie{}v1.1.}
+Support for v1.0 uploads was phased out in May 2012; please upgrade
+to@tie{}v1.2.
 
 The directive file should contain one line, excluding the clearsigned
 data GPG that inserts, which specifies the final destination directory
@@ -1730,7 +1849,7 @@
 
 @cindex announcement mailing list, project-specific
 You can maintain your own mailing list (typically
-@email{info-@var{package}@@gnu.org}) for announcements as well if you
+@indicateurl{info-@var{package}@@gnu.org}) for announcements as well if you
 like.  For your own list, of course you decide as you see fit what
 events are worth announcing.  (@xref{Mail}, for setting this up, and
 more suggestions on handling mail for your package.)
@@ -1752,7 +1871,7 @@
 @indicateurl{http://ftp.gnu.org/gnu/@var{package}/}).  It is also
 useful to mention the mirror list at
 @url{http://www.gnu.org/order/ftp.html}, and that
-@url{http://ftpmirror.gnu.org/@var{package/}} will automatically
+@indicateurl{http://ftpmirror.gnu.org/@var{package/}} will automatically
 redirect to a nearby mirror.
 
 @item
@@ -1793,6 +1912,7 @@
 
 @node Hosting for Web Pages
 @section Hosting for Web Pages
+@cindex web pages, hosting for
 
 The best way to maintain the web pages for your project is to register
 the project on @code{savannah.gnu.org}.  Then you can edit the pages
@@ -1817,6 +1937,7 @@
 
 @node Freedom for Web Pages
 @section Freedom for Web Pages
+@cindex web pages, freedom for
 
 If you use a site other than @code{www.gnu.org}, please make sure that
 the site runs on free software alone.  (It is ok if the site uses
@@ -1840,11 +1961,14 @@
 
 @node Manuals on Web Pages
 @section Manuals on Web Pages
+@cindex web pages, including manuals on
+@cindex formats for documentation, desired
 
 The web pages for the package should include its manuals, in HTML,
-DVI, Info, PostScript, PDF, plain ASCII, and Texinfo format (source).
-All of these can be generated automatically from the Texinfo source
-using Makeinfo and other programs.
+DVI, Info, PDF, plain ASCII, and the source Texinfo.  All of these can
+be generated automatically from Texinfo using Makeinfo and other
+programs.  If the Texinfo itself is generated from some other source
+format, include that too.
 
 When there is only one manual, put it in a subdirectory called
 @file{manual}; the file @file{manual/index.html} should have a link to
@@ -1872,6 +1996,7 @@
 @subsection Invoking @command{gendocs.sh}
 @pindex gendocs.sh
 @cindex generating documentation output
+@cindex documentation output, generating
 
 The script @command{gendocs.sh} eases the task of generating the
 Texinfo documentation output for your web pages
@@ -1938,9 +2063,9 @@
 gendocs.sh --email bug-texinfo@@gnu.org -o info-stnd info-stnd "GNU info-stnd manual"
 @end smallexample
 
-By default, the script uses @command{makeinfo} for generating
-@acronym{HTML} output.  If you prefer to use @command{texi2html}, use
-the @option{--texi2html} command line option, e.g.:
+By default, the script uses @command{makeinfo} for generating HTML
+output.  If you prefer to use @command{texi2html}, use the
+@option{--texi2html} command line option, e.g.:
 
 @smallexample
 gendocs --texi2html -o texinfo texinfo "GNU Texinfo manual"
@@ -1951,15 +2076,15 @@
 and chapters).
 
 You can set the environment variables @env{MAKEINFO}, @env{TEXI2DVI},
-@env{TEXI2HTML} and @env{DVIPS} to control the programs that get
-executed, and @env{GENDOCS_TEMPLATE_DIR} to control where the
+etc., to control the programs that get executed, and
+@env{GENDOCS_TEMPLATE_DIR} to control where the
 @file{gendocs_template} file is found.
 
 As usual, run @samp{gendocs.sh --help} for a description of all the
 options, environment variables, and more information.
 
 Please email bug reports, enhancement requests, or other
-correspondence to @email{bug-texinfo@@gnu.org}.
+correspondence about @command{gendocs} to @email{bug-texinfo@@gnu.org}.
 
 
 @node CVS Keywords in Web Pages
@@ -2151,6 +2276,74 @@
 Note that this uses a space, not a slash.
 
 
+@node Interviews and Speeches
+@chapter Interviews and Speeches
+
+Interviews and speeches about your package are an important channel
+for informing the public about the GNU system and the ideas of the
+free software movement.  Please avoid saying ``open source'' and avoid
+calling the GNU system ``Linux'', just as you would in the package
+itself (@pxref{Terminology}).  Likewise, avoid promoting nonfree
+programs (@pxref{References,,, standards, GNU Coding
+Standards}) as you would in the package itself.
+
+Many GNU users have erroneous ideas about GNU.  Outside of our
+community, most people think it is Linux.  Please use your opportunity
+to set them straight.  Start the presentation with the answers to
+these basic questions:
+
+@itemize @bullet
+@item
+What GNU is (an operating system developed to be Unix-like and totally
+free software).  It is good to mention @url{http://www.gnu.org}.
+
+@item
+What free software is (the users control it, so it doesn't control
+them).  It is good to state the four freedoms and/or refer to
+@url{http://www.gnu.org/philosophy/free-sw.html}.
+
+@item
+What GNU/Linux is (Linux filled the last gap in GNU).  It is useful to
+refer to @url{http://www.gnu.org/gnu/linux-and-gnu.html}.
+
+@item
+What the GNU Project is (the project to develop GNU).
+
+@item
+How your package fits in (it's part of GNU, and the work is part of
+the GNU Project).
+@end itemize
+
+If you feel a social pressure not to say these things, you may be
+coming in contact with some who would prefer that these things not be
+said.  That's precisely when we need your support most.
+
+Please don't include advertisements or plugs for any company, product
+or service.  Even if the product would meet the standards for the FSF
+to endorse it, an ad for it is out of place in a presentation about a
+GNU package.  Likewise, please don't include company slogans.  Mention
+a company only when called for by the subject matter.
+
+A few GNU packages are actually business activities of a particular
+company.  In that case, it is ok to say so at the start.  Otherwise,
+please show that this is a project of the GNU Project, and avoid
+suggesting it is any company's project.
+
+If you are paid by a company to work on the GNU package, it is
+appropriate to thank the company in a discreet way, but please don't
+go beyond that.
+
+Before you do a speech or interview, please contact the GNU Project
+leadership.  We can give you advice on how to deal with various
+eventualities.
+
+When your interviews and speech recordings or transcript are posted,
+please tell us about them.  Then we can publicize them.
+
+Please post them in formats that are friendly to free software: not in
+Doc or Docx format, not with Flash, not with QuickTime, not with MP3,
+MPEG2 or MPEG4.  Plain text, HTML and PDF are good.
+
 @node Hosting
 @chapter Hosting
 @cindex CVS repository
--- a/doc/make-stds.texi
+++ b/doc/make-stds.texi
@@ -602,7 +602,7 @@
 
 If you are using Autoconf, write the default as @samp{@@lispdir@@}.
 In order to make @samp{@@lispdir@@} work, you need the following lines
-in your @file{configure.in} file:
+in your @file{configure.ac} file:
 
 @example
 lispdir='$@{datarootdir@}/emacs/site-lisp'
--- a/doc/parse-datetime.texi
+++ b/doc/parse-datetime.texi
@@ -117,10 +117,10 @@
 The output of the @command{date} command
 is not always acceptable as a date string,
 not only because of the language problem, but also because there is no
-standard meaning for time zone items like @samp{IST}.  When using
+standard meaning for time zone items like @samp{IST}@.  When using
 @command{date} to generate a date string intended to be parsed later,
 specify a date format that is independent of language and that does not
-use time zone items other than @samp{UTC} and @samp{Z}.  Here are some
+use time zone items other than @samp{UTC} and @samp{Z}@.  Here are some
 ways to do this:
 
 @example
@@ -145,6 +145,7 @@
 nested.  Hyphens not followed by a digit are currently ignored.  Leading
 zeros on numbers are ignored.
 
+@cindex leap seconds
 Invalid dates like @samp{2005-02-29} or times like @samp{24:00} are
 rejected.  In the typical case of a host that does not support leap
 seconds, a time like @samp{23:59:60} is rejected even if it
@@ -237,6 +238,7 @@
 20:02-0500      # In @sc{est} (U.S. Eastern Standard Time).
 @end example
 
+@cindex leap seconds
 More generally, the time of day may be given as
 @samp{@var{hour}:@var{minute}:@var{second}}, where @var{hour} is
 a number between 0 and 23, @var{minute} is a number between 0 and
@@ -480,15 +482,15 @@
 infinity.  Such a number cannot be combined with any other date
 item, as it specifies a complete time stamp.
 
-@cindex beginning of time, for @acronym{POSIX}
-@cindex epoch, for @acronym{POSIX}
+@cindex beginning of time, for POSIX
+@cindex epoch, for POSIX
 Internally, computer times are represented as a count of seconds since
-an epoch---a well-defined point of time.  On @acronym{GNU} and
-@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so
+an epoch---a well-defined point of time.  On GNU and
+POSIX systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so
 @samp{@@0} represents this time, @samp{@@1} represents 1970-01-01
-00:00:01 @sc{utc}, and so forth.  @acronym{GNU} and most other
-@acronym{POSIX}-compliant systems support such times as an extension
-to @acronym{POSIX}, using negative counts, so that @samp{@@-1}
+00:00:01 @sc{utc}, and so forth.  GNU and most other
+POSIX-compliant systems support such times as an extension
+to POSIX, using negative counts, so that @samp{@@-1}
 represents 1969-12-31 23:59:59 @sc{utc}.
 
 Traditional Unix systems count seconds with 32-bit two's-complement
@@ -497,6 +499,7 @@
 of seconds with nanosecond subcounts, and can represent all the times
 in the known lifetime of the universe to a resolution of 1 nanosecond.
 
+@cindex leap seconds
 On most hosts, these counts ignore the presence of leap seconds.
 For example, on most hosts @samp{@@915148799} represents 1998-12-31
 23:59:59 @sc{utc}, @samp{@@915148800} represents 1999-01-01 00:00:00
@@ -516,7 +519,7 @@
 quotes or backslashes within @var{rule} must be escaped by a
 backslash.
 
-For example, with the @acronym{GNU} @command{date} command you can
+For example, with the GNU @command{date} command you can
 answer the question ``What time is it in New York when a Paris clock
 shows 6:30am on October 31, 2004?'' by using a date beginning with
 @samp{TZ="Europe/Paris"} as shown in the following shell transcript:
@@ -540,16 +543,16 @@
 @uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}.
 A recent catalog of location names appears in the
 @uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time
-Gateway}.  A few non-@acronym{GNU} hosts require a colon before a
+Gateway}.  A few non-GNU hosts require a colon before a
 location name in a @env{TZ} setting, e.g.,
 @samp{TZ=":America/New_York"}.
 
 The @samp{tz} database includes a wide variety of locations ranging
 from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but
 if you are at sea and have your own private time zone, or if you are
-using a non-@acronym{GNU} host that does not support the @samp{tz}
-database, you may need to use a @acronym{POSIX} rule instead.  Simple
-@acronym{POSIX} rules like @samp{UTC0} specify a time zone without
+using a non-GNU host that does not support the @samp{tz}
+database, you may need to use a POSIX rule instead.  Simple
+POSIX rules like @samp{UTC0} specify a time zone without
 daylight saving time; other rules can specify simple daylight saving
 regimes.  @xref{TZ Variable,, Specifying the Time Zone with @code{TZ},
 libc, The GNU C Library}.
@@ -585,4 +588,4 @@
 @cindex Berry, K.
 This chapter was originally produced by Fran@,{c}ois Pinard
 (@email{pinard@@iro.umontreal.ca}) from the @file{parse_datetime.y} source code,
-and then edited by K.@: Berry (@email{kb@@cs.umb.edu}).
+and then edited by K. Berry (@email{kb@@cs.umb.edu}).
--- a/doc/pastposix-functions/bsd_signal.texi
+++ b/doc/pastposix-functions/bsd_signal.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, IRIX 5.3, Solaris 2.5.1, Cygwin, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, IRIX 5.3, Solaris 2.5.1, Cygwin, mingw, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/pastposix-functions/ftime.texi
+++ b/doc/pastposix-functions/ftime.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, IRIX 5.3, Solaris 2.4.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, IRIX 5.3, Solaris 2.4.
 @item
 This function is marked as ``legacy'' in POSIX.  Better use @code{gettimeofday}
 or @code{clock_gettime} instead, and use @code{ftime} only as a fallback for
--- a/doc/pastposix-functions/gcvt.texi
+++ b/doc/pastposix-functions/gcvt.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0.
 @item
 This function is marked as ``legacy'' in POSIX.  Better use @code{sprintf}
 instead.
--- a/doc/pastposix-functions/getcontext.texi
+++ b/doc/pastposix-functions/getcontext.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/pastposix-functions/makecontext.texi
+++ b/doc/pastposix-functions/makecontext.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/pastposix-functions/pthread_attr_getstackaddr.texi
+++ b/doc/pastposix-functions/pthread_attr_getstackaddr.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-HP-UX 11, Solaris 2.4, Cygwin, mingw, MSVC 9, BeOS.
+HP-UX 11, Solaris 2.4, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/pastposix-functions/pthread_attr_setstackaddr.texi
+++ b/doc/pastposix-functions/pthread_attr_setstackaddr.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-HP-UX 11, IRIX 5.3, Solaris 2.4, Cygwin, mingw, MSVC 9, BeOS.
+HP-UX 11, IRIX 5.3, Solaris 2.4, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/pastposix-functions/setcontext.texi
+++ b/doc/pastposix-functions/setcontext.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 The effects of this call are system and compiler optimization dependent,
 since it restores the contents of register-allocated variables but not
--- a/doc/pastposix-functions/swapcontext.texi
+++ b/doc/pastposix-functions/swapcontext.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, OpenBSD 3.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/pastposix-functions/usleep.texi
+++ b/doc/pastposix-functions/usleep.texi
@@ -14,7 +14,7 @@
 mingw.
 @item
 This function is missing on some platforms.  However, the replacement
-is designed to be lightweight, and may round to the neareset second;
+is designed to be lightweight, and may round to the nearest second;
 use @code{select} or @code{nanosleep} if better resolution is needed:
 IRIX 5.3, Solaris 2.4, older mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/pastposix-functions/wcswcs.texi
+++ b/doc/pastposix-functions/wcswcs.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, IRIX 5.3, Solaris 2.5.1, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, IRIX 5.3, Solaris 2.5.1, Cygwin, mingw, MSVC 9, BeOS.
 @item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
--- a/doc/posix-functions/_Exit_C99.texi
+++ b/doc/posix-functions/_Exit_C99.texi
@@ -2,7 +2,7 @@
 @section @code{_Exit}
 @findex _Exit
 @c This file would ideally be called _Exit.texi, but then it would collide
-@c with _exit.texi on case-insensitive file systems (MacOS X HFS+ and Windows
+@c with _exit.texi on case-insensitive file systems (Mac OS X HFS+ and Windows
 @c file systems).
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/_Exit.html}
--- a/doc/posix-functions/_tolower.texi
+++ b/doc/posix-functions/_tolower.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8.
+Mac OS X 10.5, Minix 3.1.8.
 @end itemize
--- a/doc/posix-functions/_toupper.texi
+++ b/doc/posix-functions/_toupper.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8.
+Mac OS X 10.5, Minix 3.1.8.
 @end itemize
--- a/doc/posix-functions/acosl.texi
+++ b/doc/posix-functions/acosl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
new file mode 100644
--- /dev/null
+++ b/doc/posix-functions/aligned_alloc.texi
@@ -0,0 +1,16 @@
+@node aligned_alloc
+@section @code{aligned_alloc}
+@findex aligned_alloc
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/posix-functions/alphasort.texi
+++ b/doc/posix-functions/alphasort.texi
@@ -17,7 +17,7 @@
 @itemize
 @item
 The parameters of this function are declared as @code{const void *} on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Interix 3.5.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Interix 3.5.
 @item
 The parameters of this function are declared as @code{void *} on some platforms:
 AIX 5.1.
--- a/doc/posix-functions/asinl.texi
+++ b/doc/posix-functions/asinl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/atanl.texi
+++ b/doc/posix-functions/atanl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
new file mode 100644
--- /dev/null
+++ b/doc/posix-functions/c16rtomb.texi
@@ -0,0 +1,16 @@
+@node c16rtomb
+@section @code{c16rtomb}
+@findex c16rtomb
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/posix-functions/c32rtomb.texi
@@ -0,0 +1,16 @@
+@node c32rtomb
+@section @code{c32rtomb}
+@findex c32rtomb
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/posix-functions/cbrt.texi
+++ b/doc/posix-functions/cbrt.texi
@@ -8,11 +8,11 @@
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, MSVC 9.
 @end itemize
--- a/doc/posix-functions/cbrtf.texi
+++ b/doc/posix-functions/cbrtf.texi
@@ -4,15 +4,21 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/cbrtf.html}
 
-Gnulib module: ---
+Gnulib module: cbrtf
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, AIX 5.1, Solaris 9, MSVC 9.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function returns a wrong value for a minus zero on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9.
 @end itemize
--- a/doc/posix-functions/cbrtl.texi
+++ b/doc/posix-functions/cbrtl.texi
@@ -4,15 +4,29 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/cbrtl.html}
 
-Gnulib module: ---
+Gnulib module: cbrtl or cbrtl-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{cbrtl} or @code{cbrtl-ieee}
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function produces grossly wrong results on some platforms:
+OpenBSD 5.1/SPARC.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{cbrtl-ieee}:
+@itemize
+@item
+This function returns a positive zero for a minus zero argument
+on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/ceilf.texi
+++ b/doc/posix-functions/ceilf.texi
@@ -21,7 +21,7 @@
 @item
 This function returns a positive zero for an argument between -1 and 0
 on some platforms:
-MacOS X 10.5, AIX 7.1, OSF/1 5.1.
+Mac OS X 10.5, AIX 7.1, OSF/1 5.1.
 @item
 This function returns a positive zero for a minus zero argument
 on some platforms:
--- a/doc/posix-functions/clock_getcpuclockid.texi
+++ b/doc/posix-functions/clock_getcpuclockid.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/clock_getres.texi
+++ b/doc/posix-functions/clock_getres.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/clock_gettime.texi
+++ b/doc/posix-functions/clock_gettime.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/clock_nanosleep.texi
+++ b/doc/posix-functions/clock_nanosleep.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/clock_settime.texi
+++ b/doc/posix-functions/clock_settime.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, IRIX 5.3, Solaris 2.4, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, Minix 3.1.8, IRIX 5.3, Solaris 2.4, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/copysignf.texi
+++ b/doc/posix-functions/copysignf.texi
@@ -10,7 +10,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9.
+Minix 3.1.8, AIX 5.1, older IRIX 6.5, Solaris 9, MSVC 9.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/cosl.texi
+++ b/doc/posix-functions/cosl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/daylight.texi
+++ b/doc/posix-functions/daylight.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, IRIX 6.5, OSF/1 5.1.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, IRIX 6.5, OSF/1 5.1.
 @item
 The address of this variable is not a compile-time constant on some platforms:
 Cygwin, mingw.
--- a/doc/posix-functions/dprintf.texi
+++ b/doc/posix-functions/dprintf.texi
@@ -10,13 +10,17 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{dprintf-posix}:
 @itemize
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
 glibc-2.3.6.
--- a/doc/posix-functions/duplocale.texi
+++ b/doc/posix-functions/duplocale.texi
@@ -17,5 +17,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/endutxent.texi
+++ b/doc/posix-functions/endutxent.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/environ.texi
+++ b/doc/posix-functions/environ.texi
@@ -11,19 +11,19 @@
 @item
 POSIX does not require this variable to be declared, and it is indeed not
 declared on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, IRIX 6.5, Solaris 11 2011-11.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, IRIX 6.5, Solaris 11 2011-11.
 @item
-On MacOS X 10, this variable is not declared.  Up to MacOS X 10.4, one can use
+On Mac OS X 10, this variable is not declared.  Up to Mac OS X 10.4, one can use
 @smallexample
 extern char **environ;
 @end smallexample
 to get the variable declared.  This does not work any more, however, in
-shared libraries on MacOS X 10.5.  Here is a workaround: Instead, one can use
+shared libraries on Mac OS X 10.5.  Here is a workaround: Instead, one can use
 @smallexample
 #include <crt_externs.h>
 #define environ (*_NSGetEnviron())
 @end smallexample
-This works at all versions of MacOS X.
+This works at all versions of Mac OS X.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/exp2.texi
+++ b/doc/posix-functions/exp2.texi
@@ -4,15 +4,21 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/exp2.html}
 
-Gnulib module: ---
+Gnulib module: exp2
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, older IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function returns grossly wrong results on some platforms:
+OpenBSD 4.9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/posix-functions/exp2f.texi
+++ b/doc/posix-functions/exp2f.texi
@@ -4,15 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/exp2f.html}
 
-Gnulib module: ---
+Gnulib module: exp2f
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/posix-functions/exp2l.texi
+++ b/doc/posix-functions/exp2l.texi
@@ -4,15 +4,28 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/exp2l.html}
 
-Gnulib module: ---
+Gnulib module: exp2l or exp2l-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{exp2l} or @code{exp2l-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{exp2l-ieee}:
+@itemize
+@item
+This function returns a wrong value for a NaN argument on some platforms:
+OpenBSD 4.9.
+@item
+This function returns a wrong value for a negative infinity argument on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/expl.texi
+++ b/doc/posix-functions/expl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/expm1.texi
+++ b/doc/posix-functions/expm1.texi
@@ -4,15 +4,22 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/expm1.html}
 
-Gnulib module: ---
+Gnulib module: expm1 or expm1-ieee
 
-Portability problems fixed by Gnulib:
-@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{expm1} or @code{expm1-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
 Minix 3.1.8, mingw, MSVC 9.
 @end itemize
+
+Portability problems fixed by Gnulib module @code{expm1-ieee}:
+@itemize
+@item
+This function has problems when the argument is minus zero on some platforms:
+AIX 7.1.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/expm1f.texi
+++ b/doc/posix-functions/expm1f.texi
@@ -4,15 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/expm1f.html}
 
-Gnulib module: ---
+Gnulib module: expm1f
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 9, mingw, MSVC 9.
+@item
+This function produces wrong results for arguments <= -17.32868 on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 9, mingw, MSVC 9.
 @end itemize
--- a/doc/posix-functions/expm1l.texi
+++ b/doc/posix-functions/expm1l.texi
@@ -4,15 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/expm1l.html}
 
-Gnulib module: ---
+Gnulib module: expm1l
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/fabsl.texi
+++ b/doc/posix-functions/fabsl.texi
@@ -4,18 +4,21 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fabsl.html}
 
-Gnulib module: ---
+Gnulib module: fabsl
 
 Portability problems fixed by Gnulib:
 @itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
 @item
 This function is missing on some platforms:
 NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, Interix 3.5, BeOS.
 @item
 This function is only defined as a macro with arguments on some platforms:
 MSVC 9.
+@item
+This function returns a minus zero for a minus zero argument on some platforms:
+IRIX 6.5 with gcc 4.2.4.
 @end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/faccessat.texi
+++ b/doc/posix-functions/faccessat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9,
 Interix 3.5, BeOS.
 However, the replacement does not always take into account ACLs.  Also,
--- a/doc/posix-functions/fattach.texi
+++ b/doc/posix-functions/fattach.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/fchmodat.texi
+++ b/doc/posix-functions/fchmodat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @end itemize
--- a/doc/posix-functions/fchownat.texi
+++ b/doc/posix-functions/fchownat.texi
@@ -21,7 +21,7 @@
 Linux with glibc < 2.11.
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and
 is not multithread-safe.  Also, the replacement may fail to change
--- a/doc/posix-functions/fcntl.texi
+++ b/doc/posix-functions/fcntl.texi
@@ -15,7 +15,8 @@
 @item
 This function does not support @code{F_DUPFD_CLOEXEC} on some
 platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
+glibc with Linux kernels before 2.6.24,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.7.1, Interix 3.5,
 BeOS.
 Note that the gnulib replacement code is functional but not atomic.
--- a/doc/posix-functions/fdatasync.texi
+++ b/doc/posix-functions/fdatasync.texi
@@ -10,10 +10,10 @@
 @itemize
 @item
 This function is present but not declared on some platforms:
-MacOS X 10.7.
+Mac OS X 10.7.
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/fdetach.texi
+++ b/doc/posix-functions/fdetach.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/fdopendir.texi
+++ b/doc/posix-functions/fdopendir.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and
 is not multithread-safe.  Also, the replacement does not guarantee
--- a/doc/posix-functions/fexecve.texi
+++ b/doc/posix-functions/fexecve.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/fflush.texi
+++ b/doc/posix-functions/fflush.texi
@@ -18,7 +18,7 @@
 @item
 @code{fflush} on an input stream right after @code{ungetc} does not discard
 the @code{ungetc} buffer, on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Cygwin 1.5.25-10.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Cygwin 1.5.25-10.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/fgetc.texi
+++ b/doc/posix-functions/fgetc.texi
@@ -18,6 +18,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+C99 and POSIX-2001 and later require end-of-file to be sticky, that
+is, they require this function to act as if it reads end-of-file if
+@code{feof} would return nonzero.  However, on some systems this
+function attempts to read from the underlying file descriptor even if
+the stream's end-of-file indicator is set.  These systems include
+glibc and default Solaris.
+@item
 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
 upon failure.
 @item
--- a/doc/posix-functions/fgets.texi
+++ b/doc/posix-functions/fgets.texi
@@ -18,6 +18,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+C99 and POSIX-2001 and later require end-of-file to be sticky, that
+is, they require this function to act as if it reads end-of-file if
+@code{feof} would return nonzero.  However, on some systems this
+function attempts to read from the underlying file descriptor even if
+the stream's end-of-file indicator is set.  These systems include
+glibc and default Solaris.
+@item
 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
 upon failure.
 @end itemize
--- a/doc/posix-functions/fma.texi
+++ b/doc/posix-functions/fma.texi
@@ -13,7 +13,7 @@
 FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
 @item
 This function produces wrong results on some platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.4/x86, OSF/1 5.1, Cygwin 1.5, mingw.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.4/x86, OSF/1 5.1, Cygwin 1.5, mingw.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/fmaf.texi
+++ b/doc/posix-functions/fmaf.texi
@@ -13,7 +13,7 @@
 FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
 @item
 This function produces wrong results on some platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.4/x86, OSF/1 5.1, Cygwin 1.5, mingw.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.4/x86, OSF/1 5.1, Cygwin 1.5, mingw.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/fmal.texi
+++ b/doc/posix-functions/fmal.texi
@@ -13,7 +13,7 @@
 FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @item
 This function produces wrong results on some platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.4/x86, OSF/1 5.1, mingw.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.4/x86, OSF/1 5.1, mingw.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/fmemopen.texi
+++ b/doc/posix-functions/fmemopen.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on many non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/fmod.texi
+++ b/doc/posix-functions/fmod.texi
@@ -4,10 +4,21 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fmod.html}
 
-Gnulib module: fmod
+Gnulib module: fmod or fmod-ieee
+
+Portability problems fixed by either Gnulib module @code{fmod} or @code{fmod-ieee}:
+@itemize
+@end itemize
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{fmod-ieee}:
 @itemize
+@item
+This function has problems when the second argument is zero on some platforms:
+OSF/1 5.1.
+@item
+This function has problems when the first argument is minus zero on some
+platforms:
+mingw, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/fmodf.texi
+++ b/doc/posix-functions/fmodf.texi
@@ -4,9 +4,9 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fmodf.html}
 
-Gnulib module: fmodf
+Gnulib module: fmodf or fmodf-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{fmodf} or @code{fmodf-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
@@ -16,6 +16,17 @@
 MSVC 9.
 @end itemize
 
+Portability problems fixed by Gnulib module @code{fmodf-ieee}:
+@itemize
+@item
+This function has problems when the second argument is zero on some platforms:
+OSF/1 5.1.
+@item
+This function has problems when the first argument is minus zero on some
+platforms:
+MSVC 9.
+@end itemize
+
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
--- a/doc/posix-functions/fmodl.texi
+++ b/doc/posix-functions/fmodl.texi
@@ -4,13 +4,9 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fmodl.html}
 
-Gnulib module: ---
+Gnulib module: fmodl or fmodl-ieee
 
-Portability problems fixed by Gnulib:
-@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{fmodl} or @code{fmodl-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
@@ -18,4 +14,22 @@
 @item
 This function is only defined as a macro with arguments on some platforms:
 MSVC 9.
+@item
+This function is not declared and does not work on some platforms:
+AIX 5.1.
 @end itemize
+
+Portability problems fixed by Gnulib module @code{fmodl-ieee}:
+@itemize
+@item
+This function has problems when the second argument is zero on some platforms:
+OSF/1 5.1.
+@item
+This function has problems when the first argument is minus zero on some
+platforms:
+MSVC 9.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/fmtmsg.texi
+++ b/doc/posix-functions/fmtmsg.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/fpclassify.texi
+++ b/doc/posix-functions/fpclassify.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5.
+Mac OS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5.
 @end itemize
--- a/doc/posix-functions/fprintf.texi
+++ b/doc/posix-functions/fprintf.texi
@@ -20,9 +20,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -52,7 +56,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -64,7 +68,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{stdio} or @code{fprintf-posix}, together with module @code{nonblocking}:
--- a/doc/posix-functions/fread.texi
+++ b/doc/posix-functions/fread.texi
@@ -18,6 +18,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+C99 and POSIX-2001 and later require end-of-file to be sticky, that
+is, they require this function to act as if it reads end-of-file if
+@code{feof} would return nonzero.  However, on some systems this
+function attempts to read from the underlying file descriptor even if
+the stream's end-of-file indicator is set.  These systems include
+glibc and default Solaris.
+@item
 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
 upon failure.
 @item
--- a/doc/posix-functions/freelocale.texi
+++ b/doc/posix-functions/freelocale.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/frexpl.texi
+++ b/doc/posix-functions/frexpl.texi
@@ -16,13 +16,13 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @item
 This function does not work on finite numbers on some platforms:
-MacOS X 10.4/PowerPC, AIX 5.1, MSVC 9, BeOS.
+Mac OS X 10.4/PowerPC, AIX 5.1, MSVC 9, BeOS.
 @item
 This function does not work on denormalized numbers on some platforms:
-MacOS X 10.5/i386.
+Mac OS X 10.5/i386.
 @item
 This function does not work on infinite numbers on some platforms:
 IRIX 6.5, mingw, MSVC 9.
--- a/doc/posix-functions/fscanf.texi
+++ b/doc/posix-functions/fscanf.texi
@@ -18,6 +18,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+C99 and POSIX-2001 and later require end-of-file to be sticky, that
+is, they require this function to act as if it reads end-of-file if
+@code{feof} would return nonzero.  However, on some systems this
+function attempts to read from the underlying file descriptor even if
+the stream's end-of-file indicator is set.  These systems include
+glibc and default Solaris.
+@item
 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
 upon failure.
 @item
--- a/doc/posix-functions/fstatat.texi
+++ b/doc/posix-functions/fstatat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @item
--- a/doc/posix-functions/fstatvfs.texi
+++ b/doc/posix-functions/fstatvfs.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, mingw, MSVC 9.
+Mac OS X 10.3, OpenBSD 3.8, mingw, MSVC 9.
 @item
 On platforms where @code{f_blocks} in @samp{struct statvfs} is a 32-bit
 value, this function may not work correctly on files systems larger than
--- a/doc/posix-functions/ftw.texi
+++ b/doc/posix-functions/ftw.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
 correctly report the size of files or block devices larger than 2 GB.
--- a/doc/posix-functions/futimens.texi
+++ b/doc/posix-functions/futimens.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9,
 Interix 3.5, BeOS.
 However, the replacement function may end up truncating timestamps to
--- a/doc/posix-functions/getc.texi
+++ b/doc/posix-functions/getc.texi
@@ -18,6 +18,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+C99 and POSIX-2001 and later require end-of-file to be sticky, that
+is, they require this function to act as if it reads end-of-file if
+@code{feof} would return nonzero.  However, on some systems this
+function attempts to read from the underlying file descriptor even if
+the stream's end-of-file indicator is set.  These systems include
+glibc and default Solaris.
+@item
 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
 upon failure.
 @end itemize
--- a/doc/posix-functions/getchar.texi
+++ b/doc/posix-functions/getchar.texi
@@ -18,6 +18,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+C99 and POSIX-2001 and later require end-of-file to be sticky, that
+is, they require this function to act as if it reads end-of-file if
+@code{feof} would return nonzero.  However, on some systems this
+function attempts to read from the underlying file descriptor even if
+the stream's end-of-file indicator is set.  These systems include
+glibc and default Solaris.
+@item
 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
 upon failure.
 @end itemize
--- a/doc/posix-functions/getcwd.texi
+++ b/doc/posix-functions/getcwd.texi
@@ -34,7 +34,7 @@
 @item
 This function does not handle long file names (greater than @code{PATH_MAX})
 correctly on some platforms:
-glibc on Linux 2.4.20, MacOS X 10.5, FreeBSD 6.4, NetBSD 5.1, OpenBSD 4.9, AIX 7.1.
+glibc on Linux 2.4.20, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.1, OpenBSD 4.9, AIX 7.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/getdate.texi
+++ b/doc/posix-functions/getdate.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
 
 Gnulib provides a module @code{parse-datetime} that contains a function
--- a/doc/posix-functions/getdate_err.texi
+++ b/doc/posix-functions/getdate_err.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/getdelim.texi
+++ b/doc/posix-functions/getdelim.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5.
 @item
 This function is missing a declaration on some platforms:
 BeOS.
--- a/doc/posix-functions/getline.texi
+++ b/doc/posix-functions/getline.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5.
 @item
 This function is missing a declaration on some platforms:
 AIX 7.1, BeOS.
--- a/doc/posix-functions/getlogin_r.texi
+++ b/doc/posix-functions/getlogin_r.texi
@@ -16,9 +16,6 @@
 on some platforms:
 HP-UX 11.
 @item
-This function has an incompatible declaration on some platforms:
-Solaris 11 2011-11 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined).
-@item
 This function returns a truncated result, instead of failing with error code
 @code{ERANGE}, when the buffer is not large enough, on some platforms:
 OSF/1 5.1.
@@ -27,6 +24,9 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+This function has an incompatible declaration on some platforms:
+Solaris 11 2011-11 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined).
+@item
 This function fails even when standard input is a tty on some platforms:
 HP-UX 11.11.
 @item
--- a/doc/posix-functions/getmsg.texi
+++ b/doc/posix-functions/getmsg.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/getopt.texi
+++ b/doc/posix-functions/getopt.texi
@@ -13,24 +13,20 @@
 Portability problems fixed by either Gnulib module @code{getopt-posix} or @code{getopt-gnu}:
 @itemize
 @item
-The @code{getopt} function keeps some internal state that cannot be explicitly
-reset on some platforms:
-mingw.
+This function is missing on some platforms:
+MSVC 9.
 @item
 The value of @code{optind} after a missing required argument is wrong
 on some platforms:
-MacOS 10.5, AIX 7.1.
+Mac OS X 10.5, AIX 7.1, mingw.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{getopt-gnu}:
 @itemize
 @item
-This function is missing on some platforms:
-MSVC 9.
-@item
 The function @code{getopt} does not support the @samp{+} flag in the options
 string on some platforms:
-MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11.
+Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11.
 @item
 The function @code{getopt} does not obey the combination of @samp{+}
 and @samp{:} flags in the options string on some platforms:
@@ -42,14 +38,18 @@
 @item
 The function @code{getopt} does not support options with optional arguments
 on some platforms:
-MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1,
+Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1,
 Solaris 11 2010-11, Cygwin 1.5.x.
 @item
 The function @code{getopt_long} is missing on some platforms:
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, MSVC 9, Interix 3.5.
 @item
+The function @code{getopt_long} does not support abbreviated long options
+where all disambiguations are equivalent on some platforms:
+OpenBSD 5.0.
+@item
 The function @code{getopt_long_only} is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, AIX 5.1, HP-UX 11, IRIX 6.5,
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, AIX 5.1, HP-UX 11, IRIX 6.5,
 OSF/1 5.1, Solaris 9, mingw, MSVC 9, Interix 3.5.
 @item
 This function crashes if the option string includes @code{W;} on some
--- a/doc/posix-functions/getpmsg.texi
+++ b/doc/posix-functions/getpmsg.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/getrusage.texi
+++ b/doc/posix-functions/getrusage.texi
@@ -4,18 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/getrusage.html}
 
-Gnulib module: ---
+Gnulib module: getrusage
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, Solaris 2.4, mingw, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-Minix 3.1.8, Solaris 2.4, mingw, MSVC 9.
-@item
 Many platforms don't fill in all the fields of @code{struct rusage} with
 meaningful values.
 @end itemize
--- a/doc/posix-functions/gettimeofday.texi
+++ b/doc/posix-functions/gettimeofday.texi
@@ -26,7 +26,7 @@
 @item
 On some platforms, @code{gettimeofday} clobbers the buffer in which
 @code{localtime} returns its result:
-MacOS X 10.0.
+Mac OS X 10.0.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/getutxent.texi
+++ b/doc/posix-functions/getutxent.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/getutxid.texi
+++ b/doc/posix-functions/getutxid.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/getutxline.texi
+++ b/doc/posix-functions/getutxline.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/glob.texi
+++ b/doc/posix-functions/glob.texi
@@ -12,8 +12,9 @@
 This function is missing on some platforms:
 IRIX 5.3, mingw, MSVC 9, BeOS.
 @item
-This function may list symbolic links to nonexistent files among the results,
-on some platforms.
+This function does not list symbolic links to nonexistent files among the results,
+on some platforms:
+glibc 2.14, AIX 7.1, HP-UX 11, Solaris 11 2011-11.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
 work correctly on huge directories larger than 2 GB.
--- a/doc/posix-functions/grantpt.texi
+++ b/doc/posix-functions/grantpt.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
@@ -20,5 +20,5 @@
 IRIX 5.3.
 @item
 This function reports success for invalid file descriptors on some platforms:
-Cygwin 1.7.9.
+OpenBSD, Cygwin 1.7.9, musl libc.
 @end itemize
--- a/doc/posix-functions/hypot.texi
+++ b/doc/posix-functions/hypot.texi
@@ -4,10 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/hypot.html}
 
-Gnulib module: hypot
+Gnulib module: hypot or hypot-ieee
+
+Portability problems fixed by either Gnulib module @code{hypot} or @code{hypot-ieee}:
+@itemize
+@end itemize
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{hypot-ieee}:
 @itemize
+@item
+When the arguments are mixed NaN and Infinity, this function returns a wrong
+value on some platforms:
+OSF/1 5.1, mingw, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/hypotf.texi
+++ b/doc/posix-functions/hypotf.texi
@@ -4,15 +4,26 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/hypotf.html}
 
-Gnulib module: ---
+Gnulib module: hypotf or hypotf-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{hypotf} or @code{hypotf-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 9, MSVC 9.
+@item
+This function produces wrong values on some platforms:
+NetBSD 5.1, OpenBSD 4.9.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{hypot-ieee}:
+@itemize
+@item
+When the arguments are mixed NaN and Infinity, this function returns a wrong
+value on some platforms:
+OSF/1 5.1, mingw, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 9, MSVC 9.
 @end itemize
--- a/doc/posix-functions/hypotl.texi
+++ b/doc/posix-functions/hypotl.texi
@@ -4,15 +4,26 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/hypotl.html}
 
-Gnulib module: ---
+Gnulib module: hypotl or hypotl-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{hypotl} or @code{hypotl-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
+@item
+This function produces very imprecise results on some platforms:
+OpenBSD 5.1/SPARC.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{hypotl-ieee}:
+@itemize
+@item
+When the arguments are mixed NaN and Infinity, this function returns a wrong
+value on some platforms:
+OSF/1 5.1, mingw, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/iconv.texi
+++ b/doc/posix-functions/iconv.texi
@@ -22,7 +22,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin, mingw, MSVC 9, BeOS,
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin, mingw, MSVC 9, BeOS,
 when GNU libiconv is not installed.
 @item
 This function was not correctly implemented in glibc versions before 2.2.
--- a/doc/posix-functions/iconv_close.texi
+++ b/doc/posix-functions/iconv_close.texi
@@ -16,6 +16,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin, mingw, MSVC 9, BeOS,
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin, mingw, MSVC 9, BeOS,
 when GNU libiconv is not installed.
 @end itemize
--- a/doc/posix-functions/iconv_open.texi
+++ b/doc/posix-functions/iconv_open.texi
@@ -35,7 +35,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin, mingw, MSVC 9, BeOS,
+Mac OS X 10.5, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin, mingw, MSVC 9, BeOS,
 when GNU libiconv is not installed.
 @item
 For some encodings A and B, this function cannot convert directly from A to B,
--- a/doc/posix-functions/ilogb.texi
+++ b/doc/posix-functions/ilogb.texi
@@ -4,15 +4,24 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/ilogb.html}
 
-Gnulib module: ---
+Gnulib module: ilogb
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, IRIX 5.3, MSVC 9.
+@item
+This function returns a wrong result for a zero argument on some platforms:
+OpenBSD 4.9, AIX 5.1.
+@item
+This function returns a wrong result for an infinite argument on some platforms:
+NetBSD 5.1, OpenBSD 4.9.
+@item
+This function returns a wrong result for a NaN argument on some platforms:
+OpenBSD 4.9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, IRIX 5.3, MSVC 9.
 @end itemize
--- a/doc/posix-functions/ilogbf.texi
+++ b/doc/posix-functions/ilogbf.texi
@@ -4,15 +4,21 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/ilogbf.html}
 
-Gnulib module: ---
+Gnulib module: ilogbf
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, MSVC 9.
+@item
+This function returns a wrong result for a zero argument on some platforms:
+OpenBSD 4.9.
+@item
+This function returns a wrong result for an infinite argument on some platforms:
+NetBSD 5.1, OpenBSD 4.9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, MSVC 9.
 @end itemize
--- a/doc/posix-functions/ilogbl.texi
+++ b/doc/posix-functions/ilogbl.texi
@@ -4,15 +4,15 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/ilogbl.html}
 
-Gnulib module: ---
+Gnulib module: ilogbl
 
 Portability problems fixed by Gnulib:
 @itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
 @item
 This function is missing on some platforms:
 FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/inet_ntoa.texi
+++ b/doc/posix-functions/inet_ntoa.texi
@@ -24,5 +24,5 @@
 undefined string.
 @end itemize
 
-Note: @code{inet_ntoa} is specific for @acronym{IPv4} addresses.
+Note: @code{inet_ntoa} is specific for IPv4 addresses.
 A protocol independent function is @code{inet_ntop}.
--- a/doc/posix-functions/initstate.texi
+++ b/doc/posix-functions/initstate.texi
@@ -4,15 +4,15 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/initstate.html}
 
-Gnulib module: ---
+Gnulib module: random
 
 Portability problems fixed by Gnulib:
 @itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
 @item
 This function is missing on some platforms:
 Solaris 2.4, mingw, MSVC 9.
 @end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/isalnum_l.texi
+++ b/doc/posix-functions/isalnum_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isalpha_l.texi
+++ b/doc/posix-functions/isalpha_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isastream.texi
+++ b/doc/posix-functions/isastream.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isblank_l.texi
+++ b/doc/posix-functions/isblank_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/iscntrl_l.texi
+++ b/doc/posix-functions/iscntrl_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isdigit_l.texi
+++ b/doc/posix-functions/isdigit_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isfinite.texi
+++ b/doc/posix-functions/isfinite.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This macro is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5.
+Mac OS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5.
 @item
 This macro incorrectly yields true for some @samp{double} arguments, on some
 platforms:
--- a/doc/posix-functions/isgraph_l.texi
+++ b/doc/posix-functions/isgraph_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isgreater.texi
+++ b/doc/posix-functions/isgreater.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isgreaterequal.texi
+++ b/doc/posix-functions/isgreaterequal.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isless.texi
+++ b/doc/posix-functions/isless.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/islessequal.texi
+++ b/doc/posix-functions/islessequal.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/islessgreater.texi
+++ b/doc/posix-functions/islessgreater.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/islower_l.texi
+++ b/doc/posix-functions/islower_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isnormal.texi
+++ b/doc/posix-functions/isnormal.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5.
+Mac OS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5.
 @end itemize
--- a/doc/posix-functions/isprint_l.texi
+++ b/doc/posix-functions/isprint_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/ispunct_l.texi
+++ b/doc/posix-functions/ispunct_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isspace_l.texi
+++ b/doc/posix-functions/isspace_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isunordered.texi
+++ b/doc/posix-functions/isunordered.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
+Mac OS X 10.5, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/isupper_l.texi
+++ b/doc/posix-functions/isupper_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/iswalnum_l.texi
+++ b/doc/posix-functions/iswalnum_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswalpha_l.texi
+++ b/doc/posix-functions/iswalpha_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswblank_l.texi
+++ b/doc/posix-functions/iswblank_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswcntrl_l.texi
+++ b/doc/posix-functions/iswcntrl_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswctype_l.texi
+++ b/doc/posix-functions/iswctype_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswdigit_l.texi
+++ b/doc/posix-functions/iswdigit_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswgraph_l.texi
+++ b/doc/posix-functions/iswgraph_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswlower_l.texi
+++ b/doc/posix-functions/iswlower_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswprint_l.texi
+++ b/doc/posix-functions/iswprint_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswpunct_l.texi
+++ b/doc/posix-functions/iswpunct_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswspace_l.texi
+++ b/doc/posix-functions/iswspace_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswupper_l.texi
+++ b/doc/posix-functions/iswupper_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/iswxdigit_l.texi
+++ b/doc/posix-functions/iswxdigit_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/isxdigit_l.texi
+++ b/doc/posix-functions/isxdigit_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/lchown.texi
+++ b/doc/posix-functions/lchown.texi
@@ -21,7 +21,7 @@
 This function is missing on some platforms; however, the replacement
 fails on symlinks if @code{chown} is supported, and fails altogether
 with @code{ENOSYS} otherwise:
-MacOS X 10.3, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/ldexpl.texi
+++ b/doc/posix-functions/ldexpl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function has no prototype in @code{<math.h>} on some platforms:
-MacOS X.
+Mac OS X.
 @item
 This function does not work on finite numbers on some platforms:
 AIX 5.1.
--- a/doc/posix-functions/linkat.texi
+++ b/doc/posix-functions/linkat.texi
@@ -10,13 +10,16 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @item
 This function fails to reject trailing slashes on non-directories on
 some platforms:
 AIX 7.1, Solaris 11 2011-11.
+@item
+This functions does not support @code{AT_SYMLINK_FOLLOW} on some platforms:
+Linux kernel 2.6.17.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/llround.texi
+++ b/doc/posix-functions/llround.texi
@@ -14,5 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5.
+FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 4.0,
+Solaris 9, Cygwin 1.7.7, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/posix-functions/llroundf.texi
+++ b/doc/posix-functions/llroundf.texi
@@ -14,5 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5.
+FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5,
+OSF/1 4.0, Solaris 9, Cygwin 1.7.7, MSVC 9, Interix 3.5.
 @end itemize
--- a/doc/posix-functions/localeconv.texi
+++ b/doc/posix-functions/localeconv.texi
@@ -4,10 +4,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/localeconv.html}
 
-Gnulib module: ---
+Gnulib module: localeconv
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+The @code{struct lconv} type does not contain any members on some platforms:
+Android.
+@item
+The @code{struct lconv} type does not contain the members
+@code{int_p_cs_precedes}, @code{int_p_sign_posn}, @code{int_p_sep_by_space},
+@code{int_n_cs_precedes}, @code{int_n_sign_posn}, @code{int_n_sep_by_space}
+on some platforms:
+glibc, OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/log.texi
+++ b/doc/posix-functions/log.texi
@@ -4,10 +4,20 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log.html}
 
-Gnulib module: log
+Gnulib module: log or log-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log} or @code{log-ieee}:
 @itemize
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{log-ieee}:
+@itemize
+@item
+This function returns a wrong value for a negative argument on some platforms:
+NetBSD 5.1, Solaris 11 2011-11.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/log10.texi
+++ b/doc/posix-functions/log10.texi
@@ -4,10 +4,20 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log10.html}
 
-Gnulib module: log10
+Gnulib module: log10 or log10-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log10} or @code{log10-ieee}:
 @itemize
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{log10-ieee}:
+@itemize
+@item
+This function returns a wrong value for a negative argument on some platforms:
+NetBSD 5.1, Solaris 11 2011-11.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/log10f.texi
+++ b/doc/posix-functions/log10f.texi
@@ -4,9 +4,9 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log10f.html}
 
-Gnulib module: log10f
+Gnulib module: log10f or log10f-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log10f} or @code{log10f-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
@@ -14,6 +14,16 @@
 @item
 This function is only defined as a macro with arguments on some platforms:
 MSVC 9.
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{log10f-ieee}:
+@itemize
+@item
+This function returns a wrong value for a negative argument on some platforms:
+NetBSD 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/log10l.texi
+++ b/doc/posix-functions/log10l.texi
@@ -4,15 +4,30 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log10l.html}
 
-Gnulib module: ---
+Gnulib module: log10l
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, older IRIX 6.5, Solaris 9, Cygwin, Interix 3.5, BeOS.
+@item
+This function is only defined as a macro with arguments on some platforms:
+MSVC 9.
+@item
+This function is not declared and does not work on some platforms:
+AIX 5.1.
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
+@item
+This function returns an unnormalized negative infinity for a minus zero argument on some platforms:
+IRIX 6.5.
+@item
+This function returns an unnormalized positive infinity for a positive infinite argument on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/log1p.texi
+++ b/doc/posix-functions/log1p.texi
@@ -4,15 +4,22 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log1p.html}
 
-Gnulib module: log1p
+Gnulib module: log1p or log1p-ieee
 
-Portability problems fixed by Gnulib:
-@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log1p} or @code{log1p-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
 Minix 3.1.8, MSVC 9.
 @end itemize
+
+Portability problems fixed by Gnulib module @code{log1p-ieee}:
+@itemize
+@item
+This function has problems when the argument is minus zero on some platforms:
+AIX 7.1, HP-UX 11.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/log1pf.texi
+++ b/doc/posix-functions/log1pf.texi
@@ -4,15 +4,25 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log1pf.html}
 
-Gnulib module: ---
+Gnulib module: log1pf or log1pf-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log1pf} or @code{log1pf-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 9, MSVC 9.
+@item
+This function returns a wrong value for the argument -1.0f on some platforms:
+IRIX 6.5.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{log1pf-ieee}:
+@itemize
+@item
+This function has problems when the argument is minus zero on some platforms:
+OpenBSD 4.9, AIX 7.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 9, MSVC 9.
 @end itemize
--- a/doc/posix-functions/log1pl.texi
+++ b/doc/posix-functions/log1pl.texi
@@ -4,15 +4,22 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log1pl.html}
 
-Gnulib module: ---
+Gnulib module: log1pl or log1pl-ieee
 
-Portability problems fixed by Gnulib:
-@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log1pl} or @code{log1pl-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
 FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
+
+Portability problems fixed by Gnulib module @code{log1pl-ieee}:
+@itemize
+@item
+This function has problems when the argument is minus zero on some platforms:
+AIX 7.1, IRIX 6.5.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/log2.texi
+++ b/doc/posix-functions/log2.texi
@@ -4,19 +4,35 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log2.html}
 
-Gnulib module: ---
+Gnulib module: log2 or log2-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log2} or @code{log2-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, older IRIX 6.5,
+Solaris 9, MSVC 9, Interix 3.5.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function is only provided as a macro on some platforms:
+Cygwin 1.5.x.
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
+@item
+This function returns slightly wrong values for exact powers of 2 on some platforms:
+Cygwin 1.7.9.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{log2-ieee}:
+@itemize
+@item
+This function returns a wrong value for a negative argument on some platforms:
+NetBSD 5.1, Solaris 11 2011-11.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5,
-Solaris 9, MSVC 9, Interix 3.5.
-@item
-This function is only provided as a macro on some platforms:
-Cygwin 1.5.x.
 @end itemize
--- a/doc/posix-functions/log2f.texi
+++ b/doc/posix-functions/log2f.texi
@@ -4,19 +4,35 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log2f.html}
 
-Gnulib module: ---
+Gnulib module: log2f or log2f-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{log2f} or @code{log2f-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, older IRIX 6.5, Solaris 9, MSVC 9,
+Interix 3.5.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function is only provided as a macro on some platforms:
+Cygwin 1.5.x.
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
+@item
+This function returns slightly wrong values for exact powers of 2 on some platforms:
+Cygwin 1.7.9.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{log2f-ieee}:
+@itemize
+@item
+This function returns a wrong value for a negative argument on some platforms:
+NetBSD 5.1, Solaris 11 2011-11.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9,
-Interix 3.5.
-@item
-This function is only provided as a macro on some platforms:
-Cygwin 1.5.x.
 @end itemize
--- a/doc/posix-functions/log2l.texi
+++ b/doc/posix-functions/log2l.texi
@@ -4,15 +4,21 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/log2l.html}
 
-Gnulib module: ---
+Gnulib module: log2l
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/logb.texi
+++ b/doc/posix-functions/logb.texi
@@ -9,13 +9,16 @@
 Portability problems fixed by Gnulib:
 @itemize
 @item
+This function is missing on some platforms:
+Minix 3.1.8, MSVC 9.
+@item
 This function is missing a declaration on some platforms:
 Cygwin 1.5.x.
+@item
+This function produces wrong results for subnormal numbers on some platforms:
+glibc 2.11/ppc, glibc 2.7/sparc, glibc 2.7/hppa, Solaris 11 2011-11, Cygwin 1.5.x.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, MSVC 9.
 @end itemize
--- a/doc/posix-functions/logbf.texi
+++ b/doc/posix-functions/logbf.texi
@@ -4,15 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/logbf.html}
 
-Gnulib module: ---
+Gnulib module: logbf
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, MSVC 9.
+@item
+This function produces wrong results for subnormal numbers on some platforms:
+glibc 2.11/ppc, glibc 2.7/sparc, glibc 2.7/hppa, Solaris 11 2011-11.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, MSVC 9.
 @end itemize
--- a/doc/posix-functions/logbl.texi
+++ b/doc/posix-functions/logbl.texi
@@ -4,15 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/logbl.html}
 
-Gnulib module: ---
+Gnulib module: logbl
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
+@item
+This function produces wrong results for subnormal numbers on some platforms:
+glibc 2.11/ppc, glibc 2.7/sparc, glibc 2.7/hppa, Solaris 11 2011-11.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/logf.texi
+++ b/doc/posix-functions/logf.texi
@@ -4,9 +4,9 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/logf.html}
 
-Gnulib module: logf
+Gnulib module: logf or logf-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{logf} or @code{logf-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
@@ -14,6 +14,16 @@
 @item
 This function is only defined as a macro with arguments on some platforms:
 MSVC 9.
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{logf-ieee}:
+@itemize
+@item
+This function returns a wrong value for a negative argument on some platforms:
+NetBSD 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/logl.texi
+++ b/doc/posix-functions/logl.texi
@@ -16,10 +16,13 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @item
 This function returns wrong results on some platforms:
 glibc 2.7 on Linux/SPARC64.
+@item
+This function returns a wrong value for a minus zero argument on some platforms:
+OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
new file mode 100644
--- /dev/null
+++ b/doc/posix-functions/mbrtoc16.texi
@@ -0,0 +1,16 @@
+@node mbrtoc16
+@section @code{mbrtoc16}
+@findex mbrtoc16
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
new file mode 100644
--- /dev/null
+++ b/doc/posix-functions/mbrtoc32.texi
@@ -0,0 +1,16 @@
+@node mbrtoc32
+@section @code{mbrtoc32}
+@findex mbrtoc32
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/posix-functions/mbsnrtowcs.texi
+++ b/doc/posix-functions/mbsnrtowcs.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2,
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2,
 HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
@@ -22,7 +22,7 @@
 @item
 The specification is not clear about whether this function should update the
 conversion state when the first argument (the destination pointer) is NULL.
-The glibc, MacOS X, FreeBSD implementations do update the state in this case.
+The glibc, Mac OS X, FreeBSD implementations do update the state in this case.
 For portability, when passing a NULL destination argument, it is best to pass
 a pointer to a temporary copy of the conversion state.
 @end itemize
--- a/doc/posix-functions/mbsrtowcs.texi
+++ b/doc/posix-functions/mbsrtowcs.texi
@@ -27,7 +27,7 @@
 @item
 The specification is not clear about whether this function should update the
 conversion state when the first argument (the destination pointer) is NULL.
-The glibc implementation does not update the state in this case; the MacOS X
+The glibc implementation does not update the state in this case; the Mac OS X
 and FreeBSD implementations do.
 For portability, when passing a NULL destination argument, it is best to pass
 a pointer to a temporary copy of the conversion state.
--- a/doc/posix-functions/mkdirat.texi
+++ b/doc/posix-functions/mkdirat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @end itemize
--- a/doc/posix-functions/mkfifoat.texi
+++ b/doc/posix-functions/mkfifoat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9,
 Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
--- a/doc/posix-functions/mknodat.texi
+++ b/doc/posix-functions/mknodat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9,
 Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
--- a/doc/posix-functions/mkstemp.texi
+++ b/doc/posix-functions/mkstemp.texi
@@ -14,7 +14,7 @@
 @item
 This function is declared in @code{<unistd.h>} instead of @code{<stdlib.h>}
 on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @item
 On some platforms (HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a silly
 limit that it can create no more than 26 files from a given template.  On
--- a/doc/posix-functions/modf.texi
+++ b/doc/posix-functions/modf.texi
@@ -4,10 +4,20 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/modf.html}
 
-Gnulib module: modf
+Gnulib module: modf or modf-ieee
+
+Portability problems fixed by either Gnulib module @code{modf} or @code{modf-ieee}:
+@itemize
+@end itemize
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by Gnulib module @code{modf-ieee}:
 @itemize
+@item
+This function has problems with a NaN argument on some platforms:
+NetBSD 5.1, Cygwin.
+@item
+This function has problems with infinite arguments on some platforms:
+FreeBSD 6.4, OpenBSD 4.9, IRIX 6.5, OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/modff.texi
+++ b/doc/posix-functions/modff.texi
@@ -4,9 +4,9 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/modff.html}
 
-Gnulib module: modff
+Gnulib module: modff or modff-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{modff} or @code{modff-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
@@ -16,6 +16,16 @@
 MSVC 9.
 @end itemize
 
+Portability problems fixed by Gnulib module @code{modff-ieee}:
+@itemize
+@item
+This function has problems with a NaN argument on some platforms:
+NetBSD 5.1, OpenBSD 4.9, Solaris 9, Cygwin.
+@item
+This function has problems with infinite arguments on some platforms:
+IRIX 6.5, OSF/1 5.1, mingw.
+@end itemize
+
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
--- a/doc/posix-functions/modfl.texi
+++ b/doc/posix-functions/modfl.texi
@@ -4,13 +4,9 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/modfl.html}
 
-Gnulib module: ---
+Gnulib module: modfl or modfl-ieee
 
-Portability problems fixed by Gnulib:
-@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{modfl} or @code{modfl-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
@@ -19,3 +15,14 @@
 This function is only defined as a macro with arguments on some platforms:
 MSVC 9.
 @end itemize
+
+Portability problems fixed by Gnulib module @code{modfl-ieee}:
+@itemize
+@item
+This function has problems with infinite arguments on some platforms:
+IRIX 6.5, OSF/1 5.1, mingw.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/mq_close.texi
+++ b/doc/posix-functions/mq_close.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_getattr.texi
+++ b/doc/posix-functions/mq_getattr.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_notify.texi
+++ b/doc/posix-functions/mq_notify.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_open.texi
+++ b/doc/posix-functions/mq_open.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_receive.texi
+++ b/doc/posix-functions/mq_receive.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_send.texi
+++ b/doc/posix-functions/mq_send.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_setattr.texi
+++ b/doc/posix-functions/mq_setattr.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_timedreceive.texi
+++ b/doc/posix-functions/mq_timedreceive.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_timedsend.texi
+++ b/doc/posix-functions/mq_timedsend.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/mq_unlink.texi
+++ b/doc/posix-functions/mq_unlink.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3,
 Solaris 2.4, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/newlocale.texi
+++ b/doc/posix-functions/newlocale.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/nftw.texi
+++ b/doc/posix-functions/nftw.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
 correctly report the size of files or block devices larger than 2 GB.
--- a/doc/posix-functions/nl_langinfo_l.texi
+++ b/doc/posix-functions/nl_langinfo_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/open_memstream.texi
+++ b/doc/posix-functions/open_memstream.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/open_wmemstream.texi
+++ b/doc/posix-functions/open_wmemstream.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
--- a/doc/posix-functions/openat.texi
+++ b/doc/posix-functions/openat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @item
--- a/doc/posix-functions/optarg.texi
+++ b/doc/posix-functions/optarg.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, IRIX 6.5, OSF/1 5.1, MSVC 9.
+Mac OS X 10.5, IRIX 6.5, OSF/1 5.1, MSVC 9.
 @end itemize
--- a/doc/posix-functions/optopt.texi
+++ b/doc/posix-functions/optopt.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, IRIX 6.5, OSF/1 5.1, MSVC 9.
+Mac OS X 10.5, IRIX 6.5, OSF/1 5.1, MSVC 9.
 @end itemize
--- a/doc/posix-functions/perror.texi
+++ b/doc/posix-functions/perror.texi
@@ -15,7 +15,7 @@
 @item
 This function treats @code{errno} of 0 like failure, although POSIX
 requires that the message declare it as a success, on some platforms:
-FreeBSD 8.2, OpenBSD 4.7, MacOS X 10.5.
+FreeBSD 8.2, OpenBSD 4.7, Mac OS X 10.5.
 @item
 This function clobbers the @code{strerror} buffer on some platforms:
 Cygwin 1.7.9.
--- a/doc/posix-functions/poll.texi
+++ b/doc/posix-functions/poll.texi
@@ -10,13 +10,25 @@
 @itemize
 @item
 This function is missing on some platforms:
-mingw, MSVC 9, BeOS.
+mingw, MSVC 9, BeOS, HP NonStop.
 @item
 This function doesn't work on special files like @file{/dev/null} and ttys like
 @file{/dev/tty} on some platforms:
-MacOS X 10.4.0, AIX 5.3.
+Mac OS X 10.4.0, AIX 5.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+Under BeOS, Gnulib's @code{poll} replacement can only be called on descriptors
+created by the @code{socket} function, not on regular file descriptors.
+
+@item
+Under Windows, when passing a pipe, Gnulib's @code{poll} replacement might
+return 0 even before the timeout has passed.  Programs using it with pipes can
+thus busy wait.
+
+@item
+Under HP NonStop, file descriptors other than sockets do not support
+POLLHUP; they will return a "readable" status instead.
 @end itemize
--- a/doc/posix-functions/popen.texi
+++ b/doc/posix-functions/popen.texi
@@ -20,6 +20,9 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+On native Windows platforms, this functions terminates the current process
+with exit code 127 if the environment variable @code{COMSPEC} is not set.
+@item
 Some platforms mistakenly set the close-on-exec bit, then if it is
 cleared by the application, the platform then leaks file descriptors
 from earlier @code{popen} calls into subsequent @code{popen} children:
--- a/doc/posix-functions/posix_fadvise.texi
+++ b/doc/posix-functions/posix_fadvise.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
--- a/doc/posix-functions/posix_fallocate.texi
+++ b/doc/posix-functions/posix_fallocate.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On platforms where @code{off_t} is a 32-bit type, this function may not
--- a/doc/posix-functions/posix_mem_offset.texi
+++ b/doc/posix-functions/posix_mem_offset.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_memalign.texi
+++ b/doc/posix-functions/posix_memalign.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/posix-functions/posix_openpt.texi
+++ b/doc/posix-functions/posix_openpt.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1,
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1,
 Solaris 9, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 However, the replacement may fail with @code{ENOSYS} or @code{ENOENT} on
 some platforms.
--- a/doc/posix-functions/posix_spawn.texi
+++ b/doc/posix-functions/posix_spawn.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 When this function fails, it causes the stdio buffer contents to be output
 twice on some platforms:
--- a/doc/posix-functions/posix_spawn_file_actions_addclose.texi
+++ b/doc/posix-functions/posix_spawn_file_actions_addclose.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function does not reject a too large file descriptor on some platforms:
 Solaris 11 2011-11.
--- a/doc/posix-functions/posix_spawn_file_actions_adddup2.texi
+++ b/doc/posix-functions/posix_spawn_file_actions_adddup2.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function does not reject a too large file descriptor on some platforms:
 Solaris 11 2011-11.
--- a/doc/posix-functions/posix_spawn_file_actions_addopen.texi
+++ b/doc/posix-functions/posix_spawn_file_actions_addopen.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function does not reject a too large file descriptor on some platforms:
 Solaris 11 2011-11.
--- a/doc/posix-functions/posix_spawn_file_actions_destroy.texi
+++ b/doc/posix-functions/posix_spawn_file_actions_destroy.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawn_file_actions_init.texi
+++ b/doc/posix-functions/posix_spawn_file_actions_init.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_destroy.texi
+++ b/doc/posix-functions/posix_spawnattr_destroy.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_getflags.texi
+++ b/doc/posix-functions/posix_spawnattr_getflags.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_getpgroup.texi
+++ b/doc/posix-functions/posix_spawnattr_getpgroup.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_getschedparam.texi
+++ b/doc/posix-functions/posix_spawnattr_getschedparam.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_getschedpolicy.texi
+++ b/doc/posix-functions/posix_spawnattr_getschedpolicy.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_getsigdefault.texi
+++ b/doc/posix-functions/posix_spawnattr_getsigdefault.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_getsigmask.texi
+++ b/doc/posix-functions/posix_spawnattr_getsigmask.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_init.texi
+++ b/doc/posix-functions/posix_spawnattr_init.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_setflags.texi
+++ b/doc/posix-functions/posix_spawnattr_setflags.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_setpgroup.texi
+++ b/doc/posix-functions/posix_spawnattr_setpgroup.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_setschedparam.texi
+++ b/doc/posix-functions/posix_spawnattr_setschedparam.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_setschedpolicy.texi
+++ b/doc/posix-functions/posix_spawnattr_setschedpolicy.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_setsigdefault.texi
+++ b/doc/posix-functions/posix_spawnattr_setsigdefault.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnattr_setsigmask.texi
+++ b/doc/posix-functions/posix_spawnattr_setsigmask.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/posix_spawnp.texi
+++ b/doc/posix-functions/posix_spawnp.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 When this function fails, it causes the stdio buffer contents to be output
 twice on some platforms:
--- a/doc/posix-functions/posix_trace_attr_destroy.texi
+++ b/doc/posix-functions/posix_trace_attr_destroy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getclockres.texi
+++ b/doc/posix-functions/posix_trace_attr_getclockres.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getcreatetime.texi
+++ b/doc/posix-functions/posix_trace_attr_getcreatetime.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getgenversion.texi
+++ b/doc/posix-functions/posix_trace_attr_getgenversion.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getinherited.texi
+++ b/doc/posix-functions/posix_trace_attr_getinherited.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getlogfullpolicy.texi
+++ b/doc/posix-functions/posix_trace_attr_getlogfullpolicy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getlogsize.texi
+++ b/doc/posix-functions/posix_trace_attr_getlogsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getmaxdatasize.texi
+++ b/doc/posix-functions/posix_trace_attr_getmaxdatasize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getmaxsystemeventsize.texi
+++ b/doc/posix-functions/posix_trace_attr_getmaxsystemeventsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getmaxusereventsize.texi
+++ b/doc/posix-functions/posix_trace_attr_getmaxusereventsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getname.texi
+++ b/doc/posix-functions/posix_trace_attr_getname.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getstreamfullpolicy.texi
+++ b/doc/posix-functions/posix_trace_attr_getstreamfullpolicy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_getstreamsize.texi
+++ b/doc/posix-functions/posix_trace_attr_getstreamsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_init.texi
+++ b/doc/posix-functions/posix_trace_attr_init.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_setinherited.texi
+++ b/doc/posix-functions/posix_trace_attr_setinherited.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_setlogfullpolicy.texi
+++ b/doc/posix-functions/posix_trace_attr_setlogfullpolicy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_setlogsize.texi
+++ b/doc/posix-functions/posix_trace_attr_setlogsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_setmaxdatasize.texi
+++ b/doc/posix-functions/posix_trace_attr_setmaxdatasize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_setname.texi
+++ b/doc/posix-functions/posix_trace_attr_setname.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_setstreamfullpolicy.texi
+++ b/doc/posix-functions/posix_trace_attr_setstreamfullpolicy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_attr_setstreamsize.texi
+++ b/doc/posix-functions/posix_trace_attr_setstreamsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_clear.texi
+++ b/doc/posix-functions/posix_trace_clear.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_close.texi
+++ b/doc/posix-functions/posix_trace_close.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_create.texi
+++ b/doc/posix-functions/posix_trace_create.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_create_withlog.texi
+++ b/doc/posix-functions/posix_trace_create_withlog.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_event.texi
+++ b/doc/posix-functions/posix_trace_event.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventid_equal.texi
+++ b/doc/posix-functions/posix_trace_eventid_equal.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventid_get_name.texi
+++ b/doc/posix-functions/posix_trace_eventid_get_name.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventid_open.texi
+++ b/doc/posix-functions/posix_trace_eventid_open.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventset_add.texi
+++ b/doc/posix-functions/posix_trace_eventset_add.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventset_del.texi
+++ b/doc/posix-functions/posix_trace_eventset_del.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventset_empty.texi
+++ b/doc/posix-functions/posix_trace_eventset_empty.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventset_fill.texi
+++ b/doc/posix-functions/posix_trace_eventset_fill.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventset_ismember.texi
+++ b/doc/posix-functions/posix_trace_eventset_ismember.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventtypelist_getnext_id.texi
+++ b/doc/posix-functions/posix_trace_eventtypelist_getnext_id.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_eventtypelist_rewind.texi
+++ b/doc/posix-functions/posix_trace_eventtypelist_rewind.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_flush.texi
+++ b/doc/posix-functions/posix_trace_flush.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_get_attr.texi
+++ b/doc/posix-functions/posix_trace_get_attr.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_get_filter.texi
+++ b/doc/posix-functions/posix_trace_get_filter.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_get_status.texi
+++ b/doc/posix-functions/posix_trace_get_status.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_getnext_event.texi
+++ b/doc/posix-functions/posix_trace_getnext_event.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_open.texi
+++ b/doc/posix-functions/posix_trace_open.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_rewind.texi
+++ b/doc/posix-functions/posix_trace_rewind.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_set_filter.texi
+++ b/doc/posix-functions/posix_trace_set_filter.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_shutdown.texi
+++ b/doc/posix-functions/posix_trace_shutdown.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_start.texi
+++ b/doc/posix-functions/posix_trace_start.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_stop.texi
+++ b/doc/posix-functions/posix_trace_stop.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_timedgetnext_event.texi
+++ b/doc/posix-functions/posix_trace_timedgetnext_event.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_trid_eventid_open.texi
+++ b/doc/posix-functions/posix_trace_trid_eventid_open.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_trace_trygetnext_event.texi
+++ b/doc/posix-functions/posix_trace_trygetnext_event.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_typed_mem_get_info.texi
+++ b/doc/posix-functions/posix_typed_mem_get_info.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/posix_typed_mem_open.texi
+++ b/doc/posix-functions/posix_typed_mem_open.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/printf.texi
+++ b/doc/posix-functions/printf.texi
@@ -20,9 +20,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -52,7 +56,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -64,7 +68,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{stdio} or @code{printf-posix}, together with module @code{nonblocking}:
--- a/doc/posix-functions/pselect.texi
+++ b/doc/posix-functions/pselect.texi
@@ -11,6 +11,10 @@
 @item
 This function is missing on some platforms:
 OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw, MSVC 9, Interix 3.5, BeOS.
+@item
+On some platforms, this function fails to detect invalid fds with
+EBADF, but only if they lie beyond the current maximum open fd:
+FreeBSD 8.2.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/psiginfo.texi
+++ b/doc/posix-functions/psiginfo.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.9, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1,
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1,
 HP-UX 11, OSF/1 5.1, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_atfork.texi
+++ b/doc/posix-functions/pthread_atfork.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_attr_getguardsize.texi
+++ b/doc/posix-functions/pthread_attr_getguardsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-OpenBSD 3.8, Minix 3.1.8, HP-UX 11, OSF/1 4.0, Solaris 2.6, Cygwin, mingw, MSVC 9, BeOS.
+OpenBSD 3.8, Minix 3.1.8, HP-UX 11, OSF/1 4.0, Solaris 2.6, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_attr_getstack.texi
+++ b/doc/posix-functions/pthread_attr_getstack.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_attr_setguardsize.texi
+++ b/doc/posix-functions/pthread_attr_setguardsize.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-OpenBSD 3.8, Minix 3.1.8, HP-UX 11, OSF/1 4.0, Solaris 2.6, Cygwin, mingw, MSVC 9, BeOS.
+OpenBSD 3.8, Minix 3.1.8, HP-UX 11, OSF/1 4.0, Solaris 2.6, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_attr_setstack.texi
+++ b/doc/posix-functions/pthread_attr_setstack.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Minix 3.1.8, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_barrier_destroy.texi
+++ b/doc/posix-functions/pthread_barrier_destroy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_barrier_init.texi
+++ b/doc/posix-functions/pthread_barrier_init.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_barrier_wait.texi
+++ b/doc/posix-functions/pthread_barrier_wait.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_barrierattr_destroy.texi
+++ b/doc/posix-functions/pthread_barrierattr_destroy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_barrierattr_getpshared.texi
+++ b/doc/posix-functions/pthread_barrierattr_getpshared.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_barrierattr_init.texi
+++ b/doc/posix-functions/pthread_barrierattr_init.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_barrierattr_setpshared.texi
+++ b/doc/posix-functions/pthread_barrierattr_setpshared.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_cleanup_pop.texi
+++ b/doc/posix-functions/pthread_cleanup_pop.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, NetBSD 5.0, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, NetBSD 5.0, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_cleanup_push.texi
+++ b/doc/posix-functions/pthread_cleanup_push.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, NetBSD 5.0, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, NetBSD 5.0, Minix 3.1.8, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_condattr_getclock.texi
+++ b/doc/posix-functions/pthread_condattr_getclock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_condattr_setclock.texi
+++ b/doc/posix-functions/pthread_condattr_setclock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_getcpuclockid.texi
+++ b/doc/posix-functions/pthread_getcpuclockid.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_mutex_consistent.texi
+++ b/doc/posix-functions/pthread_mutex_consistent.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_mutex_timedlock.texi
+++ b/doc/posix-functions/pthread_mutex_timedlock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_mutexattr_getrobust.texi
+++ b/doc/posix-functions/pthread_mutexattr_getrobust.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_mutexattr_setrobust.texi
+++ b/doc/posix-functions/pthread_mutexattr_setrobust.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.11, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.11, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_rwlock_timedrdlock.texi
+++ b/doc/posix-functions/pthread_rwlock_timedrdlock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_rwlock_timedwrlock.texi
+++ b/doc/posix-functions/pthread_rwlock_timedwrlock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_setschedprio.texi
+++ b/doc/posix-functions/pthread_setschedprio.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_sigmask.texi
+++ b/doc/posix-functions/pthread_sigmask.texi
@@ -14,7 +14,7 @@
 @item
 This function is declared in @code{<pthread.h>} instead of @code{<signal.h>}
 on some platforms:
-MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6.
+Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6.
 @item
 This function does nothing and always returns 0 in programs that are not
 linked with @code{-lpthread} on some platforms:
--- a/doc/posix-functions/pthread_spin_destroy.texi
+++ b/doc/posix-functions/pthread_spin_destroy.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_spin_init.texi
+++ b/doc/posix-functions/pthread_spin_init.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_spin_lock.texi
+++ b/doc/posix-functions/pthread_spin_lock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_spin_trylock.texi
+++ b/doc/posix-functions/pthread_spin_trylock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/pthread_spin_unlock.texi
+++ b/doc/posix-functions/pthread_spin_unlock.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.7.9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/ptsname.texi
+++ b/doc/posix-functions/ptsname.texi
@@ -10,7 +10,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+@item
+This function fails to set errno on failure on some platforms:
+FreeBSD 8.2.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/putmsg.texi
+++ b/doc/posix-functions/putmsg.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/putpmsg.texi
+++ b/doc/posix-functions/putpmsg.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/pututxline.texi
+++ b/doc/posix-functions/pututxline.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/posix-functions/quick_exit.texi
@@ -0,0 +1,16 @@
+@node quick_exit
+@section @code{quick_exit}
+@findex quick_exit
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This function is missing on all non-glibc platforms:
+glibc 2.9, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/posix-functions/random.texi
+++ b/doc/posix-functions/random.texi
@@ -4,15 +4,15 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/random.html}
 
-Gnulib module: ---
+Gnulib module: random
 
 Portability problems fixed by Gnulib:
 @itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
 @item
 This function is missing on some platforms:
 Solaris 2.4, mingw, MSVC 9.
 @end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/read.texi
+++ b/doc/posix-functions/read.texi
@@ -23,7 +23,7 @@
 @item
 This function may fail with error @code{EINTR}, even in programs that don't
 install any signal handlers, on some platforms:
-MacOS X 10.5.
+Mac OS X 10.5.
 @end itemize
 
 For handling @code{EINTR}, Gnulib provides a module @samp{safe-read} with a
--- a/doc/posix-functions/readlinkat.texi
+++ b/doc/posix-functions/readlinkat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @end itemize
--- a/doc/posix-functions/realpath.texi
+++ b/doc/posix-functions/realpath.texi
@@ -14,7 +14,7 @@
 @item
 This function does not allow for a NULL @samp{resolved} parameter on
 some platforms:
-MacOS X 10.5, FreeBSD 6.4, OpenBSD 4.4, Solaris 10.
+Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.4, Solaris 10.
 @item
 This function does not always return an absolute path on some
 platforms:
--- a/doc/posix-functions/remainder.texi
+++ b/doc/posix-functions/remainder.texi
@@ -4,13 +4,9 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/remainder.html}
 
-Gnulib module: remainder
+Gnulib module: remainder or remainder-ieee
 
-Portability problems fixed by Gnulib:
-@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{remainder} or @code{remainder-ieee}:
 @itemize
 @item
 This function is missing on some platforms:
@@ -19,3 +15,14 @@
 This function is not declared on some platforms:
 IRIX 5.3.
 @end itemize
+
+Portability problems fixed by Gnulib module @code{remainder-ieee}:
+@itemize
+@item
+This function has problems when the second argument is zero on some platforms:
+OSF/1 5.1.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/remainderf.texi
+++ b/doc/posix-functions/remainderf.texi
@@ -4,15 +4,28 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/remainderf.html}
 
-Gnulib module: ---
+Gnulib module: remainderf or remainderf-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{remainderf} or @code{remainderf-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, Solaris 9, MSVC 9.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function may go into an endless loop on some platforms:
+IRIX 6.5.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{remainderf-ieee}:
+@itemize
+@item
+This function has problems when the second argument is zero on some platforms:
+OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, MSVC 9.
 @end itemize
--- a/doc/posix-functions/remainderl.texi
+++ b/doc/posix-functions/remainderl.texi
@@ -4,15 +4,28 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/remainderl.html}
 
-Gnulib module: ---
+Gnulib module: remainderl or remainderl-ieee
 
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{remainderl} or @code{remainderl-ieee}:
 @itemize
+@item
+This function is missing on some platforms:
+FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
+@item
+This function returns completely wrong values on some platforms:
+OpenBSD 5.1/SPARC.
+@end itemize
+
+Portability problems fixed by Gnulib module @code{remainderl-ieee}:
+@itemize
+@item
+This function has problems when the second argument is zero on some platforms:
+OSF/1 5.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on some platforms:
-FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/renameat.texi
+++ b/doc/posix-functions/renameat.texi
@@ -22,7 +22,7 @@
 Solaris 11 2011-11.
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 8, Cygwin 1.5.x, mingw, MSVC 9,
 Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
--- a/doc/posix-functions/rewinddir.texi
+++ b/doc/posix-functions/rewinddir.texi
@@ -12,7 +12,7 @@
 This function is missing on some platforms:
 MSVC 9.
 @item
-On MacOS X platforms where @code{long int} is a 32-bit type, this function may
+On Mac OS X platforms where @code{long int} is a 32-bit type, this function may
 not work correctly on huge directories larger than 2 GB.
 (Cf. @code{AC_SYS_LARGEFILE}.)
 @end itemize
--- a/doc/posix-functions/rintf.texi
+++ b/doc/posix-functions/rintf.texi
@@ -10,7 +10,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 9, MSVC 9.
+Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, Solaris 9, MSVC 9.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/round.texi
+++ b/doc/posix-functions/round.texi
@@ -10,10 +10,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
+FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, older IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
 @item
 This function is not declared on some platforms:
-glibc 2.8, OSF/1 5.1.
+glibc 2.8, IRIX 6.5, OSF/1 5.1.
 @item
 This functions returns a wrong result for x = 1/2 - 2^-54 on some platforms:
 NetBSD 3.0, AIX 7.1.
--- a/doc/posix-functions/roundf.texi
+++ b/doc/posix-functions/roundf.texi
@@ -10,10 +10,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
+FreeBSD 5.2.1, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, OSF/1 4.0, Solaris 9, MSVC 9, Interix 3.5.
 @item
 This function is not declared on some platforms:
-glibc 2.8, OSF/1 5.1.
+glibc 2.8, IRIX 6.5, OSF/1 5.1.
 @item
 This functions returns a wrong result for x = 1/2 - 2^-25 on some platforms:
 mingw.
--- a/doc/posix-functions/roundl.texi
+++ b/doc/posix-functions/roundl.texi
@@ -10,10 +10,10 @@
 @itemize
 @item
 This function is missing on some platforms:
-FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
+FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, older IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared on some platforms:
-glibc 2.8, OSF/1 5.1.
+glibc 2.8, IRIX 6.5, OSF/1 5.1.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{roundl-ieee}:
--- a/doc/posix-functions/scandir.texi
+++ b/doc/posix-functions/scandir.texi
@@ -22,7 +22,7 @@
 @itemize
 @item
 The fourth parameter of this function is declared as @code{int (*) (const void *, const void *)} on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Interix 3.5.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Interix 3.5.
 @item
 The fourth parameter of this function is declared as @code{int (*) (void *, void *)} on some platforms:
 AIX 5.1.
--- a/doc/posix-functions/scanf.texi
+++ b/doc/posix-functions/scanf.texi
@@ -18,6 +18,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+C99 and POSIX-2001 and later require end-of-file to be sticky, that
+is, they require this function to act as if it reads end-of-file if
+@code{feof} would return nonzero.  However, on some systems this
+function attempts to read from the underlying file descriptor even if
+the stream's end-of-file indicator is set.  These systems include
+glibc and default Solaris.
+@item
 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
 upon failure.
 @item
--- a/doc/posix-functions/sched_getparam.texi
+++ b/doc/posix-functions/sched_getparam.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/sched_getscheduler.texi
+++ b/doc/posix-functions/sched_getscheduler.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/sched_rr_get_interval.texi
+++ b/doc/posix-functions/sched_rr_get_interval.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/sched_setparam.texi
+++ b/doc/posix-functions/sched_setparam.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/sched_setscheduler.texi
+++ b/doc/posix-functions/sched_setscheduler.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/seekdir.texi
+++ b/doc/posix-functions/seekdir.texi
@@ -18,5 +18,5 @@
 @item
 On platforms where @code{long int} is a 32-bit type, this function may not
 work correctly on huge directories larger than 2 GB.  The fix is to use
-the @code{AC_SYS_LARGEFILE} macro (only on MacOS X systems).
+the @code{AC_SYS_LARGEFILE} macro (only on Mac OS X systems).
 @end itemize
--- a/doc/posix-functions/select.texi
+++ b/doc/posix-functions/select.texi
@@ -18,6 +18,10 @@
 @item
 This function fails when the @code{nfds} argument is 0 on some platforms:
 Interix 3.5.
+@item
+On some platforms, this function fails to detect invalid fds with
+EBADF, but only if they lie beyond the current maximum open fd:
+FreeBSD 8.2.
 @end itemize
 
 Portability problems not fixed by Gnulib:
@@ -31,6 +35,10 @@
 On BeOS, @code{select} can only be called on descriptors created by the
 @code{socket} function, not on regular file descriptors.
 @item
+Under Windows, when passing a pipe, Gnulib's @code{select} replacement might
+return 0 even before the timeout has passed.  Programs using it with pipes can
+thus busy wait.
+@item
 On Solaris 2.6 and older, @code{select} applied to a file descriptor opened
 for reading and associated with @code{/dev/null} hangs, waiting for input,
 when instead it should return immediately.
--- a/doc/posix-functions/sem_timedwait.texi
+++ b/doc/posix-functions/sem_timedwait.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/setenv.texi
+++ b/doc/posix-functions/setenv.texi
@@ -17,7 +17,7 @@
 @item
 On some platforms, this function does not fail with @samp{EINVAL} when
 passed an empty string or a string containing @samp{=}:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, Cygwin 1.5.x.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, Cygwin 1.5.x.
 @item
 On some platforms, this function removes a leading @samp{=} from the
 value argument:
--- a/doc/posix-functions/setstate.texi
+++ b/doc/posix-functions/setstate.texi
@@ -4,15 +4,18 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/setstate.html}
 
-Gnulib module: ---
+Gnulib module: random
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on some platforms:
+Solaris 2.4, mingw, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on some platforms:
-Solaris 2.4, mingw, MSVC 9.
+This function has a slightly incompatible declaration (the argument type being
+@samp{const char *} instead of @samp{char *}) on some platforms.
 @end itemize
--- a/doc/posix-functions/setutxent.texi
+++ b/doc/posix-functions/setutxent.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/sigignore.texi
+++ b/doc/posix-functions/sigignore.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/signbit.texi
+++ b/doc/posix-functions/signbit.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, MSVC 9, Interix 3.5.
+Mac OS X 10.5, OpenBSD 3.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, MSVC 9, Interix 3.5.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/signgam.texi
+++ b/doc/posix-functions/signgam.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This variable is missing on some platforms:
-MacOS X 10.5, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
+Mac OS X 10.5, Minix 3.1.8, AIX 5.1, IRIX 6.5, OSF/1 5.1, mingw, MSVC 9.
 @end itemize
--- a/doc/posix-functions/sigqueue.texi
+++ b/doc/posix-functions/sigqueue.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/sigset.texi
+++ b/doc/posix-functions/sigset.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-functions/sigtimedwait.texi
+++ b/doc/posix-functions/sigtimedwait.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 Linux implements the meaning of NULL timeout by doing what @code{sigwaitinfo}
 does; other platforms may not do the same.
--- a/doc/posix-functions/sigwaitinfo.texi
+++ b/doc/posix-functions/sigwaitinfo.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, OpenBSD 3.8, Minix 3.1.8, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/sinl.texi
+++ b/doc/posix-functions/sinl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/snprintf.texi
+++ b/doc/posix-functions/snprintf.texi
@@ -39,9 +39,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -67,7 +71,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -79,7 +83,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @item
 This function does not truncate the result as specified in C99 on some platforms:
 mingw, MSVC 9.
--- a/doc/posix-functions/sockatmark.texi
+++ b/doc/posix-functions/sockatmark.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 4.0, Solaris 9, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/sprintf.texi
+++ b/doc/posix-functions/sprintf.texi
@@ -20,9 +20,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -52,7 +56,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -64,7 +68,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/sqrt.texi
+++ b/doc/posix-functions/sqrt.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
--- a/doc/posix-functions/sqrtl.texi
+++ b/doc/posix-functions/sqrtl.texi
@@ -16,7 +16,10 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
+@item
+This function produces very imprecise results on some platforms:
+OpenBSD 5.1/SPARC.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/srandom.texi
+++ b/doc/posix-functions/srandom.texi
@@ -4,15 +4,15 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/srandom.html}
 
-Gnulib module: ---
+Gnulib module: random
 
 Portability problems fixed by Gnulib:
 @itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
 @item
 This function is missing on some platforms:
 Solaris 2.4, mingw, MSVC 9.
 @end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-functions/stat.texi
+++ b/doc/posix-functions/stat.texi
@@ -15,7 +15,7 @@
 @item
 On some platforms, @code{stat("link-to-file/",buf)} succeeds instead
 of failing with @code{ENOTDIR}.
-FreeBSD 7.2, AIX 7.1, Solaris 9.
+FreeBSD 7.2, AIX 7.1, Solaris 9, mingw64.
 @item
 On some platforms, @code{stat(".",buf)} and @code{stat("./",buf)} give
 different results:
--- a/doc/posix-functions/statvfs.texi
+++ b/doc/posix-functions/statvfs.texi
@@ -14,7 +14,12 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, mingw, MSVC 9.
+Mac OS X 10.3, OpenBSD 3.8, mingw, MSVC 9.
+@item
+This function can hang if it stats all preceding
+entries in /proc/mounts, and any of those file systems
+are hard-mounted and not available.  This affects
+Linux < 2.6.36.
 @item
 On platforms where @code{f_blocks} in @samp{struct statvfs} is a 32-bit
 value, this function may not work correctly on files systems larger than
--- a/doc/posix-functions/stpncpy.texi
+++ b/doc/posix-functions/stpncpy.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2,
 HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function has an incompatible return value on some platforms:
--- a/doc/posix-functions/strcasecmp_l.texi
+++ b/doc/posix-functions/strcasecmp_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/strcoll_l.texi
+++ b/doc/posix-functions/strcoll_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/strerror.texi
+++ b/doc/posix-functions/strerror.texi
@@ -17,7 +17,7 @@
 @code{errno} or using a string similar to out-of-range values),
 although POSIX requires this to leave @code{errno} unchanged and
 report success, on some platforms:
-FreeBSD 8.2, OpenBSD 4.7, MacOS X 10.5.
+FreeBSD 8.2, OpenBSD 4.7, Mac OS X 10.5.
 @item
 This function fails to return a string for out-of-range integers on
 some platforms:
--- a/doc/posix-functions/strerror_l.texi
+++ b/doc/posix-functions/strerror_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/strerror_r.texi
+++ b/doc/posix-functions/strerror_r.texi
@@ -49,7 +49,7 @@
 @item
 This function produces a different string for @code{0} than
 @code{strerror} on some platforms:
-MacOS X 10.5.
+Mac OS X 10.5.
 @item
 This function always fails when the third argument is less than 80 on some
 platforms:
--- a/doc/posix-functions/strfmon_l.texi
+++ b/doc/posix-functions/strfmon_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/strftime_l.texi
+++ b/doc/posix-functions/strftime_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/strncasecmp_l.texi
+++ b/doc/posix-functions/strncasecmp_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/strndup.texi
+++ b/doc/posix-functions/strndup.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function does not NUL-terminate the result on some platforms:
 AIX 5.1.
--- a/doc/posix-functions/strnlen.texi
+++ b/doc/posix-functions/strnlen.texi
@@ -10,7 +10,7 @@
 @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, mingw, Interix 3.5.
+Mac OS 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, mingw, Interix 3.5.
 @item
 This function is buggy on some platforms:
 AIX 4.3.
--- a/doc/posix-functions/strstr.texi
+++ b/doc/posix-functions/strstr.texi
@@ -23,7 +23,7 @@
 @item
 This function has quadratic instead of linear worst-case complexity on some
 platforms:
-glibc 2.8, MacOS X 10.5, FreeBSD 6.2, NetBSD 5.0, OpenBSD 4.0, AIX
+glibc 2.8, Mac OS X 10.5, FreeBSD 6.2, NetBSD 5.0, OpenBSD 4.0, AIX
 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @end itemize
 
--- a/doc/posix-functions/strtod.texi
+++ b/doc/posix-functions/strtod.texi
@@ -28,7 +28,7 @@
 @item
 This function returns the wrong end pointer for @samp{-0x} on some
 platforms:
-glibc 2.4, MacOS X 10.5, FreeBSD 6.2, AIX 7.1, Cygwin < 1.5.25-11.
+glibc 2.4, Mac OS X 10.5, FreeBSD 6.2, AIX 7.1, Cygwin < 1.5.25-11.
 
 @item
 This function returns +0.0 (not -0.0) for @samp{-0} on some platforms:
@@ -40,7 +40,7 @@
 
 @item
 This function fails to parse @samp{NaN()} on some platforms:
-glibc-2.3.6, MacOS X 10.5, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Cygwin < 1.5.25-11, mingw, MSVC 9.
+glibc-2.3.6, Mac OS X 10.5, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Cygwin < 1.5.25-11, mingw, MSVC 9.
 
 @item
 This function fails to parse @samp{NaN(@var{n-char-sequence})} on some
@@ -85,7 +85,7 @@
 @item
 This function fails to correctly parse very long strings on some
 platforms:
-MacOS X 10.5, FreeBSD 6.2, NetBSD 5.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.2, NetBSD 5.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9.
 
 @item
 The replacement function does not always return correctly rounded results.
--- a/doc/posix-functions/strxfrm_l.texi
+++ b/doc/posix-functions/strxfrm_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/symlinkat.texi
+++ b/doc/posix-functions/symlinkat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @item
--- a/doc/posix-functions/tanl.texi
+++ b/doc/posix-functions/tanl.texi
@@ -16,7 +16,7 @@
 MSVC 9.
 @item
 This function is not declared on some platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/tcdrain.texi
+++ b/doc/posix-functions/tcdrain.texi
@@ -17,6 +17,6 @@
 mingw, MSVC 9.
 @item
 On some platforms, @code{tcdrain} on a non-tty fails with @code{errno} set to
-@code{EINVAL} or, on MacOS X, also @code{EOPNOTSUPP} or @code{ENODEV}, rather
+@code{EINVAL} or, on Mac OS X, also @code{EOPNOTSUPP} or @code{ENODEV}, rather
 than @code{ENOTTY}.
 @end itemize
--- a/doc/posix-functions/tcflush.texi
+++ b/doc/posix-functions/tcflush.texi
@@ -20,6 +20,6 @@
 errno set to @code{EINVAL} rather than @code{ENOTTY}.
 @item
 On some platforms, @code{tcflush} of @code{TCOFLUSH} on a non-tty fails with
-errno set to @code{EINVAL} or, on IRIX, also @code{ENOSYS}, or, on MacOS X,
+errno set to @code{EINVAL} or, on IRIX, also @code{ENOSYS}, or, on Mac OS X,
 also @code{EOPNOTSUPP} or @code{ENODEV}, rather than @code{ENOTTY}.
 @end itemize
--- a/doc/posix-functions/tcgetsid.texi
+++ b/doc/posix-functions/tcgetsid.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 4.5, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 4.5, Minix 3.1.8, Cygwin 1.7.9, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared on some platforms:
 OSF/1 5.1.
@@ -24,5 +24,8 @@
 @itemize
 @item
 This function always fails on some platforms:
-FreeBSD 6.0, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+FreeBSD 6.0, Cygwin 1.7.8, mingw, MSVC 9, Interix 3.5, BeOS.
+@item
+This function returns int instead of pid_t on some platforms:
+Cygwin 1.7.11.
 @end itemize
--- a/doc/posix-functions/telldir.texi
+++ b/doc/posix-functions/telldir.texi
@@ -18,5 +18,5 @@
 @item
 On platforms where @code{long int} is a 32-bit type, this function may not
 work correctly on huge directories larger than 2 GB.  The fix is to use
-the @code{AC_SYS_LARGEFILE} macro (only on MacOS X systems).
+the @code{AC_SYS_LARGEFILE} macro (only on Mac OS X systems).
 @end itemize
--- a/doc/posix-functions/timer_create.texi
+++ b/doc/posix-functions/timer_create.texi
@@ -14,5 +14,8 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+Mac OS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+@item
+This function fails with @code{ENOSYS} on some platforms:
+OpenBSD 4.9.
 @end itemize
--- a/doc/posix-functions/timer_delete.texi
+++ b/doc/posix-functions/timer_delete.texi
@@ -14,5 +14,8 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+Mac OS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+@item
+This function fails with @code{ENOSYS} on some platforms:
+OpenBSD 4.9.
 @end itemize
--- a/doc/posix-functions/timer_getoverrun.texi
+++ b/doc/posix-functions/timer_getoverrun.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, Minix 3.1.8, IRIX 5.3, Solaris 2.4, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, Minix 3.1.8, IRIX 5.3, Solaris 2.4, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/timer_gettime.texi
+++ b/doc/posix-functions/timer_gettime.texi
@@ -14,5 +14,8 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+Mac OS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+@item
+This function fails with @code{ENOSYS} on some platforms:
+OpenBSD 4.9.
 @end itemize
--- a/doc/posix-functions/timer_settime.texi
+++ b/doc/posix-functions/timer_settime.texi
@@ -14,5 +14,8 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+Mac OS X 10.5, FreeBSD 6.4, Minix 3.1.8, IRIX 5.3, Solaris 2.4, mingw, MSVC 9, Interix 3.5, BeOS, Tandem/NSK.
+@item
+This function fails with @code{ENOSYS} on some platforms:
+OpenBSD 4.9.
 @end itemize
--- a/doc/posix-functions/tolower_l.texi
+++ b/doc/posix-functions/tolower_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/toupper_l.texi
+++ b/doc/posix-functions/toupper_l.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/towctrans_l.texi
+++ b/doc/posix-functions/towctrans_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/towlower_l.texi
+++ b/doc/posix-functions/towlower_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/towupper_l.texi
+++ b/doc/posix-functions/towupper_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/ttyname_r.texi
+++ b/doc/posix-functions/ttyname_r.texi
@@ -17,7 +17,7 @@
 HP-UX 11.
 @item
 This function has an incompatible declaration on some platforms:
-MacOS X 10.4, Solaris 11 2011-11 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined).
+Mac OS X 10.4, Solaris 11 2011-11 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined).
 @item
 This function ignores the size argument, thus overwriting memory after the
 buffer, on some platforms:
--- a/doc/posix-functions/unlink.texi
+++ b/doc/posix-functions/unlink.texi
@@ -12,7 +12,7 @@
 Some systems mistakenly succeed on @code{unlink("link-to-file/")}:
 GNU/Hurd, FreeBSD 7.2, AIX 7.1, Solaris 9.
 @item
-On MacOS X 10.5.6, in a writable HFS mount, @code{unlink("..")} succeeds
+On Mac OS X 10.5.6, in a writable HFS mount, @code{unlink("..")} succeeds
 without doing anything.
 @end itemize
 
--- a/doc/posix-functions/unlinkat.texi
+++ b/doc/posix-functions/unlinkat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 But the replacement function is not safe to be used in libraries and is not multithread-safe.
 @item
--- a/doc/posix-functions/unlockpt.texi
+++ b/doc/posix-functions/unlockpt.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/unsetenv.texi
+++ b/doc/posix-functions/unsetenv.texi
@@ -17,7 +17,7 @@
 @item
 This function has the return type @samp{void} instead of @samp{int} on some
 platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, OSF/1 5.1.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, OSF/1 5.1.
 @item
 On some platforms, this function does not fail with @samp{EINVAL} when
 passed an empty string or a string containing @samp{=}:
--- a/doc/posix-functions/uselocale.texi
+++ b/doc/posix-functions/uselocale.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/utimensat.texi
+++ b/doc/posix-functions/utimensat.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9,
 Interix 3.5, BeOS.
 However, the replacement function may end up truncating timestamps to
--- a/doc/posix-functions/vdprintf.texi
+++ b/doc/posix-functions/vdprintf.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5.
 @end itemize
 
@@ -24,6 +24,10 @@
 printf of @samp{long double} numbers is unsupported on some platforms:
 BeOS.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
 glibc-2.3.6, BeOS.
--- a/doc/posix-functions/vfprintf.texi
+++ b/doc/posix-functions/vfprintf.texi
@@ -20,9 +20,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -52,7 +56,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -64,7 +68,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{stdio} or @code{vfprintf-posix}, together with module @code{nonblocking}:
--- a/doc/posix-functions/vprintf.texi
+++ b/doc/posix-functions/vprintf.texi
@@ -20,9 +20,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -52,7 +56,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -64,7 +68,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems fixed by Gnulib module @code{stdio} or @code{vprintf-posix}, together with module @code{nonblocking}:
--- a/doc/posix-functions/vsnprintf.texi
+++ b/doc/posix-functions/vsnprintf.texi
@@ -39,9 +39,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -64,7 +68,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -76,7 +80,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @item
 This function does not truncate the result as specified in C99 on some platforms:
 mingw, MSVC 9.
--- a/doc/posix-functions/vsprintf.texi
+++ b/doc/posix-functions/vsprintf.texi
@@ -20,9 +20,13 @@
 incorrect result on some platforms:
 AIX 5.2, OSF/1 5.1, Solaris 11 2011-11, mingw, MSVC 9.
 @item
+printf of @samp{long double} numbers outside the IEEE 754 range produces
+no meaningful results on some platforms:
+glibc and others, on x86, x86_64, IA-64 CPUs.
+@item
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
-glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, BeOS.
 @item
 This function does not support the @samp{F} directive on some platforms:
@@ -52,7 +56,7 @@
 @item
 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
 with zeroes) on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
@@ -64,7 +68,7 @@
 Solaris 10.
 @item
 This function can crash in out-of-memory conditions on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/waitid.texi
+++ b/doc/posix-functions/waitid.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.4, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 As of 2005, no system is known on which @code{waitid} with flag @code{WNOWAIT}
 works correctly.
--- a/doc/posix-functions/wcpcpy.texi
+++ b/doc/posix-functions/wcpcpy.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared (without @code{-D_GNU_SOURCE}) on some platforms:
--- a/doc/posix-functions/wcpncpy.texi
+++ b/doc/posix-functions/wcpncpy.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 This function is not declared (without @code{-D_GNU_SOURCE}) on some platforms:
--- a/doc/posix-functions/wcscasecmp.texi
+++ b/doc/posix-functions/wcscasecmp.texi
@@ -10,7 +10,7 @@
 @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,
+Mac OS 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, MSVC 9.
 @end itemize
 
--- a/doc/posix-functions/wcscasecmp_l.texi
+++ b/doc/posix-functions/wcscasecmp_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/wcscoll_l.texi
+++ b/doc/posix-functions/wcscoll_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/wcsdup.texi
+++ b/doc/posix-functions/wcsdup.texi
@@ -10,7 +10,7 @@
 @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,
+Mac OS 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
 
--- a/doc/posix-functions/wcsncasecmp.texi
+++ b/doc/posix-functions/wcsncasecmp.texi
@@ -10,7 +10,7 @@
 @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,
+Mac OS 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, MSVC 9, BeOS.
 @end itemize
 
--- a/doc/posix-functions/wcsncasecmp_l.texi
+++ b/doc/posix-functions/wcsncasecmp_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/wcsnlen.texi
+++ b/doc/posix-functions/wcsnlen.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.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
 
--- a/doc/posix-functions/wcsnrtombs.texi
+++ b/doc/posix-functions/wcsnrtombs.texi
@@ -10,7 +10,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2,
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 4.3.2,
 HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/posix-functions/wcswidth.texi
+++ b/doc/posix-functions/wcswidth.texi
@@ -14,7 +14,7 @@
 @item
 This function handles combining characters in UTF-8 locales incorrectly on some
 platforms:
-MacOS X 10.3.
+Mac OS X 10.3.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/wcsxfrm_l.texi
+++ b/doc/posix-functions/wcsxfrm_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/wctrans_l.texi
+++ b/doc/posix-functions/wctrans_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/wctype_l.texi
+++ b/doc/posix-functions/wctype_l.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on many platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, 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.
--- a/doc/posix-functions/wcwidth.texi
+++ b/doc/posix-functions/wcwidth.texi
@@ -17,7 +17,7 @@
 @item
 This function handles combining characters in UTF-8 locales incorrectly on some
 platforms:
-MacOS X 10.3.
+Mac OS X 10.3, OpenBSD 5.0.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/wordexp.texi
+++ b/doc/posix-functions/wordexp.texi
@@ -14,7 +14,7 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @item
 On some platforms, this function does not set @code{errno} or the
 stream error indicator on attempts to write to a read-only stream:
--- a/doc/posix-functions/wordfree.texi
+++ b/doc/posix-functions/wordfree.texi
@@ -14,5 +14,5 @@
 @itemize
 @item
 This function is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-functions/write.texi
+++ b/doc/posix-functions/write.texi
@@ -38,7 +38,7 @@
 @item
 This function may fail with error @code{EINTR}, even in programs that don't
 install any signal handlers, on some platforms:
-MacOS X 10.5.
+Mac OS X 10.5.
 @end itemize
 
 For handling @code{EINTR}, Gnulib provides a module @samp{safe-write} with a
--- a/doc/posix-headers/aio.texi
+++ b/doc/posix-headers/aio.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-headers/cpio.texi
+++ b/doc/posix-headers/cpio.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-headers/errno.texi
+++ b/doc/posix-headers/errno.texi
@@ -37,6 +37,14 @@
 @code{ETIMEDOUT}, @code{ECONNREFUSED}, @code{EHOSTUNREACH}, @code{EALREADY},
 @code{EINPROGRESS} are not defined on some platforms:
 mingw, MSVC 9.
+@item
+The macros @code{EOWNERDEAD}, @code{ENOTRECOVERABLE} are not defined on
+some platforms:
+glibc/Linux 2.3.6, glibc/Hurd 2.15, glibc/kFreeBSD 2.15,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin, mingw without pthreads-win32, MSVC 9, Interix 3.5, BeOS.
+@item
+The macro @code{EILSEQ} is not defined on some platforms:
+LynxOS 178 2.2.2.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-headers/fcntl.texi
+++ b/doc/posix-headers/fcntl.texi
@@ -29,6 +29,9 @@
 @item
 @samp{O_EXEC} and @samp{O_SEARCH} are not defined on some platforms.
 Gnulib defines these macros to @samp{O_RDONLY}, which is typically 0.
+The @samp{O_PATH} macro of GNU/Linux is not a suitable substitute, as
+fchmod fails with @samp{errno==EBADF} when invoked on a file
+descriptor that was opened with @samp{O_PATH}.
 
 @item
 @samp{O_ACCMODE} is not defined on some platforms:
@@ -45,8 +48,9 @@
 not on others.
 
 @item
-@samp{O_DIRECT}, @samp{O_NDELAY}, @samp{O_NOATIME},
-and @samp{O_NOLINKS} (not specified by POSIX) are defined
+@samp{O_DIRECT}, @samp{O_IGNORE_CTTY}, @samp{O_NDELAY},
+@samp{O_NOATIME}, @samp{O_NOLINK}, @samp{O_NOLINKS}, and
+@samp{O_NOTRANS} (not specified by POSIX) are defined
 on some platforms but not on others.
 
 @item
@@ -56,7 +60,7 @@
 
 @item
 @samp{F_DUPFD_CLOEXEC} is not defined on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5,
 BeOS.
 
@@ -64,7 +68,7 @@
 @samp{AT_FDCWD}, @samp{AT_EACCESS}, @samp{AT_SYMLINK_NOFOLLOW},
 @samp{AT_SYMLINK_FOLLOW}, and @samp{AT_REMOVEDIR}
 are not defined on many platforms:
-glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX
+glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX
 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 8, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 
 @item
@@ -77,7 +81,7 @@
 @itemize
 @item
 @samp{F_SETFD}, @samp{F_GETFL}, @samp{F_SETFL}, @samp{F_GETLK},
-@samp{F_SETLK}, @samp{F_SETLOKW}, @samp{F_GETOWN}, and @samp{F_SETOWN}
+@samp{F_SETLK}, @samp{F_SETLKW}, @samp{F_GETOWN}, and @samp{F_SETOWN}
 are not defined on some platforms:
 mingw, MSVC 9.
 
--- a/doc/posix-headers/fmtmsg.texi
+++ b/doc/posix-headers/fmtmsg.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-headers/ftw.texi
+++ b/doc/posix-headers/ftw.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, FreeBSD 5.2.1, NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 5.2.1, NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-headers/limits.texi
+++ b/doc/posix-headers/limits.texi
@@ -9,7 +9,7 @@
 @itemize
 @item
 The @code{HOST_NAME_MAX} macro is not defined on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/posix-headers/locale.texi
+++ b/doc/posix-headers/locale.texi
@@ -13,7 +13,18 @@
 
 @item
 The @code{locale_t} type is not defined on some platforms:
-glibc 2.11, MacOS X 10.5.
+glibc 2.11, Mac OS X 10.5.
+
+@item
+The @code{struct lconv} type does not contain any members on some platforms:
+Android.
+
+@item
+The @code{struct lconv} type does not contain the members
+@code{int_p_cs_precedes}, @code{int_p_sign_posn}, @code{int_p_sep_by_space},
+@code{int_n_cs_precedes}, @code{int_n_sign_posn}, @code{int_n_sep_by_space}
+on some platforms:
+glibc, OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin 1.5.x, mingw, MSVC 9.
 
 @item
 Some platforms provide a @code{NULL} macro that cannot be used in arbitrary
--- a/doc/posix-headers/math.texi
+++ b/doc/posix-headers/math.texi
@@ -25,6 +25,16 @@
 The macros @code{NAN} and @code{HUGE_VAL} expand to a function address
 rather than a floating point constant on some platforms:
 Solaris 10.
+
+@item
+The macros @code{HUGE_VALF} and @code{HUGE_VALL} are not defined on some
+platforms:
+glibc/HPPA, glibc/SPARC, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9.
+
+@item
+The macros @code{FP_ILOGB0} and @code{FP_ILOGBNAN} are not defined on some
+platforms:
+NetBSD 5.1, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-headers/mqueue.texi
+++ b/doc/posix-headers/mqueue.texi
@@ -13,6 +13,6 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, Interix 3.5,
 BeOS.
 @end itemize
--- a/doc/posix-headers/net_if.texi
+++ b/doc/posix-headers/net_if.texi
@@ -3,10 +3,14 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html}
 
-Gnulib module: ---
+Gnulib module: net_if
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This header file is not self-contained on some platforms (needing
+<sys/socket.h> to be included first):
+FreeBSD 8.2, OpenBSD 5.2.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-headers/sched.texi
+++ b/doc/posix-headers/sched.texi
@@ -12,7 +12,7 @@
 Minix 3.1.8, mingw, MSVC 9, BeOS.
 @item
 This header file does not define the type @code{pid_t} on some platforms:
-glibc 2.11, MacOS X 10.5.
+glibc 2.11, Mac OS X 10.5.
 @item
 @code{struct sched_param} is not defined on some platforms:
 Haiku.
--- a/doc/posix-headers/signal.texi
+++ b/doc/posix-headers/signal.texi
@@ -41,7 +41,7 @@
 @item
 The type @code{sighandler_t} (a GNU extension) is not defined on most non-glibc
 platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/posix-headers/spawn.texi
+++ b/doc/posix-headers/spawn.texi
@@ -9,7 +9,7 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.3, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
 
--- a/doc/posix-headers/stdalign.texi
+++ b/doc/posix-headers/stdalign.texi
@@ -17,6 +17,9 @@
 This header file is missing on most circa-2011 platforms.
 @item
 Clang 3.0's @code{<stdalign.h>} does not define @code{alignof}/@code{_Alignof}.
+@item
+The @code{alignof} and @code{_Alignof} macros return too large values for
+the types @code{double} and @code{long long} in GCC 4.7.0.
 @end itemize
 
 Portability problems not fixed by Gnulib:
@@ -47,8 +50,8 @@
 Report Review Team assigned the internal review ID 2125432 (dated
 2011-11-01) to this issue.
 @item
-@code{<stdalign.h>} must be #included before @samp{_Alignas} and
-@samp{_Alignof} can be used.
+@code{<stdalign.h>} must be #included before @code{_Alignas} and
+@code{_Alignof} can be used.
 @item
 You cannot assume that @code{_Alignas} and @code{_Alignof} are reserved words;
 they might be macros.
--- a/doc/posix-headers/stdbool.texi
+++ b/doc/posix-headers/stdbool.texi
@@ -29,7 +29,7 @@
 @item
 Casts and automatic conversions to @samp{bool} don't test against the
 zero value or the null pointer, as they should.  Such casts should only
-be used if the casted value is known to be equal to 0 or 1.
+be used if the value is known to be equal to 0 or 1.
 @item
 You cannot assume that casting a floating point literal to @samp{bool} will
 result in a constant expression.
--- a/doc/posix-headers/stdint.texi
+++ b/doc/posix-headers/stdint.texi
@@ -40,6 +40,8 @@
 @item
 @code{@{uint,int@}_fast@{8,16,32,64@}_t} may not correspond to the fastest
 types available on the system.
+Other @code{<stdint.h>} substitutes may define these types differently,
+so public header files should avoid these types.
 @item
 Macros are used instead of typedefs.
 @item
--- a/doc/posix-headers/stdio.texi
+++ b/doc/posix-headers/stdio.texi
@@ -12,7 +12,7 @@
 glibc 2.8, eglibc 2.11.2 and others.
 @item
 The type @code{ssize_t} is missing on some platforms:
-glibc 2.8, MacOS X 10.5, Solaris 10, MSVC 9, and others.
+glibc 2.8, Mac OS X 10.5, Solaris 10, MSVC 9, and others.
 @item
 The type @code{va_list} is missing on some platforms:
 glibc 2.8, OpenBSD 4.0, Solaris 11 2011-11, and others.
--- a/doc/posix-headers/stdlib.texi
+++ b/doc/posix-headers/stdlib.texi
@@ -34,5 +34,5 @@
 @item
 System status macros such as @code{WEXITSTATUS} require an lvalue
 argument on some platforms.
-MacOS X 10.5.
+Mac OS X 10.5.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/posix-headers/stdnoreturn.texi
@@ -0,0 +1,36 @@
+@node stdnoreturn.h
+@section @file{stdnoreturn.h}
+
+POSIX specification:@* Not in POSIX yet, but we expect it will be.
+ISO C11 (latest free draft
+@url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf})
+sections 7.23.
+
+Gnulib module: stdnoreturn
+
+Portability problems fixed by Gnulib:
+@itemize
+@item
+This header file is missing on most circa-2012 platforms.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+@code{<stdnoreturn.h>} should be #included before @samp{_Noreturn} is used.
+@item
+You cannot assume that @code{_Noreturn} is a reserved word;
+it might be a macro.
+@item
+On MSVC 9, @code{noreturn} expands to the empty token sequence, to avoid
+problems with standard headers that use @code{__declspec (noreturn)}
+directly.  Although the resulting code operates correctly, the
+compiler is not informed whether @code{noreturn} functions do not
+return, so it may generate incorrect warnings at compile-time, or code
+that is slightly less optimized.  This problem does not occur with
+@item
+Circa 2012 bleeding-edge GCC with @code{-Werror=old-style-declaration}
+requires @code{_Noreturn} or @code{noreturn} before the returned type
+in a declaration, and therefore rejects valid but unusually-worded
+declarations such as @code{void _Noreturn foo (void);}.
+@end itemize
--- a/doc/posix-headers/stropts.texi
+++ b/doc/posix-headers/stropts.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS.
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-headers/sys_msg.texi
+++ b/doc/posix-headers/sys_msg.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-headers/sys_resource.texi
+++ b/doc/posix-headers/sys_resource.texi
@@ -3,20 +3,19 @@
 
 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_resource.h.html}
 
-Gnulib module: ---
+Gnulib module: sys_resource
 
 Portability problems fixed by Gnulib:
 @itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
 @item
 This header file is missing on some platforms:
 mingw, MSVC 9.
-
 @item
 On some platforms, this header file requires that <sys/types.h> and
 <sys/time.h> already be included:
 FreeBSD 5.0.
 @end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- a/doc/posix-headers/sys_statvfs.texi
+++ b/doc/posix-headers/sys_statvfs.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, mingw, MSVC 9.
+Mac OS X 10.3, OpenBSD 3.8, mingw, MSVC 9.
 @end itemize
--- a/doc/posix-headers/sys_time.texi
+++ b/doc/posix-headers/sys_time.texi
@@ -12,8 +12,20 @@
 MSVC 9.
 @item
 @samp{struct timeval} is not defined on some platforms.
+@item
+@samp{struct timeval} is defined with a @code{tv_sec} type that is
+narrower than @code{time_t}
+on some native Windows platforms:
+mingw64 in 64-bit mode,
+mingw64 in 32-bit mode when @code{__MINGW_USE_VC2005_COMPAT} is defined,
+MSVC 9 in 64-bit mode,
+MSVC 9 in 32-bit mode when @code{_USE_32BIT_TIME_T} is not defined.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+@samp{struct timeval} is defined with a @code{tv_sec} type that is
+wider than @code{time_t}:
+OpenBSD 5.1 in 64-bit mode.
 @end itemize
--- a/doc/posix-headers/sys_types.texi
+++ b/doc/posix-headers/sys_types.texi
@@ -23,4 +23,12 @@
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+On some platforms the types @code{blksize_t} and @code{suseconds_t}
+are signed integer types that are wider than @code{long}:
+glibc x32
 @end itemize
+
+This module, together with the module @code{largefile}, also defines the type
+@code{off_t} to a 64-bit integer type on some platforms:
+mingw (except mingw64), MSVC 9.
--- a/doc/posix-headers/sys_wait.texi
+++ b/doc/posix-headers/sys_wait.texi
@@ -17,5 +17,5 @@
 @item
 System status macros such as @code{WEXITSTATUS} require an lvalue
 argument on some platforms.
-MacOS X 10.5.
+Mac OS X 10.5.
 @end itemize
--- a/doc/posix-headers/termios.texi
+++ b/doc/posix-headers/termios.texi
@@ -10,6 +10,9 @@
 @item
 This header file is missing on some platforms:
 mingw, MSVC 9.
+@item
+This header does not declare @code{pid_t} on all platforms:
+glibc on some architectures, FreeBSD 6.4, OpenBSD 4.9, Cygwin 1.7.11.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/doc/posix-headers/tgmath.texi
+++ b/doc/posix-headers/tgmath.texi
@@ -13,6 +13,6 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/posix-headers/time.texi
+++ b/doc/posix-headers/time.texi
@@ -18,4 +18,9 @@
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+On some platforms the @code{tv_nsec} member of @code{struct timespec}
+is not of type @code{long}, but is of type @code{long long} instead:
+glibc x32
+
 @end itemize
--- a/doc/posix-headers/trace.texi
+++ b/doc/posix-headers/trace.texi
@@ -13,6 +13,6 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
+Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11,
 IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
new file mode 100644
--- /dev/null
+++ b/doc/posix-headers/uchar.texi
@@ -0,0 +1,19 @@
+@node uchar.h
+@section @file{uchar.h}
+
+Defines the types @code{char16_t}, @code{char32_t} and declares the
+functions @code{mbrtoc16}, @code{c16rtomb}, @code{mbrtoc32},
+@code{c32rtomb}.
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This header file is missing on all non-glibc platforms:
+glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5, BeOS.
+@end itemize
--- a/doc/posix-headers/utmpx.texi
+++ b/doc/posix-headers/utmpx.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
+Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
 @end itemize
--- a/doc/posix-headers/wordexp.texi
+++ b/doc/posix-headers/wordexp.texi
@@ -13,5 +13,5 @@
 @itemize
 @item
 This header file is missing on some platforms:
-MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
+Mac OS X 10.3, OpenBSD 3.8, Minix 3.1.8, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
 @end itemize
--- a/doc/regex.texi
+++ b/doc/regex.texi
@@ -1853,7 +1853,7 @@
 @node Using Registers
 @subsection Using Registers
 
-A group in a regular expression can match a (posssibly empty) substring
+A group in a regular expression can match a (possibly empty) substring
 of the string that regular expression as a whole matched.  The matcher
 remembers the beginning and end of the substring matched by
 each group.
--- a/doc/regexprops-generic.texi
+++ b/doc/regexprops-generic.texi
@@ -712,4 +712,4 @@
 
 @node sed regular expression syntax
 @subsection @samp{sed} regular expression syntax
-This is a synonym for ed.
\ No newline at end of file
+This is a synonym for ed.
--- a/doc/solaris-versions
+++ b/doc/solaris-versions
@@ -22,7 +22,7 @@
        SunOS 4.1.3_U1B == Solaris 1.1.1B
        SunOS 4.1.4     == Solaris 1.1.2
 
-The SunOS 5.x uname output maps to the Solaris 2.x numbers thru 2.6
+The SunOS 5.x uname output maps to the Solaris 2.x numbers through 2.6
 
        SunOS 5.0       == Solaris 2.0
        SunOS 5.1       == Solaris 2.1
--- 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 December 31, 2011
+@set lastupdate November 25, 2012
 @c %**end of header
 
 @dircategory GNU organization
@@ -27,8 +27,8 @@
 The GNU coding standards, last updated @value{lastupdate}.
 
 Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-Free Software Foundation, Inc.
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+2011, 2012 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -751,15 +751,15 @@
 Error messages from compilers should look like this:
 
 @example
-@var{source-file-name}:@var{lineno}: @var{message}
+@var{sourcefile}:@var{lineno}: @var{message}
 @end example
 
 @noindent
 If you want to mention the column number, use one of these formats:
 
 @example
-@var{source-file-name}:@var{lineno}:@var{column}: @var{message}
-@var{source-file-name}:@var{lineno}.@var{column}: @var{message}
+@var{sourcefile}:@var{lineno}:@var{column}: @var{message}
+@var{sourcefile}:@var{lineno}.@var{column}: @var{message}
 
 @end example
 
@@ -779,22 +779,22 @@
 Here are the possible formats:
 
 @example
-@var{source-file-name}:@var{lineno-1}.@var{column-1}-@var{lineno-2}.@var{column-2}: @var{message}
-@var{source-file-name}:@var{lineno-1}.@var{column-1}-@var{column-2}: @var{message}
-@var{source-file-name}:@var{lineno-1}-@var{lineno-2}: @var{message}
+@var{sourcefile}:@var{line1}.@var{column1}-@var{line2}.@var{column2}: @var{message}
+@var{sourcefile}:@var{line1}.@var{column1}-@var{column2}: @var{message}
+@var{sourcefile}:@var{line1}-@var{line2}: @var{message}
 @end example
 
 @noindent
 When an error is spread over several files, you can use this format:
 
 @example
-@var{file-1}:@var{lineno-1}.@var{column-1}-@var{file-2}:@var{lineno-2}.@var{column-2}: @var{message}
+@var{file1}:@var{line1}.@var{column1}-@var{file2}:@var{line2}.@var{column2}: @var{message}
 @end example
 
 Error messages from other noninteractive programs should look like this:
 
 @example
-@var{program}:@var{source-file-name}:@var{lineno}: @var{message}
+@var{program}:@var{sourcefile}:@var{lineno}: @var{message}
 @end example
 
 @noindent
@@ -810,7 +810,7 @@
 If you want to mention the column number, use this format:
 
 @example
-@var{program}:@var{source-file-name}:@var{lineno}:@var{column}: @var{message}
+@var{program}:@var{sourcefile}:@var{lineno}:@var{column}: @var{message}
 @end example
 
 In an interactive program (one that is reading commands from a
@@ -998,7 +998,7 @@
 each on a separate line.
 
 Next should follow a line stating the license, preferably using one of
-abbrevations below, and a brief statement that the program is free
+abbreviations below, and a brief statement that the program is free
 software, and that users are free to copy and change it.  Also mention
 that there is no warranty, to the extent permitted by law.  See
 recommended wording below.
@@ -1047,7 +1047,8 @@
 Finally, here is the table of our suggested license abbreviations.
 Any abbreviation can be followed by @samp{v@var{version}[+]}, meaning
 that particular version, or later versions with the @samp{+}, as shown
-above.
+above.  In the case of a GNU license, @emph{always} indicate the permitted
+versions in this way.
 
 In the case of exceptions for extra permissions with the GPL, we use
 @samp{/} for a separator; the version number can follow the license
@@ -2384,6 +2385,7 @@
 
 @cindex open brace
 @cindex braces, in C source
+@cindex function definitions, formatting
 It is important to put the open-brace that starts the body of a C
 function in column one, so that they will start a defun.  Several
 tools look for open-braces in column one to find the beginnings of C
@@ -2430,6 +2432,20 @@
 @dots{}
 @end example
 
+@cindex @code{struct} types, formatting
+@cindex @code{enum} types, formatting
+For @code{struct} and @code{enum} types, likewise put the braces in
+column one, unless the whole contents fits on one line:
+
+@example
+struct foo
+@{
+  int a, b;
+@}
+@exdent @r{or}
+struct foo @{ int a, b; @}
+@end example
+
 The rest of this section gives our recommendations for other aspects of
 C formatting style, which is also the default style of the @code{indent}
 program in version 1.2 and newer.  It corresponds to the options
@@ -2576,7 +2592,7 @@
 number NODE_NUM'' rather than ``an inode''.
 
 There is usually no purpose in restating the name of the function in
-the comment before it, because the reader can see that for himself.
+the comment before it, because readers can see that for themselves.
 There might be an exception when the comment is so long that the function
 itself would be off the bottom of the screen.
 
@@ -2655,10 +2671,10 @@
 as @command{lint}, @command{clang}, and GCC with extra warnings
 options such as @option{-Wconversion} and @option{-Wundef}.  These
 tools can help find bugs and unclear code, but they can also generate
-so many false alarms that that it hurts readability to silence them
-with unnecessary casts, wrappers, and other complications.  For
-example, please don't insert casts to @code{void} or calls to
-do-nothing functions merely to pacify a lint checker.
+so many false alarms that it hurts readability to silence them with
+unnecessary casts, wrappers, and other complications.  For example,
+please don't insert casts to @code{void} or calls to do-nothing
+functions merely to pacify a lint checker.
 
 Declarations of external functions and functions to appear later in the
 source file should all go in one place near the beginning of the file
@@ -3516,11 +3532,26 @@
 @node Change Log Concepts
 @subsection Change Log Concepts
 
+@cindex change set
+@cindex batch of changes
 You can think of the change log as a conceptual ``undo list'' which
 explains how earlier versions were different from the current version.
-People can see the current version; they don't need the change log
-to tell them what is in it.  What they want from a change log is a
-clear explanation of how the earlier version differed.
+People can see the current version; they don't need the change log to
+tell them what is in it.  What they want from a change log is a clear
+explanation of how the earlier version differed.  Each @dfn{entry} in
+a change log describes either an individual change or the smallest
+batch of changes that belong together, also known as a @dfn{change
+set}.
+@cindex title, change log entry
+@cindex description, change log entry
+For later reference or for summarizing, sometimes it is useful to
+start the entry with a one-line description (sometimes called a
+@dfn{title}) to describe its overall purpose.
+
+In the past, we recommended not mentioning changes in non-software
+files (manuals, help files, media files, etc.)@: in change logs.
+However, we've been advised that it is a good idea to include them,
+for the sake of copyright records.
 
 The change log file is normally called @file{ChangeLog} and covers an
 entire directory.  Each directory can have its own change log, or a
@@ -3532,26 +3563,26 @@
 to a @file{ChangeLog} file using @code{rcs2log}; in Emacs, the command
 @kbd{C-x v a} (@code{vc-update-change-log}) does the job.
 
-There's no need to describe the full purpose of the changes or how
-they work together.  However, sometimes it is useful to write one line
-to describe the overall purpose of a change or a batch of changes.  If
-you think that a change calls for explanation, you're probably right.
-Please do explain it---but please put the full explanation in comments
-in the code, where people will see it whenever they see the code.  For
-example, ``New function'' is enough for the change log when you add a
-function, because there should be a comment before the function
-definition to explain what it does.
-
-In the past, we recommended not mentioning changes in non-software
-files (manuals, help files, etc.) in change logs.  However, we've been
-advised that it is a good idea to include them, for the sake of
-copyright records.
+For changes to code, there's no need to describe the full purpose of
+the changes or how they work together.  If you think that a change
+calls for explanation, you're probably right.  Please do explain
+it---but please put the full explanation in comments in the code,
+where people will see it whenever they see the code.  For example,
+``New function'' is enough for the change log when you add a function,
+because there should be a comment before the function definition to
+explain what it does.
+
+For changes to files that do not support a comment syntax (e.g., media
+files), it is ok to include the full explanation in the change log file,
+after the title and before the list of individual changes.
 
 The easiest way to add an entry to @file{ChangeLog} is with the Emacs
-command @kbd{M-x add-change-log-entry}.  An entry should have an
-asterisk, the name of the changed file, and then in parentheses the name
-of the changed functions, variables or whatever, followed by a colon.
-Then describe the changes you made to that function or variable.
+command @kbd{M-x add-change-log-entry}.  An individual change should
+have an asterisk, the name of the changed file, and then in
+parentheses the name of the changed functions, variables or whatever,
+followed by a colon.  Then describe the changes you made to that
+function or variable.
+
 
 @node Style of Change Logs
 @subsection Style of Change Logs
@@ -3590,10 +3621,10 @@
 this is not a good idea, since searching for @code{jump-to-register} or
 @code{insert-register} would not find that entry.
 
-Separate unrelated change log entries with blank lines.  When two
-entries represent parts of the same change, so that they work together,
-then don't put blank lines between them.  Then you can omit the file
-name and the asterisk when successive entries are in the same file.
+Separate unrelated change log entries with blank lines.  Don't put
+blank lines between individual changes of an entry.  You can omit the
+file name and the asterisk when successive individual changes are in
+the same file.
 
 Break long lists of function names by closing continued lines with
 @samp{)}, rather than @samp{,}, and opening the continuation with
@@ -3718,9 +3749,10 @@
 a certain macro is @emph{not} defined:
 
 @example
-(gethostname) [!HAVE_SOCKETS]: Replace with winsock version.
+* host.c (gethostname) [!HAVE_SOCKETS]: Replace with winsock version.
 @end example
 
+
 @node Indicating the Part Changed
 @subsection Indicating the Part Changed
 
@@ -4032,6 +4064,7 @@
 @section Making Releases
 @cindex packaging
 
+@cindex version numbers, for releases
 You should identify each release with a pair of version numbers, a
 major version and a minor.  We have no objection to using more than
 two numbers, but it is very unlikely that you really need them.
@@ -4048,20 +4081,28 @@
 source files by programs under the control of the Makefile.
 
 @cindex @file{README} file
-The distribution should contain a file named @file{README} which gives
-the name of the package, and a general description of what it does.  It
-is also good to explain the purpose of each of the first-level
-subdirectories in the package, if there are any.  The @file{README} file
-should either state the version number of the package, or refer to where
-in the package it can be found.
-
-The @file{README} file should refer to the file @file{INSTALL}, which
-should contain an explanation of the installation procedure.
-
-The @file{README} file should also refer to the file which contains the
-copying conditions.  The GNU GPL, if used, should be in a file called
-@file{COPYING}.  If the GNU LGPL is used, it should be in a file called
+The distribution should contain a file named @file{README} with a
+general overview of the package:
+
+@itemize
+@item the name of the package;
+
+@item the version number of the package, or refer to where in the
+package the version can be found;
+
+@item a general description of what the package does;
+
+@item a reference to the the file @file{INSTALL}, which
+should in turn contain an explanation of the installation procedure;
+
+@item a brief explanation of any unusual top-level directories or
+files, or other hints for readers to find their way around the source;
+
+@item a reference to the file which contains the copying conditions.
+The GNU GPL, if used, should be in a file called @file{COPYING}.  If
+the GNU LGPL is used, it should be in a file called
 @file{COPYING.LESSER}.
+@end itemize
 
 Naturally, all the source files must be in the distribution.  It is
 okay to include non-source files in the distribution along with the
@@ -4069,9 +4110,10 @@
 with the source they are made from, and machine-independent, so that
 normal building of the distribution will never modify them.  We
 commonly include non-source files produced by Autoconf, Automake,
-Bison, @code{lex}, @TeX{}, and @code{makeinfo}; this helps avoid
+Bison, @code{flex}, @TeX{}, and @code{makeinfo}; this helps avoid
 unnecessary dependencies between our distributions, so that users can
-install whichever packages they want to install.
+install whichever versions of whichever packages they like.  Do not
+induce new dependencies on other software lightly.
 
 Non-source files that might actually be modified by building and
 installing the program should @strong{never} be included in the
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -186,6 +186,8 @@
       --extract-maintainer         report the maintainer(s) inside gnulib
       --extract-tests-module       report the unit test module, if it exists
       --copy-file                  copy a file that is not part of any module
+      --help                Show this help text.
+      --version             Show version and authorship information.
 
 General options:
 
@@ -204,21 +206,35 @@
 
       --dry-run             Only print what would have been done.
 
+Options for --import, --add/remove-import:
+
+      --with-tests          Include unit tests for the included modules.
+
+Options for --create-[mega]testdir, --[mega]test:
+
+      --without-tests       Don't include unit tests for the included modules.
+
 Options for --import, --add/remove-import,
             --create-[mega]testdir, --[mega]test:
 
-      --with-tests          Include unit tests for the included modules.
       --with-obsolete       Include obsolete modules when they occur among the
                             dependencies. By default, dependencies to obsolete
                             modules are ignored.
       --with-c++-tests      Include even unit tests for C++ interoperability.
+      --without-c++-tests   Exclude unit tests for C++ interoperability.
       --with-longrunning-tests
                             Include even unit tests that are long-runners.
+      --without-longrunning-tests
+                            Exclude unit tests that are long-runners.
       --with-privileged-tests
                             Include even unit tests that require root
                             privileges.
+      --without-privileged-tests
+                            Exclude unit tests that require root privileges.
       --with-unportable-tests
                             Include even unit tests that fail on some platforms.
+      --without-unportable-tests
+                            Exclude unit tests that fail on some platforms.
       --with-all-tests      Include all kinds of problematic unit tests.
       --avoid=MODULE        Avoid including the given MODULE. Useful if you
                             have code that provides equivalent functionality.
@@ -264,17 +280,9 @@
       --vc-files            Update version control related files.
       --no-vc-files         Don't update version control related files
                             (.gitignore and/or .cvsignore).
-      --no-changelog        Don't update or create ChangeLog files.
 
 Options for --create-[mega]testdir, --[mega]test:
 
-      --without-c++-tests   Exclude unit tests for C++ interoperability.
-      --without-longrunning-tests
-                            Exclude unit tests that are long-runners.
-      --without-privileged-tests
-                            Exclude unit tests that require root privileges.
-      --without-unportable-tests
-                            Exclude unit tests that fail on some platforms.
       --single-configure    Generate a single configure file, not a separate
                             configure file for the tests directory.
 
@@ -335,8 +343,8 @@
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
-
-Written by" "Bruno Haible" "and" "Simon Josefsson"
+"
+  printf "Written by %s, %s, and %s.\n" "Bruno Haible" "Paul Eggert" "Simon Josefsson"
 }
 
 # func_emit_copyright_notice
@@ -585,7 +593,7 @@
 
 # func_readlink SYMLINK
 # outputs the target of the given symlink.
-if (type -p readlink) > /dev/null 2>&1; then
+if (type readlink) > /dev/null 2>&1; then
   func_readlink ()
   {
     # Use the readlink program from GNU coreutils.
@@ -902,8 +910,9 @@
 
 # Command-line option processing.
 # Removes the OPTIONS from the arguments. Sets the variables:
-# - mode            list or import or add-import or remove-import or update
-#                   or create-testdir or create-megatestdir
+# - mode            one of: list, find, import, add-import, remove-import,
+#                   update, create-testdir, create-megatestdir, test, megatest,
+#                   copy-file
 # - destdir         from --dir
 # - local_gnulib_dir  from --local-dir
 # - modcache        true or false, from --cache-modules/--no-cache-modules
@@ -915,7 +924,8 @@
 # - docbase         from --doc-base
 # - testsbase       from --tests-base
 # - auxdir          from --aux-dir
-# - inctests        true if --with-tests was given, blank otherwise
+# - inctests        true if --with-tests was given, false if --without-tests
+#                   was given, blank otherwise
 # - incobsolete     true if --with-obsolete was given, blank otherwise
 # - inc_cxx_tests   true if --with-c++-tests was given, blank otherwise
 # - inc_longrunning_tests  true if --with-longrunning-tests was given, blank
@@ -946,7 +956,6 @@
 # - vc_files        true if --vc-files was given, false if --no-vc-files was
 #                   given, blank otherwise
 # - autoconf_minversion  minimum supported autoconf version
-# - do_changelog    false if --no-changelog was given, : otherwise
 # - doit            : if actions shall be executed, false if only to be printed
 # - symbolic        true if --symlink or --more-symlinks was given, blank
 #                   otherwise
@@ -987,7 +996,6 @@
   po_domain=
   witness_c_macro=
   vc_files=
-  do_changelog=:
   doit=:
   symbolic=
   lsymbolic=
@@ -1158,6 +1166,9 @@
       --with-all-tests | --with-all-test | --with-all-tes | --with-all-te | --with-all-t | --with-all- | --with-all | --with-al | --with-a)
         inc_all_tests=true
         shift ;;
+      --without-tests | --without-test | --without-tes | --without-te | --without-t)
+        inctests=false
+        shift ;;
       --without-c++-tests | --without-c++-test | --without-c++-tes | --without-c++-te | --without-c++-t | --without-c++- | --without-c++ | --without-c+ | --without-c)
         excl_cxx_tests=true
         shift ;;
@@ -1254,7 +1265,7 @@
         vc_files=false
         shift ;;
       --no-changelog | --no-changelo | --no-changel | --no-change | --no-chang | --no-chan | --no-cha | --no-ch )
-        do_changelog=false
+        # A no-op for backward compatibility.
         shift ;;
       --dry-run )
         doit=false
@@ -1297,19 +1308,6 @@
       func_exit 1
     fi
   fi
-  # This code helps migrating from --import to --add-import or --update. It can
-  # be removed on 2012-01-01.
-  if test "$mode" = import && test $# = 0; then
-    echo "gnulib-tool: cowardly refusing to erase the module list." 1>&2
-    echo "The meaning of the option '--import' has changed." 1>&2
-    echo "See the documentation at" 1>&2
-    echo "<http://www.gnu.org/software/gnulib/manual/html_node/Modified-imports.html>." 1>&2
-    echo "For updating to a newer version of gnulib, use" 1>&2
-    echo "  gnulib-tool --add-import" 1>&2
-    echo "For restoring files that were omitted from version control, use" 1>&2
-    echo "  gnulib-tool --update" 1>&2
-    func_exit 1
-  fi
   if test "$mode" = update; then
     if test $# != 0; then
       echo "gnulib-tool: too many arguments in 'update' mode" 1>&2
@@ -1336,7 +1334,6 @@
       echo "you need to use 'gnulib --import' - at your own risk!" 1>&2
       func_exit 1
     fi
-    do_changelog=false
   fi
   if test -n "$pobase" && test -z "$po_domain"; then
     echo "gnulib-tool: together with --po-base, you need to specify --po-domain" 1>&2
@@ -1346,7 +1343,22 @@
   if test -z "$pobase" && test -n "$po_domain"; then
     func_warning "--po-domain has no effect without a --po-base option"
   fi
-  if test "$cond_dependencies" = true && test -n "$inctests"; then
+  # Canonicalize the inctests variable.
+  case "$mode" in
+    import | add-import | remove-import | update)
+      if test -z "$inctests"; then
+        inctests=false
+      fi
+      ;;
+    create-testdir | create-megatestdir | test | megatest)
+      if test -z "$inctests"; then
+        inctests=true
+      fi
+      ;;
+  esac
+  # Now the only possible values of "$inctests" are true and false
+  # (or blank but then it is irrelevant).
+  if test "$cond_dependencies" = true && test "$inctests" = true; then
     echo "gnulib-tool: option --conditional-dependencies is not supported with --with-tests" 1>&2
     func_exit 1
   fi
@@ -2619,7 +2631,7 @@
 # - local_gnulib_dir  from --local-dir
 # - modcache        true or false, from --cache-modules/--no-cache-modules
 # - modules         list of specified modules
-# - inctests        true if tests should be included, blank otherwise
+# - inctests        true if tests should be included, false otherwise
 # - incobsolete     true if obsolete modules among dependencies should be
 #                   included, blank otherwise
 # - inc_cxx_tests   true if C++ interoperability tests should be included,
@@ -2704,7 +2716,7 @@
           if test -n "$duplicated_deps"; then
             func_warning "module $module has duplicated dependencies: "`echo $duplicated_deps`
           fi
-          if test -n "$inctests"; then
+          if $inctests; then
             testsmodule=`func_get_tests_module $module`
             if test -n "$testsmodule"; then
               deps="$deps $testsmodule"
@@ -2827,7 +2839,7 @@
 # - local_gnulib_dir  from --local-dir
 # - modcache        true or false, from --cache-modules/--no-cache-modules
 # - specified_modules  list of specified modules
-# - inctests        true if tests should be included, blank otherwise
+# - inctests        true if tests should be included, false otherwise
 # - incobsolete     true if obsolete modules among dependencies should be
 #                   included, blank otherwise
 # - inc_cxx_tests   true if C++ interoperability tests should be included,
@@ -2865,7 +2877,7 @@
 {
   # Determine main module list.
   saved_inctests="$inctests"
-  inctests=""
+  inctests=false
   modules="$specified_modules"
   func_modules_transitive_closure
   main_modules="$modules"
@@ -3145,7 +3157,7 @@
          || { test -n "$lsymbolic" \
               && test "$lookedup_file" = "$local_gnulib_dir/$f"; }; } \
        && test -z "$lookedup_tmp" \
-       && cmp "$lookedup_file" "$tmpfile" > /dev/null; then
+       && cmp -s "$lookedup_file" "$tmpfile"; then
       func_ln_if_changed "$lookedup_file" "$destdir/$g"
     else
       mv -f "$tmpfile" "$destdir/${g}" || func_fatal_error "failed"
@@ -3174,7 +3186,7 @@
 # - already_present  nonempty if the file should already exist, empty otherwise
 func_update_file ()
 {
-  if cmp "$destdir/$g" "$tmpfile" > /dev/null; then
+  if cmp -s "$destdir/$g" "$tmpfile"; then
     : # The file has not changed.
   else
     # Replace the file.
@@ -3189,7 +3201,7 @@
            || { test -n "$lsymbolic" \
                 && test "$lookedup_file" = "$local_gnulib_dir/$f"; }; } \
          && test -z "$lookedup_tmp" \
-         && cmp "$lookedup_file" "$tmpfile" > /dev/null; then
+         && cmp -s "$lookedup_file" "$tmpfile"; then
         func_ln_if_changed "$lookedup_file" "$destdir/$g"
       else
         mv -f "$tmpfile" "$destdir/${g}" || func_fatal_error "failed"
@@ -3342,8 +3354,12 @@
     echo "noinst_HEADERS ="
     echo "noinst_LIBRARIES ="
     echo "noinst_LTLIBRARIES ="
-    # Automake versions < 1.9b create an empty pkgdatadir at installation time
-    # if you specify pkgdata_DATA to empty. This is a workaround.
+    # Automake versions < 1.11.4 create an empty pkgdatadir at
+    # installation time if you specify pkgdata_DATA to empty.
+    # See automake bugs #10997 and #11030:
+    #  * http://debbugs.gnu.org/10997
+    #  * http://debbugs.gnu.org/11030
+    # So we need this workaround.
     if grep '^pkgdata_DATA *+=' "$tmp"/allsnippets > /dev/null; then
       echo "pkgdata_DATA ="
     fi
@@ -3556,9 +3572,11 @@
   witness_macro="$1"
   if test "$libtool" = true; then
     libext=la
+    perhapsLT=LT
     sed_eliminate_LDFLAGS="$sed_noop"
   else
     libext=a
+    perhapsLT=
     sed_eliminate_LDFLAGS='/^lib_LDFLAGS[	 ]*+=/d'
   fi
   if $for_test; then
@@ -3663,8 +3681,12 @@
       echo "check_LIBRARIES = libtests.a"
     fi
   fi
-  # Automake versions < 1.9b create an empty pkgdatadir at installation time
-  # if you specify pkgdata_DATA to empty. This is a workaround.
+  # Automake versions < 1.11.4 create an empty pkgdatadir at
+  # installation time if you specify pkgdata_DATA to empty.
+  # See automake bugs #10997 and #11030:
+  #  * http://debbugs.gnu.org/10997
+  #  * http://debbugs.gnu.org/11030
+  # So we need this workaround.
   if grep '^pkgdata_DATA *+=' "$tmp"/main_snippets "$tmp"/longrunning_snippets > /dev/null; then
     echo "pkgdata_DATA ="
   fi
@@ -3868,6 +3890,7 @@
 # func_emit_autoconf_snippet indentation
 # emits the autoconf snippet of a module.
 # Input:
+# - indentation       spaces to prepend on each line
 # - local_gnulib_dir  from --local-dir
 # - modcache          true or false, from --cache-modules/--no-cache-modules
 # - sed_replace_build_aux  sed expression that replaces reference to build-aux
@@ -3881,9 +3904,9 @@
 #                     command line options.
 # - disable_gettext   true or false. It tells whether to disable AM_GNU_GETTEXT
 #                     invocations.
-# - indentation       spaces to prepend on each line
 func_emit_autoconf_snippet ()
 {
+  indentation="$1"
   if { case $module in
          gnumakefile | maintainer-makefile)
            # These modules are meant to be used only in the top-level directory.
@@ -4074,7 +4097,7 @@
 # - docbase         directory relative to destdir where to place doc files
 # - testsbase       directory relative to destdir where to place unit test code
 # - auxdir          directory relative to destdir where to place build aux files
-# - inctests        true if --with-tests was given, blank otherwise
+# - inctests        true if --with-tests was given, false otherwise
 # - incobsolete     true if --with-obsolete was given, blank otherwise
 # - inc_cxx_tests   true if --with-c++-tests was given, blank otherwise
 # - inc_longrunning_tests  true if --with-longrunning-tests was given, blank
@@ -4368,8 +4391,11 @@
       fi
     fi
     # Require the tests if specified either way.
-    if test -z "$inctests"; then
+    if ! $inctests; then
       inctests="$cached_inctests"
+      if test -z "$inctests"; then
+        inctests=false
+      fi
     fi
     # The libname defaults to the cached one.
     if test -z "$supplied_libname"; then
@@ -4418,7 +4444,7 @@
       vc_files="$cached_vc_files"
     fi
     # Ensure constraints.
-    if test "$cond_dependencies" = true && test -n "$inctests"; then
+    if test "$cond_dependencies" = true && $inctests; then
       echo "gnulib-tool: option --conditional-dependencies is not supported with --with-tests" 1>&2
       func_exit 1
     fi
@@ -4615,7 +4641,7 @@
     if test -n "$docfiles"; then
       echo "$docbase"
     fi
-    if test -n "$inctests"; then
+    if $inctests; then
       echo "$testsbase"
     fi
     echo "$auxdir"
@@ -4764,7 +4790,7 @@
   func_append actioncmd " --doc-base=$docbase"
   func_append actioncmd " --tests-base=$testsbase"
   func_append actioncmd " --aux-dir=$auxdir"
-  if test -n "$inctests"; then
+  if $inctests; then
     func_append actioncmd " --with-tests"
   fi
   if test -n "$incobsolete"; then
@@ -4861,7 +4887,7 @@
     pobase_base=`basename "$pobase"`
     func_note_Makefile_am_edit "$pobase_dir" SUBDIRS "$pobase_base"
   fi
-  if test -n "$inctests"; then
+  if $inctests; then
     if test "$makefile_am" = Makefile.am; then
       testsbase_dir=`echo "$testsbase" | sed -n -e 's,/[^/]*$,/,p'`
       testsbase_base=`basename "$testsbase"`
@@ -4880,7 +4906,7 @@
           && ! { test -f "${destdir}/${dir1}Makefile.am" \
                  || test "${dir1}Makefile.am" = "$sourcebase/$makefile_am" \
                  || test "./${dir1}Makefile.am" = "$sourcebase/$makefile_am" \
-                 || { test -n "$inctests" \
+                 || { $inctests \
                       && { test "${dir1}Makefile.am" = "$testsbase/$makefile_am" \
                            || test "./${dir1}Makefile.am" = "$testsbase/$makefile_am"; }; }; }; do
       dir2=`echo "$dir1" | sed -e "$sed_last"`"$dir2"
@@ -4895,7 +4921,7 @@
   modules="$main_modules"
   func_emit_lib_Makefile_am > "$tmpfile"
   if test -f "$destdir"/$sourcebase/$makefile_am; then
-    if cmp "$destdir"/$sourcebase/$makefile_am "$tmpfile" > /dev/null; then
+    if cmp -s "$destdir"/$sourcebase/$makefile_am "$tmpfile"; then
       rm -f "$tmpfile"
     else
       if $doit; then
@@ -4926,7 +4952,7 @@
       func_lookup_file build-aux/po/$file
       cat "$lookedup_file" > "$tmpfile"
       if test -f "$destdir"/$pobase/$file; then
-        if cmp "$destdir"/$pobase/$file "$tmpfile" > /dev/null; then
+        if cmp -s "$destdir"/$pobase/$file "$tmpfile"; then
           rm -f "$tmpfile"
         else
           if $doit; then
@@ -4953,7 +4979,7 @@
     func_dest_tmpfilename $pobase/Makevars
     func_emit_po_Makevars > "$tmpfile"
     if test -f "$destdir"/$pobase/Makevars; then
-      if cmp "$destdir"/$pobase/Makevars "$tmpfile" > /dev/null; then
+      if cmp -s "$destdir"/$pobase/Makevars "$tmpfile"; then
         rm -f "$tmpfile"
       else
         if $doit; then
@@ -4979,7 +5005,7 @@
     func_dest_tmpfilename $pobase/POTFILES.in
     func_emit_po_POTFILES_in > "$tmpfile"
     if test -f "$destdir"/$pobase/POTFILES.in; then
-      if cmp "$destdir"/$pobase/POTFILES.in "$tmpfile" > /dev/null; then
+      if cmp -s "$destdir"/$pobase/POTFILES.in "$tmpfile"; then
         rm -f "$tmpfile"
       else
         if $doit; then
@@ -5028,7 +5054,7 @@
           }
       ) > "$tmpfile"
       if test -f "$destdir"/$pobase/LINGUAS; then
-        if cmp "$destdir"/$pobase/LINGUAS "$tmpfile" > /dev/null; then
+        if cmp -s "$destdir"/$pobase/LINGUAS "$tmpfile"; then
           rm -f "$tmpfile"
         else
           echo "Updating $pobase/LINGUAS (backup in $pobase/LINGUAS~)"
@@ -5093,7 +5119,9 @@
     echo "gl_PO_BASE([$pobase])"
     echo "gl_DOC_BASE([$docbase])"
     echo "gl_TESTS_BASE([$testsbase])"
-    test -z "$inctests" || echo "gl_WITH_TESTS"
+    if $inctests; then
+      echo "gl_WITH_TESTS"
+    fi
     echo "gl_LIB([$libname])"
     if test -n "$lgpl"; then
       if test "$lgpl" = yes; then
@@ -5111,13 +5139,13 @@
     fi
     echo "gl_MACRO_PREFIX([$macro_prefix])"
     echo "gl_PO_DOMAIN([$po_domain])"
-    echo "gl_WITNESS_C_DOMAIN([$witness_c_macro])"
+    echo "gl_WITNESS_C_MACRO([$witness_c_macro])"
     if test -n "$vc_files"; then
       echo "gl_VC_FILES([$vc_files])"
     fi
   ) > "$tmpfile"
   if test -f "$destdir"/$m4base/gnulib-cache.m4; then
-    if cmp "$destdir"/$m4base/gnulib-cache.m4 "$tmpfile" > /dev/null; then
+    if cmp -s "$destdir"/$m4base/gnulib-cache.m4 "$tmpfile"; then
       rm -f "$tmpfile"
     else
       if $doit; then
@@ -5256,7 +5284,7 @@
     echo "])"
   ) > "$tmpfile"
   if test -f "$destdir"/$m4base/gnulib-comp.m4; then
-    if cmp "$destdir"/$m4base/gnulib-comp.m4 "$tmpfile" > /dev/null; then
+    if cmp -s "$destdir"/$m4base/gnulib-comp.m4 "$tmpfile"; then
       rm -f "$tmpfile"
     else
       if $doit; then
@@ -5284,14 +5312,14 @@
     fi
   fi
 
-  if test -n "$inctests"; then
+  if $inctests; then
     # Create tests makefile.
     func_dest_tmpfilename $testsbase/$makefile_am
     destfile="$testsbase/$makefile_am"
     modules="$testsrelated_modules"
     func_emit_tests_Makefile_am "${macro_prefix}tests_WITNESS" > "$tmpfile"
     if test -f "$destdir"/$testsbase/$makefile_am; then
-      if cmp "$destdir"/$testsbase/$makefile_am "$tmpfile" > /dev/null; then
+      if cmp -s "$destdir"/$testsbase/$makefile_am "$tmpfile"; then
         rm -f "$tmpfile"
       else
         if $doit; then
@@ -5311,7 +5339,7 @@
         echo "Create $testsbase/$makefile_am"
         rm -f "$tmpfile"
       fi
-    func_append added_files "$testsbase/$makefile_am$nl"
+      func_append added_files "$testsbase/$makefile_am$nl"
     fi
   fi
 
@@ -5345,7 +5373,7 @@
             (echo "$dir_added" | sed -e '/^$/d' | LC_ALL=C sort -u \
                | LC_ALL=C join -v 1 - "$tmp"/ignore > "$tmp"/ignore-added
              echo "$dir_removed" | sed -e '/^$/d' | LC_ALL=C sort -u \
-               | LC_ALL=C join -v 1 - "$tmp"/ignore > "$tmp"/ignore-removed
+               > "$tmp"/ignore-removed
             )
             if test -s "$tmp"/ignore-added || test -s "$tmp"/ignore-removed; then
               if $doit; then
@@ -5472,7 +5500,7 @@
   if test -n "$pobase"; then
     echo "  - add \"$pobase/Makefile.in\" to AC_CONFIG_FILES in $configure_ac,"
   fi
-  if test -n "$inctests"; then
+  if $inctests; then
     if test "$makefile_am" = Makefile.am; then
       echo "  - add \"$testsbase/Makefile\" to AC_CONFIG_FILES in $configure_ac,"
     else
@@ -5507,7 +5535,7 @@
 # - local_gnulib_dir  from --local-dir
 # - modcache        true or false, from --cache-modules/--no-cache-modules
 # - auxdir          directory relative to destdir where to place build aux files
-# - inctests        true if tests should be included, blank otherwise
+# - inctests        true if tests should be included, false otherwise
 # - incobsolete     true if obsolete modules among dependencies should be
 #                   included, blank otherwise
 # - excl_cxx_tests   true if C++ interoperability tests should be excluded,
@@ -5554,9 +5582,9 @@
   # its dependencies.
   saved_inctests="$inctests"
   # When computing transitive closures, don't consider $module to depend on
-  # $module-tests. Need this becauses tests are implicitly GPL and may depend
+  # $module-tests. Need this because tests are implicitly GPL and may depend
   # on GPL modules - therefore we don't want a warning in this case.
-  inctests=""
+  inctests=false
   for requested_module in $specified_modules; do
     requested_license=`func_get_license "$requested_module"`
     if test "$requested_license" != GPL; then
@@ -5758,7 +5786,7 @@
     func_append subdirs " po"
   fi
 
-  if test -n "$inctests"; then
+  if $inctests; then
     test -d "$testdir/$testsbase" || mkdir "$testdir/$testsbase"
     if $single_configure; then
       # Create $testsbase/Makefile.am.
@@ -6031,7 +6059,7 @@
    func_execute_command ${AUTOHEADER} || func_exit 1
    func_execute_command ${AUTOMAKE} --add-missing --copy || func_exit 1
   ) || func_exit 1
-  if test -n "$inctests" && ! $single_configure; then
+  if $inctests && ! $single_configure; then
     # Create autogenerated files.
     (cd "$testdir/$testsbase" || func_exit 1
      # Do not use "${AUTORECONF} --force --install", because it may invoke
@@ -6072,7 +6100,7 @@
                                esac;
                              done`
   tests_distributed_built_sources=
-  if test -n "$inctests"; then
+  if $inctests; then
     # Likewise for built files in the $testsbase directory.
     tests_cleaned_files=`sed -e "$sed_remove_backslash_newline" < "$testdir/$testsbase/Makefile.am" \
                          | sed -n -e 's,^CLEANFILES[	 ]*+=\([^#]*\).*$,\1,p' -e 's,^MOSTLYCLEANFILES[	 ]*+=\([^#]*\).*$,\1,p'`
--- a/lib/accept4.c
+++ b/lib/accept4.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -91,7 +90,7 @@
       /* Closing fd before allocating the new fd ensures that the new fd will
          have the minimum possible value.  */
       close (fd);
-      nfd = _open_osfhandle ((long) new_handle,
+      nfd = _open_osfhandle ((intptr_t) new_handle,
                              O_NOINHERIT | (flags & (O_TEXT | O_BINARY)));
       if (nfd < 0)
         {
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -55,6 +55,15 @@
 # define ENOTSUP (-1)
 #endif
 
+#include <limits.h>
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
 #ifndef HAVE_FCHMOD
 # define HAVE_FCHMOD false
 # define fchmod(fd, mode) (-1)
@@ -62,7 +71,7 @@
 
 /* Recognize some common errors such as from an NFS mount that does
    not support ACLs, even when local drives do.  */
-#if defined __APPLE__ && defined __MACH__ /* MacOS X */
+#if defined __APPLE__ && defined __MACH__ /* Mac OS X */
 # define ACL_NOT_WELL_SUPPORTED(Err) \
      ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT)
 #elif defined EOPNOTSUPP /* Tru64 NFS */
@@ -73,11 +82,16 @@
      ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY)
 #endif
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef ACL_INTERNAL_INLINE
+# define ACL_INTERNAL_INLINE _GL_INLINE
+#endif
+
 #if USE_ACL
 
 # if HAVE_ACL_GET_FILE
 /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
 
 #  ifndef MIN_ACL_ENTRIES
 #   define MIN_ACL_ENTRIES 4
@@ -88,7 +102,7 @@
 /* Most platforms have a 1-argument acl_get_fd, only OSF/1 has a 2-argument
    macro(!).  */
 #   if HAVE_ACL_FREE_TEXT /* OSF/1 */
-static inline acl_t
+ACL_INTERNAL_INLINE acl_t
 rpl_acl_get_fd (int fd)
 {
   return acl_get_fd (fd, ACL_TYPE_ACCESS);
@@ -107,7 +121,7 @@
 /* Most platforms have a 2-argument acl_set_fd, only OSF/1 has a 3-argument
    macro(!).  */
 #   if HAVE_ACL_FREE_TEXT /* OSF/1 */
-static inline int
+ACL_INTERNAL_INLINE int
 rpl_acl_set_fd (int fd, acl_t acl)
 {
   return acl_set_fd (fd, ACL_TYPE_ACCESS, acl);
@@ -140,7 +154,7 @@
 
 /* Set to 1 if a file's mode is implicit by the ACL.
    Set to 0 if a file's mode is stored independently from the ACL.  */
-#  if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi /* MacOS X, IRIX */
+#  if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi /* Mac OS X, IRIX */
 #   define MODE_INSIDE_ACL 0
 #  else
 #   define MODE_INSIDE_ACL 1
@@ -154,7 +168,7 @@
 extern int acl_entries (acl_t);
 #  endif
 
-#  if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
+#  if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
 /* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
    Return 1 if the given ACL is non-trivial.
    Return 0 if it is trivial.  */
@@ -254,3 +268,5 @@
 # endif
 
 #endif
+
+_GL_INLINE_HEADER_END
--- a/lib/acl.h
+++ b/lib/acl.h
@@ -21,7 +21,8 @@
 #include <sys/stat.h>
 
 int file_has_acl (char const *, struct stat const *);
-int copy_acl (char const *, int, char const *, int, mode_t);
+int qset_acl (char const *, int, mode_t);
 int set_acl (char const *, int, mode_t);
-int qset_acl (char const *, int, mode_t);
+int qcopy_acl (char const *, int, char const *, int, mode_t);
+int copy_acl (char const *, int, char const *, int, mode_t);
 int chmod_or_fchmod (char const *, int, mode_t);
--- a/lib/acl_entries.c
+++ b/lib/acl_entries.c
@@ -22,7 +22,7 @@
 #include "acl-internal.h"
 
 /* This file assumes POSIX-draft like ACLs
-   (Linux, FreeBSD, MacOS X, IRIX, Tru64).  */
+   (Linux, FreeBSD, Mac OS X, IRIX, Tru64).  */
 
 /* Return the number of entries in ACL.
    Return -1 and set errno upon failure to determine it.  */
@@ -34,8 +34,8 @@
 
   if (acl != NULL)
     {
-#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, MacOS X */
-# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
+#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Mac OS X */
+# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
       /* acl_get_entry returns 0 when it successfully fetches an entry,
          and -1/EINVAL at the end.  */
       acl_entry_t ace;
--- a/lib/acosl.c
+++ b/lib/acosl.c
@@ -24,6 +24,9 @@
 
 #else
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_asinl.c
+   and           glibc/sysdeps/ieee754/ldbl-128/e_acosl.c.  */
+
 /*
   Long double expansions contributed by
   Stephen L. Moshier <moshier@na-net.ornl.gov>
--- a/lib/alignof.h
+++ b/lib/alignof.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _ALIGNOF_H
 #define _ALIGNOF_H
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -14,9 +14,9 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   License along with this program; if not, see
+   <http://www.gnu.org/licenses/>.
+  */
 
 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
    means there is a real alloca function.  */
@@ -44,6 +44,13 @@
 #  define alloca _alloca
 # elif defined __DECC && defined __VMS
 #  define alloca __ALLOCA
+# elif defined __TANDEM && defined _TNS_E_TARGET
+#  ifdef  __cplusplus
+extern "C"
+#  endif
+void *_alloca (unsigned short);
+#  pragma intrinsic (_alloca)
+#  define alloca _alloca
 # else
 #  include <stddef.h>
 #  ifdef  __cplusplus
--- a/lib/alphasort.c
+++ b/lib/alphasort.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/arcfour.c
+++ b/lib/arcfour.c
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/arcfour.h
+++ b/lib/arcfour.h
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/arctwo.c
+++ b/lib/arctwo.c
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  */
 
 /* Code from GnuTLS/Libgcrypt adapted for gnulib by Simon Josefsson. */
@@ -69,7 +67,7 @@
 };
 
 /* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
 to_uchar (char ch)
 {
   return ch;
--- a/lib/arctwo.h
+++ b/lib/arctwo.h
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/argp-ba.c
+++ b/lib/argp-ba.c
@@ -23,7 +23,7 @@
    ADDR."  */
 const char *argp_program_bug_address
 /* This variable should be zero-initialized.  On most systems, putting it into
-   BSS is sufficient.  Not so on MacOS X 10.3 and 10.4, see
+   BSS is sufficient.  Not so on Mac OS X 10.3 and 10.4, see
    <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>
    <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00096.html>.  */
 #if defined __ELF__
--- a/lib/argp-help.c
+++ b/lib/argp-help.c
@@ -1,4 +1,4 @@
-/* Hierarchial argument parsing help output
+/* Hierarchical argument parsing help output
    Copyright (C) 1995-2005, 2007, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -29,6 +29,7 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <assert.h>
 #include <stdarg.h>
 #include <ctype.h>
@@ -154,7 +155,7 @@
   uparams.valid = 1;
 }
 
-/* Read user options from the environment, and fill in UPARAMS appropiately. */
+/* Read user options from the environment, and fill in UPARAMS appropriately. */
 static void
 fill_in_uparams (const struct argp_state *state)
 {
@@ -277,11 +278,11 @@
      -xARG, -yARG, --long1=ARG, --long2=ARG        Documentation...
 
    Where ARG will be omitted if there's no argument, for this option, or
-   will be surrounded by "[" and "]" appropiately if the argument is
-   optional.  The documentation string is word-wrapped appropiately, and if
+   will be surrounded by "[" and "]" appropriately if the argument is
+   optional.  The documentation string is word-wrapped appropriately, and if
    the list of options is long enough, it will be started on a separate line.
    If there are no short options for a given option, the first long option is
-   indented slighly in a way that's supposed to make most long options appear
+   indented slightly in a way that's supposed to make most long options appear
    to be in a separate column.
 
    For example, the following output (from ps):
@@ -753,7 +754,7 @@
   if (entry1->cluster != entry2->cluster)
     {
       /* The entries are not within the same cluster, so we can't compare them
-         directly, we have to use the appropiate clustering level too.  */
+         directly, we have to use the appropriate clustering level too.  */
       if (! entry1->cluster)
         /* ENTRY1 is at the "base level", not in a cluster, so we have to
            compare it's group number with that of the base cluster in which
@@ -1023,7 +1024,7 @@
     return doc;
 }
 
-/* Prints STR as a header line, with the margin lines set appropiately, and
+/* Prints STR as a header line, with the margin lines set appropriately, and
    notes the fact that groups should be separated with a blank line.  ARGP is
    the argp that should dictate any user doc filtering to take place.  Note
    that the previous wrap margin isn't restored, but the left margin is reset
@@ -1480,7 +1481,7 @@
 }
 
 /* Print the documentation for ARGP to STREAM; if POST is false, then
-   everything preceeding a '\v' character in the documentation strings (or
+   everything preceding a '\v' character in the documentation strings (or
    the whole string, for those with none) is printed, otherwise, everything
    following the '\v' character (nothing for strings without).  Each separate
    bit of documentation is separated a blank line, and if PRE_BLANK is true,
@@ -1579,7 +1580,7 @@
 }
 
 /* Output a usage message for ARGP to STREAM.  If called from
-   argp_state_help, STATE is the relevent parsing state.  FLAGS are from the
+   argp_state_help, STATE is the relevant parsing state.  FLAGS are from the
    set ARGP_HELP_*.  NAME is what to use wherever a "program name" is
    needed. */
 static void
--- a/lib/argp-parse.c
+++ b/lib/argp-parse.c
@@ -1,4 +1,4 @@
-/* Hierarchial argument parsing, layered over getopt
+/* Hierarchical argument parsing, layered over getopt
    Copyright (C) 1995-2000, 2002-2004, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -204,7 +204,7 @@
      particular short options is from.  */
   char *short_end;
 
-  /* The number of non-option args sucessfully handled by this parser.  */
+  /* The number of non-option args successfully handled by this parser.  */
   unsigned args_processed;
 
   /* This group's parser's parent's group.  */
@@ -386,7 +386,7 @@
   return group;
 }
 
-/* Find the merged set of getopt options, with keys appropiately prefixed. */
+/* Find the merged set of getopt options, with keys appropriately prefixed. */
 static void
 parser_convert (struct parser *parser, const struct argp *argp, int flags)
 {
@@ -880,11 +880,11 @@
 #ifndef _LIBC
   if (!(flags & ARGP_PARSE_ARGV0))
     {
-#ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
       if (!program_invocation_name)
         program_invocation_name = argv[0];
 #endif
-#ifdef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
       if (!program_invocation_short_name)
         program_invocation_short_name = __argp_base_name (argv[0]);
 #endif
--- a/lib/argp-pin.c
+++ b/lib/argp-pin.c
@@ -24,4 +24,3 @@
 #ifndef HAVE_PROGRAM_INVOCATION_NAME
 char *program_invocation_name = 0;
 #endif
-
--- a/lib/argp-pv.c
+++ b/lib/argp-pv.c
@@ -23,7 +23,7 @@
    ARGP_NO_EXIT flag is used).  Overridden by ARGP_PROGRAM_VERSION_HOOK.  */
 const char *argp_program_version
 /* This variable should be zero-initialized.  On most systems, putting it into
-   BSS is sufficient.  Not so on MacOS X 10.3 and 10.4, see
+   BSS is sufficient.  Not so on Mac OS X 10.3 and 10.4, see
    <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>
    <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00096.html>.  */
 #if defined __ELF__
--- a/lib/argp-version-etc.h
+++ b/lib/argp-version-etc.h
@@ -27,7 +27,7 @@
    given.
 
    If NAME is NULL, the package name (as given by the PACKAGE macro)
-   is asumed to be the name of the program.
+   is assumed to be the name of the program.
 
    This function is intended to be called before argp_parse().
 */
--- a/lib/argp.h
+++ b/lib/argp.h
@@ -1,4 +1,4 @@
-/* Hierarchial argument parsing, layered over getopt.
+/* Hierarchical argument parsing, layered over getopt.
    Copyright (C) 1995-1999, 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -278,7 +278,7 @@
 };
 
 /* Possible KEY arguments to a help filter function.  */
-#define ARGP_KEY_HELP_PRE_DOC   0x2000001 /* Help text preceeding options. */
+#define ARGP_KEY_HELP_PRE_DOC   0x2000001 /* Help text preceding options. */
 #define ARGP_KEY_HELP_POST_DOC  0x2000002 /* Help text following options. */
 #define ARGP_KEY_HELP_HEADER    0x2000003 /* Option header string. */
 #define ARGP_KEY_HELP_EXTRA     0x2000004 /* After all other documentation;
@@ -506,7 +506,7 @@
    parsing routine (thus taking an argp_state structure as the first
    argument).  They may or may not print an error message and exit, depending
    on the flags in STATE -- in any case, the caller should be prepared for
-   them *not* to exit, and should return an appropiate error after calling
+   them *not* to exit, and should return an appropriate error after calling
    them.  [argp_usage & argp_error should probably be called argp_state_...,
    but they're used often enough that they should be short]  */
 
--- a/lib/argz.c
+++ b/lib/argz.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/arpa_inet.in.h
+++ b/lib/arpa_inet.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_ARPA_INET_H
 
--- a/lib/asinl.c
+++ b/lib/asinl.c
@@ -24,6 +24,8 @@
 
 #else
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_asinl.c.  */
+
 /*
   Long double expansions contributed by
   Stephen L. Moshier <moshier@na-net.ornl.gov>
--- a/lib/asnprintf.c
+++ b/lib/asnprintf.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/asprintf.c
+++ b/lib/asprintf.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/assert.in.h
+++ b/lib/assert.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Do not guard the include, since <assert.h> is supposed to define
    the assert macro each time it is included.  */
--- a/lib/at-func.c
+++ b/lib/at-func.c
@@ -17,9 +17,17 @@
 /* written by Jim Meyering */
 
 #include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
-#include "openat.h"
-#include "openat-priv.h"
-#include "save-cwd.h"
+
+#ifdef GNULIB_SUPPORT_ONLY_AT_FDCWD
+# include <errno.h>
+# ifndef ENOTSUP
+#  define ENOTSUP EINVAL
+# endif
+#else
+# include "openat.h"
+# include "openat-priv.h"
+# include "save-cwd.h"
+#endif
 
 #ifdef AT_FUNC_USE_F1_COND
 # define CALL_FUNC(F)                           \
@@ -51,7 +59,7 @@
 
 /* Call AT_FUNC_F1 to operate on FILE, which is in the directory
    open on descriptor FD.  If AT_FUNC_USE_F1_COND is defined to a value,
-   AT_FUNC_POST_FILE_PARAM_DECLS must inlude a parameter named flag;
+   AT_FUNC_POST_FILE_PARAM_DECLS must include a parameter named flag;
    call AT_FUNC_F2 if FLAG is 0 or fail if FLAG contains more bits than
    AT_FUNC_USE_F1_COND.  Return int and fail with -1 unless AT_FUNC_RESULT
    or AT_FUNC_FAIL are defined.  If possible, do it without changing the
@@ -61,17 +69,22 @@
 FUNC_RESULT
 AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS)
 {
+  VALIDATE_FLAG (flag);
+
+  if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
+    return CALL_FUNC (file);
+
+#ifdef GNULIB_SUPPORT_ONLY_AT_FDCWD
+  errno = ENOTSUP;
+  return FUNC_FAIL;
+#else
+  {
   /* Be careful to choose names unlikely to conflict with
      AT_FUNC_POST_FILE_PARAM_DECLS.  */
   struct saved_cwd saved_cwd;
   int saved_errno;
   FUNC_RESULT err;
 
-  VALIDATE_FLAG (flag);
-
-  if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
-    return CALL_FUNC (file);
-
   {
     char proc_buf[OPENAT_BUFFER_SIZE];
     char *proc_file = openat_proc_name (proc_buf, fd, file);
@@ -125,6 +138,8 @@
   if (saved_errno)
     errno = saved_errno;
   return err;
+  }
+#endif
 }
 #undef CALL_FUNC
 #undef FUNC_RESULT
--- a/lib/atanl.c
+++ b/lib/atanl.c
@@ -28,6 +28,8 @@
 
 #else
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_atanl.c.  */
+
 /*                                                      s_atanl.c
  *
  *      Inverse circular tangent for 128-bit long double precision
--- a/lib/base32.c
+++ b/lib/base32.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Adapted from Simon Josefsson's base64 code by Gijs van Tulder.
  *
@@ -52,7 +51,7 @@
 #include <string.h>
 
 /* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
 to_uchar (char ch)
 {
   return ch;
@@ -303,7 +302,7 @@
    and return CTX->buf.  In either case, advance *IN to point to the byte
    after the last one processed, and set *N_NON_NEWLINE to the number of
    verified non-newline bytes accessible through the returned pointer.  */
-static inline char *
+static char *
 get_8 (struct base32_decode_context *ctx,
        char const *restrict *in, char const *restrict in_end,
        size_t *n_non_newline)
@@ -357,7 +356,7 @@
    as many bytes as possible are written to *OUT.  On return, advance
    *OUT to point to the byte after the last one written, and decrement
    *OUTLEN to reflect the number of bytes remaining in *OUT.  */
-static inline bool
+static bool
 decode_8 (char const *restrict in, size_t inlen,
           char *restrict *outp, size_t *outleft)
 {
--- a/lib/base32.h
+++ b/lib/base32.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef BASE32_H
 # define BASE32_H
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  Partially adapted from GNU MailUtils
  * (mailbox/filter_trans.c, as of 2004-11-28).  Improved by review
@@ -54,7 +53,7 @@
 #include <string.h>
 
 /* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
 to_uchar (char ch)
 {
   return ch;
@@ -315,7 +314,7 @@
    and return CTX->buf.  In either case, advance *IN to point to the byte
    after the last one processed, and set *N_NON_NEWLINE to the number of
    verified non-newline bytes accessible through the returned pointer.  */
-static inline char *
+static char *
 get_4 (struct base64_decode_context *ctx,
        char const *restrict *in, char const *restrict in_end,
        size_t *n_non_newline)
@@ -369,7 +368,7 @@
    as many bytes as possible are written to *OUT.  On return, advance
    *OUT to point to the byte after the last one written, and decrement
    *OUTLEN to reflect the number of bytes remaining in *OUT.  */
-static inline bool
+static bool
 decode_4 (char const *restrict in, size_t inlen,
           char *restrict *outp, size_t *outleft)
 {
--- a/lib/base64.h
+++ b/lib/base64.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef BASE64_H
 # define BASE64_H
@@ -25,6 +24,10 @@
 /* Get bool. */
 # include <stdbool.h>
 
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 /* This uses that the expression (n+(k-1))/k means the smallest
    integer >= n/k, i.e., the ceiling of n/k.  */
 # define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
@@ -58,4 +61,8 @@
 #define base64_decode_alloc(in, inlen, out, outlen) \
         base64_decode_alloc_ctx (NULL, in, inlen, out, outlen)
 
+# ifdef __cplusplus
+}
+# endif
+
 #endif /* BASE64_H */
new file mode 100644
--- /dev/null
+++ b/lib/binary-io.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define BINARY_IO_INLINE _GL_EXTERN_INLINE
+#include "binary-io.h"
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -25,28 +25,48 @@
    so we include it here first.  */
 #include <stdio.h>
 
-/* SET_BINARY (fd);
-   changes the file descriptor fd to perform binary I/O.  */
+_GL_INLINE_HEADER_BEGIN
+#ifndef BINARY_IO_INLINE
+# define BINARY_IO_INLINE _GL_INLINE
+#endif
+
+/* set_binary_mode (fd, mode)
+   sets the binary/text I/O mode of file descriptor fd to the given mode
+   (must be O_BINARY or O_TEXT) and returns the previous mode.  */
 #if O_BINARY
 # if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
 #  include <io.h> /* declares setmode() */
+#  define set_binary_mode setmode
 # else
-#  define setmode _setmode
+#  define set_binary_mode _setmode
 #  undef fileno
 #  define fileno _fileno
 # endif
-# ifdef __DJGPP__
-#  include <unistd.h> /* declares isatty() */
-   /* Avoid putting stdin/stdout in binary mode if it is connected to
-      the console, because that would make it impossible for the user
-      to interrupt the program through Ctrl-C or Ctrl-Break.  */
-#  define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0))
-# else
-#  define SET_BINARY(fd) ((void) setmode (fd, O_BINARY))
-# endif
 #else
-  /* On reasonable systems, binary I/O is the default.  */
-# define SET_BINARY(fd) /* do nothing */ ((void) 0)
+  /* On reasonable systems, binary I/O is the only choice.  */
+  /* Use a function rather than a macro, to avoid gcc warnings
+     "warning: statement with no effect".  */
+BINARY_IO_INLINE int
+set_binary_mode (int fd, int mode)
+{
+  (void) fd;
+  (void) mode;
+  return O_BINARY;
+}
 #endif
 
+/* SET_BINARY (fd);
+   changes the file descriptor fd to perform binary I/O.  */
+#ifdef __DJGPP__
+# include <unistd.h> /* declares isatty() */
+  /* Avoid putting stdin/stdout in binary mode if it is connected to
+     the console, because that would make it impossible for the user
+     to interrupt the program through Ctrl-C or Ctrl-Break.  */
+# define SET_BINARY(fd) ((void) (!isatty (fd) ? (set_binary_mode (fd, O_BINARY), 0) : 0))
+#else
+# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
+#endif
+
+_GL_INLINE_HEADER_END
+
 #endif /* _BINARY_H */
new file mode 100644
--- /dev/null
+++ b/lib/bitrotate.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define BITROTATE_INLINE _GL_EXTERN_INLINE
+#include "bitrotate.h"
--- a/lib/bitrotate.h
+++ b/lib/bitrotate.h
@@ -23,11 +23,16 @@
 #include <stdint.h>
 #include <sys/types.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef BITROTATE_INLINE
+# define BITROTATE_INLINE _GL_INLINE
+#endif
+
 #ifdef UINT64_MAX
 /* Given an unsigned 64-bit argument X, return the value corresponding
    to rotating the bits N steps to the left.  N must be between 1 and
    63 inclusive. */
-static inline uint64_t
+BITROTATE_INLINE uint64_t
 rotl64 (uint64_t x, int n)
 {
   return ((x << n) | (x >> (64 - n))) & UINT64_MAX;
@@ -36,7 +41,7 @@
 /* Given an unsigned 64-bit argument X, return the value corresponding
    to rotating the bits N steps to the right.  N must be between 1 to
    63 inclusive.*/
-static inline uint64_t
+BITROTATE_INLINE uint64_t
 rotr64 (uint64_t x, int n)
 {
   return ((x >> n) | (x << (64 - n))) & UINT64_MAX;
@@ -46,7 +51,7 @@
 /* Given an unsigned 32-bit argument X, return the value corresponding
    to rotating the bits N steps to the left.  N must be between 1 and
    31 inclusive. */
-static inline uint32_t
+BITROTATE_INLINE uint32_t
 rotl32 (uint32_t x, int n)
 {
   return ((x << n) | (x >> (32 - n))) & UINT32_MAX;
@@ -55,7 +60,7 @@
 /* Given an unsigned 32-bit argument X, return the value corresponding
    to rotating the bits N steps to the right.  N must be between 1 to
    31 inclusive.*/
-static inline uint32_t
+BITROTATE_INLINE uint32_t
 rotr32 (uint32_t x, int n)
 {
   return ((x >> n) | (x << (32 - n))) & UINT32_MAX;
@@ -64,7 +69,7 @@
 /* Given a size_t argument X, return the value corresponding
    to rotating the bits N steps to the left.  N must be between 1 and
    (CHAR_BIT * sizeof (size_t) - 1) inclusive.  */
-static inline size_t
+BITROTATE_INLINE size_t
 rotl_sz (size_t x, int n)
 {
   return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX;
@@ -73,7 +78,7 @@
 /* Given a size_t argument X, return the value corresponding
    to rotating the bits N steps to the right.  N must be between 1 to
    (CHAR_BIT * sizeof (size_t) - 1) inclusive.  */
-static inline size_t
+BITROTATE_INLINE size_t
 rotr_sz (size_t x, int n)
 {
   return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX;
@@ -84,7 +89,7 @@
    15 inclusive, but on most relevant targets N can also be 0 and 16
    because 'int' is at least 32 bits and the arguments must widen
    before shifting. */
-static inline uint16_t
+BITROTATE_INLINE uint16_t
 rotl16 (uint16_t x, int n)
 {
   return ((x << n) | (x >> (16 - n))) & UINT16_MAX;
@@ -95,7 +100,7 @@
    inclusive, but on most relevant targets N can also be 0 and 16
    because 'int' is at least 32 bits and the arguments must widen
    before shifting. */
-static inline uint16_t
+BITROTATE_INLINE uint16_t
 rotr16 (uint16_t x, int n)
 {
   return ((x >> n) | (x << (16 - n))) & UINT16_MAX;
@@ -106,7 +111,7 @@
    inclusive, but on most relevant targets N can also be 0 and 8
    because 'int' is at least 32 bits and the arguments must widen
    before shifting. */
-static inline uint8_t
+BITROTATE_INLINE uint8_t
 rotl8 (uint8_t x, int n)
 {
   return ((x << n) | (x >> (8 - n))) & UINT8_MAX;
@@ -117,10 +122,12 @@
    inclusive, but on most relevant targets N can also be 0 and 8
    because 'int' is at least 32 bits and the arguments must widen
    before shifting. */
-static inline uint8_t
+BITROTATE_INLINE uint8_t
 rotr8 (uint8_t x, int n)
 {
   return ((x >> n) | (x << (8 - n))) & UINT8_MAX;
 }
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_BITROTATE_H */
--- a/lib/c-ctype.c
+++ b/lib/c-ctype.c
@@ -13,8 +13,7 @@
 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, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -18,8 +18,7 @@
 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, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef C_CTYPE_H
 #define C_CTYPE_H
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -237,7 +237,7 @@
 
      Note that although both Linux and Solaris provide
      sigaltstack, SA_ONSTACK, and SA_SIGINFO, currently only
-     Solaris satisfies the XSI heueristic.  This is because
+     Solaris satisfies the XSI heuristic.  This is because
      Solaris populates uc_stack with the details of the
      interrupted stack, while Linux populates it with the details
      of the current stack.  */
--- a/lib/c-strcase.h
+++ b/lib/c-strcase.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef C_STRCASE_H
 #define C_STRCASE_H
--- a/lib/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/c-strstr.h
+++ b/lib/c-strstr.h
@@ -33,7 +33,7 @@
         [this restriction is needed because of BIG5, BIG5-HKSCS, GBK, GB18030,
          Shift_JIS, JOHAB], and
      3. does not consist entirely of decimal digits, or has at least length 4
-        [this restricion is needed because of GB18030].
+        [this restriction is needed because of GB18030].
    This function is also safe to be called, even in a multibyte locale, if
    HAYSTACK and NEEDLE are known to both consist solely of printable ASCII
    characters excluding '\\' and '~'.  */
--- a/lib/c-strtod.c
+++ b/lib/c-strtod.c
@@ -52,7 +52,7 @@
 
 /* Return the C locale object, or (locale_t) 0 with errno set
    if it cannot be created.  */
-static inline locale_t
+static locale_t
 c_locale (void)
 {
   if (!c_locale_cache)
--- a/lib/c-strtod.h
+++ b/lib/c-strtod.h
@@ -20,7 +20,7 @@
    accepting only the ASCII digits '0'..'9', and only '.' as decimal point
    character.
    If ENDPTR is not NULL, set *ENDPTR to point to the first byte beyond the
-   parsed number or to NPTR if the string does not start with a parseable
+   parsed number or to NPTR if the string does not start with a parsable
    number.
    Return value:
    - If successful, return the value as a double or 'long double',
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -51,6 +51,7 @@
 # define __realpath realpath
 # include "pathmax.h"
 # include "malloca.h"
+# include "dosname.h"
 # if HAVE_GETCWD
 #  if IN_RELOCWRAPPER
     /* When building the relocatable program wrapper, use the system's getcwd
@@ -101,6 +102,7 @@
   const char *start, *end, *rpath_limit;
   long int path_max;
   int num_links = 0;
+  size_t prefix_len;
 
   if (name == NULL)
     {
@@ -143,7 +145,11 @@
     rpath = resolved;
   rpath_limit = rpath + path_max;
 
-  if (name[0] != '/')
+  /* This is always zero for Posix hosts, but can be 2 for MS-Windows
+     and MS-DOS X:/foo/bar file names.  */
+  prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+
+  if (!IS_ABSOLUTE_FILE_NAME (name))
     {
       if (!__getcwd (rpath, path_max))
         {
@@ -154,13 +160,22 @@
     }
   else
     {
-      rpath[0] = '/';
-      dest = rpath + 1;
-      if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/')
-        *dest++ = '/';
+      dest = rpath;
+      if (prefix_len)
+        {
+          memcpy (rpath, name, prefix_len);
+          dest += prefix_len;
+        }
+      *dest++ = '/';
+      if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
+        {
+          if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len)
+            *dest++ = '/';
+          *dest = '\0';
+        }
     }
 
-  for (start = end = name; *start; start = end)
+  for (start = end = name + prefix_len; *start; start = end)
     {
 #ifdef _LIBC
       struct stat64 st;
@@ -170,11 +185,11 @@
       int n;
 
       /* Skip sequence of multiple path-separators.  */
-      while (*start == '/')
+      while (ISSLASH (*start))
         ++start;
 
       /* Find end of path component.  */
-      for (end = start; *end && *end != '/'; ++end)
+      for (end = start; *end && !ISSLASH (*end); ++end)
         /* Nothing.  */;
 
       if (end - start == 0)
@@ -184,17 +199,19 @@
       else if (end - start == 2 && start[0] == '.' && start[1] == '.')
         {
           /* Back up to previous component, ignore if at root already.  */
-          if (dest > rpath + 1)
-            while ((--dest)[-1] != '/');
-          if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1
-              && *dest == '/')
+          if (dest > rpath + prefix_len + 1)
+            for (--dest; !ISSLASH (dest[-1]); --dest)
+              continue;
+          if (DOUBLE_SLASH_IS_DISTINCT_ROOT
+              && dest == rpath + 1 && !prefix_len
+              && ISSLASH (*dest) && !ISSLASH (dest[1]))
             dest++;
         }
       else
         {
           size_t new_size;
 
-          if (dest[-1] != '/')
+          if (!ISSLASH (dest[-1]))
             *dest++ = '/';
 
           if (dest + (end - start) >= rpath_limit)
@@ -205,7 +222,7 @@
               if (resolved)
                 {
                   __set_errno (ENAMETOOLONG);
-                  if (dest > rpath + 1)
+                  if (dest > rpath + prefix_len + 1)
                     dest--;
                   *dest = '\0';
                   goto error;
@@ -295,20 +312,32 @@
               memmove (&extra_buf[n], end, len + 1);
               name = end = memcpy (extra_buf, buf, n);
 
-              if (buf[0] == '/')
+              if (IS_ABSOLUTE_FILE_NAME (buf))
                 {
-                  dest = rpath + 1;     /* It's an absolute symlink */
-                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/')
-                    *dest++ = '/';
+                  size_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf);
+
+                  if (pfxlen)
+                    memcpy (rpath, buf, pfxlen);
+                  dest = rpath + pfxlen;
+                  *dest++ = '/'; /* It's an absolute symlink */
+                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
+                    {
+                      if (ISSLASH (buf[1]) && !ISSLASH (buf[2]) && !pfxlen)
+                        *dest++ = '/';
+                      *dest = '\0';
+                    }
+                  /* Install the new prefix to be in effect hereafter.  */
+                  prefix_len = pfxlen;
                 }
               else
                 {
                   /* Back up to previous component, ignore if at root
                      already: */
-                  if (dest > rpath + 1)
-                    while ((--dest)[-1] != '/');
+                  if (dest > rpath + prefix_len + 1)
+                    for (--dest; !ISSLASH (dest[-1]); --dest)
+                      continue;
                   if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1
-                      && *dest == '/')
+                      && ISSLASH (*dest) && !ISSLASH (dest[1]) && !prefix_len)
                     dest++;
                 }
             }
@@ -319,9 +348,10 @@
             }
         }
     }
-  if (dest > rpath + 1 && dest[-1] == '/')
+  if (dest > rpath + prefix_len + 1 && ISSLASH (dest[-1]))
     --dest;
-  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && *dest == '/')
+  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && !prefix_len
+      && ISSLASH (*dest) && !ISSLASH (dest[1]))
     dest++;
   *dest = '\0';
 
--- a/lib/canonicalize.c
+++ b/lib/canonicalize.c
@@ -30,6 +30,7 @@
 #include "pathmax.h"
 #include "xalloc.h"
 #include "xgetcwd.h"
+#include "dosname.h"
 
 #define MULTIPLE_BITS_SET(i) (((i) & ((i) - 1)) != 0)
 
@@ -43,6 +44,12 @@
 # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
 #endif
 
+#if ISSLASH ('\\')
+# define SLASHES "/\\"
+#else
+# define SLASHES "/"
+#endif
+
 #if !((HAVE_CANONICALIZE_FILE_NAME && FUNC_REALPATH_WORKS)      \
       || GNULIB_CANONICALIZE_LGPL)
 /* Return the canonical absolute name of file NAME.  A canonical name
@@ -99,9 +106,10 @@
   Hash_table *ht = NULL;
   int saved_errno;
   int can_flags = can_mode & ~CAN_MODE_MASK;
+  bool logical = can_flags & CAN_NOLINKS;
+  size_t prefix_len;
+
   can_mode &= CAN_MODE_MASK;
-  bool logical = can_flags & CAN_NOLINKS;
-  /* Perhaps in future we might support CAN_NOALLOC with CAN_NOLINKS.  */
 
   if (MULTIPLE_BITS_SET (can_mode))
     {
@@ -121,7 +129,11 @@
       return NULL;
     }
 
-  if (name[0] != '/')
+  /* This is always zero for Posix hosts, but can be 2 for MS-Windows
+     and MS-DOS X:/foo/bar file names.  */
+  prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+
+  if (!IS_ABSOLUTE_FILE_NAME (name))
     {
       rname = xgetcwd ();
       if (!rname)
@@ -143,20 +155,29 @@
     {
       rname = xmalloc (PATH_MAX);
       rname_limit = rname + PATH_MAX;
-      rname[0] = '/';
-      dest = rname + 1;
-      if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/')
-        *dest++ = '/';
+      dest = rname;
+      if (prefix_len)
+        {
+          memcpy (rname, name, prefix_len);
+          dest += prefix_len;
+        }
+      *dest++ = '/';
+      if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
+        {
+          if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len)
+            *dest++ = '/';
+          *dest = '\0';
+        }
     }
 
-  for (start = name; *start; start = end)
+  for (start = name + prefix_len; *start; start = end)
     {
       /* Skip sequence of multiple file name separators.  */
-      while (*start == '/')
+      while (ISSLASH (*start))
         ++start;
 
       /* Find end of component.  */
-      for (end = start; *end && *end != '/'; ++end)
+      for (end = start; *end && !ISSLASH (*end); ++end)
         /* Nothing.  */;
 
       if (end - start == 0)
@@ -166,17 +187,18 @@
       else if (end - start == 2 && start[0] == '.' && start[1] == '.')
         {
           /* Back up to previous component, ignore if at root already.  */
-          if (dest > rname + 1)
-            while ((--dest)[-1] != '/');
+          if (dest > rname + prefix_len + 1)
+            for (--dest; !ISSLASH (dest[-1]); --dest)
+              continue;
           if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
-              && *dest == '/')
+              && !prefix_len && ISSLASH (*dest) && !ISSLASH (dest[1]))
             dest++;
         }
       else
         {
           struct stat st;
 
-          if (dest[-1] != '/')
+          if (!ISSLASH (dest[-1]))
             *dest++ = '/';
 
           if (dest + (end - start) >= rname_limit)
@@ -212,7 +234,7 @@
                 goto error;
               if (can_mode == CAN_ALL_BUT_LAST)
                 {
-                  if (end[strspn (end, "/")] || saved_errno != ENOENT)
+                  if (end[strspn (end, SLASHES)] || saved_errno != ENOENT)
                     goto error;
                   continue;
                 }
@@ -264,20 +286,32 @@
               memmove (&extra_buf[n], end, len + 1);
               name = end = memcpy (extra_buf, buf, n);
 
-              if (buf[0] == '/')
+              if (IS_ABSOLUTE_FILE_NAME (buf))
                 {
-                  dest = rname + 1;     /* It's an absolute symlink */
-                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/')
-                    *dest++ = '/';
+                  size_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf);
+
+                  if (pfxlen)
+                    memcpy (rname, buf, pfxlen);
+                  dest = rname + pfxlen;
+                  *dest++ = '/'; /* It's an absolute symlink */
+                  if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
+                    {
+                      if (ISSLASH (buf[1]) && !ISSLASH (buf[2]) && !pfxlen)
+                        *dest++ = '/';
+                      *dest = '\0';
+                    }
+                  /* Install the new prefix to be in effect hereafter.  */
+                  prefix_len = pfxlen;
                 }
               else
                 {
                   /* Back up to previous component, ignore if at root
                      already: */
-                  if (dest > rname + 1)
-                    while ((--dest)[-1] != '/');
+                  if (dest > rname + prefix_len + 1)
+                    for (--dest; !ISSLASH (dest[-1]); --dest)
+                      continue;
                   if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
-                      && *dest == '/')
+                      && ISSLASH (*dest) && !ISSLASH (dest[1]) && !prefix_len)
                     dest++;
                 }
 
@@ -293,9 +327,10 @@
             }
         }
     }
-  if (dest > rname + 1 && dest[-1] == '/')
+  if (dest > rname + prefix_len + 1 && ISSLASH (dest[-1]))
     --dest;
-  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && *dest == '/')
+  if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && !prefix_len
+      && ISSLASH (*dest) && !ISSLASH (dest[1]))
     dest++;
   *dest = '\0';
   if (rname_limit != dest + 1)
new file mode 100644
--- /dev/null
+++ b/lib/cbrt.c
@@ -0,0 +1,77 @@
+/* Compute cubic root of double value.
+   Copyright (C) 1997, 2012 Free Software Foundation, Inc.
+
+   Contributed by Dirk Alboth <dirka@uni-paderborn.de> and
+   Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
+/* Code based on glibc/sysdeps/ieee754/dbl-64/s_cbrt.c.  */
+
+#define CBRT2 1.2599210498948731648             /* 2^(1/3) */
+#define SQR_CBRT2 1.5874010519681994748         /* 2^(2/3) */
+
+static const double factor[5] =
+{
+  1.0 / SQR_CBRT2,
+  1.0 / CBRT2,
+  1.0,
+  CBRT2,
+  SQR_CBRT2
+};
+
+
+double
+cbrt (double x)
+{
+  if (isfinite (x) && x != 0.0)
+    {
+      double xm, ym, u, t2;
+      int xe;
+
+      /* Reduce X.  XM now is an range 1.0 to 0.5.  */
+      xm = frexp (fabs (x), &xe);
+
+      u = (0.354895765043919860
+           + ((1.50819193781584896
+               + ((-2.11499494167371287
+                   + ((2.44693122563534430
+                       + ((-1.83469277483613086
+                           + (0.784932344976639262 - 0.145263899385486377 * xm)
+                             * xm)
+                          * xm))
+                      * xm))
+                  * xm))
+              * xm));
+
+      t2 = u * u * u;
+
+      ym = u * (t2 + 2.0 * xm) / (2.0 * t2 + xm) * factor[2 + xe % 3];
+
+      return ldexp (x > 0.0 ? ym : -ym, xe / 3);
+    }
+  else
+    return x + x;
+}
new file mode 100644
--- /dev/null
+++ b/lib/cbrtf.c
@@ -0,0 +1,68 @@
+/* Compute cubic root of float value.
+   Copyright (C) 1997, 2012 Free Software Foundation, Inc.
+
+   Contributed by Dirk Alboth <dirka@uni-paderborn.de> and
+   Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
+/* Code based on glibc/sysdeps/ieee754/flt-32/s_cbrtf.c.  */
+
+#define CBRT2 1.2599210498948731648             /* 2^(1/3) */
+#define SQR_CBRT2 1.5874010519681994748         /* 2^(2/3) */
+
+static const double factor[5] =
+{
+  1.0 / SQR_CBRT2,
+  1.0 / CBRT2,
+  1.0,
+  CBRT2,
+  SQR_CBRT2
+};
+
+
+float
+cbrtf (float x)
+{
+  if (isfinite (x) && x != 0.0f)
+    {
+      float xm, ym, u, t2;
+      int xe;
+
+      /* Reduce X.  XM now is an range 1.0 to 0.5.  */
+      xm = frexpf (fabsf (x), &xe);
+
+      u = (0.492659620528969547
+           + (0.697570460207922770 - 0.191502161678719066 * xm) * xm);
+
+      t2 = u * u * u;
+
+      ym = u * (t2 + 2.0 * xm) / (2.0 * t2 + xm) * factor[2 + xe % 3];
+
+      return ldexpf (x > 0.0 ? ym : -ym, xe / 3);
+    }
+  else
+    return x + x;
+}
new file mode 100644
--- /dev/null
+++ b/lib/cbrtl.c
@@ -0,0 +1,152 @@
+/* Compute cubic root of long double value.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   Cephes Math Library Release 2.2: January, 1991
+   Copyright 1984, 1991 by Stephen L. Moshier
+   Adapted for glibc October, 2001.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+cbrtl (long double x)
+{
+  return cbrt (x);
+}
+
+#else
+
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_cbrtl.c.  */
+
+/*                                                      cbrtl.c
+ *
+ *      Cube root, long double precision
+ *
+ *
+ *
+ * SYNOPSIS:
+ *
+ * long double x, y, cbrtl();
+ *
+ * y = cbrtl( x );
+ *
+ *
+ *
+ * DESCRIPTION:
+ *
+ * Returns the cube root of the argument, which may be negative.
+ *
+ * Range reduction involves determining the power of 2 of
+ * the argument.  A polynomial of degree 2 applied to the
+ * mantissa, and multiplication by the cube root of 1, 2, or 4
+ * approximates the root to within about 0.1%.  Then Newton's
+ * iteration is used three times to converge to an accurate
+ * result.
+ *
+ *
+ *
+ * ACCURACY:
+ *
+ *                      Relative error:
+ * arithmetic   domain     # trials      peak         rms
+ *    IEEE       -8,8       100000      1.3e-34     3.9e-35
+ *    IEEE    exp(+-707)    100000      1.3e-34     4.3e-35
+ *
+ */
+
+static const long double CBRT2 = 1.259921049894873164767210607278228350570251L;
+static const long double CBRT4 = 1.587401051968199474751705639272308260391493L;
+static const long double CBRT2I = 0.7937005259840997373758528196361541301957467L;
+static const long double CBRT4I = 0.6299605249474365823836053036391141752851257L;
+
+long double
+cbrtl (long double x)
+{
+  if (isfinite (x) && x != 0.0L)
+    {
+      int e, rem, sign;
+      long double z;
+
+      if (x > 0)
+        sign = 1;
+      else
+        {
+          sign = -1;
+          x = -x;
+        }
+
+      z = x;
+      /* extract power of 2, leaving mantissa between 0.5 and 1  */
+      x = frexpl (x, &e);
+
+      /* Approximate cube root of number between .5 and 1,
+         peak relative error = 1.2e-6  */
+      x = ((((1.3584464340920900529734e-1L * x
+              - 6.3986917220457538402318e-1L) * x
+             + 1.2875551670318751538055e0L) * x
+            - 1.4897083391357284957891e0L) * x
+           + 1.3304961236013647092521e0L) * x + 3.7568280825958912391243e-1L;
+
+      /* exponent divided by 3 */
+      if (e >= 0)
+        {
+          rem = e;
+          e /= 3;
+          rem -= 3 * e;
+          if (rem == 1)
+            x *= CBRT2;
+          else if (rem == 2)
+            x *= CBRT4;
+        }
+      else
+        {                           /* argument less than 1 */
+          e = -e;
+          rem = e;
+          e /= 3;
+          rem -= 3 * e;
+          if (rem == 1)
+            x *= CBRT2I;
+          else if (rem == 2)
+            x *= CBRT4I;
+          e = -e;
+        }
+
+      /* multiply by power of 2 */
+      x = ldexpl (x, e);
+
+      /* Newton iteration */
+      x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
+      x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
+      x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L;
+
+      if (sign < 0)
+        x = -x;
+      return x;
+    }
+  else
+    {
+# ifdef __sgi /* so that when x == -0.0L, the result is -0.0L not +0.0L */
+      return x;
+# else
+      return x + x;
+# endif
+    }
+}
+
+#endif
--- a/lib/ceil.c
+++ b/lib/ceil.c
@@ -54,6 +54,12 @@
 # define MINUS_ZERO L_(-0.0)
 #endif
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 /* 2^(MANT_DIG-1).  */
 static const DOUBLE TWO_MANT_DIG =
   /* Assume MANT_DIG <= 5 * 31.
--- a/lib/chdir-long.c
+++ b/lib/chdir-long.c
@@ -42,19 +42,19 @@
   int fd;
 };
 
-static inline void
+static void
 cdb_init (struct cd_buf *cdb)
 {
   cdb->fd = AT_FDCWD;
 }
 
-static inline int
+static int
 cdb_fchdir (struct cd_buf const *cdb)
 {
   return fchdir (cdb->fd);
 }
 
-static inline void
+static void
 cdb_free (struct cd_buf const *cdb)
 {
   if (0 <= cdb->fd)
@@ -83,7 +83,7 @@
 }
 
 /* Return a pointer to the first non-slash in S.  */
-static inline char * _GL_ATTRIBUTE_PURE
+static char * _GL_ATTRIBUTE_PURE
 find_non_slash (char const *s)
 {
   size_t n_slash = strspn (s, "/");
--- a/lib/check-version.c
+++ b/lib/check-version.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  This interface is influenced by
    gcry_check_version from Werner Koch's Libgcrypt.  Paul Eggert
--- a/lib/check-version.h
+++ b/lib/check-version.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson. */
 
new file mode 100644
--- /dev/null
+++ b/lib/chmodat.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define FCHMODAT_INLINE _GL_EXTERN_INLINE
+#include "openat.h"
new file mode 100644
--- /dev/null
+++ b/lib/chownat.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define FCHOWNAT_INLINE _GL_EXTERN_INLINE
+#include "openat.h"
--- a/lib/clean-temp.c
+++ b/lib/clean-temp.c
@@ -556,7 +556,10 @@
           }
         else
           cleanup_list.tempdir_list[i] = NULL;
-        /* Now only we can free the tmpdir->dirname and tmpdir itself.  */
+        /* Now only we can free the tmpdir->dirname, tmpdir->subdirs,
+           tmpdir->files, and tmpdir itself.  */
+        gl_list_free (tmpdir->files);
+        gl_list_free (tmpdir->subdirs);
         free (tmpdir->dirname);
         free (tmpdir);
         return err;
@@ -583,6 +586,11 @@
     {
       OSVERSIONINFO v;
 
+      /* According to
+         <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx>
+         this structure must be initialised as follows:  */
+      v.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
+
       if (GetVersionEx (&v))
         known = (v.dwPlatformId == VER_PLATFORM_WIN32_NT ? 1 : -1);
       else
--- a/lib/config.charset
+++ b/lib/config.charset
@@ -14,8 +14,7 @@
 #   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, write to the Free Software Foundation,
-#   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#   with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # The table consists of lines of the form
 #    ALIAS  CANONICAL
@@ -30,7 +29,7 @@
 # The current list of GNU canonical charset names is as follows.
 #
 #       name              MIME?             used by which systems
-#                                    (darwin = MacOS X, woe32 = native Windows)
+#                                    (darwin = Mac OS X, woe32 = native Windows)
 #
 #   ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin cygwin
 #   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
--- a/lib/copy-acl.c
+++ b/lib/copy-acl.c
@@ -38,13 +38,13 @@
    Return -2 and set errno for an error relating to the source file.
    Return -1 and set errno for an error relating to the destination file.  */
 
-static int
+int
 qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
            int dest_desc, mode_t mode)
 {
 #if USE_ACL && HAVE_ACL_GET_FILE
   /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-  /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
 # if !HAVE_ACL_TYPE_EXTENDED
   /* Linux, FreeBSD, IRIX, Tru64 */
 
@@ -116,19 +116,19 @@
   return 0;
 
 # else /* HAVE_ACL_TYPE_EXTENDED */
-  /* MacOS X */
+  /* Mac OS X */
 
-  /* On MacOS X,  acl_get_file (name, ACL_TYPE_ACCESS)
-     and          acl_get_file (name, ACL_TYPE_DEFAULT)
+  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
+     and           acl_get_file (name, ACL_TYPE_DEFAULT)
      always return NULL / EINVAL.  You have to use
-                  acl_get_file (name, ACL_TYPE_EXTENDED)
-     or           acl_get_fd (open (name, ...))
+                   acl_get_file (name, ACL_TYPE_EXTENDED)
+     or            acl_get_fd (open (name, ...))
      to retrieve an ACL.
      On the other hand,
-                  acl_set_file (name, ACL_TYPE_ACCESS, acl)
-     and          acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+                   acl_set_file (name, ACL_TYPE_ACCESS, acl)
+     and           acl_set_file (name, ACL_TYPE_DEFAULT, acl)
      have the same effect as
-                  acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+                   acl_set_file (name, ACL_TYPE_EXTENDED, acl):
      Each of these calls sets the file's ACL.  */
 
   acl_t acl;
@@ -235,10 +235,22 @@
           return -2;
         }
 
-      if ((source_desc != -1
-           ? facl (source_desc, ACE_GETACL, ace_count, ace_entries)
-           : acl (src_name, ACE_GETACL, ace_count, ace_entries))
-          == ace_count)
+      ret = (source_desc != -1
+             ? facl (source_desc, ACE_GETACL, ace_count, ace_entries)
+             : acl (src_name, ACE_GETACL, ace_count, ace_entries));
+      if (ret < 0)
+        {
+          free (ace_entries);
+          if (errno == ENOSYS || errno == EINVAL)
+            {
+              ace_count = 0;
+              ace_entries = NULL;
+              break;
+            }
+          else
+            return -2;
+        }
+      if (ret == ace_count)
         break;
       /* Huh? The number of ACL entries changed since the last call.
          Repeat.  */
@@ -365,77 +377,49 @@
 
 #elif USE_ACL && HAVE_GETACL /* HP-UX */
 
+  struct acl_entry entries[NACLENTRIES];
   int count;
-  struct acl_entry entries[NACLENTRIES];
 # if HAVE_ACLV_H
+  struct acl aclv_entries[NACLVENTRIES];
   int aclv_count;
-  struct acl aclv_entries[NACLVENTRIES];
 # endif
   int did_chmod;
   int saved_errno;
   int ret;
 
-  for (;;)
-    {
-      count = (source_desc != -1
-               ? fgetacl (source_desc, 0, NULL)
-               : getacl (src_name, 0, NULL));
+  count = (source_desc != -1
+           ? fgetacl (source_desc, NACLENTRIES, entries)
+           : getacl (src_name, NACLENTRIES, entries));
 
-      if (count < 0)
-        {
-          if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
-            {
-              count = 0;
-              break;
-            }
-          else
-            return -2;
-        }
-
-      if (count == 0)
-        break;
-
+  if (count < 0)
+    {
+      if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+        count = 0;
+      else
+        return -2;
+    }
+  else if (count > 0)
+    {
       if (count > NACLENTRIES)
         /* If NACLENTRIES cannot be trusted, use dynamic memory allocation.  */
         abort ();
-
-      if ((source_desc != -1
-           ? fgetacl (source_desc, count, entries)
-           : getacl (src_name, count, entries))
-          == count)
-        break;
-      /* Huh? The number of ACL entries changed since the last call.
-         Repeat.  */
     }
 
 # if HAVE_ACLV_H
-  for (;;)
-    {
-      aclv_count = acl ((char *) src_name, ACL_CNT, NACLVENTRIES, aclv_entries);
+  aclv_count = acl ((char *) src_name, ACL_GET, NACLVENTRIES, aclv_entries);
 
-      if (aclv_count < 0)
-        {
-          if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
-            {
-              count = 0;
-              break;
-            }
-          else
-            return -2;
-        }
-
-      if (aclv_count == 0)
-        break;
-
+  if (aclv_count < 0)
+    {
+      if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+        count = 0;
+      else
+        return -2;
+    }
+  else if (aclv_count > 0)
+    {
       if (aclv_count > NACLVENTRIES)
         /* If NACLVENTRIES cannot be trusted, use dynamic memory allocation.  */
         abort ();
-
-      if (acl ((char *) src_name, ACL_GET, aclv_count, aclv_entries)
-          == aclv_count)
-        break;
-      /* Huh? The number of ACL entries changed since the last call.
-         Repeat.  */
     }
 # endif
 
@@ -546,36 +530,24 @@
 
 #elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */
 
+  struct acl entries[NACLENTRIES];
   int count;
-  struct acl entries[NACLENTRIES];
   int ret;
 
-  for (;;)
-    {
-      count = acl ((char *) src_name, ACL_CNT, NACLENTRIES, NULL);
+  count = acl ((char *) src_name, ACL_GET, NACLENTRIES, entries);
 
-      if (count < 0)
-        {
-          if (0)
-            {
-              count = 0;
-              break;
-            }
-          else
-            return -2;
-        }
-
-      if (count == 0)
-        break;
-
+  if (count < 0)
+    {
+      if (0)
+        count = 0;
+      else
+        return -2;
+    }
+  else if (count > 0)
+    {
       if (count > NACLENTRIES)
         /* If NACLENTRIES cannot be trusted, use dynamic memory allocation.  */
         abort ();
-
-      if (acl ((char *) src_name, ACL_GET, count, entries) == count)
-        break;
-      /* Huh? The number of ACL entries changed since the last call.
-         Repeat.  */
     }
 
   if (count == 0)
@@ -621,7 +593,8 @@
    If access control lists are not available, fchmod the target file to
    MODE.  Also sets the non-permission bits of the destination file
    (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
-   Return 0 if successful, otherwise output a diagnostic and return -1.  */
+   Return 0 if successful, otherwise output a diagnostic and return a
+   negative error code.  */
 
 int
 copy_acl (const char *src_name, int source_desc, const char *dst_name,
@@ -632,13 +605,14 @@
     {
     case -2:
       error (0, errno, "%s", quote (src_name));
-      return -1;
+      break;
 
     case -1:
       error (0, errno, _("preserving permissions for %s"), quote (dst_name));
-      return -1;
+      break;
 
     default:
-      return 0;
+      break;
     }
+  return ret;
 }
--- a/lib/copy-file.c
+++ b/lib/copy-file.c
@@ -41,6 +41,7 @@
 #include "full-write.h"
 #include "acl.h"
 #include "binary-io.h"
+#include "quote.h"
 #include "gettext.h"
 #include "xalloc.h"
 
@@ -53,9 +54,10 @@
 
 enum { IO_SIZE = 32 * 1024 };
 
-void
-copy_file_preserving (const char *src_filename, const char *dest_filename)
+int
+qcopy_file_preserving (const char *src_filename, const char *dest_filename)
 {
+  int err = 0;
   int src_fd;
   struct stat statbuf;
   int mode;
@@ -63,37 +65,58 @@
   char *buf = xmalloc (IO_SIZE);
 
   src_fd = open (src_filename, O_RDONLY | O_BINARY);
-  if (src_fd < 0 || fstat (src_fd, &statbuf) < 0)
-    error (EXIT_FAILURE, errno, _("error while opening \"%s\" for reading"),
-           src_filename);
+  if (src_fd < 0)
+    {
+      err = GL_COPY_ERR_OPEN_READ;
+      goto error;
+    }
+  if (fstat (src_fd, &statbuf) < 0)
+    {
+      err = GL_COPY_ERR_OPEN_READ;
+      goto error_src;
+    }
 
   mode = statbuf.st_mode & 07777;
 
   dest_fd = open (dest_filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0600);
   if (dest_fd < 0)
-    error (EXIT_FAILURE, errno, _("cannot open backup file \"%s\" for writing"),
-           dest_filename);
+    {
+      err = GL_COPY_ERR_OPEN_BACKUP_WRITE;
+      goto error_src;
+    }
 
   /* Copy the file contents.  */
   for (;;)
     {
       size_t n_read = safe_read (src_fd, buf, IO_SIZE);
       if (n_read == SAFE_READ_ERROR)
-        error (EXIT_FAILURE, errno, _("error reading \"%s\""), src_filename);
+        {
+          err = GL_COPY_ERR_READ;
+          goto error_src_dest;
+        }
       if (n_read == 0)
         break;
 
       if (full_write (dest_fd, buf, n_read) < n_read)
-        error (EXIT_FAILURE, errno, _("error writing \"%s\""), dest_filename);
+        {
+          err = GL_COPY_ERR_WRITE;
+          goto error_src_dest;
+        }
     }
 
   free (buf);
 
 #if !USE_ACL
   if (close (dest_fd) < 0)
-    error (EXIT_FAILURE, errno, _("error writing \"%s\""), dest_filename);
+    {
+      err = GL_COPY_ERR_WRITE;
+      goto error_src;
+    }
   if (close (src_fd) < 0)
-    error (EXIT_FAILURE, errno, _("error after reading \"%s\""), src_filename);
+    {
+      err = GL_COPY_ERR_AFTER_READ;
+      goto error;
+    }
 #endif
 
   /* Preserve the access and modification times.  */
@@ -122,16 +145,78 @@
 
   /* Preserve the access permissions.  */
 #if USE_ACL
-  if (copy_acl (src_filename, src_fd, dest_filename, dest_fd, mode))
-    exit (EXIT_FAILURE);
+  switch (qcopy_acl (src_filename, src_fd, dest_filename, dest_fd, mode))
+    {
+    case -2:
+      err = GL_COPY_ERR_GET_ACL;
+      goto error_src_dest;
+    case -1:
+      err = GL_COPY_ERR_SET_ACL;
+      goto error_src_dest;
+    }
 #else
   chmod (dest_filename, mode);
 #endif
 
 #if USE_ACL
   if (close (dest_fd) < 0)
-    error (EXIT_FAILURE, errno, _("error writing \"%s\""), dest_filename);
+    {
+      err = GL_COPY_ERR_WRITE;
+      goto error_src;
+    }
   if (close (src_fd) < 0)
-    error (EXIT_FAILURE, errno, _("error after reading \"%s\""), src_filename);
+    {
+      err = GL_COPY_ERR_AFTER_READ;
+      goto error;
+    }
 #endif
+
+  return 0;
+
+ error_src_dest:
+  close (dest_fd);
+ error_src:
+  close (src_fd);
+ error:
+  return err;
 }
+
+void
+copy_file_preserving (const char *src_filename, const char *dest_filename)
+{
+  switch (qcopy_file_preserving (src_filename, dest_filename))
+    {
+    case 0:
+      return;
+
+    case GL_COPY_ERR_OPEN_READ:
+      error (EXIT_FAILURE, errno, _("error while opening %s for reading"),
+             quote (src_filename));
+
+    case GL_COPY_ERR_OPEN_BACKUP_WRITE:
+      error (EXIT_FAILURE, errno, _("cannot open backup file %s for writing"),
+             quote (dest_filename));
+
+    case GL_COPY_ERR_READ:
+      error (EXIT_FAILURE, errno, _("error reading %s"),
+             quote (src_filename));
+
+    case GL_COPY_ERR_WRITE:
+      error (EXIT_FAILURE, errno, _("error writing %s"),
+             quote (dest_filename));
+
+    case GL_COPY_ERR_AFTER_READ:
+      error (EXIT_FAILURE, errno, _("error after reading %s"),
+             quote (src_filename));
+
+    case GL_COPY_ERR_GET_ACL:
+      error (EXIT_FAILURE, errno, "%s", quote (src_filename));
+
+    case GL_COPY_ERR_SET_ACL:
+      error (EXIT_FAILURE, errno, _("preserving permissions for %s"),
+             quote (dest_filename));
+
+    default:
+      abort ();
+    }
+}
--- a/lib/copy-file.h
+++ b/lib/copy-file.h
@@ -21,6 +21,26 @@
 #endif
 
 
+/* Error codes returned by qcopy_file_preserving.  */
+enum
+{
+  GL_COPY_ERR_OPEN_READ = -1,
+  GL_COPY_ERR_OPEN_BACKUP_WRITE = -2,
+  GL_COPY_ERR_READ = -3,
+  GL_COPY_ERR_WRITE = -4,
+  GL_COPY_ERR_AFTER_READ = -5,
+  GL_COPY_ERR_GET_ACL = -6,
+  GL_COPY_ERR_SET_ACL = -7
+};
+
+/* Copy a regular file: from src_filename to dest_filename.
+   The destination file is assumed to be a backup file.
+   Modification times, owner, group and access permissions are preserved as
+   far as possible.
+   Return 0 if successful, otherwise set errno and return one of the error
+   codes above.  */
+extern int qcopy_file_preserving (const char *src_filename, const char *dest_filename);
+
 /* Copy a regular file: from src_filename to dest_filename.
    The destination file is assumed to be a backup file.
    Modification times, owner, group and access permissions are preserved as
--- a/lib/cosl.c
+++ b/lib/cosl.c
@@ -28,12 +28,14 @@
 
 #else
 
-/* sinl(x)
- * Return sine function of x.
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_cosl.c.  */
+
+/* cosl(x)
+ * Return cosine function of x.
  *
  * kernel function:
  *      __kernel_sinl           ... sine function on [-pi/4,pi/4]
- *      __kernel_cosl           ... cose function on [-pi/4,pi/4]
+ *      __kernel_cosl           ... cosine function on [-pi/4,pi/4]
  *      __ieee754_rem_pio2l     ... argument reduction routine
  *
  * Method.
new file mode 100644
--- /dev/null
+++ b/lib/count-leading-zeros.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define COUNT_LEADING_ZEROS_INLINE _GL_EXTERN_INLINE
+#include "count-leading-zeros.h"
new file mode 100644
--- /dev/null
+++ b/lib/count-leading-zeros.h
@@ -0,0 +1,98 @@
+/* count-leading-zeros.h -- counts the number of leading 0 bits in a word.
+   Copyright (C) 2012 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 Eric Blake.  */
+
+#ifndef COUNT_LEADING_ZEROS_H
+# define COUNT_LEADING_ZEROS_H 1
+
+#include <limits.h>
+#include <stdlib.h>
+#include "verify.h"
+
+_GL_INLINE_HEADER_BEGIN
+#ifndef COUNT_LEADING_ZEROS_INLINE
+# define COUNT_LEADING_ZEROS_INLINE _GL_INLINE
+#endif
+
+/* Expand the code which computes the number of leading zeros of the local
+   variable 'x' of type TYPE (an unsigned integer type) and returns it
+   from the current function.  */
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# define COUNT_LEADING_ZEROS(BUILTIN, TYPE)     \
+  return x ? BUILTIN (x) : CHAR_BIT * sizeof x;
+#else
+# define COUNT_LEADING_ZEROS(BUILTIN, TYPE)                             \
+  /* This condition is written so as to avoid shifting by more than     \
+     31 bits at once, and also avoids a random HP-UX cc bug.  */        \
+  verify (((TYPE) -1 >> 31 >> 31 >> 2) == 0); /* TYPE has at most 64 bits */ \
+  int count = 0;                                                        \
+  if (1 < (TYPE) -1 >> 31) { /* TYPE has more than 32 bits? */          \
+    count = count_leading_zeros_32 (x >> 31 >> 1);                      \
+    if (count < 32)                                                     \
+      return count;                                                     \
+  }                                                                     \
+  return count + count_leading_zeros_32 (x);
+
+/* Compute and return the number of leading zeros in the least
+   significant 32 bits of X. */
+COUNT_LEADING_ZEROS_INLINE int
+count_leading_zeros_32 (unsigned int x)
+{
+  /* http://graphics.stanford.edu/~seander/bithacks.html */
+  static const char deBruijnLookup[32] = {
+    0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
+    8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
+  };
+
+  x &= 0xffffffffU;
+  if (!x)
+    return 32;
+  x |= x >> 1;
+  x |= x >> 2;
+  x |= x >> 4;
+  x |= x >> 8;
+  x |= x >> 16;
+  return 31 - deBruijnLookup[(x * 0x07c4acddU) >> 27];
+}
+#endif
+
+/* Compute and return the number of leading zeros in X. */
+COUNT_LEADING_ZEROS_INLINE int
+count_leading_zeros (unsigned int x)
+{
+  COUNT_LEADING_ZEROS (__builtin_clz, unsigned int);
+}
+
+/* Compute and return the number of leading zeros in X. */
+COUNT_LEADING_ZEROS_INLINE int
+count_leading_zeros_l (unsigned long int x)
+{
+  COUNT_LEADING_ZEROS (__builtin_clzl, unsigned long int);
+}
+
+#if HAVE_UNSIGNED_LONG_LONG_INT
+/* Compute and return the number of leading zeros in X. */
+COUNT_LEADING_ZEROS_INLINE int
+count_leading_zeros_ll (unsigned long long int x)
+{
+  COUNT_LEADING_ZEROS (__builtin_clzll, unsigned long long int);
+}
+#endif
+
+_GL_INLINE_HEADER_END
+
+#endif /* COUNT_LEADING_ZEROS_H */
new file mode 100644
--- /dev/null
+++ b/lib/count-one-bits.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define COUNT_ONE_BITS_INLINE _GL_EXTERN_INLINE
+#include "count-one-bits.h"
--- a/lib/count-one-bits.h
+++ b/lib/count-one-bits.h
@@ -22,6 +22,11 @@
 #include <stdlib.h>
 #include "verify.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef COUNT_ONE_BITS_INLINE
+# define COUNT_ONE_BITS_INLINE _GL_INLINE
+#endif
+
 /* Expand the code which computes the number of 1-bits of the local
    variable 'x' of type TYPE (an unsigned integer type) and returns it
    from the current function.  */
@@ -40,7 +45,7 @@
 
 /* Compute and return the number of 1-bits set in the least
    significant 32 bits of X. */
-static inline int
+COUNT_ONE_BITS_INLINE int
 count_one_bits_32 (unsigned int x)
 {
   x = ((x & 0xaaaaaaaaU) >> 1) + (x & 0x55555555U);
@@ -52,14 +57,14 @@
 #endif
 
 /* Compute and return the number of 1-bits set in X. */
-static inline int
+COUNT_ONE_BITS_INLINE int
 count_one_bits (unsigned int x)
 {
   COUNT_ONE_BITS (__builtin_popcount, unsigned int);
 }
 
 /* Compute and return the number of 1-bits set in X. */
-static inline int
+COUNT_ONE_BITS_INLINE int
 count_one_bits_l (unsigned long int x)
 {
   COUNT_ONE_BITS (__builtin_popcountl, unsigned long int);
@@ -67,11 +72,13 @@
 
 #if HAVE_UNSIGNED_LONG_LONG_INT
 /* Compute and return the number of 1-bits set in X. */
-static inline int
+COUNT_ONE_BITS_INLINE int
 count_one_bits_ll (unsigned long long int x)
 {
   COUNT_ONE_BITS (__builtin_popcountll, unsigned long long int);
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* COUNT_ONE_BITS_H */
--- a/lib/csharpexec.c
+++ b/lib/csharpexec.c
@@ -47,7 +47,7 @@
   /* Native Windows, Cygwin */
   #define CLASSPATHVAR "PATH"
 #elif defined __APPLE__ && defined __MACH__
-  /* MacOS X */
+  /* Mac OS X */
   #define CLASSPATHVAR "DYLD_LIBRARY_PATH"
 #else
   /* Normal Unix */
--- a/lib/ctype.in.h
+++ b/lib/ctype.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible.  */
 
--- a/lib/cycle-check.c
+++ b/lib/cycle-check.c
@@ -33,7 +33,7 @@
 
 /* Return true if I is a power of 2, or is zero.  */
 
-static inline bool
+static bool
 is_zero_or_power_of_two (uintmax_t i)
 {
   return (i & (i - 1)) == 0;
--- a/lib/des.c
+++ b/lib/des.c
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
@@ -64,7 +62,7 @@
  *     // Encrypt the plaintext
  *     des_ecb_encrypt(&context, plaintext, ciphertext);
  *
- *     // To recover the orginal plaintext from ciphertext use:
+ *     // To recover the original plaintext from ciphertext use:
  *     des_ecb_decrypt(&context, ciphertext, recoverd);
  *
  *
--- a/lib/des.h
+++ b/lib/des.h
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/diacrit.c
+++ b/lib/diacrit.c
@@ -94,9 +94,9 @@
 
 /*------------------------------------------------------------------------.
 | For each alphabetic character, returns a code of what its diacritic is, |
-| according to the following codes: 1 (eE) over aA for latin diphtongs; 2 |
-| (') acute accent; 3 (`) grave accent; 4 (^) circumflex accent; 5 (")    |
-| umlaut or diaraesis; 6 (~) tilda; 7 (,) cedilla; 8 (o) covering degree  |
+| according to the following codes: 1 (eE) over aA for latin diphthongs;  |
+| 2 (') acute accent; 3 (`) grave accent; 4 (^) circumflex accent; 5 (")  |
+| umlaut or diaeresis; 6 (~) tilda; 7 (,) cedilla; 8 (o) covering degree  |
 | symbol; 9 (|) slashed character.                                        |
 `------------------------------------------------------------------------*/
 
--- a/lib/dirent.in.h
+++ b/lib/dirent.in.h
@@ -55,6 +55,14 @@
 # endif
 #endif
 
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The attribute __pure__ was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -229,6 +237,7 @@
 # if !@HAVE_ALPHASORT@
 _GL_FUNCDECL_SYS (alphasort, int,
                   (const struct dirent **, const struct dirent **)
+                  _GL_ATTRIBUTE_PURE
                   _GL_ARG_NONNULL ((1, 2)));
 # endif
 /* Need to cast, because on glibc systems, the parameters are
--- a/lib/dup-safer-flag.c
+++ b/lib/dup-safer-flag.c
@@ -26,8 +26,6 @@
 #include <fcntl.h>
 #include <unistd.h>
 
-#include "cloexec.h"
-
 /* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
    STDERR_FILENO.  If FLAG contains O_CLOEXEC, behave like
    fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD).  */
--- a/lib/dup.c
+++ b/lib/dup.c
@@ -27,7 +27,7 @@
 #undef dup
 
 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
 dup_nothrow (int fd)
 {
   int result;
--- a/lib/dup3.c
+++ b/lib/dup3.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
new file mode 100644
--- /dev/null
+++ b/lib/eealloc.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define EEALLOC_INLINE _GL_EXTERN_INLINE
+#include "eealloc.h"
--- a/lib/eealloc.h
+++ b/lib/eealloc.h
@@ -31,18 +31,23 @@
 
 #include <stdlib.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef EEALLOC_INLINE
+# define EEALLOC_INLINE _GL_INLINE
+#endif
+
 #if MALLOC_0_IS_NONNULL
 # define eemalloc malloc
 #else
 # if __GNUC__ >= 3
-static inline void *eemalloc (size_t n)
+EEALLOC_INLINE void *eemalloc (size_t n)
      __attribute__ ((__malloc__))
 #  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
      __attribute__ ((__alloc_size__ (1)))
 #  endif
   ;
 # endif
-static inline void *
+EEALLOC_INLINE void *
 eemalloc (size_t n)
 {
   /* If n is zero, allocate a 1-byte block.  */
@@ -56,10 +61,10 @@
 # define eerealloc realloc
 #else
 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-static inline void *eerealloc (void *p, size_t n)
+EEALLOC_INLINE void *eerealloc (void *p, size_t n)
      __attribute__ ((__alloc_size__ (2)));
 # endif
-static inline void *
+EEALLOC_INLINE void *
 eerealloc (void *p, size_t n)
 {
   /* If n is zero, allocate or keep a 1-byte block.  */
@@ -76,4 +81,6 @@
     eenrealloc (void *p, size_t n, size_t s) - like eerealloc (p, n * s)
    If this would be useful in your application. please speak up.  */
 
+_GL_INLINE_HEADER_END
+
 #endif /* _EEALLOC_H */
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_ERRNO_H
 
@@ -85,6 +84,16 @@
 #   define GNULIB_defined_ECANCELED 1
 #  endif
 
+#  ifndef EOWNERDEAD
+#   define EOWNERDEAD 133
+#   define GNULIB_defined_EOWNERDEAD 1
+#  endif
+
+#  ifndef ENOTRECOVERABLE
+#   define ENOTRECOVERABLE 127
+#   define GNULIB_defined_ENOTRECOVERABLE 1
+#  endif
+
 #  ifndef EINPROGRESS
 #   define EINPROGRESS     112
 #   define EALREADY        103
@@ -109,15 +118,17 @@
 #   define ELOOP           114
 #   define EHOSTUNREACH    110
 #   define EWOULDBLOCK     140
+#   define GNULIB_defined_ESOCK 1
+#  endif
+
+#  ifndef ETXTBSY
 #   define ETXTBSY         139
 #   define ENODATA         120  /* not required by POSIX */
 #   define ENOSR           124  /* not required by POSIX */
 #   define ENOSTR          125  /* not required by POSIX */
-#   define ENOTRECOVERABLE 127  /* not required by POSIX */
-#   define EOWNERDEAD      133  /* not required by POSIX */
 #   define ETIME           137  /* not required by POSIX */
 #   define EOTHER          131  /* not required by POSIX */
-#   define GNULIB_defined_ESOCK 1
+#   define GNULIB_defined_ESTREAMS 1
 #  endif
 
 /* These are intentionally the same values as the WSA* error numbers, defined
@@ -228,6 +239,41 @@
 #  define GNULIB_defined_ECANCELED 1
 # endif
 
+/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not
+   defined.  */
+
+# ifndef EOWNERDEAD
+#  if defined __sun
+    /* Use the same values as defined for Solaris >= 8, for
+       interoperability.  */
+#   define EOWNERDEAD      58
+#   define ENOTRECOVERABLE 59
+#  elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+    /* We have a conflict here: pthreads-win32 defines these values
+       differently than MSVC 10.  It's hairy to decide which one to use.  */
+#   if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
+     /* Use the same values as defined by pthreads-win32, for
+        interoperability.  */
+#    define EOWNERDEAD      43
+#    define ENOTRECOVERABLE 44
+#   else
+     /* Use the same values as defined by MSVC 10, for
+        interoperability.  */
+#    define EOWNERDEAD      133
+#    define ENOTRECOVERABLE 127
+#   endif
+#  else
+#   define EOWNERDEAD      2013
+#   define ENOTRECOVERABLE 2014
+#  endif
+#  define GNULIB_defined_EOWNERDEAD 1
+#  define GNULIB_defined_ENOTRECOVERABLE 1
+# endif
+
+# ifndef EILSEQ
+#  define EILSEQ 2015
+#  define GNULIB_defined_EILSEQ 1
+# endif
 
 #endif /* _@GUARD_PREFIX@_ERRNO_H */
 #endif /* _@GUARD_PREFIX@_ERRNO_H */
--- a/lib/error.c
+++ b/lib/error.c
@@ -121,7 +121,7 @@
 
 #if !_LIBC
 /* Return non-zero if FD is open.  */
-static inline int
+static int
 is_open (int fd)
 {
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@@ -139,7 +139,7 @@
 }
 #endif
 
-static inline void
+static void
 flush_stdout (void)
 {
 #if !_LIBC
--- a/lib/euidaccess.c
+++ b/lib/euidaccess.c
@@ -30,6 +30,8 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "root-uid.h"
+
 #if HAVE_LIBGEN_H
 # include <libgen.h>
 #endif
@@ -82,7 +84,7 @@
   return accessx (file, mode, ACC_SELF);
 #elif HAVE_EACCESS                      /* FreeBSD */
   return eaccess (file, mode);
-#else       /* MacOS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS */
+#else       /* Mac OS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS */
 
   uid_t uid = getuid ();
   gid_t gid = getgid ();
@@ -140,8 +142,9 @@
 
   /* The super-user can read and write any file, and execute any file
      that anyone can execute.  */
-  if (euid == 0 && ((mode & X_OK) == 0
-                    || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))
+  if (euid == ROOT_UID
+      && ((mode & X_OK) == 0
+          || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))
     return 0;
 
   /* Convert the mode to traditional form, clearing any bogus bits.  */
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -104,53 +104,46 @@
     } v;
   };
 
-/* The exclude structure keeps a singly-linked list of exclude segments */
+/* The exclude structure keeps a singly-linked list of exclude segments,
+   maintained in reverse order.  */
 struct exclude
   {
-    struct exclude_segment *head, *tail;
+    struct exclude_segment *head;
   };
 
-/* Return true if str has wildcard characters */
+/* Return true if STR has or may have wildcards, when matched with OPTIONS.
+   Return false if STR definitely does not have wildcards.  */
 bool
 fnmatch_pattern_has_wildcards (const char *str, int options)
 {
-  const char *cset = "\\?*[]";
-  if (options & FNM_NOESCAPE)
-    cset++;
-  while (*str)
+  while (1)
     {
-      size_t n = strcspn (str, cset);
-      if (str[n] == 0)
-        break;
-      else if (str[n] == '\\')
+      switch (*str++)
         {
-          str += n + 1;
-          if (*str)
-            str++;
+        case '\\':
+          str += ! (options & FNM_NOESCAPE) && *str;
+          break;
+
+        case '+': case '@': case '!':
+          if (options & FNM_EXTMATCH && *str == '(')
+            return true;
+          break;
+
+        case '?': case '*': case '[':
+          return true;
+
+        case '\0':
+          return false;
         }
-      else
-        return true;
     }
-  return false;
 }
 
 static void
 unescape_pattern (char *str)
 {
-  int inset = 0;
-  char *q = str;
+  char const *q = str;
   do
-    {
-      if (inset)
-        {
-          if (*q == ']')
-            inset = 0;
-        }
-      else if (*q == '[')
-        inset = 1;
-      else if (*q == '\\')
-        q++;
-    }
+    q += *q == '\\' && q[1];
   while ((*str++ = *q++));
 }
 
@@ -219,8 +212,8 @@
 }
 
 /* Create new exclude segment of given TYPE and OPTIONS, and attach it
-   to the tail of list in EX */
-static struct exclude_segment *
+   to the head of EX.  */
+static void
 new_exclude_segment (struct exclude *ex, enum exclude_type type, int options)
 {
   struct exclude_segment *sp = xzalloc (sizeof (struct exclude_segment));
@@ -242,12 +235,8 @@
                                      string_free);
       break;
     }
-  if (ex->tail)
-    ex->tail->next = sp;
-  else
-    ex->head = sp;
-  ex->tail = sp;
-  return sp;
+  sp->next = ex->head;
+  ex->head = sp;
 }
 
 /* Free a single exclude segment */
@@ -347,36 +336,33 @@
   return matched;
 }
 
-/* Return true if the exclude_pattern segment SEG excludes F.  */
+/* Return true if the exclude_pattern segment SEG matches F.  */
 
 static bool
-excluded_file_pattern_p (struct exclude_segment const *seg, char const *f)
+file_pattern_matches (struct exclude_segment const *seg, char const *f)
 {
   size_t exclude_count = seg->v.pat.exclude_count;
   struct patopts const *exclude = seg->v.pat.exclude;
   size_t i;
-  bool excluded = !! (exclude[0].options & EXCLUDE_INCLUDE);
 
-  /* Scan through the options, until they change excluded */
   for (i = 0; i < exclude_count; i++)
     {
       char const *pattern = exclude[i].pattern;
       int options = exclude[i].options;
       if (exclude_fnmatch (pattern, f, options))
-        return !excluded;
+        return true;
     }
-  return excluded;
+  return false;
 }
 
-/* Return true if the exclude_hash segment SEG excludes F.
+/* Return true if the exclude_hash segment SEG matches F.
    BUFFER is an auxiliary storage of the same length as F (with nul
    terminator included) */
 static bool
-excluded_file_name_p (struct exclude_segment const *seg, char const *f,
-                      char *buffer)
+file_name_matches (struct exclude_segment const *seg, char const *f,
+                   char *buffer)
 {
   int options = seg->options;
-  bool excluded = !! (options & EXCLUDE_INCLUDE);
   Hash_table *table = seg->v.table;
 
   do
@@ -387,7 +373,7 @@
       while (1)
         {
           if (hash_lookup (table, buffer))
-            return !excluded;
+            return true;
           if (options & FNM_LEADING_DIR)
             {
               char *p = strrchr (buffer, '/');
@@ -410,7 +396,8 @@
         break;
     }
   while (f);
-  return excluded;
+
+  return false;
 }
 
 /* Return true if EX excludes F.  */
@@ -419,44 +406,46 @@
 excluded_file_name (struct exclude const *ex, char const *f)
 {
   struct exclude_segment *seg;
-  bool excluded;
+  bool invert = false;
   char *filename = NULL;
 
   /* If no patterns are given, the default is to include.  */
   if (!ex->head)
     return false;
 
-  /* Otherwise, the default is the opposite of the first option.  */
-  excluded = !! (ex->head->options & EXCLUDE_INCLUDE);
-  /* Scan through the segments, seeing whether they change status from
-     excluded to included or vice versa.  */
-  for (seg = ex->head; seg; seg = seg->next)
+  /* Scan through the segments, reporting the status of the first match.
+     The segments are in reverse order, so this reports the status of
+     the last match in the original option list.  */
+  for (seg = ex->head; ; seg = seg->next)
     {
-      bool rc;
-
-      switch (seg->type)
+      if (seg->type == exclude_hash)
         {
-        case exclude_pattern:
-          rc = excluded_file_pattern_p (seg, f);
-          break;
-
-        case exclude_hash:
           if (!filename)
             filename = xmalloc (strlen (f) + 1);
-          rc = excluded_file_name_p (seg, f, filename);
-          break;
+          if (file_name_matches (seg, f, filename))
+            break;
+        }
+      else
+        {
+          if (file_pattern_matches (seg, f))
+            break;
+        }
 
-        default:
-          abort ();
-        }
-      if (rc != excluded)
+      if (! seg->next)
         {
-          excluded = rc;
+          /* If patterns are given but none match, the default is the
+             opposite of the last segment (i.e., the first in the
+             original option list).  For example, in the command
+             'grep -r --exclude="a*" --include="*b" pat dir', the
+             first option is --exclude so any file name matching
+             neither a* nor *b is included.  */
+          invert = true;
           break;
         }
     }
+
   free (filename);
-  return excluded;
+  return invert ^ ! (seg->options & EXCLUDE_INCLUDE);
 }
 
 /* Append to EX the exclusion PATTERN with OPTIONS.  */
@@ -472,12 +461,11 @@
       struct exclude_pattern *pat;
       struct patopts *patopts;
 
-      if (ex->tail && ex->tail->type == exclude_pattern
-          && ((ex->tail->options & EXCLUDE_INCLUDE) ==
-              (options & EXCLUDE_INCLUDE)))
-        seg = ex->tail;
-      else
-        seg = new_exclude_segment (ex, exclude_pattern, options);
+      if (! (ex->head && ex->head->type == exclude_pattern
+             && ((ex->head->options & EXCLUDE_INCLUDE)
+                 == (options & EXCLUDE_INCLUDE))))
+        new_exclude_segment (ex, exclude_pattern, options);
+      seg = ex->head;
 
       pat = &seg->v.pat;
       if (pat->exclude_count == pat->exclude_alloc)
@@ -490,17 +478,16 @@
   else
     {
       char *str, *p;
-#define EXCLUDE_HASH_FLAGS (EXCLUDE_INCLUDE|EXCLUDE_ANCHORED|\
-                            FNM_LEADING_DIR|FNM_CASEFOLD)
-      if (ex->tail && ex->tail->type == exclude_hash
-          && ((ex->tail->options & EXCLUDE_HASH_FLAGS) ==
-              (options & EXCLUDE_HASH_FLAGS)))
-        seg = ex->tail;
-      else
-        seg = new_exclude_segment (ex, exclude_hash, options);
+      int exclude_hash_flags = (EXCLUDE_INCLUDE | EXCLUDE_ANCHORED
+                                | FNM_LEADING_DIR | FNM_CASEFOLD);
+      if (! (ex->head && ex->head->type == exclude_hash
+             && ((ex->head->options & exclude_hash_flags)
+                 == (options & exclude_hash_flags))))
+        new_exclude_segment (ex, exclude_hash, options);
+      seg = ex->head;
 
       str = xstrdup (pattern);
-      if (options & EXCLUDE_WILDCARDS)
+      if ((options & (EXCLUDE_WILDCARDS | FNM_NOESCAPE)) == EXCLUDE_WILDCARDS)
         unescape_pattern (str);
       p = hash_insert (seg->v.table, str);
       if (p != str)
new file mode 100644
--- /dev/null
+++ b/lib/execinfo.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_EXECINFO_INLINE _GL_EXTERN_INLINE
+#include "execinfo.h"
new file mode 100644
--- /dev/null
+++ b/lib/execinfo.in.h
@@ -0,0 +1,54 @@
+/* Information about executables.
+
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+
+   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/>.  */
+
+/* Written by Paul Eggert.  */
+
+#ifndef _GL_EXECINFO_H
+#define _GL_EXECINFO_H
+
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_EXECINFO_INLINE
+# define _GL_EXECINFO_INLINE _GL_INLINE
+#endif
+
+_GL_EXECINFO_INLINE int
+backtrace (void **buffer, int size)
+{
+  (void) buffer;
+  (void) size;
+  return 0;
+}
+
+_GL_EXECINFO_INLINE char **
+backtrace_symbols (void *const *buffer, int size)
+{
+  (void) buffer;
+  (void) size;
+  return 0;
+}
+
+_GL_EXECINFO_INLINE void
+backtrace_symbols_fd (void *const *buffer, int size, int fd)
+{
+  (void) buffer;
+  (void) size;
+  (void) fd;
+}
+
+_GL_INLINE_HEADER_END
+
+#endif
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -60,7 +60,7 @@
    These functions can return -1/EINTR even though we don't have any
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
-static inline int
+static int
 nonintr_close (int fd)
 {
   int retval;
@@ -73,7 +73,7 @@
 }
 #define close nonintr_close
 
-static inline int
+static int
 nonintr_open (const char *pathname, int oflag, mode_t mode)
 {
   int retval;
new file mode 100644
--- /dev/null
+++ b/lib/exp2.c
@@ -0,0 +1,387 @@
+/* Exponential base 2 function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#include <float.h>
+
+/* Best possible approximation of log(2) as a 'double'.  */
+#define LOG2 0.693147180559945309417232121458176568075
+
+/* Best possible approximation of 1/log(2) as a 'double'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743
+
+/* Best possible approximation of log(2)/256 as a 'double'.  */
+#define LOG2_BY_256 0.00270760617406228636491106297444600221904
+
+/* Best possible approximation of 256/log(2) as a 'double'.  */
+#define LOG2_BY_256_INVERSE 369.329930467574632284140718336484387181
+
+double
+exp2 (double x)
+{
+  /* exp2(x) = exp(x*log(2)).
+     If we would compute it like this, there would be rounding errors for
+     integer or near-integer values of x.  To avoid these, we inline the
+     algorithm for exp(), and the multiplication with log(2) cancels a
+     division by log(2).  */
+
+  if (isnand (x))
+    return x;
+
+  if (x > (double) DBL_MAX_EXP)
+    /* x > DBL_MAX_EXP
+       hence exp2(x) > 2^DBL_MAX_EXP, overflows to Infinity.  */
+    return HUGE_VAL;
+
+  if (x < (double) (DBL_MIN_EXP - 1 - DBL_MANT_DIG))
+    /* x < (DBL_MIN_EXP - 1 - DBL_MANT_DIG)
+       hence exp2(x) < 2^(DBL_MIN_EXP-1-DBL_MANT_DIG),
+       underflows to zero.  */
+    return 0.0;
+
+  /* Decompose x into
+       x = n + m/256 + y/log(2)
+     where
+       n is an integer,
+       m is an integer, -128 <= m <= 128,
+       y is a number, |y| <= log(2)/512 + epsilon = 0.00135...
+     Then
+       exp2(x) = 2^n * exp(m * log(2)/256) * exp(y)
+     The first factor is an ldexpl() call.
+     The second factor is a table lookup.
+     The third factor is computed
+     - either as sinh(y) + cosh(y)
+       where sinh(y) is computed through the power series:
+         sinh(y) = y + y^3/3! + y^5/5! + ...
+       and cosh(y) is computed as hypot(1, sinh(y)),
+     - or as exp(2*z) = (1 + tanh(z)) / (1 - tanh(z))
+       where z = y/2
+       and tanh(z) is computed through its power series:
+         tanh(z) = z
+                   - 1/3 * z^3
+                   + 2/15 * z^5
+                   - 17/315 * z^7
+                   + 62/2835 * z^9
+                   - 1382/155925 * z^11
+                   + 21844/6081075 * z^13
+                   - 929569/638512875 * z^15
+                   + ...
+       Since |z| <= log(2)/1024 < 0.0007, the relative contribution of the
+       z^7 term is < 0.0007^6 < 2^-60 <= 2^-DBL_MANT_DIG, therefore we can
+       truncate the series after the z^5 term.  */
+
+  {
+    double nm = round (x * 256.0); /* = 256 * n + m */
+    double z = (x * 256.0 - nm) * (LOG2_BY_256 * 0.5);
+
+/* Coefficients of the power series for tanh(z).  */
+#define TANH_COEFF_1   1.0
+#define TANH_COEFF_3  -0.333333333333333333333333333333333333334
+#define TANH_COEFF_5   0.133333333333333333333333333333333333334
+#define TANH_COEFF_7  -0.053968253968253968253968253968253968254
+#define TANH_COEFF_9   0.0218694885361552028218694885361552028218
+#define TANH_COEFF_11 -0.00886323552990219656886323552990219656886
+#define TANH_COEFF_13  0.00359212803657248101692546136990581435026
+#define TANH_COEFF_15 -0.00145583438705131826824948518070211191904
+
+    double z2 = z * z;
+    double tanh_z =
+      ((TANH_COEFF_5
+        * z2 + TANH_COEFF_3)
+       * z2 + TANH_COEFF_1)
+      * z;
+
+    double exp_y = (1.0 + tanh_z) / (1.0 - tanh_z);
+
+    int n = (int) round (nm * (1.0 / 256.0));
+    int m = (int) nm - 256 * n;
+
+    /* exp_table[i] = exp((i - 128) * log(2)/256).
+       Computed in GNU clisp through
+         (setf (long-float-digits) 128)
+         (setq a 0L0)
+         (setf (long-float-digits) 256)
+         (dotimes (i 257)
+           (format t "        ~D,~%"
+                   (float (exp (* (/ (- i 128) 256) (log 2L0))) a)))  */
+    static const double exp_table[257] =
+      {
+        0.707106781186547524400844362104849039284,
+        0.709023942160207598920563322257676190836,
+        0.710946301084582779904674297352120049962,
+        0.71287387205274715340350157671438300618,
+        0.714806669195985005617532889137569953044,
+        0.71674470668389442125974978427737336719,
+        0.71868799872449116280161304224785251353,
+        0.720636559564312831364255957304947586072,
+        0.72259040348852331001850312073583545284,
+        0.724549544821017490259402705487111270714,
+        0.726513997924526282423036245842287293786,
+        0.728483777200721910815451524818606761737,
+        0.730458897090323494325651445155310766577,
+        0.732439372073202913296664682112279175616,
+        0.734425216668490963430822513132890712652,
+        0.736416445434683797507470506133110286942,
+        0.738413072969749655693453740187024961962,
+        0.740415113911235885228829945155951253966,
+        0.742422582936376250272386395864403155277,
+        0.744435494762198532693663597314273242753,
+        0.746453864145632424600321765743336770838,
+        0.748477705883617713391824861712720862423,
+        0.750507034813212760132561481529764324813,
+        0.752541865811703272039672277899716132493,
+        0.75458221379671136988300977551659676571,
+        0.756628093726304951096818488157633113612,
+        0.75867952059910734940489114658718937343,
+        0.760736509454407291763130627098242426467,
+        0.762799075372269153425626844758470477304,
+        0.76486723347364351194254345936342587308,
+        0.766940998920478000900300751753859329456,
+        0.769020386915828464216738479594307884331,
+        0.771105412703970411806145931045367420652,
+        0.773196091570510777431255778146135325272,
+        0.77529243884249997956151370535341912283,
+        0.777394469888544286059157168801667390437,
+        0.779502200118918483516864044737428940745,
+        0.781615644985678852072965367573877941354,
+        0.783734819982776446532455855478222575498,
+        0.78585974064617068462428149076570281356,
+        0.787990422553943243227635080090952504452,
+        0.790126881326412263402248482007960521995,
+        0.79226913262624686505993407346567890838,
+        0.794417192158581972116898048814333564685,
+        0.796571075671133448968624321559534367934,
+        0.798730798954313549131410147104316569576,
+        0.800896377841346676896923120795476813684,
+        0.803067828208385462848443946517563571584,
+        0.805245165974627154089760333678700291728,
+        0.807428407102430320039984581575729114268,
+        0.809617567597431874649880866726368203972,
+        0.81181266350866441589760797777344082227,
+        0.814013710928673883424109261007007338614,
+        0.816220725993637535170713864466769240053,
+        0.818433724883482243883852017078007231025,
+        0.82065272382200311435413206848451310067,
+        0.822877739076982422259378362362911222833,
+        0.825108786960308875483586738272485101678,
+        0.827345883828097198786118571797909120834,
+        0.829589046080808042697824787210781231927,
+        0.831838290163368217523168228488195222638,
+        0.834093632565291253329796170708536192903,
+        0.836355089820798286809404612069230711295,
+        0.83862267850893927589613232455870870518,
+        0.84089641525371454303112547623321489504,
+        0.84317631672419664796432298771385230143,
+        0.84546239963465259098692866759361830709,
+        0.84775468074466634749045860363936420312,
+        0.850053176859261734750681286748751167545,
+        0.852357904829025611837203530384718316326,
+        0.854668881550231413551897437515331498025,
+        0.856986123964963019301812477839166009452,
+        0.859309649061238957814672188228156252257,
+        0.861639473873136948607517116872358729753,
+        0.863975615480918781121524414614366207052,
+        0.866318091011155532438509953514163469652,
+        0.868666917636853124497101040936083380124,
+        0.871022112577578221729056715595464682243,
+        0.873383693099584470038708278290226842228,
+        0.875751676515939078050995142767930296012,
+        0.878126080186649741556080309687656610647,
+        0.880506921518791912081045787323636256171,
+        0.882894217966636410521691124969260937028,
+        0.885287987031777386769987907431242017412,
+        0.88768824626326062627527960009966160388,
+        0.89009501325771220447985955243623523504,
+        0.892508305659467490072110281986409916153,
+        0.8949281411607004980029443898876582985,
+        0.897354537501553593213851621063890907178,
+        0.899787512470267546027427696662514569756,
+        0.902227083903311940153838631655504844215,
+        0.904673269685515934269259325789226871994,
+        0.907126087750199378124917300181170171233,
+        0.909585556079304284147971563828178746372,
+        0.91205169270352665549806275316460097744,
+        0.914524515702448671545983912696158354092,
+        0.91700404320467123174354159479414442804,
+        0.919490293387946858856304371174663918816,
+        0.921983284479312962533570386670938449637,
+        0.92448303475522546419252726694739603678,
+        0.92698956254169278419622653516884831976,
+        0.929502886214410192307650717745572682403,
+        0.932023024198894522404814545597236289343,
+        0.934549994970619252444512104439799143264,
+        0.93708381705514995066499947497722326722,
+        0.93962450902828008902058735120448448827,
+        0.942172089516167224843810351983745154882,
+        0.944726577195469551733539267378681531548,
+        0.947287990793482820670109326713462307376,
+        0.949856349088277632361251759806996099924,
+        0.952431670908837101825337466217860725517,
+        0.955013975135194896221170529572799135168,
+        0.957603280698573646936305635147915443924,
+        0.960199606581523736948607188887070611744,
+        0.962802971818062464478519115091191368377,
+        0.965413395493813583952272948264534783197,
+        0.968030896746147225299027952283345762418,
+        0.970655494764320192607710617437589705184,
+        0.973287208789616643172102023321302921373,
+        0.97592605811548914795551023340047499377,
+        0.978572062087700134509161125813435745597,
+        0.981225240104463713381244885057070325016,
+        0.983885611616587889056366801238014683926,
+        0.98655319612761715646797006813220671315,
+        0.989228013193975484129124959065583667775,
+        0.99191008242510968492991311132615581644,
+        0.994599423483633175652477686222166314457,
+        0.997296056085470126257659913847922601123,
+        1.0,
+        1.00271127505020248543074558845036204047,
+        1.0054299011128028213513839559347998147,
+        1.008155898118417515783094890817201039276,
+        1.01088928605170046002040979056186052439,
+        1.013630084951489438840258929063939929597,
+        1.01637831491095303794049311378629406276,
+        1.0191339960777379496848780958207928794,
+        1.02189714865411667823448013478329943978,
+        1.02466779289713564514828907627081492763,
+        1.0274459491187636965388611939222137815,
+        1.030231637686041012871707902453904567093,
+        1.033024879021228422500108283970460918086,
+        1.035825693601957120029983209018081371844,
+        1.03863410196137879061243669795463973258,
+        1.04145012468831614126454607901189312648,
+        1.044273782427413840321966478739929008784,
+        1.04710509587928986612990725022711224056,
+        1.04994408580068726608203812651590790906,
+        1.05279077300462632711989120298074630319,
+        1.05564517836055715880834132515293865216,
+        1.058507322794512690105772109683716645074,
+        1.061377227289262080950567678003883726294,
+        1.06425491288446454978861125700158022068,
+        1.06714040067682361816952112099280916261,
+        1.0700337118202417735424119367576235685,
+        1.072934867525975551385035450873827585343,
+        1.075843889062791037803228648476057074063,
+        1.07876079775711979374068003743848295849,
+        1.081685614993215201942115594422531125643,
+        1.08461836221330923781610517190661434161,
+        1.087559060917769665346797830944039707867,
+        1.09050773266525765920701065576070797899,
+        1.09346439907288585422822014625044716208,
+        1.096429081816376823386138295859248481766,
+        1.09940180263022198546369696823882990404,
+        1.10238258330784094355641420942564685751,
+        1.10537144570174125558827469625695031104,
+        1.108368411723678638009423649426619850137,
+        1.111373503344817603850149254228916637444,
+        1.1143867425958925363088129569196030678,
+        1.11740815156736919905457996308578026665,
+        1.12043775240960668442900387986631301277,
+        1.123475567333019800733729739775321431954,
+        1.12652161860824189979479864378703477763,
+        1.129575928566288145997264988840249825907,
+        1.13263851959871922798707372367762308438,
+        1.13570941415780551424039033067611701343,
+        1.13878863475669165370383028384151125472,
+        1.14187620396956162271229760828788093894,
+        1.14497214443180421939441388822291589579,
+        1.14807647884017900677879966269734268003,
+        1.15118922995298270581775963520198253612,
+        1.154310420590216039548221528724806960684,
+        1.157440073633751029613085766293796821106,
+        1.16057821202749874636945947257609098625,
+        1.16372485877757751381357359909218531234,
+        1.166880036952481570555516298414089287834,
+        1.170043769683250188080259035792738573,
+        1.17321608016363724753480435451324538889,
+        1.176396991650281276284645728483848641054,
+        1.17958652746287594548610056676944051898,
+        1.182784710984341029924457204693850757966,
+        1.18599156566099383137126564953421556374,
+        1.18920711500272106671749997056047591529,
+        1.19243138258315122214272755814543101148,
+        1.195664392039827374583837049865451975705,
+        1.19890616707438048177030255797630020695,
+        1.202156731452703142096396957497765876003,
+        1.205416109005123825604211432558411335666,
+        1.208684323626581577354792255889216998484,
+        1.21196139927680119446816891773249304545,
+        1.215247359980468878116520251338798457624,
+        1.218542229827408361758207148117394510724,
+        1.221846032972757516903891841911570785836,
+        1.225158793637145437709464594384845353707,
+        1.22848053610687000569400895779278184036,
+        1.2318112847340759358845566532127948166,
+        1.235151063936933305692912507415415760294,
+        1.238499898199816567833368865859612431545,
+        1.24185781207348404859367746872659560551,
+        1.24522483017525793277520496748615267417,
+        1.24860097718920473662176609730249554519,
+        1.25198627786631627006020603178920359732,
+        1.255380757024691089579390657442301194595,
+        1.25878443954971644307786044181516261876,
+        1.26219735039425070801401025851841645967,
+        1.265619514578806324196273999873453036296,
+        1.26905095719173322255441908103233800472,
+        1.27249170338940275123669204418460217677,
+        1.27594177839639210038120243475928938891,
+        1.27940120750566922691358797002785254596,
+        1.28287001607877828072666978102151405111,
+        1.286348229546025533601482208069738348355,
+        1.28983587340666581223274729549155218968,
+        1.293332973229089436725559789048704304684,
+        1.296839554651009665933754117792451159835,
+        1.30035564337965065101414056707091779129,
+        1.30388126519193589857452364895199736833,
+        1.30741644593467724479715157747196172848,
+        1.310961211524764341922991786330755849366,
+        1.314515587949354658485983613383997794965,
+        1.318079601266063994690185647066116617664,
+        1.32165327760315751432651181233060922616,
+        1.32523664315974129462953709549872167411,
+        1.32882972420595439547865089632866510792,
+        1.33243254708316144935164337949073577407,
+        1.33604513820414577344262790437186975929,
+        1.33966752405330300536003066972435257602,
+        1.34329973118683526382421714618163087542,
+        1.346941786232945835788173713229537282075,
+        1.35059371589203439140852219606013396004,
+        1.35425554693689272829801474014070280434,
+        1.357927306212901046494536695671766697446,
+        1.36160902063822475558553593883194147464,
+        1.36530071720401181543069836033754285543,
+        1.36900242297459061192960113298219283217,
+        1.37271416508766836928499785714471721579,
+        1.37643597075453010021632280551868696026,
+        1.380167867260238095581945274358283464697,
+        1.383909881963831954872659527265192818,
+        1.387662042298529159042861017950775988896,
+        1.39142437577192618714983552956624344668,
+        1.395196909966200178275574599249220994716,
+        1.398979672538311140209528136715194969206,
+        1.40277269122020470637471352433337881711,
+        1.40657599381901544248361973255451684411,
+        1.410389608217270704414375128268675481145,
+        1.41421356237309504880168872420969807857
+      };
+
+    return ldexp (exp_table[128 + m] * exp_y, n);
+  }
+}
new file mode 100644
--- /dev/null
+++ b/lib/exp2f.c
@@ -0,0 +1,26 @@
+/* Exponential base 2 function.
+   Copyright (C) 2011-2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+float
+exp2f (float x)
+{
+  return (float) exp2 ((double) x);
+}
new file mode 100644
--- /dev/null
+++ b/lib/exp2l.c
@@ -0,0 +1,136 @@
+/* Exponential base 2 function.
+   Copyright (C) 2011-2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+exp2l (long double x)
+{
+  return exp2 (x);
+}
+
+#else
+
+# include <float.h>
+
+/* gl_expl_table[i] = exp((i - 128) * log(2)/256).  */
+extern const long double gl_expl_table[257];
+
+/* Best possible approximation of log(2) as a 'long double'.  */
+#define LOG2 0.693147180559945309417232121458176568075L
+
+/* Best possible approximation of 1/log(2) as a 'long double'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743L
+
+/* Best possible approximation of log(2)/256 as a 'long double'.  */
+#define LOG2_BY_256 0.00270760617406228636491106297444600221904L
+
+/* Best possible approximation of 256/log(2) as a 'long double'.  */
+#define LOG2_BY_256_INVERSE 369.329930467574632284140718336484387181L
+
+long double
+exp2l (long double x)
+{
+  /* exp2(x) = exp(x*log(2)).
+     If we would compute it like this, there would be rounding errors for
+     integer or near-integer values of x.  To avoid these, we inline the
+     algorithm for exp(), and the multiplication with log(2) cancels a
+     division by log(2).  */
+
+  if (isnanl (x))
+    return x;
+
+  if (x > (long double) LDBL_MAX_EXP)
+    /* x > LDBL_MAX_EXP
+       hence exp2(x) > 2^LDBL_MAX_EXP, overflows to Infinity.  */
+    return HUGE_VALL;
+
+  if (x < (long double) (LDBL_MIN_EXP - 1 - LDBL_MANT_DIG))
+    /* x < (LDBL_MIN_EXP - 1 - LDBL_MANT_DIG)
+       hence exp2(x) < 2^(LDBL_MIN_EXP-1-LDBL_MANT_DIG),
+       underflows to zero.  */
+    return 0.0L;
+
+  /* Decompose x into
+       x = n + m/256 + y/log(2)
+     where
+       n is an integer,
+       m is an integer, -128 <= m <= 128,
+       y is a number, |y| <= log(2)/512 + epsilon = 0.00135...
+     Then
+       exp2(x) = 2^n * exp(m * log(2)/256) * exp(y)
+     The first factor is an ldexpl() call.
+     The second factor is a table lookup.
+     The third factor is computed
+     - either as sinh(y) + cosh(y)
+       where sinh(y) is computed through the power series:
+         sinh(y) = y + y^3/3! + y^5/5! + ...
+       and cosh(y) is computed as hypot(1, sinh(y)),
+     - or as exp(2*z) = (1 + tanh(z)) / (1 - tanh(z))
+       where z = y/2
+       and tanh(z) is computed through its power series:
+         tanh(z) = z
+                   - 1/3 * z^3
+                   + 2/15 * z^5
+                   - 17/315 * z^7
+                   + 62/2835 * z^9
+                   - 1382/155925 * z^11
+                   + 21844/6081075 * z^13
+                   - 929569/638512875 * z^15
+                   + ...
+       Since |z| <= log(2)/1024 < 0.0007, the relative contribution of the
+       z^13 term is < 0.0007^12 < 2^-120 <= 2^-LDBL_MANT_DIG, therefore we
+       can truncate the series after the z^11 term.  */
+
+  {
+    long double nm = roundl (x * 256.0L); /* = 256 * n + m */
+    long double z = (x * 256.0L - nm) * (LOG2_BY_256 * 0.5L);
+
+/* Coefficients of the power series for tanh(z).  */
+#define TANH_COEFF_1   1.0L
+#define TANH_COEFF_3  -0.333333333333333333333333333333333333334L
+#define TANH_COEFF_5   0.133333333333333333333333333333333333334L
+#define TANH_COEFF_7  -0.053968253968253968253968253968253968254L
+#define TANH_COEFF_9   0.0218694885361552028218694885361552028218L
+#define TANH_COEFF_11 -0.00886323552990219656886323552990219656886L
+#define TANH_COEFF_13  0.00359212803657248101692546136990581435026L
+#define TANH_COEFF_15 -0.00145583438705131826824948518070211191904L
+
+    long double z2 = z * z;
+    long double tanh_z =
+      (((((TANH_COEFF_11
+           * z2 + TANH_COEFF_9)
+          * z2 + TANH_COEFF_7)
+         * z2 + TANH_COEFF_5)
+        * z2 + TANH_COEFF_3)
+       * z2 + TANH_COEFF_1)
+      * z;
+
+    long double exp_y = (1.0L + tanh_z) / (1.0L - tanh_z);
+
+    int n = (int) roundl (nm * (1.0L / 256.0L));
+    int m = (int) nm - 256 * n;
+
+    return ldexpl (gl_expl_table[128 + m] * exp_y, n);
+  }
+}
+
+#endif
new file mode 100644
--- /dev/null
+++ b/lib/expl-table.c
@@ -0,0 +1,286 @@
+/* Exponential function.
+   Copyright (C) 2011-2012 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/>.  */
+
+#include <config.h>
+
+/* gl_expl_table[i] = exp((i - 128) * log(2)/256).
+   Computed in GNU clisp through
+     (setf (long-float-digits) 128)
+     (setq a 0L0)
+     (setf (long-float-digits) 256)
+     (dotimes (i 257)
+       (format t "    ~D,~%"
+               (float (exp (* (/ (- i 128) 256) (log 2L0))) a)))  */
+const long double gl_expl_table[257] =
+  {
+    0.707106781186547524400844362104849039284L,
+    0.709023942160207598920563322257676190836L,
+    0.710946301084582779904674297352120049962L,
+    0.71287387205274715340350157671438300618L,
+    0.714806669195985005617532889137569953044L,
+    0.71674470668389442125974978427737336719L,
+    0.71868799872449116280161304224785251353L,
+    0.720636559564312831364255957304947586072L,
+    0.72259040348852331001850312073583545284L,
+    0.724549544821017490259402705487111270714L,
+    0.726513997924526282423036245842287293786L,
+    0.728483777200721910815451524818606761737L,
+    0.730458897090323494325651445155310766577L,
+    0.732439372073202913296664682112279175616L,
+    0.734425216668490963430822513132890712652L,
+    0.736416445434683797507470506133110286942L,
+    0.738413072969749655693453740187024961962L,
+    0.740415113911235885228829945155951253966L,
+    0.742422582936376250272386395864403155277L,
+    0.744435494762198532693663597314273242753L,
+    0.746453864145632424600321765743336770838L,
+    0.748477705883617713391824861712720862423L,
+    0.750507034813212760132561481529764324813L,
+    0.752541865811703272039672277899716132493L,
+    0.75458221379671136988300977551659676571L,
+    0.756628093726304951096818488157633113612L,
+    0.75867952059910734940489114658718937343L,
+    0.760736509454407291763130627098242426467L,
+    0.762799075372269153425626844758470477304L,
+    0.76486723347364351194254345936342587308L,
+    0.766940998920478000900300751753859329456L,
+    0.769020386915828464216738479594307884331L,
+    0.771105412703970411806145931045367420652L,
+    0.773196091570510777431255778146135325272L,
+    0.77529243884249997956151370535341912283L,
+    0.777394469888544286059157168801667390437L,
+    0.779502200118918483516864044737428940745L,
+    0.781615644985678852072965367573877941354L,
+    0.783734819982776446532455855478222575498L,
+    0.78585974064617068462428149076570281356L,
+    0.787990422553943243227635080090952504452L,
+    0.790126881326412263402248482007960521995L,
+    0.79226913262624686505993407346567890838L,
+    0.794417192158581972116898048814333564685L,
+    0.796571075671133448968624321559534367934L,
+    0.798730798954313549131410147104316569576L,
+    0.800896377841346676896923120795476813684L,
+    0.803067828208385462848443946517563571584L,
+    0.805245165974627154089760333678700291728L,
+    0.807428407102430320039984581575729114268L,
+    0.809617567597431874649880866726368203972L,
+    0.81181266350866441589760797777344082227L,
+    0.814013710928673883424109261007007338614L,
+    0.816220725993637535170713864466769240053L,
+    0.818433724883482243883852017078007231025L,
+    0.82065272382200311435413206848451310067L,
+    0.822877739076982422259378362362911222833L,
+    0.825108786960308875483586738272485101678L,
+    0.827345883828097198786118571797909120834L,
+    0.829589046080808042697824787210781231927L,
+    0.831838290163368217523168228488195222638L,
+    0.834093632565291253329796170708536192903L,
+    0.836355089820798286809404612069230711295L,
+    0.83862267850893927589613232455870870518L,
+    0.84089641525371454303112547623321489504L,
+    0.84317631672419664796432298771385230143L,
+    0.84546239963465259098692866759361830709L,
+    0.84775468074466634749045860363936420312L,
+    0.850053176859261734750681286748751167545L,
+    0.852357904829025611837203530384718316326L,
+    0.854668881550231413551897437515331498025L,
+    0.856986123964963019301812477839166009452L,
+    0.859309649061238957814672188228156252257L,
+    0.861639473873136948607517116872358729753L,
+    0.863975615480918781121524414614366207052L,
+    0.866318091011155532438509953514163469652L,
+    0.868666917636853124497101040936083380124L,
+    0.871022112577578221729056715595464682243L,
+    0.873383693099584470038708278290226842228L,
+    0.875751676515939078050995142767930296012L,
+    0.878126080186649741556080309687656610647L,
+    0.880506921518791912081045787323636256171L,
+    0.882894217966636410521691124969260937028L,
+    0.885287987031777386769987907431242017412L,
+    0.88768824626326062627527960009966160388L,
+    0.89009501325771220447985955243623523504L,
+    0.892508305659467490072110281986409916153L,
+    0.8949281411607004980029443898876582985L,
+    0.897354537501553593213851621063890907178L,
+    0.899787512470267546027427696662514569756L,
+    0.902227083903311940153838631655504844215L,
+    0.904673269685515934269259325789226871994L,
+    0.907126087750199378124917300181170171233L,
+    0.909585556079304284147971563828178746372L,
+    0.91205169270352665549806275316460097744L,
+    0.914524515702448671545983912696158354092L,
+    0.91700404320467123174354159479414442804L,
+    0.919490293387946858856304371174663918816L,
+    0.921983284479312962533570386670938449637L,
+    0.92448303475522546419252726694739603678L,
+    0.92698956254169278419622653516884831976L,
+    0.929502886214410192307650717745572682403L,
+    0.932023024198894522404814545597236289343L,
+    0.934549994970619252444512104439799143264L,
+    0.93708381705514995066499947497722326722L,
+    0.93962450902828008902058735120448448827L,
+    0.942172089516167224843810351983745154882L,
+    0.944726577195469551733539267378681531548L,
+    0.947287990793482820670109326713462307376L,
+    0.949856349088277632361251759806996099924L,
+    0.952431670908837101825337466217860725517L,
+    0.955013975135194896221170529572799135168L,
+    0.957603280698573646936305635147915443924L,
+    0.960199606581523736948607188887070611744L,
+    0.962802971818062464478519115091191368377L,
+    0.965413395493813583952272948264534783197L,
+    0.968030896746147225299027952283345762418L,
+    0.970655494764320192607710617437589705184L,
+    0.973287208789616643172102023321302921373L,
+    0.97592605811548914795551023340047499377L,
+    0.978572062087700134509161125813435745597L,
+    0.981225240104463713381244885057070325016L,
+    0.983885611616587889056366801238014683926L,
+    0.98655319612761715646797006813220671315L,
+    0.989228013193975484129124959065583667775L,
+    0.99191008242510968492991311132615581644L,
+    0.994599423483633175652477686222166314457L,
+    0.997296056085470126257659913847922601123L,
+    1.0L,
+    1.00271127505020248543074558845036204047L,
+    1.0054299011128028213513839559347998147L,
+    1.008155898118417515783094890817201039276L,
+    1.01088928605170046002040979056186052439L,
+    1.013630084951489438840258929063939929597L,
+    1.01637831491095303794049311378629406276L,
+    1.0191339960777379496848780958207928794L,
+    1.02189714865411667823448013478329943978L,
+    1.02466779289713564514828907627081492763L,
+    1.0274459491187636965388611939222137815L,
+    1.030231637686041012871707902453904567093L,
+    1.033024879021228422500108283970460918086L,
+    1.035825693601957120029983209018081371844L,
+    1.03863410196137879061243669795463973258L,
+    1.04145012468831614126454607901189312648L,
+    1.044273782427413840321966478739929008784L,
+    1.04710509587928986612990725022711224056L,
+    1.04994408580068726608203812651590790906L,
+    1.05279077300462632711989120298074630319L,
+    1.05564517836055715880834132515293865216L,
+    1.058507322794512690105772109683716645074L,
+    1.061377227289262080950567678003883726294L,
+    1.06425491288446454978861125700158022068L,
+    1.06714040067682361816952112099280916261L,
+    1.0700337118202417735424119367576235685L,
+    1.072934867525975551385035450873827585343L,
+    1.075843889062791037803228648476057074063L,
+    1.07876079775711979374068003743848295849L,
+    1.081685614993215201942115594422531125643L,
+    1.08461836221330923781610517190661434161L,
+    1.087559060917769665346797830944039707867L,
+    1.09050773266525765920701065576070797899L,
+    1.09346439907288585422822014625044716208L,
+    1.096429081816376823386138295859248481766L,
+    1.09940180263022198546369696823882990404L,
+    1.10238258330784094355641420942564685751L,
+    1.10537144570174125558827469625695031104L,
+    1.108368411723678638009423649426619850137L,
+    1.111373503344817603850149254228916637444L,
+    1.1143867425958925363088129569196030678L,
+    1.11740815156736919905457996308578026665L,
+    1.12043775240960668442900387986631301277L,
+    1.123475567333019800733729739775321431954L,
+    1.12652161860824189979479864378703477763L,
+    1.129575928566288145997264988840249825907L,
+    1.13263851959871922798707372367762308438L,
+    1.13570941415780551424039033067611701343L,
+    1.13878863475669165370383028384151125472L,
+    1.14187620396956162271229760828788093894L,
+    1.14497214443180421939441388822291589579L,
+    1.14807647884017900677879966269734268003L,
+    1.15118922995298270581775963520198253612L,
+    1.154310420590216039548221528724806960684L,
+    1.157440073633751029613085766293796821106L,
+    1.16057821202749874636945947257609098625L,
+    1.16372485877757751381357359909218531234L,
+    1.166880036952481570555516298414089287834L,
+    1.170043769683250188080259035792738573L,
+    1.17321608016363724753480435451324538889L,
+    1.176396991650281276284645728483848641054L,
+    1.17958652746287594548610056676944051898L,
+    1.182784710984341029924457204693850757966L,
+    1.18599156566099383137126564953421556374L,
+    1.18920711500272106671749997056047591529L,
+    1.19243138258315122214272755814543101148L,
+    1.195664392039827374583837049865451975705L,
+    1.19890616707438048177030255797630020695L,
+    1.202156731452703142096396957497765876003L,
+    1.205416109005123825604211432558411335666L,
+    1.208684323626581577354792255889216998484L,
+    1.21196139927680119446816891773249304545L,
+    1.215247359980468878116520251338798457624L,
+    1.218542229827408361758207148117394510724L,
+    1.221846032972757516903891841911570785836L,
+    1.225158793637145437709464594384845353707L,
+    1.22848053610687000569400895779278184036L,
+    1.2318112847340759358845566532127948166L,
+    1.235151063936933305692912507415415760294L,
+    1.238499898199816567833368865859612431545L,
+    1.24185781207348404859367746872659560551L,
+    1.24522483017525793277520496748615267417L,
+    1.24860097718920473662176609730249554519L,
+    1.25198627786631627006020603178920359732L,
+    1.255380757024691089579390657442301194595L,
+    1.25878443954971644307786044181516261876L,
+    1.26219735039425070801401025851841645967L,
+    1.265619514578806324196273999873453036296L,
+    1.26905095719173322255441908103233800472L,
+    1.27249170338940275123669204418460217677L,
+    1.27594177839639210038120243475928938891L,
+    1.27940120750566922691358797002785254596L,
+    1.28287001607877828072666978102151405111L,
+    1.286348229546025533601482208069738348355L,
+    1.28983587340666581223274729549155218968L,
+    1.293332973229089436725559789048704304684L,
+    1.296839554651009665933754117792451159835L,
+    1.30035564337965065101414056707091779129L,
+    1.30388126519193589857452364895199736833L,
+    1.30741644593467724479715157747196172848L,
+    1.310961211524764341922991786330755849366L,
+    1.314515587949354658485983613383997794965L,
+    1.318079601266063994690185647066116617664L,
+    1.32165327760315751432651181233060922616L,
+    1.32523664315974129462953709549872167411L,
+    1.32882972420595439547865089632866510792L,
+    1.33243254708316144935164337949073577407L,
+    1.33604513820414577344262790437186975929L,
+    1.33966752405330300536003066972435257602L,
+    1.34329973118683526382421714618163087542L,
+    1.346941786232945835788173713229537282075L,
+    1.35059371589203439140852219606013396004L,
+    1.35425554693689272829801474014070280434L,
+    1.357927306212901046494536695671766697446L,
+    1.36160902063822475558553593883194147464L,
+    1.36530071720401181543069836033754285543L,
+    1.36900242297459061192960113298219283217L,
+    1.37271416508766836928499785714471721579L,
+    1.37643597075453010021632280551868696026L,
+    1.380167867260238095581945274358283464697L,
+    1.383909881963831954872659527265192818L,
+    1.387662042298529159042861017950775988896L,
+    1.39142437577192618714983552956624344668L,
+    1.395196909966200178275574599249220994716L,
+    1.398979672538311140209528136715194969206L,
+    1.40277269122020470637471352433337881711L,
+    1.40657599381901544248361973255451684411L,
+    1.410389608217270704414375128268675481145L,
+    1.41421356237309504880168872420969807857L
+  };
--- a/lib/expl.c
+++ b/lib/expl.c
@@ -1,9 +1,5 @@
-/* Emulation for expl.
-   Contributed by Paolo Bonzini
-
-   Copyright 2002-2003, 2007, 2009-2012 Free Software Foundation, Inc.
-
-   This file is part of gnulib.
+/* Exponential function.
+   Copyright (C) 2011-2012 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
@@ -35,113 +31,120 @@
 
 # include <float.h>
 
-static const long double C[] = {
-/* Chebyshev polynom coeficients for (exp(x)-1)/x */
-# define P1 C[0]
-# define P2 C[1]
-# define P3 C[2]
-# define P4 C[3]
-# define P5 C[4]
-# define P6 C[5]
- 0.5L,
- 1.66666666666666666666666666666666683E-01L,
- 4.16666666666666666666654902320001674E-02L,
- 8.33333333333333333333314659767198461E-03L,
- 1.38888888889899438565058018857254025E-03L,
- 1.98412698413981650382436541785404286E-04L,
+/* gl_expl_table[i] = exp((i - 128) * log(2)/256).  */
+extern const long double gl_expl_table[257];
+
+/* A value slightly larger than log(2).  */
+#define LOG2_PLUS_EPSILON 0.6931471805599454L
+
+/* Best possible approximation of log(2) as a 'long double'.  */
+#define LOG2 0.693147180559945309417232121458176568075L
+
+/* Best possible approximation of 1/log(2) as a 'long double'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743L
 
-/* Smallest integer x for which e^x overflows.  */
-# define himark C[6]
- 11356.523406294143949491931077970765L,
+/* Best possible approximation of log(2)/256 as a 'long double'.  */
+#define LOG2_BY_256 0.00270760617406228636491106297444600221904L
 
-/* Largest integer x for which e^x underflows.  */
-# define lomark C[7]
--11433.4627433362978788372438434526231L,
+/* Best possible approximation of 256/log(2) as a 'long double'.  */
+#define LOG2_BY_256_INVERSE 369.329930467574632284140718336484387181L
 
-/* very small number */
-# define TINY C[8]
- 1.0e-4900L,
-
-/* 2^16383 */
-# define TWO16383 C[9]
- 5.94865747678615882542879663314003565E+4931L};
+/* The upper 32 bits of log(2)/256.  */
+#define LOG2_BY_256_HI_PART 0.0027076061733168899081647396087646484375L
+/* log(2)/256 - LOG2_HI_PART.  */
+#define LOG2_BY_256_LO_PART \
+  0.000000000000745396456746323365681353781544922399845L
 
 long double
 expl (long double x)
 {
-  /* Check for usual case.  */
-  if (x < himark && x > lomark)
-    {
-      int exponent;
-      long double t, x22;
-      int k = 1;
-      long double result = 1.0;
-
-      /* Compute an integer power of e with a granularity of 0.125.  */
-      exponent = (int) floorl (x * 8.0L);
-      x -= exponent / 8.0L;
+  if (isnanl (x))
+    return x;
 
-      if (x > 0.0625)
-        {
-          exponent++;
-          x -= 0.125L;
-        }
+  if (x >= (long double) LDBL_MAX_EXP * LOG2_PLUS_EPSILON)
+    /* x > LDBL_MAX_EXP * log(2)
+       hence exp(x) > 2^LDBL_MAX_EXP, overflows to Infinity.  */
+    return HUGE_VALL;
 
-      if (exponent < 0)
-        {
-          t = 0.8824969025845954028648921432290507362220L; /* e^-0.25 */
-          exponent = -exponent;
-        }
-      else
-        t = 1.1331484530668263168290072278117938725655L; /* e^0.25 */
+  if (x <= (long double) (LDBL_MIN_EXP - 1 - LDBL_MANT_DIG) * LOG2_PLUS_EPSILON)
+    /* x < (LDBL_MIN_EXP - 1 - LDBL_MANT_DIG) * log(2)
+       hence exp(x) < 2^(LDBL_MIN_EXP-1-LDBL_MANT_DIG),
+       underflows to zero.  */
+    return 0.0L;
 
-      while (exponent)
-        {
-          if (exponent & k)
-            {
-              result *= t;
-              exponent ^= k;
-            }
-          t *= t;
-          k <<= 1;
-        }
+  /* Decompose x into
+       x = n * log(2) + m * log(2)/256 + y
+     where
+       n is an integer,
+       m is an integer, -128 <= m <= 128,
+       y is a number, |y| <= log(2)/512 + epsilon = 0.00135...
+     Then
+       exp(x) = 2^n * exp(m * log(2)/256) * exp(y)
+     The first factor is an ldexpl() call.
+     The second factor is a table lookup.
+     The third factor is computed
+     - either as sinh(y) + cosh(y)
+       where sinh(y) is computed through the power series:
+         sinh(y) = y + y^3/3! + y^5/5! + ...
+       and cosh(y) is computed as hypot(1, sinh(y)),
+     - or as exp(2*z) = (1 + tanh(z)) / (1 - tanh(z))
+       where z = y/2
+       and tanh(z) is computed through its power series:
+         tanh(z) = z
+                   - 1/3 * z^3
+                   + 2/15 * z^5
+                   - 17/315 * z^7
+                   + 62/2835 * z^9
+                   - 1382/155925 * z^11
+                   + 21844/6081075 * z^13
+                   - 929569/638512875 * z^15
+                   + ...
+       Since |z| <= log(2)/1024 < 0.0007, the relative contribution of the
+       z^13 term is < 0.0007^12 < 2^-120 <= 2^-LDBL_MANT_DIG, therefore we
+       can truncate the series after the z^11 term.
 
-      /* Approximate (e^x - 1)/x, using a seventh-degree polynomial,
-         with maximum error in [-2^-16-2^-53,2^-16+2^-53]
-         less than 4.8e-39.  */
-      x22 = x + x*x*(P1+x*(P2+x*(P3+x*(P4+x*(P5+x*P6)))));
+     Given the usual bounds LDBL_MAX_EXP <= 16384, LDBL_MIN_EXP >= -16381,
+     LDBL_MANT_DIG <= 120, we can estimate x:  -11440 <= x <= 11357.
+     This means, when dividing x by log(2), where we want x mod log(2)
+     to be precise to LDBL_MANT_DIG bits, we have to use an approximation
+     to log(2) that has 14+LDBL_MANT_DIG bits.  */
 
-      return result + result * x22;
-    }
-  /* Exceptional cases:  */
-  else if (x < himark)
-    {
-      if (x + x == x)
-        /* e^-inf == 0, with no error.  */
-        return 0;
-      else
-        /* Underflow */
-        return TINY * TINY;
-    }
-  else
-    /* Return x, if x is a NaN or Inf; or overflow, otherwise.  */
-    return TWO16383*x;
+  {
+    long double nm = roundl (x * LOG2_BY_256_INVERSE); /* = 256 * n + m */
+    /* n has at most 15 bits, nm therefore has at most 23 bits, therefore
+       n * LOG2_HI_PART is computed exactly, and n * LOG2_LO_PART is computed
+       with an absolute error < 2^15 * 2e-10 * 2^-LDBL_MANT_DIG.  */
+    long double y_tmp = x - nm * LOG2_BY_256_HI_PART;
+    long double y = y_tmp - nm * LOG2_BY_256_LO_PART;
+    long double z = 0.5L * y;
+
+/* Coefficients of the power series for tanh(z).  */
+#define TANH_COEFF_1   1.0L
+#define TANH_COEFF_3  -0.333333333333333333333333333333333333334L
+#define TANH_COEFF_5   0.133333333333333333333333333333333333334L
+#define TANH_COEFF_7  -0.053968253968253968253968253968253968254L
+#define TANH_COEFF_9   0.0218694885361552028218694885361552028218L
+#define TANH_COEFF_11 -0.00886323552990219656886323552990219656886L
+#define TANH_COEFF_13  0.00359212803657248101692546136990581435026L
+#define TANH_COEFF_15 -0.00145583438705131826824948518070211191904L
+
+    long double z2 = z * z;
+    long double tanh_z =
+      (((((TANH_COEFF_11
+           * z2 + TANH_COEFF_9)
+          * z2 + TANH_COEFF_7)
+         * z2 + TANH_COEFF_5)
+        * z2 + TANH_COEFF_3)
+       * z2 + TANH_COEFF_1)
+      * z;
+
+    long double exp_y = (1.0L + tanh_z) / (1.0L - tanh_z);
+
+    int n = (int) roundl (nm * (1.0L / 256.0L));
+    int m = (int) nm - 256 * n;
+
+    return ldexpl (gl_expl_table[128 + m] * exp_y, n);
+  }
 }
 
 #endif
-
-#if 0
-int
-main (void)
-{
-  printf ("%.16Lg\n", expl (1.0L));
-  printf ("%.16Lg\n", expl (-1.0L));
-  printf ("%.16Lg\n", expl (2.0L));
-  printf ("%.16Lg\n", expl (4.0L));
-  printf ("%.16Lg\n", expl (-2.0L));
-  printf ("%.16Lg\n", expl (-4.0L));
-  printf ("%.16Lg\n", expl (0.0625L));
-  printf ("%.16Lg\n", expl (0.3L));
-  printf ("%.16Lg\n", expl (0.6L));
-}
-#endif
new file mode 100644
--- /dev/null
+++ b/lib/expm1.c
@@ -0,0 +1,422 @@
+/* Exponential function minus one.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#include <float.h>
+
+/* A value slightly larger than log(2).  */
+#define LOG2_PLUS_EPSILON 0.6931471805599454
+
+/* Best possible approximation of log(2) as a 'double'.  */
+#define LOG2 0.693147180559945309417232121458176568075
+
+/* Best possible approximation of 1/log(2) as a 'double'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743
+
+/* Best possible approximation of log(2)/256 as a 'double'.  */
+#define LOG2_BY_256 0.00270760617406228636491106297444600221904
+
+/* Best possible approximation of 256/log(2) as a 'double'.  */
+#define LOG2_BY_256_INVERSE 369.329930467574632284140718336484387181
+
+/* The upper 32 bits of log(2)/256.  */
+#define LOG2_BY_256_HI_PART 0.0027076061733168899081647396087646484375
+/* log(2)/256 - LOG2_HI_PART.  */
+#define LOG2_BY_256_LO_PART \
+  0.000000000000745396456746323365681353781544922399845
+
+double
+expm1 (double x)
+{
+  if (isnand (x))
+    return x;
+
+  if (x >= (double) DBL_MAX_EXP * LOG2_PLUS_EPSILON)
+    /* x > DBL_MAX_EXP * log(2)
+       hence exp(x) > 2^DBL_MAX_EXP, overflows to Infinity.  */
+    return HUGE_VAL;
+
+  if (x <= (double) (- DBL_MANT_DIG) * LOG2_PLUS_EPSILON)
+    /* x < (- DBL_MANT_DIG) * log(2)
+       hence 0 < exp(x) < 2^-DBL_MANT_DIG,
+       hence -1 < exp(x)-1 < -1 + 2^-DBL_MANT_DIG
+       rounds to -1.  */
+    return -1.0;
+
+  if (x <= - LOG2_PLUS_EPSILON)
+    /* 0 < exp(x) < 1/2.
+       Just compute exp(x), then subtract 1.  */
+    return exp (x) - 1.0;
+
+  if (x == 0.0)
+    /* Return a zero with the same sign as x.  */
+    return x;
+
+  /* Decompose x into
+       x = n * log(2) + m * log(2)/256 + y
+     where
+       n is an integer, n >= -1,
+       m is an integer, -128 <= m <= 128,
+       y is a number, |y| <= log(2)/512 + epsilon = 0.00135...
+     Then
+       exp(x) = 2^n * exp(m * log(2)/256) * exp(y)
+     Compute each factor minus one, then combine them through the
+     formula (1+a)*(1+b) = 1 + (a+b*(1+a)),
+     that is (1+a)*(1+b) - 1 = a + b*(1+a).
+     The first factor is an ldexpl() call.
+     The second factor is a table lookup.
+     The third factor minus one is computed
+     - either as sinh(y) + sinh(y)^2 / (cosh(y) + 1)
+       where sinh(y) is computed through the power series:
+         sinh(y) = y + y^3/3! + y^5/5! + ...
+       and cosh(y) is computed as hypot(1, sinh(y)),
+     - or as exp(2*z) - 1 = 2 * tanh(z) / (1 - tanh(z))
+       where z = y/2
+       and tanh(z) is computed through its power series:
+         tanh(z) = z
+                   - 1/3 * z^3
+                   + 2/15 * z^5
+                   - 17/315 * z^7
+                   + 62/2835 * z^9
+                   - 1382/155925 * z^11
+                   + 21844/6081075 * z^13
+                   - 929569/638512875 * z^15
+                   + ...
+       Since |z| <= log(2)/1024 < 0.0007, the relative contribution of the
+       z^7 term is < 0.0007^6 < 2^-60 <= 2^-DBL_MANT_DIG, therefore we can
+       truncate the series after the z^5 term.
+
+     Given the usual bounds DBL_MAX_EXP <= 16384, DBL_MANT_DIG <= 120, we
+     can estimate x:  -84 <= x <= 11357.
+     This means, when dividing x by log(2), where we want x mod log(2)
+     to be precise to DBL_MANT_DIG bits, we have to use an approximation
+     to log(2) that has 14+DBL_MANT_DIG bits.  */
+
+  {
+    double nm = round (x * LOG2_BY_256_INVERSE); /* = 256 * n + m */
+    /* n has at most 15 bits, nm therefore has at most 23 bits, therefore
+       n * LOG2_HI_PART is computed exactly, and n * LOG2_LO_PART is computed
+       with an absolute error < 2^15 * 2e-10 * 2^-DBL_MANT_DIG.  */
+    double y_tmp = x - nm * LOG2_BY_256_HI_PART;
+    double y = y_tmp - nm * LOG2_BY_256_LO_PART;
+    double z = 0.5L * y;
+
+/* Coefficients of the power series for tanh(z).  */
+#define TANH_COEFF_1   1.0
+#define TANH_COEFF_3  -0.333333333333333333333333333333333333334
+#define TANH_COEFF_5   0.133333333333333333333333333333333333334
+#define TANH_COEFF_7  -0.053968253968253968253968253968253968254
+#define TANH_COEFF_9   0.0218694885361552028218694885361552028218
+#define TANH_COEFF_11 -0.00886323552990219656886323552990219656886
+#define TANH_COEFF_13  0.00359212803657248101692546136990581435026
+#define TANH_COEFF_15 -0.00145583438705131826824948518070211191904
+
+    double z2 = z * z;
+    double tanh_z =
+      ((TANH_COEFF_5
+        * z2 + TANH_COEFF_3)
+       * z2 + TANH_COEFF_1)
+      * z;
+
+    double exp_y_minus_1 = 2.0 * tanh_z / (1.0 - tanh_z);
+
+    int n = (int) round (nm * (1.0 / 256.0));
+    int m = (int) nm - 256 * n;
+
+    /* expm1_table[i] = exp((i - 128) * log(2)/256) - 1.
+       Computed in GNU clisp through
+         (setf (long-float-digits) 128)
+         (setq a 0L0)
+         (setf (long-float-digits) 256)
+         (dotimes (i 257)
+           (format t "        ~D,~%"
+                   (float (- (exp (* (/ (- i 128) 256) (log 2L0))) 1) a)))  */
+    static const double expm1_table[257] =
+      {
+        -0.292893218813452475599155637895150960716,
+        -0.290976057839792401079436677742323809165,
+        -0.289053698915417220095325702647879950038,
+        -0.287126127947252846596498423285616993819,
+        -0.285193330804014994382467110862430046956,
+        -0.283255293316105578740250215722626632811,
+        -0.281312001275508837198386957752147486471,
+        -0.279363440435687168635744042695052413926,
+        -0.277409596511476689981496879264164547161,
+        -0.275450455178982509740597294512888729286,
+        -0.273486002075473717576963754157712706214,
+        -0.271516222799278089184548475181393238264,
+        -0.269541102909676505674348554844689233423,
+        -0.267560627926797086703335317887720824384,
+        -0.265574783331509036569177486867109287348,
+        -0.263583554565316202492529493866889713058,
+        -0.261586927030250344306546259812975038038,
+        -0.259584886088764114771170054844048746036,
+        -0.257577417063623749727613604135596844722,
+        -0.255564505237801467306336402685726757248,
+        -0.253546135854367575399678234256663229163,
+        -0.251522294116382286608175138287279137577,
+        -0.2494929651867872398674385184702356751864,
+        -0.247458134188296727960327722100283867508,
+        -0.24541778620328863011699022448340323429,
+        -0.243371906273695048903181511842366886387,
+        -0.24132047940089265059510885341281062657,
+        -0.239263490545592708236869372901757573532,
+        -0.237200924627730846574373155241529522695,
+        -0.23513276652635648805745654063657412692,
+        -0.233059001079521999099699248246140670544,
+        -0.230979613084171535783261520405692115669,
+        -0.228894587296029588193854068954632579346,
+        -0.226803908429489222568744221853864674729,
+        -0.224707561157500020438486294646580877171,
+        -0.222605530111455713940842831198332609562,
+        -0.2204977998810815164831359552625710592544,
+        -0.218384355014321147927034632426122058645,
+        -0.2162651800172235534675441445217774245016,
+        -0.214140259353829315375718509234297186439,
+        -0.212009577446056756772364919909047495547,
+        -0.209873118673587736597751517992039478005,
+        -0.2077308673737531349400659265343210916196,
+        -0.205582807841418027883101951185666435317,
+        -0.2034289243288665510313756784404656320656,
+        -0.201269201045686450868589852895683430425,
+        -0.199103622158653323103076879204523186316,
+        -0.196932171791614537151556053482436428417,
+        -0.19475483402537284591023966632129970827,
+        -0.192571592897569679960015418424270885733,
+        -0.190382432402568125350119133273631796029,
+        -0.188187336491335584102392022226559177731,
+        -0.185986289071326116575890738992992661386,
+        -0.183779274006362464829286135533230759947,
+        -0.181566275116517756116147982921992768975,
+        -0.17934727617799688564586793151548689933,
+        -0.1771222609230175777406216376370887771665,
+        -0.1748912130396911245164132617275148983224,
+        -0.1726541161719028012138814282020908791644,
+        -0.170410953919191957302175212789218768074,
+        -0.168161709836631782476831771511804777363,
+        -0.165906367434708746670203829291463807099,
+        -0.1636449101792017131905953879307692887046,
+        -0.161377321491060724103867675441291294819,
+        -0.15910358474628545696887452376678510496,
+        -0.15682368327580335203567701228614769857,
+        -0.154537600365347409013071332406381692911,
+        -0.152245319255333652509541396360635796882,
+        -0.149946823140738265249318713251248832456,
+        -0.147642095170974388162796469615281683674,
+        -0.145331118449768586448102562484668501975,
+        -0.143013876035036980698187522160833990549,
+        -0.140690350938761042185327811771843747742,
+        -0.138360526126863051392482883127641270248,
+        -0.136024384519081218878475585385633792948,
+        -0.133681908988844467561490046485836530346,
+        -0.131333082363146875502898959063916619876,
+        -0.128977887422421778270943284404535317759,
+        -0.126616306900415529961291721709773157771,
+        -0.1242483234840609219490048572320697039866,
+        -0.121873919813350258443919690312343389353,
+        -0.1194930784812080879189542126763637438278,
+        -0.11710578203336358947830887503073906297,
+        -0.1147120129682226132300120925687579825894,
+        -0.1123117537367393737247203999003383961205,
+        -0.1099049867422877955201404475637647649574,
+        -0.1074916943405325099278897180135900838485,
+        -0.1050718588392995019970556101123417014993,
+        -0.102645462498446406786148378936109092823,
+        -0.1002124875297324539725723033374854302454,
+        -0.097772916096688059846161368344495155786,
+        -0.0953267303144840657307406742107731280055,
+        -0.092873912249800621875082699818829828767,
+        -0.0904144439206957158520284361718212536293,
+        -0.0879483072964733445019372468353990225585,
+        -0.0854754842975513284540160873038416459095,
+        -0.0829959567953287682564584052058555719614,
+        -0.080509706612053141143695628825336081184,
+        -0.078016715520687037466429613329061550362,
+        -0.075516965244774535807472733052603963221,
+        -0.073010437458307215803773464831151680239,
+        -0.070497113785589807692349282254427317595,
+        -0.067976975801105477595185454402763710658,
+        -0.0654500050293807475554878955602008567352,
+        -0.06291618294485004933500052502277673278,
+        -0.0603754909717199109794126487955155117284,
+        -0.0578279104838327751561896480162548451191,
+        -0.055273422804530448266460732621318468453,
+        -0.0527120092065171793298906732865376926237,
+        -0.0501436509117223676387482401930039000769,
+        -0.0475683290911628981746625337821392744829,
+        -0.044986024864805103778829470427200864833,
+        -0.0423967193014263530636943648520845560749,
+        -0.0398003934184762630513928111129293882558,
+        -0.0371970281819375355214808849088086316225,
+        -0.0345866045061864160477270517354652168038,
+        -0.0319691032538527747009720477166542375817,
+        -0.0293445052356798073922893825624102948152,
+        -0.0267127912103833568278979766786970786276,
+        -0.0240739418845108520444897665995250062307,
+        -0.0214279379122998654908388741865642544049,
+        -0.018774759895536286618755114942929674984,
+        -0.016114388383412110943633198761985316073,
+        -0.01344680387238284353202993186779328685225,
+        -0.0107719868060245158708750409344163322253,
+        -0.00808991757489031507008688867384418356197,
+        -0.00540057651636682434752231377783368554176,
+        -0.00270394391452987374234008615207739887604,
+        0.0,
+        0.00271127505020248543074558845036204047301,
+        0.0054299011128028213513839559347998147001,
+        0.00815589811841751578309489081720103927357,
+        0.0108892860517004600204097905618605243881,
+        0.01363008495148943884025892906393992959584,
+        0.0163783149109530379404931137862940627635,
+        0.0191339960777379496848780958207928793998,
+        0.0218971486541166782344801347832994397821,
+        0.0246677928971356451482890762708149276281,
+        0.0274459491187636965388611939222137814994,
+        0.0302316376860410128717079024539045670944,
+        0.0330248790212284225001082839704609180866,
+        0.0358256936019571200299832090180813718441,
+        0.0386341019613787906124366979546397325796,
+        0.0414501246883161412645460790118931264803,
+        0.0442737824274138403219664787399290087847,
+        0.0471050958792898661299072502271122405627,
+        0.049944085800687266082038126515907909062,
+        0.0527907730046263271198912029807463031904,
+        0.05564517836055715880834132515293865216,
+        0.0585073227945126901057721096837166450754,
+        0.0613772272892620809505676780038837262945,
+        0.0642549128844645497886112570015802206798,
+        0.0671404006768236181695211209928091626068,
+        0.070033711820241773542411936757623568504,
+        0.0729348675259755513850354508738275853402,
+        0.0758438890627910378032286484760570740623,
+        0.0787607977571197937406800374384829584908,
+        0.081685614993215201942115594422531125645,
+        0.0846183622133092378161051719066143416095,
+        0.0875590609177696653467978309440397078697,
+        0.090507732665257659207010655760707978993,
+        0.0934643990728858542282201462504471620805,
+        0.096429081816376823386138295859248481766,
+        0.099401802630221985463696968238829904039,
+        0.1023825833078409435564142094256468575113,
+        0.1053714457017412555882746962569503110404,
+        0.1083684117236786380094236494266198501387,
+        0.111373503344817603850149254228916637444,
+        0.1143867425958925363088129569196030678004,
+        0.1174081515673691990545799630857802666544,
+        0.120437752409606684429003879866313012766,
+        0.1234755673330198007337297397753214319548,
+        0.1265216186082418997947986437870347776336,
+        0.12957592856628814599726498884024982591,
+        0.1326385195987192279870737236776230843835,
+        0.135709414157805514240390330676117013429,
+        0.1387886347566916537038302838415112547204,
+        0.14187620396956162271229760828788093894,
+        0.144972144431804219394413888222915895793,
+        0.148076478840179006778799662697342680031,
+        0.15118922995298270581775963520198253612,
+        0.154310420590216039548221528724806960684,
+        0.157440073633751029613085766293796821108,
+        0.160578212027498746369459472576090986253,
+        0.163724858777577513813573599092185312343,
+        0.166880036952481570555516298414089287832,
+        0.1700437696832501880802590357927385730016,
+        0.1732160801636372475348043545132453888896,
+        0.176396991650281276284645728483848641053,
+        0.1795865274628759454861005667694405189764,
+        0.182784710984341029924457204693850757963,
+        0.185991565660993831371265649534215563735,
+        0.189207115002721066717499970560475915293,
+        0.192431382583151222142727558145431011481,
+        0.1956643920398273745838370498654519757025,
+        0.1989061670743804817703025579763002069494,
+        0.202156731452703142096396957497765876,
+        0.205416109005123825604211432558411335666,
+        0.208684323626581577354792255889216998483,
+        0.211961399276801194468168917732493045449,
+        0.2152473599804688781165202513387984576236,
+        0.218542229827408361758207148117394510722,
+        0.221846032972757516903891841911570785834,
+        0.225158793637145437709464594384845353705,
+        0.2284805361068700056940089577927818403626,
+        0.231811284734075935884556653212794816605,
+        0.235151063936933305692912507415415760296,
+        0.238499898199816567833368865859612431546,
+        0.241857812073484048593677468726595605511,
+        0.245224830175257932775204967486152674173,
+        0.248600977189204736621766097302495545187,
+        0.251986277866316270060206031789203597321,
+        0.255380757024691089579390657442301194598,
+        0.258784439549716443077860441815162618762,
+        0.262197350394250708014010258518416459672,
+        0.265619514578806324196273999873453036297,
+        0.269050957191733222554419081032338004715,
+        0.272491703389402751236692044184602176772,
+        0.27594177839639210038120243475928938891,
+        0.279401207505669226913587970027852545961,
+        0.282870016078778280726669781021514051111,
+        0.286348229546025533601482208069738348358,
+        0.289835873406665812232747295491552189677,
+        0.293332973229089436725559789048704304684,
+        0.296839554651009665933754117792451159835,
+        0.300355643379650651014140567070917791291,
+        0.303881265191935898574523648951997368331,
+        0.30741644593467724479715157747196172848,
+        0.310961211524764341922991786330755849366,
+        0.314515587949354658485983613383997794966,
+        0.318079601266063994690185647066116617661,
+        0.321653277603157514326511812330609226158,
+        0.325236643159741294629537095498721674113,
+        0.32882972420595439547865089632866510792,
+        0.33243254708316144935164337949073577407,
+        0.336045138204145773442627904371869759286,
+        0.339667524053303005360030669724352576023,
+        0.343299731186835263824217146181630875424,
+        0.346941786232945835788173713229537282073,
+        0.350593715892034391408522196060133960038,
+        0.354255546936892728298014740140702804344,
+        0.357927306212901046494536695671766697444,
+        0.361609020638224755585535938831941474643,
+        0.365300717204011815430698360337542855432,
+        0.369002422974590611929601132982192832168,
+        0.372714165087668369284997857144717215791,
+        0.376435970754530100216322805518686960261,
+        0.380167867260238095581945274358283464698,
+        0.383909881963831954872659527265192818003,
+        0.387662042298529159042861017950775988895,
+        0.391424375771926187149835529566243446678,
+        0.395196909966200178275574599249220994717,
+        0.398979672538311140209528136715194969206,
+        0.402772691220204706374713524333378817108,
+        0.40657599381901544248361973255451684411,
+        0.410389608217270704414375128268675481146,
+        0.414213562373095048801688724209698078569
+      };
+
+    double t = expm1_table[128 + m];
+
+    /* (1+t) * (1+exp_y_minus_1) - 1 = t + (1+t)*exp_y_minus_1 */
+    double p_minus_1 = t + (1.0 + t) * exp_y_minus_1;
+
+    double s = ldexp (1.0, n) - 1.0;
+
+    /* (1+s) * (1+p_minus_1) - 1 = s + (1+s)*p_minus_1 */
+    return s + (1.0 + s) * p_minus_1;
+  }
+}
new file mode 100644
--- /dev/null
+++ b/lib/expm1f.c
@@ -0,0 +1,26 @@
+/* Exponential function minus one.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+float
+expm1f (float x)
+{
+  return (float) expm1 ((double) x);
+}
new file mode 100644
--- /dev/null
+++ b/lib/expm1l.c
@@ -0,0 +1,437 @@
+/* Exponential function minus one.
+   Copyright (C) 2011-2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+expm1l (long double x)
+{
+  return expm1 (x);
+}
+
+#else
+
+# include <float.h>
+
+/* A value slightly larger than log(2).  */
+#define LOG2_PLUS_EPSILON 0.6931471805599454L
+
+/* Best possible approximation of log(2) as a 'long double'.  */
+#define LOG2 0.693147180559945309417232121458176568075L
+
+/* Best possible approximation of 1/log(2) as a 'long double'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743L
+
+/* Best possible approximation of log(2)/256 as a 'long double'.  */
+#define LOG2_BY_256 0.00270760617406228636491106297444600221904L
+
+/* Best possible approximation of 256/log(2) as a 'long double'.  */
+#define LOG2_BY_256_INVERSE 369.329930467574632284140718336484387181L
+
+/* The upper 32 bits of log(2)/256.  */
+#define LOG2_BY_256_HI_PART 0.0027076061733168899081647396087646484375L
+/* log(2)/256 - LOG2_HI_PART.  */
+#define LOG2_BY_256_LO_PART \
+  0.000000000000745396456746323365681353781544922399845L
+
+long double
+expm1l (long double x)
+{
+  if (isnanl (x))
+    return x;
+
+  if (x >= (long double) LDBL_MAX_EXP * LOG2_PLUS_EPSILON)
+    /* x > LDBL_MAX_EXP * log(2)
+       hence exp(x) > 2^LDBL_MAX_EXP, overflows to Infinity.  */
+    return HUGE_VALL;
+
+  if (x <= (long double) (- LDBL_MANT_DIG) * LOG2_PLUS_EPSILON)
+    /* x < (- LDBL_MANT_DIG) * log(2)
+       hence 0 < exp(x) < 2^-LDBL_MANT_DIG,
+       hence -1 < exp(x)-1 < -1 + 2^-LDBL_MANT_DIG
+       rounds to -1.  */
+    return -1.0L;
+
+  if (x <= - LOG2_PLUS_EPSILON)
+    /* 0 < exp(x) < 1/2.
+       Just compute exp(x), then subtract 1.  */
+    return expl (x) - 1.0L;
+
+  if (x == 0.0L)
+    /* Return a zero with the same sign as x.  */
+    return x;
+
+  /* Decompose x into
+       x = n * log(2) + m * log(2)/256 + y
+     where
+       n is an integer, n >= -1,
+       m is an integer, -128 <= m <= 128,
+       y is a number, |y| <= log(2)/512 + epsilon = 0.00135...
+     Then
+       exp(x) = 2^n * exp(m * log(2)/256) * exp(y)
+     Compute each factor minus one, then combine them through the
+     formula (1+a)*(1+b) = 1 + (a+b*(1+a)),
+     that is (1+a)*(1+b) - 1 = a + b*(1+a).
+     The first factor is an ldexpl() call.
+     The second factor is a table lookup.
+     The third factor minus one is computed
+     - either as sinh(y) + sinh(y)^2 / (cosh(y) + 1)
+       where sinh(y) is computed through the power series:
+         sinh(y) = y + y^3/3! + y^5/5! + ...
+       and cosh(y) is computed as hypot(1, sinh(y)),
+     - or as exp(2*z) - 1 = 2 * tanh(z) / (1 - tanh(z))
+       where z = y/2
+       and tanh(z) is computed through its power series:
+         tanh(z) = z
+                   - 1/3 * z^3
+                   + 2/15 * z^5
+                   - 17/315 * z^7
+                   + 62/2835 * z^9
+                   - 1382/155925 * z^11
+                   + 21844/6081075 * z^13
+                   - 929569/638512875 * z^15
+                   + ...
+       Since |z| <= log(2)/1024 < 0.0007, the relative contribution of the
+       z^13 term is < 0.0007^12 < 2^-120 <= 2^-LDBL_MANT_DIG, therefore we
+       can truncate the series after the z^11 term.
+
+     Given the usual bounds LDBL_MAX_EXP <= 16384, LDBL_MANT_DIG <= 120, we
+     can estimate x:  -84 <= x <= 11357.
+     This means, when dividing x by log(2), where we want x mod log(2)
+     to be precise to LDBL_MANT_DIG bits, we have to use an approximation
+     to log(2) that has 14+LDBL_MANT_DIG bits.  */
+
+  {
+    long double nm = roundl (x * LOG2_BY_256_INVERSE); /* = 256 * n + m */
+    /* n has at most 15 bits, nm therefore has at most 23 bits, therefore
+       n * LOG2_HI_PART is computed exactly, and n * LOG2_LO_PART is computed
+       with an absolute error < 2^15 * 2e-10 * 2^-LDBL_MANT_DIG.  */
+    long double y_tmp = x - nm * LOG2_BY_256_HI_PART;
+    long double y = y_tmp - nm * LOG2_BY_256_LO_PART;
+    long double z = 0.5L * y;
+
+/* Coefficients of the power series for tanh(z).  */
+#define TANH_COEFF_1   1.0L
+#define TANH_COEFF_3  -0.333333333333333333333333333333333333334L
+#define TANH_COEFF_5   0.133333333333333333333333333333333333334L
+#define TANH_COEFF_7  -0.053968253968253968253968253968253968254L
+#define TANH_COEFF_9   0.0218694885361552028218694885361552028218L
+#define TANH_COEFF_11 -0.00886323552990219656886323552990219656886L
+#define TANH_COEFF_13  0.00359212803657248101692546136990581435026L
+#define TANH_COEFF_15 -0.00145583438705131826824948518070211191904L
+
+    long double z2 = z * z;
+    long double tanh_z =
+      (((((TANH_COEFF_11
+           * z2 + TANH_COEFF_9)
+          * z2 + TANH_COEFF_7)
+         * z2 + TANH_COEFF_5)
+        * z2 + TANH_COEFF_3)
+       * z2 + TANH_COEFF_1)
+      * z;
+
+    long double exp_y_minus_1 = 2.0L * tanh_z / (1.0L - tanh_z);
+
+    int n = (int) roundl (nm * (1.0L / 256.0L));
+    int m = (int) nm - 256 * n;
+
+    /* expm1l_table[i] = exp((i - 128) * log(2)/256) - 1.
+       Computed in GNU clisp through
+         (setf (long-float-digits) 128)
+         (setq a 0L0)
+         (setf (long-float-digits) 256)
+         (dotimes (i 257)
+           (format t "        ~D,~%"
+                   (float (- (exp (* (/ (- i 128) 256) (log 2L0))) 1) a)))  */
+    static const long double expm1l_table[257] =
+      {
+        -0.292893218813452475599155637895150960716L,
+        -0.290976057839792401079436677742323809165L,
+        -0.289053698915417220095325702647879950038L,
+        -0.287126127947252846596498423285616993819L,
+        -0.285193330804014994382467110862430046956L,
+        -0.283255293316105578740250215722626632811L,
+        -0.281312001275508837198386957752147486471L,
+        -0.279363440435687168635744042695052413926L,
+        -0.277409596511476689981496879264164547161L,
+        -0.275450455178982509740597294512888729286L,
+        -0.273486002075473717576963754157712706214L,
+        -0.271516222799278089184548475181393238264L,
+        -0.269541102909676505674348554844689233423L,
+        -0.267560627926797086703335317887720824384L,
+        -0.265574783331509036569177486867109287348L,
+        -0.263583554565316202492529493866889713058L,
+        -0.261586927030250344306546259812975038038L,
+        -0.259584886088764114771170054844048746036L,
+        -0.257577417063623749727613604135596844722L,
+        -0.255564505237801467306336402685726757248L,
+        -0.253546135854367575399678234256663229163L,
+        -0.251522294116382286608175138287279137577L,
+        -0.2494929651867872398674385184702356751864L,
+        -0.247458134188296727960327722100283867508L,
+        -0.24541778620328863011699022448340323429L,
+        -0.243371906273695048903181511842366886387L,
+        -0.24132047940089265059510885341281062657L,
+        -0.239263490545592708236869372901757573532L,
+        -0.237200924627730846574373155241529522695L,
+        -0.23513276652635648805745654063657412692L,
+        -0.233059001079521999099699248246140670544L,
+        -0.230979613084171535783261520405692115669L,
+        -0.228894587296029588193854068954632579346L,
+        -0.226803908429489222568744221853864674729L,
+        -0.224707561157500020438486294646580877171L,
+        -0.222605530111455713940842831198332609562L,
+        -0.2204977998810815164831359552625710592544L,
+        -0.218384355014321147927034632426122058645L,
+        -0.2162651800172235534675441445217774245016L,
+        -0.214140259353829315375718509234297186439L,
+        -0.212009577446056756772364919909047495547L,
+        -0.209873118673587736597751517992039478005L,
+        -0.2077308673737531349400659265343210916196L,
+        -0.205582807841418027883101951185666435317L,
+        -0.2034289243288665510313756784404656320656L,
+        -0.201269201045686450868589852895683430425L,
+        -0.199103622158653323103076879204523186316L,
+        -0.196932171791614537151556053482436428417L,
+        -0.19475483402537284591023966632129970827L,
+        -0.192571592897569679960015418424270885733L,
+        -0.190382432402568125350119133273631796029L,
+        -0.188187336491335584102392022226559177731L,
+        -0.185986289071326116575890738992992661386L,
+        -0.183779274006362464829286135533230759947L,
+        -0.181566275116517756116147982921992768975L,
+        -0.17934727617799688564586793151548689933L,
+        -0.1771222609230175777406216376370887771665L,
+        -0.1748912130396911245164132617275148983224L,
+        -0.1726541161719028012138814282020908791644L,
+        -0.170410953919191957302175212789218768074L,
+        -0.168161709836631782476831771511804777363L,
+        -0.165906367434708746670203829291463807099L,
+        -0.1636449101792017131905953879307692887046L,
+        -0.161377321491060724103867675441291294819L,
+        -0.15910358474628545696887452376678510496L,
+        -0.15682368327580335203567701228614769857L,
+        -0.154537600365347409013071332406381692911L,
+        -0.152245319255333652509541396360635796882L,
+        -0.149946823140738265249318713251248832456L,
+        -0.147642095170974388162796469615281683674L,
+        -0.145331118449768586448102562484668501975L,
+        -0.143013876035036980698187522160833990549L,
+        -0.140690350938761042185327811771843747742L,
+        -0.138360526126863051392482883127641270248L,
+        -0.136024384519081218878475585385633792948L,
+        -0.133681908988844467561490046485836530346L,
+        -0.131333082363146875502898959063916619876L,
+        -0.128977887422421778270943284404535317759L,
+        -0.126616306900415529961291721709773157771L,
+        -0.1242483234840609219490048572320697039866L,
+        -0.121873919813350258443919690312343389353L,
+        -0.1194930784812080879189542126763637438278L,
+        -0.11710578203336358947830887503073906297L,
+        -0.1147120129682226132300120925687579825894L,
+        -0.1123117537367393737247203999003383961205L,
+        -0.1099049867422877955201404475637647649574L,
+        -0.1074916943405325099278897180135900838485L,
+        -0.1050718588392995019970556101123417014993L,
+        -0.102645462498446406786148378936109092823L,
+        -0.1002124875297324539725723033374854302454L,
+        -0.097772916096688059846161368344495155786L,
+        -0.0953267303144840657307406742107731280055L,
+        -0.092873912249800621875082699818829828767L,
+        -0.0904144439206957158520284361718212536293L,
+        -0.0879483072964733445019372468353990225585L,
+        -0.0854754842975513284540160873038416459095L,
+        -0.0829959567953287682564584052058555719614L,
+        -0.080509706612053141143695628825336081184L,
+        -0.078016715520687037466429613329061550362L,
+        -0.075516965244774535807472733052603963221L,
+        -0.073010437458307215803773464831151680239L,
+        -0.070497113785589807692349282254427317595L,
+        -0.067976975801105477595185454402763710658L,
+        -0.0654500050293807475554878955602008567352L,
+        -0.06291618294485004933500052502277673278L,
+        -0.0603754909717199109794126487955155117284L,
+        -0.0578279104838327751561896480162548451191L,
+        -0.055273422804530448266460732621318468453L,
+        -0.0527120092065171793298906732865376926237L,
+        -0.0501436509117223676387482401930039000769L,
+        -0.0475683290911628981746625337821392744829L,
+        -0.044986024864805103778829470427200864833L,
+        -0.0423967193014263530636943648520845560749L,
+        -0.0398003934184762630513928111129293882558L,
+        -0.0371970281819375355214808849088086316225L,
+        -0.0345866045061864160477270517354652168038L,
+        -0.0319691032538527747009720477166542375817L,
+        -0.0293445052356798073922893825624102948152L,
+        -0.0267127912103833568278979766786970786276L,
+        -0.0240739418845108520444897665995250062307L,
+        -0.0214279379122998654908388741865642544049L,
+        -0.018774759895536286618755114942929674984L,
+        -0.016114388383412110943633198761985316073L,
+        -0.01344680387238284353202993186779328685225L,
+        -0.0107719868060245158708750409344163322253L,
+        -0.00808991757489031507008688867384418356197L,
+        -0.00540057651636682434752231377783368554176L,
+        -0.00270394391452987374234008615207739887604L,
+        0.0L,
+        0.00271127505020248543074558845036204047301L,
+        0.0054299011128028213513839559347998147001L,
+        0.00815589811841751578309489081720103927357L,
+        0.0108892860517004600204097905618605243881L,
+        0.01363008495148943884025892906393992959584L,
+        0.0163783149109530379404931137862940627635L,
+        0.0191339960777379496848780958207928793998L,
+        0.0218971486541166782344801347832994397821L,
+        0.0246677928971356451482890762708149276281L,
+        0.0274459491187636965388611939222137814994L,
+        0.0302316376860410128717079024539045670944L,
+        0.0330248790212284225001082839704609180866L,
+        0.0358256936019571200299832090180813718441L,
+        0.0386341019613787906124366979546397325796L,
+        0.0414501246883161412645460790118931264803L,
+        0.0442737824274138403219664787399290087847L,
+        0.0471050958792898661299072502271122405627L,
+        0.049944085800687266082038126515907909062L,
+        0.0527907730046263271198912029807463031904L,
+        0.05564517836055715880834132515293865216L,
+        0.0585073227945126901057721096837166450754L,
+        0.0613772272892620809505676780038837262945L,
+        0.0642549128844645497886112570015802206798L,
+        0.0671404006768236181695211209928091626068L,
+        0.070033711820241773542411936757623568504L,
+        0.0729348675259755513850354508738275853402L,
+        0.0758438890627910378032286484760570740623L,
+        0.0787607977571197937406800374384829584908L,
+        0.081685614993215201942115594422531125645L,
+        0.0846183622133092378161051719066143416095L,
+        0.0875590609177696653467978309440397078697L,
+        0.090507732665257659207010655760707978993L,
+        0.0934643990728858542282201462504471620805L,
+        0.096429081816376823386138295859248481766L,
+        0.099401802630221985463696968238829904039L,
+        0.1023825833078409435564142094256468575113L,
+        0.1053714457017412555882746962569503110404L,
+        0.1083684117236786380094236494266198501387L,
+        0.111373503344817603850149254228916637444L,
+        0.1143867425958925363088129569196030678004L,
+        0.1174081515673691990545799630857802666544L,
+        0.120437752409606684429003879866313012766L,
+        0.1234755673330198007337297397753214319548L,
+        0.1265216186082418997947986437870347776336L,
+        0.12957592856628814599726498884024982591L,
+        0.1326385195987192279870737236776230843835L,
+        0.135709414157805514240390330676117013429L,
+        0.1387886347566916537038302838415112547204L,
+        0.14187620396956162271229760828788093894L,
+        0.144972144431804219394413888222915895793L,
+        0.148076478840179006778799662697342680031L,
+        0.15118922995298270581775963520198253612L,
+        0.154310420590216039548221528724806960684L,
+        0.157440073633751029613085766293796821108L,
+        0.160578212027498746369459472576090986253L,
+        0.163724858777577513813573599092185312343L,
+        0.166880036952481570555516298414089287832L,
+        0.1700437696832501880802590357927385730016L,
+        0.1732160801636372475348043545132453888896L,
+        0.176396991650281276284645728483848641053L,
+        0.1795865274628759454861005667694405189764L,
+        0.182784710984341029924457204693850757963L,
+        0.185991565660993831371265649534215563735L,
+        0.189207115002721066717499970560475915293L,
+        0.192431382583151222142727558145431011481L,
+        0.1956643920398273745838370498654519757025L,
+        0.1989061670743804817703025579763002069494L,
+        0.202156731452703142096396957497765876L,
+        0.205416109005123825604211432558411335666L,
+        0.208684323626581577354792255889216998483L,
+        0.211961399276801194468168917732493045449L,
+        0.2152473599804688781165202513387984576236L,
+        0.218542229827408361758207148117394510722L,
+        0.221846032972757516903891841911570785834L,
+        0.225158793637145437709464594384845353705L,
+        0.2284805361068700056940089577927818403626L,
+        0.231811284734075935884556653212794816605L,
+        0.235151063936933305692912507415415760296L,
+        0.238499898199816567833368865859612431546L,
+        0.241857812073484048593677468726595605511L,
+        0.245224830175257932775204967486152674173L,
+        0.248600977189204736621766097302495545187L,
+        0.251986277866316270060206031789203597321L,
+        0.255380757024691089579390657442301194598L,
+        0.258784439549716443077860441815162618762L,
+        0.262197350394250708014010258518416459672L,
+        0.265619514578806324196273999873453036297L,
+        0.269050957191733222554419081032338004715L,
+        0.272491703389402751236692044184602176772L,
+        0.27594177839639210038120243475928938891L,
+        0.279401207505669226913587970027852545961L,
+        0.282870016078778280726669781021514051111L,
+        0.286348229546025533601482208069738348358L,
+        0.289835873406665812232747295491552189677L,
+        0.293332973229089436725559789048704304684L,
+        0.296839554651009665933754117792451159835L,
+        0.300355643379650651014140567070917791291L,
+        0.303881265191935898574523648951997368331L,
+        0.30741644593467724479715157747196172848L,
+        0.310961211524764341922991786330755849366L,
+        0.314515587949354658485983613383997794966L,
+        0.318079601266063994690185647066116617661L,
+        0.321653277603157514326511812330609226158L,
+        0.325236643159741294629537095498721674113L,
+        0.32882972420595439547865089632866510792L,
+        0.33243254708316144935164337949073577407L,
+        0.336045138204145773442627904371869759286L,
+        0.339667524053303005360030669724352576023L,
+        0.343299731186835263824217146181630875424L,
+        0.346941786232945835788173713229537282073L,
+        0.350593715892034391408522196060133960038L,
+        0.354255546936892728298014740140702804344L,
+        0.357927306212901046494536695671766697444L,
+        0.361609020638224755585535938831941474643L,
+        0.365300717204011815430698360337542855432L,
+        0.369002422974590611929601132982192832168L,
+        0.372714165087668369284997857144717215791L,
+        0.376435970754530100216322805518686960261L,
+        0.380167867260238095581945274358283464698L,
+        0.383909881963831954872659527265192818003L,
+        0.387662042298529159042861017950775988895L,
+        0.391424375771926187149835529566243446678L,
+        0.395196909966200178275574599249220994717L,
+        0.398979672538311140209528136715194969206L,
+        0.402772691220204706374713524333378817108L,
+        0.40657599381901544248361973255451684411L,
+        0.410389608217270704414375128268675481146L,
+        0.414213562373095048801688724209698078569L
+      };
+
+    long double t = expm1l_table[128 + m];
+
+    /* (1+t) * (1+exp_y_minus_1) - 1 = t + (1+t)*exp_y_minus_1 */
+    long double p_minus_1 = t + (1.0L + t) * exp_y_minus_1;
+
+    long double s = ldexpl (1.0L, n) - 1.0L;
+
+    /* (1+s) * (1+p_minus_1) - 1 = s + (1+s)*p_minus_1 */
+    return s + (1.0L + s) * p_minus_1;
+  }
+}
+
+#endif
new file mode 100644
--- /dev/null
+++ b/lib/fabsl.c
@@ -0,0 +1,41 @@
+/* Absolute value.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+/* fabsl (x) can be defined as copysignl (x, 1.0L).
+   Or, more directly, as (signbit (x) ? - x : x).  */
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+fabsl (long double x)
+{
+  return fabs (x);
+}
+
+#else
+
+long double
+fabsl (long double x)
+{
+  return (signbit (x) ? - x : x);
+}
+
+#endif
--- a/lib/faccessat.c
+++ b/lib/faccessat.c
@@ -19,6 +19,7 @@
 #include <config.h>
 
 #include <unistd.h>
+#include <fcntl.h>
 
 #ifndef HAVE_ACCESS
 /* Mingw lacks access, but it also lacks real vs. effective ids, so
--- a/lib/fatal-signal.c
+++ b/lib/fatal-signal.c
@@ -131,8 +131,8 @@
 
 
 /* Uninstall the handlers.  */
-static inline void
-uninstall_handlers ()
+static void
+uninstall_handlers (void)
 {
   size_t i;
 
@@ -176,8 +176,8 @@
 
 
 /* Install the handlers.  */
-static inline void
-install_handlers ()
+static void
+install_handlers (void)
 {
   size_t i;
   struct sigaction action;
@@ -251,7 +251,7 @@
 static sigset_t fatal_signal_set;
 
 static void
-init_fatal_signal_set ()
+init_fatal_signal_set (void)
 {
   static bool fatal_signal_set_initialized = false;
   if (!fatal_signal_set_initialized)
@@ -271,7 +271,7 @@
 
 /* Temporarily delay the catchable fatal signals.  */
 void
-block_fatal_signals ()
+block_fatal_signals (void)
 {
   init_fatal_signal_set ();
   sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
@@ -279,7 +279,7 @@
 
 /* Stop delaying the catchable fatal signals.  */
 void
-unblock_fatal_signals ()
+unblock_fatal_signals (void)
 {
   init_fatal_signal_set ();
   sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
--- a/lib/fbufmode.c
+++ b/lib/fbufmode.c
@@ -42,7 +42,7 @@
   if (fp->_flags & _IO_UNBUFFERED)
     return _IONBF;
   return _IOFBF;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   if (fp_->_flags & __SLBF)
     return _IOLBF;
   if (fp_->_flags & __SNBF)
@@ -79,6 +79,16 @@
   if (fp->__linebuf)
     return _IOLBF;
   return (fp->__bufsize > 0 ? _IOFBF : _IONBF);
+#elif HAVE___FLBF && HAVE___FBUFSIZE /* musl libc */
+  if (__flbf (fp))
+    return _IOLBF;
+  return (__fbufsize (fp) > 0 ? _IOFBF : _IONBF);
+#elif defined EPLAN9                /* Plan9 */
+  if (fp->flags & 2 /* LINEBUF */)
+    return _IOLBF;
+  if (fp->bufl)
+    return _IOFBF;
+  return _IONBF;
 #else
 # error "Please port gnulib fbufmode.c to your platform! Look at the setvbuf implementation."
 #endif
--- a/lib/fcntl.c
+++ b/lib/fcntl.c
@@ -94,7 +94,7 @@
           result = -1;
           break;
         }
-      duplicated_fd = _open_osfhandle ((long) new_handle, flags);
+      duplicated_fd = _open_osfhandle ((intptr_t) new_handle, flags);
       if (duplicated_fd < 0)
         {
           CloseHandle (new_handle);
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -25,6 +25,8 @@
 #if defined __need_system_fcntl_h
 /* Special invocation convention.  */
 
+/* Needed before <sys/stat.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
    <fcntl.h>.  On glibc systems, we would like to avoid namespace pollution.
@@ -42,6 +44,8 @@
 
 #ifndef _@GUARD_PREFIX@_FCNTL_H
 
+/* Needed before <sys/stat.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
    <fcntl.h>.  On glibc systems, we would like to avoid namespace pollution.
@@ -62,6 +66,12 @@
 # include <unistd.h>
 #endif
 
+/* Native Windows platforms declare open(), creat() in <io.h>.  */
+#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+    && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -206,6 +216,10 @@
 # define O_EXEC O_RDONLY /* This is often close enough in older systems.  */
 #endif
 
+#ifndef O_IGNORE_CTTY
+# define O_IGNORE_CTTY 0
+#endif
+
 #ifndef O_NDELAY
 # define O_NDELAY 0
 #endif
@@ -239,10 +253,18 @@
 # define O_NOFOLLOW 0
 #endif
 
+#ifndef O_NOLINK
+# define O_NOLINK 0
+#endif
+
 #ifndef O_NOLINKS
 # define O_NOLINKS 0
 #endif
 
+#ifndef O_NOTRANS
+# define O_NOTRANS 0
+#endif
+
 #ifndef O_RSYNC
 # define O_RSYNC 0
 #endif
@@ -259,7 +281,7 @@
 # define O_TTY_INIT 0
 #endif
 
-#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
+#if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
 # undef O_ACCMODE
 # define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
 #endif
--- a/lib/fflush.c
+++ b/lib/fflush.c
@@ -28,13 +28,15 @@
 
 #include "stdio-impl.h"
 
+#include "unused-parameter.h"
+
 #undef fflush
 
 
 #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
 
 /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
-static inline void
+static void
 clear_ungetc_buffer_preserving_position (FILE *fp)
 {
   if (fp->_flags & _IO_IN_BACKUP)
@@ -45,10 +47,10 @@
 #else
 
 /* Clear the stream's ungetc buffer.  May modify the value of ftello (fp).  */
-static inline void
+static void
 clear_ungetc_buffer (FILE *fp)
 {
-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   if (HASUB (fp))
     {
       fp_->_p += fp_->_r;
@@ -69,9 +71,11 @@
 
 #endif
 
-#if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
 
-static inline int
+# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+
+static int
 disable_seek_optimization (FILE *fp)
 {
   int saved_flags = fp_->_flags & (__SOPT | __SNPT);
@@ -79,22 +83,23 @@
   return saved_flags;
 }
 
-static inline void
+static void
 restore_seek_optimization (FILE *fp, int saved_flags)
 {
   fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags;
 }
 
-#endif
+# else
 
-static inline void
-update_fpos_cache (FILE *fp, off_t pos)
+static void
+update_fpos_cache (FILE *fp _GL_UNUSED_PARAMETER,
+                   off_t pos _GL_UNUSED_PARAMETER)
 {
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
-# if defined __CYGWIN__
+#  if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+#   if defined __CYGWIN__
   /* fp_->_offset is typed as an integer.  */
   fp_->_offset = pos;
-# else
+#   else
   /* fp_->_offset is an fpos_t.  */
   /* Use a union, since on NetBSD, the compilation flags determine
      whether fpos_t is typedef'd to off_t or a struct containing a
@@ -106,10 +111,12 @@
     } u;
   u.o = pos;
   fp_->_offset = u.f;
-# endif
+#   endif
   fp_->_flags |= __SOFF;
+#  endif
+}
+# endif
 #endif
-}
 
 /* Flush all pending data on STREAM according to POSIX rules.  Both
    output and seekable input streams are supported.  */
@@ -188,7 +195,7 @@
         return result;
     }
 
-# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
 
     {
       /* Disable seek optimization for the next fseeko call.  This tells the
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -17,6 +17,12 @@
 
    Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible.  */
 
+/* Without this pragma, gcc 4.7.0 20120126 may suggest that the
+   file_has_acl function might be candidate for attribute 'const'  */
+#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
 #include <config.h>
 
 #include "acl.h"
@@ -26,7 +32,7 @@
 
 #if USE_ACL && HAVE_ACL_GET_FILE
 
-# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
+# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
 
 /* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
    Return 1 if the given ACL is non-trivial.
@@ -148,6 +154,9 @@
 
 # ifdef ACE_GETACL
 
+/* A shortcut for a bitmask.  */
+#  define NEW_ACE_WRITEA_DATA (NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA)
+
 /* Test an ACL retrieved with ACE_GETACL.
    Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
    Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.  */
@@ -244,16 +253,6 @@
                            | NEW_ACE_WRITE_ATTRIBUTES
                            | NEW_ACE_WRITE_ACL
                            | NEW_ACE_WRITE_OWNER);
-      if ((NEW_ACE_WRITE_NAMED_ATTRS
-           | NEW_ACE_WRITE_ATTRIBUTES
-           | NEW_ACE_WRITE_ACL
-           | NEW_ACE_WRITE_OWNER)
-          & ~ access_masks[4])
-        return 1;
-      access_masks[4] &= ~(NEW_ACE_WRITE_NAMED_ATTRS
-                           | NEW_ACE_WRITE_ATTRIBUTES
-                           | NEW_ACE_WRITE_ACL
-                           | NEW_ACE_WRITE_OWNER);
       if ((NEW_ACE_READ_NAMED_ATTRS
            | NEW_ACE_READ_ATTRIBUTES
            | NEW_ACE_READ_ACL
@@ -266,21 +265,60 @@
                            | NEW_ACE_SYNCHRONIZE);
 
       /* Check the allowed or denied bits.  */
-      if ((access_masks[0] | access_masks[1])
-          != (NEW_ACE_READ_DATA
-              | NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA
-              | NEW_ACE_EXECUTE))
-        return 1;
-      if ((access_masks[2] | access_masks[3])
-          != (NEW_ACE_READ_DATA
-              | NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA
-              | NEW_ACE_EXECUTE))
-        return 1;
-      if ((access_masks[4] | access_masks[5])
-          != (NEW_ACE_READ_DATA
-              | NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA
-              | NEW_ACE_EXECUTE))
-        return 1;
+      switch ((access_masks[0] | access_masks[1])
+              & ~(NEW_ACE_READ_NAMED_ATTRS
+                  | NEW_ACE_READ_ATTRIBUTES
+                  | NEW_ACE_READ_ACL
+                  | NEW_ACE_SYNCHRONIZE))
+        {
+        case 0:
+        case NEW_ACE_READ_DATA:
+        case                     NEW_ACE_WRITEA_DATA:
+        case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA:
+        case                                           NEW_ACE_EXECUTE:
+        case NEW_ACE_READ_DATA |                       NEW_ACE_EXECUTE:
+        case                     NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
+        case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
+          break;
+        default:
+          return 1;
+        }
+      switch ((access_masks[2] | access_masks[3])
+              & ~(NEW_ACE_READ_NAMED_ATTRS
+                  | NEW_ACE_READ_ATTRIBUTES
+                  | NEW_ACE_READ_ACL
+                  | NEW_ACE_SYNCHRONIZE))
+        {
+        case 0:
+        case NEW_ACE_READ_DATA:
+        case                     NEW_ACE_WRITEA_DATA:
+        case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA:
+        case                                           NEW_ACE_EXECUTE:
+        case NEW_ACE_READ_DATA |                       NEW_ACE_EXECUTE:
+        case                     NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
+        case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
+          break;
+        default:
+          return 1;
+        }
+      switch ((access_masks[4] | access_masks[5])
+              & ~(NEW_ACE_WRITE_NAMED_ATTRS
+                  | NEW_ACE_WRITE_ATTRIBUTES
+                  | NEW_ACE_WRITE_ACL
+                  | NEW_ACE_WRITE_OWNER))
+        {
+        case 0:
+        case NEW_ACE_READ_DATA:
+        case                     NEW_ACE_WRITEA_DATA:
+        case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA:
+        case                                           NEW_ACE_EXECUTE:
+        case NEW_ACE_READ_DATA |                       NEW_ACE_EXECUTE:
+        case                     NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
+        case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
+          break;
+        default:
+          return 1;
+        }
 
       /* Check that the NEW_ACE_WRITE_DATA and NEW_ACE_APPEND_DATA bits are
          either both allowed or both denied.  */
@@ -451,7 +489,7 @@
 # if HAVE_ACL_GET_FILE
 
       /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-      /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+      /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
       int ret;
 
       if (HAVE_ACL_EXTENDED_FILE) /* Linux */
@@ -461,10 +499,10 @@
              ACL_TYPE_DEFAULT.  */
           ret = acl_extended_file (name);
         }
-      else /* FreeBSD, MacOS X, IRIX, Tru64 */
+      else /* FreeBSD, Mac OS X, IRIX, Tru64 */
         {
-#  if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
-          /* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
+#  if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+          /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
              and acl_get_file (name, ACL_TYPE_DEFAULT)
              always return NULL / EINVAL.  There is no point in making
              these two useless calls.  The real ACL is retrieved through
@@ -518,7 +556,7 @@
         return ACL_NOT_WELL_SUPPORTED (errno) ? 0 : -1;
       return ret;
 
-# elif HAVE_FACL && defined GETACLCNT /* Solaris, Cygwin, not HP-UX */
+# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
 
 #  if defined ACL_NO_TRIVIAL
 
@@ -532,75 +570,135 @@
       /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
          of Unixware.  The acl() call returns the access and default ACL both
          at once.  */
-      int count;
       {
-        aclent_t *entries;
+        /* Initially, try to read the entries into a stack-allocated buffer.
+           Use malloc if it does not fit.  */
+        enum
+          {
+            alloc_init = 4000 / sizeof (aclent_t), /* >= 3 */
+            alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t))
+          };
+        aclent_t buf[alloc_init];
+        size_t alloc = alloc_init;
+        aclent_t *entries = buf;
+        aclent_t *malloced = NULL;
+        int count;
 
         for (;;)
           {
-            count = acl (name, GETACLCNT, 0, NULL);
-
-            if (count < 0)
+            count = acl (name, GETACL, alloc, entries);
+            if (count < 0 && errno == ENOSPC)
               {
-                if (errno == ENOSYS || errno == ENOTSUP)
-                  break;
-                else
-                  return -1;
+                /* Increase the size of the buffer.  */
+                free (malloced);
+                if (alloc > alloc_max / 2)
+                  {
+                    errno = ENOMEM;
+                    return -1;
+                  }
+                alloc = 2 * alloc; /* <= alloc_max */
+                entries = malloced =
+                  (aclent_t *) malloc (alloc * sizeof (aclent_t));
+                if (entries == NULL)
+                  {
+                    errno = ENOMEM;
+                    return -1;
+                  }
+                continue;
               }
-
-            if (count == 0)
-              break;
-
+            break;
+          }
+        if (count < 0)
+          {
+            if (errno == ENOSYS || errno == ENOTSUP)
+              ;
+            else
+              {
+                int saved_errno = errno;
+                free (malloced);
+                errno = saved_errno;
+                return -1;
+              }
+          }
+        else if (count == 0)
+          ;
+        else
+          {
             /* Don't use MIN_ACL_ENTRIES:  It's set to 4 on Cygwin, but Cygwin
                returns only 3 entries for files with no ACL.  But this is safe:
                If there are more than 4 entries, there cannot be only the
                "user::", "group::", "other:", and "mask:" entries.  */
             if (count > 4)
-              return 1;
-
-            entries = (aclent_t *) malloc (count * sizeof (aclent_t));
-            if (entries == NULL)
-              {
-                errno = ENOMEM;
-                return -1;
-              }
-            if (acl (name, GETACL, count, entries) == count)
               {
-                if (acl_nontrivial (count, entries))
-                  {
-                    free (entries);
-                    return 1;
-                  }
-                free (entries);
-                break;
+                free (malloced);
+                return 1;
               }
-            /* Huh? The number of ACL entries changed since the last call.
-               Repeat.  */
-            free (entries);
+
+            if (acl_nontrivial (count, entries))
+              {
+                free (malloced);
+                return 1;
+              }
           }
+        free (malloced);
       }
 
 #   ifdef ACE_GETACL
       /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
          file systems (whereas the other ones are used in UFS file systems).  */
       {
-        ace_t *entries;
+        /* Initially, try to read the entries into a stack-allocated buffer.
+           Use malloc if it does not fit.  */
+        enum
+          {
+            alloc_init = 4000 / sizeof (ace_t), /* >= 3 */
+            alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t))
+          };
+        ace_t buf[alloc_init];
+        size_t alloc = alloc_init;
+        ace_t *entries = buf;
+        ace_t *malloced = NULL;
+        int count;
 
         for (;;)
           {
-            count = acl (name, ACE_GETACLCNT, 0, NULL);
-
-            if (count < 0)
+            count = acl (name, ACE_GETACL, alloc, entries);
+            if (count < 0 && errno == ENOSPC)
               {
-                if (errno == ENOSYS || errno == EINVAL)
-                  break;
-                else
-                  return -1;
+                /* Increase the size of the buffer.  */
+                free (malloced);
+                if (alloc > alloc_max / 2)
+                  {
+                    errno = ENOMEM;
+                    return -1;
+                  }
+                alloc = 2 * alloc; /* <= alloc_max */
+                entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
+                if (entries == NULL)
+                  {
+                    errno = ENOMEM;
+                    return -1;
+                  }
+                continue;
               }
-
-            if (count == 0)
-              break;
-
+            break;
+          }
+        if (count < 0)
+          {
+            if (errno == ENOSYS || errno == EINVAL)
+              ;
+            else
+              {
+                int saved_errno = errno;
+                free (malloced);
+                errno = saved_errno;
+                return -1;
+              }
+          }
+        else if (count == 0)
+          ;
+        else
+          {
             /* In the old (original Solaris 10) convention:
                If there are more than 3 entries, there cannot be only the
                ACE_OWNER, ACE_GROUP, ACE_OTHER entries.
@@ -610,28 +708,18 @@
                NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with
                NEW_ACE_ACCESS_DENIED_ACE_TYPE.  */
             if (count > 6)
-              return 1;
-
-            entries = (ace_t *) malloc (count * sizeof (ace_t));
-            if (entries == NULL)
-              {
-                errno = ENOMEM;
-                return -1;
-              }
-            if (acl (name, ACE_GETACL, count, entries) == count)
               {
-                if (acl_ace_nontrivial (count, entries))
-                  {
-                    free (entries);
-                    return 1;
-                  }
-                free (entries);
-                break;
+                free (malloced);
+                return 1;
               }
-            /* Huh? The number of ACL entries changed since the last call.
-               Repeat.  */
-            free (entries);
+
+            if (acl_ace_nontrivial (count, entries))
+              {
+                free (malloced);
+                return 1;
+              }
           }
+        free (malloced);
       }
 #   endif
 
@@ -640,38 +728,36 @@
 
 # elif HAVE_GETACL /* HP-UX */
 
-      for (;;)
-        {
-          int count;
-          struct acl_entry entries[NACLENTRIES];
+      {
+        struct acl_entry entries[NACLENTRIES];
+        int count;
 
-          count = getacl (name, 0, NULL);
+        count = getacl (name, NACLENTRIES, entries);
 
-          if (count < 0)
-            {
-              /* ENOSYS is seen on newer HP-UX versions.
-                 EOPNOTSUPP is typically seen on NFS mounts.
-                 ENOTSUP was seen on Quantum StorNext file systems (cvfs).  */
-              if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
-                break;
-              else
-                return -1;
-            }
+        if (count < 0)
+          {
+            /* ENOSYS is seen on newer HP-UX versions.
+               EOPNOTSUPP is typically seen on NFS mounts.
+               ENOTSUP was seen on Quantum StorNext file systems (cvfs).  */
+            if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+              ;
+            else
+              return -1;
+          }
+        else if (count == 0)
+          return 0;
+        else /* count > 0 */
+          {
+            if (count > NACLENTRIES)
+              /* If NACLENTRIES cannot be trusted, use dynamic memory
+                 allocation.  */
+              abort ();
 
-          if (count == 0)
-            return 0;
+            /* If there are more than 3 entries, there cannot be only the
+               (uid,%), (%,gid), (%,%) entries.  */
+            if (count > 3)
+              return 1;
 
-          if (count > NACLENTRIES)
-            /* If NACLENTRIES cannot be trusted, use dynamic memory
-               allocation.  */
-            abort ();
-
-          /* If there are more than 3 entries, there cannot be only the
-             (uid,%), (%,gid), (%,%) entries.  */
-          if (count > 3)
-            return 1;
-
-          if (getacl (name, count, entries) == count)
             {
               struct stat statbuf;
 
@@ -680,47 +766,43 @@
 
               return acl_nontrivial (count, entries, &statbuf);
             }
-          /* Huh? The number of ACL entries changed since the last call.
-             Repeat.  */
-        }
+          }
+      }
 
 #  if HAVE_ACLV_H /* HP-UX >= 11.11 */
 
-      for (;;)
-        {
-          int count;
-          struct acl entries[NACLVENTRIES];
-
-          count = acl ((char *) name, ACL_CNT, NACLVENTRIES, entries);
+      {
+        struct acl entries[NACLVENTRIES];
+        int count;
 
-          if (count < 0)
-            {
-              /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23.
-                 EINVAL is seen on NFS in HP-UX 11.31.  */
-              if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
-                break;
-              else
-                return -1;
-            }
+        count = acl ((char *) name, ACL_GET, NACLVENTRIES, entries);
 
-          if (count == 0)
-            return 0;
-
-          if (count > NACLVENTRIES)
-            /* If NACLVENTRIES cannot be trusted, use dynamic memory
-               allocation.  */
-            abort ();
+        if (count < 0)
+          {
+            /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23.
+               EINVAL is seen on NFS in HP-UX 11.31.  */
+            if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+              ;
+            else
+              return -1;
+          }
+        else if (count == 0)
+          return 0;
+        else /* count > 0 */
+          {
+            if (count > NACLVENTRIES)
+              /* If NACLVENTRIES cannot be trusted, use dynamic memory
+                 allocation.  */
+              abort ();
 
-          /* If there are more than 4 entries, there cannot be only the
-             four base ACL entries.  */
-          if (count > 4)
-            return 1;
+            /* If there are more than 4 entries, there cannot be only the
+               four base ACL entries.  */
+            if (count > 4)
+              return 1;
 
-          if (acl ((char *) name, ACL_GET, count, entries) == count)
             return aclv_nontrivial (count, entries);
-          /* Huh? The number of ACL entries changed since the last call.
-             Repeat.  */
-        }
+          }
+      }
 
 #  endif
 
@@ -797,39 +879,36 @@
 
 # elif HAVE_ACLSORT /* NonStop Kernel */
 
-      int count;
-      struct acl entries[NACLENTRIES];
-
-      for (;;)
-        {
-          count = acl ((char *) name, ACL_CNT, NACLENTRIES, NULL);
+      {
+        struct acl entries[NACLENTRIES];
+        int count;
 
-          if (count < 0)
-            {
-              if (errno == ENOSYS || errno == ENOTSUP)
-                break;
-              else
-                return -1;
-            }
+        count = acl ((char *) name, ACL_GET, NACLENTRIES, entries);
 
-          if (count == 0)
-            return 0;
-
-          if (count > NACLENTRIES)
-            /* If NACLENTRIES cannot be trusted, use dynamic memory
-               allocation.  */
-            abort ();
+        if (count < 0)
+          {
+            if (errno == ENOSYS || errno == ENOTSUP)
+              ;
+            else
+              return -1;
+          }
+        else if (count == 0)
+          return 0;
+        else /* count > 0 */
+          {
+            if (count > NACLENTRIES)
+              /* If NACLENTRIES cannot be trusted, use dynamic memory
+                 allocation.  */
+              abort ();
 
-          /* If there are more than 4 entries, there cannot be only the
-             four base ACL entries.  */
-          if (count > 4)
-            return 1;
+            /* If there are more than 4 entries, there cannot be only the
+               four base ACL entries.  */
+            if (count > 4)
+              return 1;
 
-          if (acl ((char *) name, ACL_GET, count, entries) == count)
             return acl_nontrivial (count, entries);
-          /* Huh? The number of ACL entries changed since the last call.
-             Repeat.  */
-        }
+          }
+      }
 
 # endif
     }
--- a/lib/filemode.h
+++ b/lib/filemode.h
@@ -23,7 +23,7 @@
 
 /* Get the declaration of strmode.  */
 # if HAVE_DECL_STRMODE
-#  include <string.h> /* MacOS X, FreeBSD, OpenBSD */
+#  include <string.h> /* Mac OS X, FreeBSD, OpenBSD */
 #  include <unistd.h> /* NetBSD */
 # endif
 
--- a/lib/filevercmp.c
+++ b/lib/filevercmp.c
@@ -57,7 +57,7 @@
 }
 
 /* verrevcmp helper function */
-static inline int
+static int
 order (unsigned char c)
 {
   if (c_isdigit (c))
--- a/lib/float+.h
+++ b/lib/float+.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _FLOATPLUS_H
 #define _FLOATPLUS_H
--- a/lib/floor.c
+++ b/lib/floor.c
@@ -42,6 +42,12 @@
 # define L_(literal) literal##f
 #endif
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 /* 2^(MANT_DIG-1).  */
 static const DOUBLE TWO_MANT_DIG =
   /* Assume MANT_DIG <= 5 * 31.
--- a/lib/fma.c
+++ b/lib/fma.c
@@ -66,6 +66,19 @@
 #undef MIN
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
+/* Work around GCC 4.2.1 bug on OpenBSD 5.1/SPARC64.  */
+#if defined __GNUC__ && defined __sparc__
+# define VOLATILE volatile
+#else
+# define VOLATILE
+#endif
+
 /* It is possible to write an implementation of fused multiply-add with
    floating-point operations alone.  See
      Sylvie Boldo, Guillaume Melquiond:
@@ -860,16 +873,22 @@
                     else
                       {
                         /* First loop round.  */
-                        fsum = (DOUBLE)
-                               ((sum[sum_len - k - 1] << (GMP_LIMB_BITS - shift))
-                                | (sum_len >= k + 2 ? sum[sum_len - k - 2] >> shift : 0));
+                        {
+                          VOLATILE mp_limb_t chunk =
+                            (sum[sum_len - k - 1] << (GMP_LIMB_BITS - shift))
+                            | (sum_len >= k + 2 ? sum[sum_len - k - 2] >> shift : 0);
+                          fsum = (DOUBLE) chunk;
+                        }
                         /* General loop.  */
                         while (--k >= 0)
                           {
                             fsum *= chunk_multiplier;
-                            fsum += (DOUBLE)
-                                    ((sum[sum_len - k - 1] << (GMP_LIMB_BITS - shift))
-                                     | (sum[sum_len - k - 2] >> shift));
+                            {
+                              VOLATILE mp_limb_t chunk =
+                                (sum[sum_len - k - 1] << (GMP_LIMB_BITS - shift))
+                                | (sum[sum_len - k - 2] >> shift);
+                              fsum += (DOUBLE) chunk;
+                            }
                           }
                       }
                   }
new file mode 100644
--- /dev/null
+++ b/lib/fmod.c
@@ -0,0 +1,360 @@
+/* Remainder.
+   Copyright (C) 2011-2012 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/>.  */
+
+#if ! defined USE_LONG_DOUBLE
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include <math.h>
+
+#include <float.h>
+#include <stdlib.h>
+
+#ifdef USE_LONG_DOUBLE
+# define FMOD fmodl
+# define DOUBLE long double
+# define MANT_DIG LDBL_MANT_DIG
+# define L_(literal) literal##L
+# define FREXP frexpl
+# define LDEXP ldexpl
+# define FABS fabsl
+# define TRUNC truncl
+# define ISNAN isnanl
+#else
+# define FMOD fmod
+# define DOUBLE double
+# define MANT_DIG DBL_MANT_DIG
+# define L_(literal) literal
+# define FREXP frexp
+# define LDEXP ldexp
+# define FABS fabs
+# define TRUNC trunc
+# define ISNAN isnand
+#endif
+
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
+#undef NAN
+#if defined _MSC_VER
+static DOUBLE zero;
+# define NAN (zero / zero)
+#else
+# define NAN (L_(0.0) / L_(0.0))
+#endif
+
+/* To avoid rounding errors during the computation of x - q * y,
+   there are three possibilities:
+     - Use fma (- q, y, x).
+     - Have q be a single bit at a time, and compute x - q * y
+       through a subtraction.
+     - Have q be at most MANT_DIG/2 bits at a time, and compute
+       x - q * y by splitting y into two halves:
+       y = y1 * 2^(MANT_DIG/2) + y0
+       x - q * y = (x - q * y1 * 2^MANT_DIG/2) - q * y0.
+   The latter is probably the most efficient.  */
+
+/* Number of bits in a limb.  */
+#define LIMB_BITS (MANT_DIG / 2)
+
+/* 2^LIMB_BITS.  */
+static const DOUBLE TWO_LIMB_BITS =
+  /* Assume LIMB_BITS <= 3 * 31.
+     Use the identity
+       n = floor(n/3) + floor((n+1)/3) + floor((n+2)/3).  */
+  (DOUBLE) (1U << (LIMB_BITS / 3))
+  * (DOUBLE) (1U << ((LIMB_BITS + 1) / 3))
+  * (DOUBLE) (1U << ((LIMB_BITS + 2) / 3));
+
+/* 2^-LIMB_BITS.  */
+static const DOUBLE TWO_LIMB_BITS_INVERSE =
+  /* Assume LIMB_BITS <= 3 * 31.
+     Use the identity
+       n = floor(n/3) + floor((n+1)/3) + floor((n+2)/3).  */
+  L_(1.0) / ((DOUBLE) (1U << (LIMB_BITS / 3))
+             * (DOUBLE) (1U << ((LIMB_BITS + 1) / 3))
+             * (DOUBLE) (1U << ((LIMB_BITS + 2) / 3)));
+
+DOUBLE
+FMOD (DOUBLE x, DOUBLE y)
+{
+  if (isfinite (x) && isfinite (y) && y != L_(0.0))
+    {
+      if (x == L_(0.0))
+        /* Return x, regardless of the sign of y.  */
+        return x;
+
+      {
+        int negate = ((!signbit (x)) ^ (!signbit (y)));
+
+        /* Take the absolute value of x and y.  */
+        x = FABS (x);
+        y = FABS (y);
+
+        /* Trivial case that requires no computation.  */
+        if (x < y)
+          return (negate ? - x : x);
+
+        {
+          int yexp;
+          DOUBLE ym;
+          DOUBLE y1;
+          DOUBLE y0;
+          int k;
+          DOUBLE x2;
+          DOUBLE x1;
+          DOUBLE x0;
+
+          /* Write y = 2^yexp * (y1 * 2^-LIMB_BITS + y0 * 2^-(2*LIMB_BITS))
+             where y1 is an integer, 2^(LIMB_BITS-1) <= y1 < 2^LIMB_BITS,
+             y1 has at most LIMB_BITS bits,
+             0 <= y0 < 2^LIMB_BITS,
+             y0 has at most (MANT_DIG + 1) / 2 bits.  */
+          ym = FREXP (y, &yexp);
+          ym = ym * TWO_LIMB_BITS;
+          y1 = TRUNC (ym);
+          y0 = (ym - y1) * TWO_LIMB_BITS;
+
+          /* Write
+               x = 2^(yexp+(k-3)*LIMB_BITS)
+                   * (x2 * 2^(2*LIMB_BITS) + x1 * 2^LIMB_BITS + x0)
+             where x2, x1, x0 are each integers >= 0, < 2^LIMB_BITS.  */
+          {
+            int xexp;
+            DOUBLE xm = FREXP (x, &xexp);
+            /* Since we know x >= y, we know xexp >= yexp.  */
+            xexp -= yexp;
+            /* Compute k = ceil(xexp / LIMB_BITS).  */
+            k = (xexp + LIMB_BITS - 1) / LIMB_BITS;
+            /* Note: (k - 1) * LIMB_BITS + 1 <= xexp <= k * LIMB_BITS.  */
+            /* Note: 0.5 <= xm < 1.0.  */
+            xm = LDEXP (xm, xexp - (k - 1) * LIMB_BITS);
+            /* Note: Now xm < 2^(xexp - (k - 1) * LIMB_BITS) <= 2^LIMB_BITS
+               and xm >= 0.5 * 2^(xexp - (k - 1) * LIMB_BITS) >= 1.0
+               and xm has at most MANT_DIG <= 2*LIMB_BITS+1 bits.  */
+            x2 = TRUNC (xm);
+            x1 = (xm - x2) * TWO_LIMB_BITS;
+            /* Split off x0 from x1 later.  */
+          }
+
+          /* Test whether [x2,x1,0] >= 2^LIMB_BITS * [y1,y0].  */
+          if (x2 > y1 || (x2 == y1 && x1 >= y0))
+            {
+              /* Subtract 2^LIMB_BITS * [y1,y0] from [x2,x1,0].  */
+              x2 -= y1;
+              x1 -= y0;
+              if (x1 < L_(0.0))
+                {
+                  if (!(x2 >= L_(1.0)))
+                    abort ();
+                  x2 -= L_(1.0);
+                  x1 += TWO_LIMB_BITS;
+                }
+            }
+
+          /* Split off x0 from x1.  */
+          {
+            DOUBLE x1int = TRUNC (x1);
+            x0 = TRUNC ((x1 - x1int) * TWO_LIMB_BITS);
+            x1 = x1int;
+          }
+
+          for (; k > 0; k--)
+            {
+              /* Multiprecision division of the limb sequence [x2,x1,x0]
+                 by [y1,y0].  */
+              /* Here [x2,x1,x0] < 2^LIMB_BITS * [y1,y0].  */
+              /* The first guess takes into account only [x2,x1] and [y1].
+
+                 By Knuth's theorem, we know that
+                   q* = min (floor ([x2,x1] / [y1]), 2^LIMB_BITS - 1)
+                 and
+                   q = floor ([x2,x1,x0] / [y1,y0])
+                 are not far away:
+                   q* - 2 <= q <= q* + 1.
+
+                 Proof:
+                 a) q* * y1 <= floor ([x2,x1] / [y1]) * y1 <= [x2,x1].
+                    Hence
+                    [x2,x1,x0] - q* * [y1,y0]
+                      = 2^LIMB_BITS * ([x2,x1] - q* * [y1]) + x0 - q* * y0
+                      >= x0 - q* * y0
+                      >= - q* * y0
+                      > - 2^(2*LIMB_BITS)
+                      >= - 2 * [y1,y0]
+                    So
+                      [x2,x1,x0] > (q* - 2) * [y1,y0].
+                 b) If q* = floor ([x2,x1] / [y1]), then
+                      [x2,x1] < (q* + 1) * y1
+                    Hence
+                    [x2,x1,x0] - q* * [y1,y0]
+                      = 2^LIMB_BITS * ([x2,x1] - q* * [y1]) + x0 - q* * y0
+                      <= 2^LIMB_BITS * (y1 - 1) + x0 - q* * y0
+                      <= 2^LIMB_BITS * (2^LIMB_BITS-2) + (2^LIMB_BITS-1) - 0
+                      < 2^(2*LIMB_BITS)
+                      <= 2 * [y1,y0]
+                    So
+                      [x2,x1,x0] < (q* + 2) * [y1,y0].
+                    and so
+                      q < q* + 2
+                    which implies
+                      q <= q* + 1.
+                    In the other case, q* = 2^LIMB_BITS - 1.  Then trivially
+                      q < 2^LIMB_BITS = q* + 1.
+
+                 We know that floor ([x2,x1] / [y1]) >= 2^LIMB_BITS if and
+                 only if x2 >= y1.  */
+              DOUBLE q =
+                (x2 >= y1
+                 ? TWO_LIMB_BITS - L_(1.0)
+                 : TRUNC ((x2 * TWO_LIMB_BITS + x1) / y1));
+              if (q > L_(0.0))
+                {
+                  /* Compute
+                     [x2,x1,x0] - q* * [y1,y0]
+                       = 2^LIMB_BITS * ([x2,x1] - q* * [y1]) + x0 - q* * y0.  */
+                  DOUBLE q_y1 = q * y1; /* exact, at most 2*LIMB_BITS bits */
+                  DOUBLE q_y1_1 = TRUNC (q_y1 * TWO_LIMB_BITS_INVERSE);
+                  DOUBLE q_y1_0 = q_y1 - q_y1_1 * TWO_LIMB_BITS;
+                  DOUBLE q_y0 = q * y0; /* exact, at most MANT_DIG bits */
+                  DOUBLE q_y0_1 = TRUNC (q_y0 * TWO_LIMB_BITS_INVERSE);
+                  DOUBLE q_y0_0 = q_y0 - q_y0_1 * TWO_LIMB_BITS;
+                  x2 -= q_y1_1;
+                  x1 -= q_y1_0;
+                  x1 -= q_y0_1;
+                  x0 -= q_y0_0;
+                  /* Move negative carry from x0 to x1 and from x1 to x2.  */
+                  if (x0 < L_(0.0))
+                    {
+                      x0 += TWO_LIMB_BITS;
+                      x1 -= L_(1.0);
+                    }
+                  if (x1 < L_(0.0))
+                    {
+                      x1 += TWO_LIMB_BITS;
+                      x2 -= L_(1.0);
+                      if (x1 < L_(0.0)) /* not sure this can happen */
+                        {
+                          x1 += TWO_LIMB_BITS;
+                          x2 -= L_(1.0);
+                        }
+                    }
+                  if (x2 < L_(0.0))
+                    {
+                      /* Reduce q by 1.  */
+                      x1 += y1;
+                      x0 += y0;
+                      /* Move overflow from x0 to x1 and from x1 to x0.  */
+                      if (x0 >= TWO_LIMB_BITS)
+                        {
+                          x0 -= TWO_LIMB_BITS;
+                          x1 += L_(1.0);
+                        }
+                      if (x1 >= TWO_LIMB_BITS)
+                        {
+                          x1 -= TWO_LIMB_BITS;
+                          x2 += L_(1.0);
+                        }
+                      if (x2 < L_(0.0))
+                        {
+                          /* Reduce q by 1 again.  */
+                          x1 += y1;
+                          x0 += y0;
+                          /* Move overflow from x0 to x1 and from x1 to x0.  */
+                          if (x0 >= TWO_LIMB_BITS)
+                            {
+                              x0 -= TWO_LIMB_BITS;
+                              x1 += L_(1.0);
+                            }
+                          if (x1 >= TWO_LIMB_BITS)
+                            {
+                              x1 -= TWO_LIMB_BITS;
+                              x2 += L_(1.0);
+                            }
+                          if (x2 < L_(0.0))
+                            /* Shouldn't happen, because we proved that
+                               q >= q* - 2.  */
+                            abort ();
+                        }
+                    }
+                }
+              if (x2 > L_(0.0)
+                  || x1 > y1
+                  || (x1 == y1 && x0 >= y0))
+                {
+                  /* Increase q by 1.  */
+                  x1 -= y1;
+                  x0 -= y0;
+                  /* Move negative carry from x0 to x1 and from x1 to x2.  */
+                  if (x0 < L_(0.0))
+                    {
+                      x0 += TWO_LIMB_BITS;
+                      x1 -= L_(1.0);
+                    }
+                  if (x1 < L_(0.0))
+                    {
+                      x1 += TWO_LIMB_BITS;
+                      x2 -= L_(1.0);
+                    }
+                  if (x2 < L_(0.0))
+                    abort ();
+                  if (x2 > L_(0.0)
+                      || x1 > y1
+                      || (x1 == y1 && x0 >= y0))
+                    /* Shouldn't happen, because we proved that
+                       q <= q* + 1.  */
+                    abort ();
+                }
+              /* Here [x2,x1,x0] < [y1,y0].  */
+              /* Next round.  */
+              x2 = x1;
+#if (MANT_DIG + 1) / 2 > LIMB_BITS /* y0 can have a fractional bit */
+              x1 = TRUNC (x0);
+              x0 = (x0 - x1) * TWO_LIMB_BITS;
+#else
+              x1 = x0;
+              x0 = L_(0.0);
+#endif
+              /* Here [x2,x1,x0] < 2^LIMB_BITS * [y1,y0].  */
+            }
+          /* Here k = 0.
+             The result is
+               2^(yexp-3*LIMB_BITS)
+               * (x2 * 2^(2*LIMB_BITS) + x1 * 2^LIMB_BITS + x0).  */
+          {
+            DOUBLE r =
+              LDEXP ((x2 * TWO_LIMB_BITS + x1) * TWO_LIMB_BITS + x0,
+                     yexp - 3 * LIMB_BITS);
+            return (negate ? - r : r);
+          }
+        }
+      }
+    }
+  else
+    {
+      if (ISNAN (x) || ISNAN (y))
+        return x + y; /* NaN */
+      else if (isinf (y))
+        return x;
+      else
+        /* x infinite or y zero */
+        return NAN;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/lib/fmodl.c
@@ -0,0 +1,35 @@
+/* Remainder.
+   Copyright (C) 2011-2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+fmodl (long double x, long double y)
+{
+  return fmod (x, y);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "fmod.c"
+
+#endif
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -11,8 +11,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
@@ -42,7 +41,7 @@
   (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \
    && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY))
 
-/* For platform which support the ISO C amendement 1 functionality we
+/* For platform which support the ISO C amendment 1 functionality we
    support user defined character classes.  */
 #if defined _LIBC || WIDE_CHAR_SUPPORT
 # include <wctype.h>
@@ -92,7 +91,7 @@
 
 # if defined _LIBC || WIDE_CHAR_SUPPORT
 /* The GNU C library provides support for user-defined character classes
-   and the functions from ISO C amendement 1.  */
+   and the functions from ISO C amendment 1.  */
 #  ifdef CHARCLASS_NAME_MAX
 #   define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
 #  else
--- a/lib/fnmatch.in.h
+++ b/lib/fnmatch.in.h
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _FNMATCH_H
 #define _FNMATCH_H      1
--- a/lib/fnmatch_loop.c
+++ b/lib/fnmatch_loop.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Match STRING against the file name pattern PATTERN, returning zero if
    it matches, nonzero if not.  */
@@ -382,7 +381,7 @@
                           {
                             /* We found a table entry.  Now see whether the
                                character we are currently at has the same
-                               equivalance class value.  */
+                               equivalence class value.  */
                             int len = weights[idx & 0xffffff];
                             int32_t idx2;
                             const UCHAR *np = (const UCHAR *) n;
--- a/lib/fopen.c
+++ b/lib/fopen.c
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #undef __need_FILE
 
-static inline FILE *
+static FILE *
 orig_fopen (const char *filename, const char *mode)
 {
   return fopen (filename, mode);
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -21,10 +21,6 @@
 #include <stddef.h>
 #include <stdio.h>
 
-#ifndef HAVE_DECL___FPENDING
-"this configure-time declaration test was not run"
-#endif
-
 #if HAVE_DECL___FPENDING
 # if HAVE_STDIO_EXT_H
 #  include <stdio_ext.h>
--- a/lib/fpucw.h
+++ b/lib/fpucw.h
@@ -30,7 +30,8 @@
 
    On some platforms, such as NetBSD, the default precision is set to
    "double precision".  This means that 'long double' instructions will operate
-   only as 'double', i.e. lead wrong results.
+   only as 'double', i.e. lead to wrong results.  Similarly on FreeBSD 6.4, at
+   least for the division of 'long double' numbers.
 
    The FPU control word is under control of the application, i.e. it is
    not required to be set either way by the ABI.  (In fact, the i386 ABI
--- a/lib/fpurge.c
+++ b/lib/fpurge.c
@@ -29,13 +29,13 @@
 int
 fpurge (FILE *fp)
 {
-#if HAVE___FPURGE                   /* glibc >= 2.2, Haiku, Solaris >= 7 */
+#if HAVE___FPURGE                   /* glibc >= 2.2, Haiku, Solaris >= 7, musl libc */
 
   __fpurge (fp);
   /* The __fpurge function does not have a return value.  */
   return 0;
 
-#elif HAVE_FPURGE                   /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */
+#elif HAVE_FPURGE                   /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin 1.7 */
 
   /* Call the system's fpurge function.  */
 # undef fpurge
@@ -43,7 +43,7 @@
   extern int fpurge (FILE *);
 # endif
   int result = fpurge (fp);
-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   if (result == 0)
     /* Correct the invariants that fpurge broke.
        <stdio.h> on BSD systems says:
@@ -71,7 +71,7 @@
       fp->_IO_save_base = NULL;
     }
   return 0;
-# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   fp_->_p = fp_->_bf._base;
   fp_->_r = 0;
   fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
@@ -134,6 +134,9 @@
   /* Nothing in the buffer, next putc is nontrivial.  */
   fp->__put_limit = fp->__buffer;
   return 0;
+# elif defined EPLAN9               /* Plan9 */
+  fp->rp = fp->wp = fp->lp = fp->buf;
+  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."
 # endif
--- a/lib/freadable.c
+++ b/lib/freadable.c
@@ -21,6 +21,10 @@
 
 #include "stdio-impl.h"
 
+#if defined EPLAN9                  /* Plan9 */
+# include <fcntl.h>
+#endif
+
 bool
 freadable (FILE *fp)
 {
@@ -29,7 +33,7 @@
      fast macros.  */
 #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   return (fp->_flags & _IO_NO_READS) == 0;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   return (fp_->_flags & (__SRW | __SRD)) != 0;
 #elif defined __EMX__               /* emx+gcc */
   return (fp->_flags & (_IORW | _IOREAD)) != 0;
@@ -41,6 +45,18 @@
   return (fp->_Mode & 0x1 /* _MOPENR */) != 0;
 #elif defined __MINT__              /* Atari FreeMiNT */
   return fp->__mode.__read;
+#elif defined EPLAN9                /* Plan9 */
+  int fd = fp->fd;
+  if (fd >= 0)
+    {
+      int flags = fcntl (fd, F_GETFL, NULL);
+      if (flags >= 0)
+        {
+          flags &= O_ACCMODE;
+          return (flags == O_RDONLY || flags == O_RDWR);
+        }
+    }
+  return 0;
 #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."
 #endif
--- a/lib/freadable.h
+++ b/lib/freadable.h
@@ -22,7 +22,7 @@
    STREAM must not be wide-character oriented.
    The result doesn't change until the stream is closed or re-opened.  */
 
-#if HAVE___FREADABLE /* glibc >= 2.2, Solaris >= 7 */
+#if HAVE___FREADABLE /* glibc >= 2.2, Solaris >= 7, musl libc */
 
 # include <stdio_ext.h>
 # define freadable(stream) (__freadable (stream) != 0)
--- a/lib/freadahead.c
+++ b/lib/freadahead.c
@@ -31,7 +31,7 @@
   return (fp->_IO_read_end - fp->_IO_read_ptr)
          + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
             0);
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
     return 0;
 # if defined __DragonFly__
@@ -80,6 +80,10 @@
   return (fp->__pushed_back
           ? fp->__get_limit - fp->__pushback_bufp + 1
           : fp->__get_limit - fp->__bufp);
+#elif defined EPLAN9                /* Plan9 */
+  if (fp->state == 4 /* WR */ || fp->rp >= fp->wp)
+    return 0;
+  return fp->wp - fp->rp;
 #elif defined SLOW_BUT_NO_HACKS     /* users can define this */
   abort ();
   return 0;
--- a/lib/freadahead.h
+++ b/lib/freadahead.h
@@ -17,10 +17,6 @@
 #include <stddef.h>
 #include <stdio.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Assuming the stream STREAM is open for reading:
    Return the number of bytes waiting in the input buffer of STREAM.
    This includes both the bytes that have been read from the underlying input
@@ -31,8 +27,21 @@
 
    STREAM must not be wide-character oriented.  */
 
+#if HAVE___FREADAHEAD /* musl libc */
+
+# include <stdio_ext.h>
+# define freadahead(stream) __freadahead (stream)
+
+#else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 extern size_t freadahead (FILE *stream) _GL_ATTRIBUTE_PURE;
 
-#ifdef __cplusplus
+# ifdef __cplusplus
 }
+# endif
+
 #endif
--- a/lib/freading.c
+++ b/lib/freading.c
@@ -35,7 +35,7 @@
   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, Mac OS X, Cygwin */
   return (fp_->_flags & __SRD) != 0;
 # elif defined __EMX__               /* emx+gcc */
   return (fp->_flags & _IOREAD) != 0;
@@ -62,6 +62,10 @@
 #  else
   return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/);
 #  endif
+# elif defined EPLAN9                /* Plan9 */
+  if (fp->state == 0 /* CLOSED */ || fp->state == 4 /* WR */)
+    return 0;
+  return (fp->state == 3 /* RD */ && (fp->bufl == 0 || fp->rp < fp->wp));
 # else
 #  error "Please port gnulib freading.c to your platform!"
 # endif
--- a/lib/freading.h
+++ b/lib/freading.h
@@ -33,7 +33,7 @@
    STREAM must not be wide-character oriented.  */
 
 #if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
-/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7  */
+/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7, or musl libc  */
 
 # include <stdio_ext.h>
 # define freading(stream) (__freading (stream) != 0)
--- a/lib/freadptr.c
+++ b/lib/freadptr.c
@@ -37,7 +37,7 @@
     return NULL;
   *sizep = size;
   return (const char *) fp->_IO_read_ptr;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
     return NULL;
   size = fp_->_r;
@@ -101,6 +101,13 @@
     return NULL;
   *sizep = size;
   return fp->__bufp;
+#elif defined EPLAN9                /* Plan9 */
+  if (fp->state == 4 /* WR */)
+    return NULL;
+  if (fp->rp >= fp->wp)
+    return NULL;
+  *sizep = fp->wp - fp->rp;
+  return fp->rp;
 #elif defined SLOW_BUT_NO_HACKS     /* users can define this */
   /* This implementation is correct on any ANSI C platform.  It is just
      awfully slow.  */
--- a/lib/freadptr.h
+++ b/lib/freadptr.h
@@ -17,10 +17,6 @@
 #include <stddef.h>
 #include <stdio.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Assuming the stream STREAM is open for reading:
    Return a pointer to the input buffer of STREAM, or NULL.
    If the returned pointer is non-NULL, *SIZEP is set to the (positive) size
@@ -32,8 +28,21 @@
 
    STREAM must not be wide-character oriented.  */
 
+#if HAVE___FREADPTR /* musl libc */
+
+# include <stdio_ext.h>
+# define freadptr(stream,sizep) __freadptr (stream, sizep)
+
+#else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 extern const char * freadptr (FILE *stream, size_t *sizep);
 
-#ifdef __cplusplus
+# ifdef __cplusplus
 }
+# endif
+
 #endif
--- a/lib/freadseek.c
+++ b/lib/freadseek.c
@@ -30,13 +30,15 @@
 /* Increment the in-memory pointer.  INCREMENT must be at most the buffer size
    returned by freadptr().
    This is very cheap (no system calls).  */
-static inline void
+static void
 freadptrinc (FILE *fp, size_t increment)
 {
   /* Keep this code in sync with freadptr!  */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if HAVE___FREADPTRINC              /* musl libc */
+  __freadptrinc (fp, increment);
+#elif defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   fp->_IO_read_ptr += increment;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   fp_->_p += increment;
   fp_->_r -= increment;
 #elif defined __EMX__               /* emx+gcc */
@@ -58,6 +60,8 @@
   fp->_Next += increment;
 #elif defined __MINT__              /* Atari FreeMiNT */
   fp->__bufp += increment;
+#elif defined EPLAN9                /* Plan9 */
+  fp->rp += increment;
 #elif defined SLOW_BUT_NO_HACKS     /* users can define this */
 #else
  #error "Please port gnulib freadseek.c to your platform! Look at the definition of getc, getc_unlocked on your system, then report this to bug-gnulib."
--- a/lib/freopen.c
+++ b/lib/freopen.c
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #undef __need_FILE
 
-static inline FILE *
+static FILE *
 orig_freopen (const char *filename, const char *mode, FILE *stream)
 {
   return freopen (filename, mode, stream);
--- a/lib/fseeko.c
+++ b/lib/fseeko.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -32,6 +31,14 @@
 # undef fseek
 # define fseeko fseek
 #endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+# undef fseeko
+# if HAVE__FSEEKI64 /* msvc, mingw64 */
+#  define fseeko _fseeki64
+# else /* mingw */
+#  define fseeko fseeko64
+# endif
+#endif
 {
 #if LSEEK_PIPE_BROKEN
   /* mingw gives bogus answers rather than failure on non-seekable files.  */
@@ -44,7 +51,7 @@
   if (fp->_IO_read_end == fp->_IO_read_ptr
       && fp->_IO_write_ptr == fp->_IO_write_base
       && fp->_IO_save_base == NULL)
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
 # if defined __SL64 && defined __SCLE /* Cygwin */
   if ((fp->_flags & __SL64) == 0)
     {
@@ -89,6 +96,9 @@
       && fp->__get_limit == fp->__bufp
       && fp->__put_limit == fp->__bufp
       && !fp->__pushed_back)
+#elif defined EPLAN9                /* Plan9 */
+  if (fp->rp == fp->buf
+      && fp->wp == fp->buf)
 #else
   #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
 #endif
@@ -99,7 +109,7 @@
       off_t pos = lseek (fileno (fp), offset, whence);
       if (pos == -1)
         {
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
           fp_->_flags &= ~__SOFF;
 #endif
           return -1;
@@ -108,7 +118,7 @@
 #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
       fp->_flags &= ~_IO_EOF_SEEN;
       fp->_offset = pos;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
 # if defined __CYGWIN__
       /* fp_->_offset is typed as an integer.  */
       fp_->_offset = pos;
--- a/lib/fseterr.c
+++ b/lib/fseterr.c
@@ -31,7 +31,7 @@
      fast macros.  */
 #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   fp->_flags |= _IO_ERR_SEEN;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   fp_->_flags |= __SERR;
 #elif defined __EMX__               /* emx+gcc */
   fp->_flags |= _IOERR;
@@ -45,6 +45,9 @@
   fp->_Mode |= 0x200 /* _MERR */;
 #elif defined __MINT__              /* Atari FreeMiNT */
   fp->__error = 1;
+#elif defined EPLAN9                /* Plan9 */
+  if (fp->state != 0 /* CLOSED */)
+    fp->state = 5 /* ERR */;
 #elif 0                             /* unknown  */
   /* Portable fallback, based on an idea by Rich Felker.
      Wow! 6 system calls for something that is just a bit operation!
--- a/lib/fseterr.h
+++ b/lib/fseterr.h
@@ -19,19 +19,27 @@
 
 #include <stdio.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
 /* Set the error indicator of the stream FP.
    The "error indicator" is set when an I/O operation on the stream fails, and
    is cleared (together with the "end-of-file" indicator) by clearerr (FP).  */
+
+#if HAVE___FSETERR /* musl libc */
+
+# include <stdio_ext.h>
+# define fseterr(fp) __fseterr (fp)
+
+#else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 extern void fseterr (FILE *fp);
 
+# ifdef __cplusplus
+}
+# endif
 
-#ifdef __cplusplus
-}
 #endif
 
 #endif /* _FSETERR_H */
--- a/lib/fstat.c
+++ b/lib/fstat.c
@@ -23,9 +23,15 @@
 /* Get the original definition of fstat.  It might be defined as a macro.  */
 #include <sys/types.h>
 #include <sys/stat.h>
+#if _GL_WINDOWS_64_BIT_ST_SIZE
+# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
+# define stat _stati64
+# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
+# define fstat _fstati64
+#endif
 #undef __need_system_sys_stat_h
 
-static inline int
+static int
 orig_fstat (int fd, struct stat *buf)
 {
   return fstat (fd, buf);
@@ -45,7 +51,7 @@
 #endif
 
 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
 fstat_nothrow (int fd, struct stat *buf)
 {
   int result;
--- a/lib/fstatat.c
+++ b/lib/fstatat.c
@@ -29,7 +29,7 @@
 #undef __need_system_sys_stat_h
 
 #if HAVE_FSTATAT
-static inline int
+static int
 orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
 {
   return fstatat (fd, filename, buf, flags);
@@ -97,7 +97,7 @@
    because the preprocessor sees a use of a macro that requires two
    arguments but is only given one.  Hence, we need an inline
    forwarder to get past the preprocessor.  */
-static inline int
+static int
 stat_func (char const *name, struct stat *st)
 {
   return stat (name, st);
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -31,15 +31,15 @@
 # include <fcntl.h>
 # include <unistd.h>
 # include <sys/stat.h>
-# if HAVE_SYS_PARAM_H
-#  include <sys/param.h>
-# endif
-# if HAVE_SYS_MOUNT_H
-#  include <sys/mount.h>
-# endif
-# if HAVE_SYS_VFS_H
-#  include <sys/vfs.h>
-# endif
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_VFS_H
+# include <sys/vfs.h>
+#endif
 # if HAVE_SYS_FS_S5PARAM_H      /* Fujitsu UXP/V */
 #  include <sys/fs/s5param.h>
 # endif
@@ -84,6 +84,35 @@
    otherwise, use PROPAGATE_ALL_ONES.  */
 #define PROPAGATE_TOP_BIT(x) ((x) | ~ (EXTRACT_TOP_BIT (x) - 1))
 
+#ifdef STAT_STATVFS
+/* Return true if statvfs works.  This is false for statvfs on systems
+   with GNU libc on Linux kernels before 2.6.36, which stats all
+   preceding entries in /proc/mounts; that makes df hang if even one
+   of the corresponding file systems is hard-mounted but not available.  */
+# if ! (__linux__ && (__GLIBC__ || __UCLIBC__))
+/* The FRSIZE fallback is not required in this case.  */
+#  undef STAT_STATFS2_FRSIZE
+static int statvfs_works (void) { return 1; }
+# else
+#  include <string.h> /* for strverscmp */
+#  include <sys/utsname.h>
+#  include <sys/statfs.h>
+#  define STAT_STATFS2_BSIZE 1
+
+static int
+statvfs_works (void)
+{
+  static int statvfs_works_cache = -1;
+  struct utsname name;
+  if (statvfs_works_cache < 0)
+    statvfs_works_cache = (uname (&name) == 0
+                           && 0 <= strverscmp (name.release, "2.6.36"));
+  return statvfs_works_cache;
+}
+# endif
+#endif
+
+
 /* Fill in the fields of FSP with information about space usage for
    the file system on which FILE resides.
    DISK is the device on which FILE is mounted, for space-getting
@@ -94,19 +123,32 @@
 int
 get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
 {
-#if defined STAT_STATVFS                /* POSIX, except glibc/Linux */
+#ifdef STAT_STATVFS     /* POSIX, except pre-2.6.36 glibc/Linux */
 
-  struct statvfs fsd;
+  if (statvfs_works ())
+    {
+      struct statvfs vfsd;
 
-  if (statvfs (file, &fsd) < 0)
-    return -1;
+      if (statvfs (file, &vfsd) < 0)
+        return -1;
 
-  /* f_frsize isn't guaranteed to be supported.  */
-  fsp->fsu_blocksize = (fsd.f_frsize
-                        ? PROPAGATE_ALL_ONES (fsd.f_frsize)
-                        : PROPAGATE_ALL_ONES (fsd.f_bsize));
+      /* f_frsize isn't guaranteed to be supported.  */
+      fsp->fsu_blocksize = (vfsd.f_frsize
+                            ? PROPAGATE_ALL_ONES (vfsd.f_frsize)
+                            : PROPAGATE_ALL_ONES (vfsd.f_bsize));
 
-#elif defined STAT_STATVFS64            /* AIX */
+      fsp->fsu_blocks = PROPAGATE_ALL_ONES (vfsd.f_blocks);
+      fsp->fsu_bfree = PROPAGATE_ALL_ONES (vfsd.f_bfree);
+      fsp->fsu_bavail = PROPAGATE_TOP_BIT (vfsd.f_bavail);
+      fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (vfsd.f_bavail) != 0;
+      fsp->fsu_files = PROPAGATE_ALL_ONES (vfsd.f_files);
+      fsp->fsu_ffree = PROPAGATE_ALL_ONES (vfsd.f_ffree);
+      return 0;
+    }
+
+#endif
+
+#if defined STAT_STATVFS64            /* AIX */
 
   struct statvfs64 fsd;
 
@@ -177,8 +219,17 @@
 
   fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
 
-#elif defined STAT_STATFS2_BSIZE        /* glibc/Linux, 4.3BSD, SunOS 4, \
-                                           MacOS X < 10.4, FreeBSD < 5.0, \
+#elif defined STAT_STATFS2_FRSIZE        /* 2.6 < glibc/Linux < 2.6.36 */
+
+  struct statfs fsd;
+
+  if (statfs (file, &fsd) < 0)
+    return -1;
+
+  fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_frsize);
+
+#elif defined STAT_STATFS2_BSIZE        /* glibc/Linux < 2.6, 4.3BSD, SunOS 4, \
+                                           Mac OS X < 10.4, FreeBSD < 5.0, \
                                            NetBSD < 3.0, OpenBSD < 4.4 */
 
   struct statfs fsd;
@@ -235,8 +286,9 @@
 
 #endif
 
-#if (defined STAT_STATVFS || defined STAT_STATVFS64 \
-     || (!defined STAT_STATFS2_FS_DATA && !defined STAT_READ_FILSYS))
+#if (defined STAT_STATVFS64 || defined STAT_STATFS3_OSF1                \
+     || defined STAT_STATFS2_FRSIZE || defined STAT_STATFS2_BSIZE       \
+     || defined STAT_STATFS2_FSIZE || defined STAT_STATFS4)
 
   fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.f_blocks);
   fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.f_bfree);
--- a/lib/fsync.c
+++ b/lib/fsync.c
@@ -57,6 +57,11 @@
       err = GetLastError ();
       switch (err)
         {
+        case ERROR_ACCESS_DENIED:
+          /* For a read-only handle, fsync should succeed, even though we have
+             no way to sync the access-time changes.  */
+          return 0;
+
           /* eg. Trying to fsync a tty. */
         case ERROR_INVALID_HANDLE:
           errno = EINVAL;
--- a/lib/ftello.c
+++ b/lib/ftello.c
@@ -31,6 +31,14 @@
 # undef ftell
 # define ftello ftell
 #endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+# undef ftello
+# if HAVE__FTELLI64 /* msvc, mingw64 */
+#  define ftello _ftelli64
+# else /* mingw */
+#  define ftello ftello64
+# endif
+#endif
 {
 #if LSEEK_PIPE_BROKEN
   /* mingw gives bogus answers rather than failure on non-seekable files.  */
--- a/lib/ftoastr.c
+++ b/lib/ftoastr.c
@@ -29,7 +29,6 @@
 
 #include "ftoastr.h"
 
-#include "intprops.h"
 #include <float.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/lib/ftruncate.c
+++ b/lib/ftruncate.c
@@ -1,5 +1,18 @@
 /* ftruncate emulations for native Windows.
-   This file is in the public domain.  */
+   Copyright (C) 1992-2012 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, 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/>.  */
 
 #include <config.h>
 
@@ -7,13 +20,144 @@
 #include <unistd.h>
 
 #if HAVE_CHSIZE
+/* A native Windows platform.  */
 
 # include <errno.h>
-# include <io.h>
+
+# if _GL_WINDOWS_64_BIT_OFF_T
+
+/* Large File Support: off_t is 64-bit, but chsize() takes only a 32-bit
+   argument.  So, define a 64-bit safe SetFileSize function ourselves.  */
+
+/* Ensure that <windows.h> declares GetFileSizeEx.  */
+#  undef _WIN32_WINNT
+#  define _WIN32_WINNT 0x500
+
+/* Get declarations of the native Windows API functions.  */
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+
+/* Get _get_osfhandle.  */
+#  include "msvc-nothrow.h"
+
+static BOOL
+SetFileSize (HANDLE h, LONGLONG size)
+{
+  LARGE_INTEGER old_size;
+
+  if (!GetFileSizeEx (h, &old_size))
+    return FALSE;
+
+  if (size != old_size.QuadPart)
+    {
+      /* Duplicate the handle, so we are free to modify its file position.  */
+      HANDLE curr_process = GetCurrentProcess ();
+      HANDLE tmph;
+
+      if (!DuplicateHandle (curr_process,           /* SourceProcessHandle */
+                            h,                      /* SourceHandle */
+                            curr_process,           /* TargetProcessHandle */
+                            (PHANDLE) &tmph,        /* TargetHandle */
+                            (DWORD) 0,              /* DesiredAccess */
+                            FALSE,                  /* InheritHandle */
+                            DUPLICATE_SAME_ACCESS)) /* Options */
+        return FALSE;
 
-# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-#  include "msvc-inval.h"
-static inline int
+      if (size < old_size.QuadPart)
+        {
+          /* Reduce the size.  */
+          LONG size_hi = (LONG) (size >> 32);
+          if (SetFilePointer (tmph, (LONG) size, &size_hi, FILE_BEGIN)
+              == INVALID_SET_FILE_POINTER
+              && GetLastError() != NO_ERROR)
+            {
+              CloseHandle (tmph);
+              return FALSE;
+            }
+          if (!SetEndOfFile (tmph))
+            {
+              CloseHandle (tmph);
+              return FALSE;
+            }
+        }
+      else
+        {
+          /* Increase the size by adding zero bytes at the end.  */
+          static char zero_bytes[1024];
+          LONG pos_hi = 0;
+          LONG pos_lo = SetFilePointer (tmph, (LONG) 0, &pos_hi, FILE_END);
+          LONGLONG pos;
+          if (pos_lo == INVALID_SET_FILE_POINTER
+              && GetLastError() != NO_ERROR)
+            {
+              CloseHandle (tmph);
+              return FALSE;
+            }
+          pos = ((LONGLONG) pos_hi << 32) | (ULONGLONG) (ULONG) pos_lo;
+          while (pos < size)
+            {
+              DWORD written;
+              LONGLONG count = size - pos;
+              if (count > sizeof (zero_bytes))
+                count = sizeof (zero_bytes);
+              if (!WriteFile (tmph, zero_bytes, (DWORD) count, &written, NULL)
+                  || written == 0)
+                {
+                  CloseHandle (tmph);
+                  return FALSE;
+                }
+              pos += (ULONGLONG) (ULONG) written;
+            }
+        }
+      /* Close the handle.  */
+      CloseHandle (tmph);
+    }
+  return TRUE;
+}
+
+int
+ftruncate (int fd, off_t length)
+{
+  HANDLE handle = (HANDLE) _get_osfhandle (fd);
+
+  if (handle == INVALID_HANDLE_VALUE)
+    {
+      errno = EBADF;
+      return -1;
+    }
+  if (length < 0)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  if (!SetFileSize (handle, length))
+    {
+      switch (GetLastError ())
+        {
+        case ERROR_ACCESS_DENIED:
+          errno = EACCES;
+          break;
+        case ERROR_HANDLE_DISK_FULL:
+        case ERROR_DISK_FULL:
+        case ERROR_DISK_TOO_FRAGMENTED:
+          errno = ENOSPC;
+          break;
+        default:
+          errno = EIO;
+          break;
+        }
+      return -1;
+    }
+  return 0;
+}
+
+# else
+
+#  include <io.h>
+
+#  if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#   include "msvc-inval.h"
+static int
 chsize_nothrow (int fd, long length)
 {
   int result;
@@ -31,8 +175,8 @@
 
   return result;
 }
-#  define chsize chsize_nothrow
-# endif
+#   define chsize chsize_nothrow
+#  endif
 
 int
 ftruncate (int fd, off_t length)
@@ -40,4 +184,5 @@
   return chsize (fd, length);
 }
 
+# endif
 #endif
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -290,7 +290,7 @@
 
 /* file-descriptor-relative opendir.  */
 /* FIXME: if others need this function, move it into lib/openat.c */
-static inline DIR *
+static DIR *
 internal_function
 opendirat (int fd, char const *dir, int extra_flags, int *pdir_fd)
 {
@@ -360,7 +360,7 @@
    descriptor.  Return -1 and set errno on failure.  It doesn't matter
    whether the file descriptor has read or write access.  */
 
-static inline int
+static int
 internal_function
 diropen (FTS const *sp, char const *dir)
 {
@@ -487,6 +487,17 @@
         for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
                 /* *Do* allow zero-length file names. */
                 size_t len = strlen(*argv);
+
+                if ( ! (options & FTS_VERBATIM))
+                  {
+                    /* If there are two or more trailing slashes, trim all but one,
+                       but don't change "//" to "/", and do map "///" to "/".  */
+                    char const *v = *argv;
+                    if (2 < len && v[len - 1] == '/')
+                      while (1 < len && v[len - 2] == '/')
+                        --len;
+                  }
+
                 if ((p = fts_alloc(sp, *argv, len)) == NULL)
                         goto mem3;
                 p->fts_level = FTS_ROOTLEVEL;
@@ -704,7 +715,7 @@
 
   switch (fs_buf.f_type)
     {
-      /* List here the file system types that lack useable dirent.d_type
+      /* List here the file system types that lack usable dirent.d_type
          info, yet for which the optimization does apply.  */
     case S_MAGIC_REISERFS:
       return true;
@@ -1894,7 +1905,7 @@
                 return (NULL);
 
         /* Copy the name and guarantee NUL termination. */
-        memmove(p->fts_name, name, namelen);
+        memcpy(p->fts_name, name, namelen);
         p->fts_name[namelen] = '\0';
 
         p->fts_namelen = namelen;
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -145,10 +145,14 @@
 
 # define FTS_NOATIME    0x0800          /* use O_NOATIME during traversal */
 
-# define FTS_OPTIONMASK 0x0fff          /* valid user option mask */
+  /* Use this flag to disable stripping of trailing slashes
+     from input path names during fts_open initialization.  */
+# define FTS_VERBATIM   0x1000
 
-# define FTS_NAMEONLY   0x1000          /* (private) child names only */
-# define FTS_STOP       0x2000          /* (private) unrecoverable error */
+# define FTS_OPTIONMASK 0x1fff          /* valid user option mask */
+
+# define FTS_NAMEONLY   0x2000          /* (private) child names only */
+# define FTS_STOP       0x4000          /* (private) unrecoverable error */
         int fts_options;                /* fts_open options, global flags */
 
         /* Map a directory's device number to a boolean.  The boolean is
--- a/lib/fwritable.c
+++ b/lib/fwritable.c
@@ -21,6 +21,10 @@
 
 #include "stdio-impl.h"
 
+#if defined EPLAN9                  /* Plan9 */
+# include <fcntl.h>
+#endif
+
 bool
 fwritable (FILE *fp)
 {
@@ -29,7 +33,7 @@
      fast macros.  */
 #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   return (fp->_flags & _IO_NO_WRITES) == 0;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   return (fp_->_flags & (__SRW | __SWR)) != 0;
 #elif defined __EMX__               /* emx+gcc */
   return (fp->_flags & (_IORW | _IOWRT)) != 0;
@@ -41,6 +45,18 @@
   return (fp->_Mode & 0x2 /* _MOPENW */) != 0;
 #elif defined __MINT__              /* Atari FreeMiNT */
   return fp->__mode.__write;
+#elif defined EPLAN9                /* Plan9 */
+  int fd = fp->fd;
+  if (fd >= 0)
+    {
+      int flags = fcntl (fd, F_GETFL, NULL);
+      if (flags >= 0)
+        {
+          flags &= O_ACCMODE;
+          return (flags == O_WRONLY || flags == O_RDWR);
+        }
+    }
+  return 0;
 #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."
 #endif
--- a/lib/fwritable.h
+++ b/lib/fwritable.h
@@ -22,7 +22,7 @@
    STREAM must not be wide-character oriented.
    The result doesn't change until the stream is closed or re-opened.  */
 
-#if HAVE___FWRITABLE /* glibc >= 2.2, Solaris >= 7 */
+#if HAVE___FWRITABLE /* glibc >= 2.2, Solaris >= 7, musl libc */
 
 # include <stdio_ext.h>
 # define fwritable(stream) (__fwritable (stream) != 0)
--- a/lib/fwriting.c
+++ b/lib/fwriting.c
@@ -29,7 +29,7 @@
      fast macros.  */
 #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   return (fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) != 0;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   return (fp_->_flags & __SWR) != 0;
 #elif defined __EMX__               /* emx+gcc */
   return (fp->_flags & _IOWRT) != 0;
@@ -52,6 +52,10 @@
 # else
   return (fp->__buffer < fp->__put_limit /*|| fp->__bufp == fp->__get_limit ??*/);
 # endif
+#elif defined EPLAN9                /* Plan9 */
+  if (fp->state == 0 /* CLOSED */ || fp->state == 3 /* RD */)
+    return 0;
+  return (fp->state == 4 /* WR */ && (fp->bufl == 0 || fp->wp < fp->rp));
 #else
 # error "Please port gnulib fwriting.c to your platform!"
 #endif
--- a/lib/fwriting.h
+++ b/lib/fwriting.h
@@ -33,7 +33,7 @@
 
    STREAM must not be wide-character oriented.  */
 
-#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7 */
+#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, musl libc */
 
 # include <stdio_ext.h>
 # define fwriting(stream) (__fwriting (stream) != 0)
--- a/lib/gai_strerror.c
+++ b/lib/gai_strerror.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
--- a/lib/gc-gnulib.c
+++ b/lib/gc-gnulib.c
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/gc-libgcrypt.c
+++ b/lib/gc-libgcrypt.c
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/gc-pbkdf2-sha1.c
+++ b/lib/gc-pbkdf2-sha1.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson. */
 
--- a/lib/gc.h
+++ b/lib/gc.h
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/gen-uni-tables.c
+++ b/lib/gen-uni-tables.c
@@ -92,7 +92,7 @@
       exit (1);
     }
   if (strcmp (field2, "Cs") == 0)
-    /* Surrogates are UTF-16 artefacts, not real characters. Ignore them.  */
+    /* Surrogates are UTF-16 artifacts, not real characters. Ignore them.  */
     return;
   uni = &unicode_attributes[i];
   /* Copy the strings.  */
@@ -5698,7 +5698,7 @@
   fprintf (stream, "END LC_IDENTIFICATION\n");
   fprintf (stream, "\n");
 
-  /* Verifications. */
+  /* Verification. */
   for (ch = 0; ch < 0x110000; ch++)
     {
       /* toupper restriction: "Only characters specified for the keywords
--- a/lib/get-rusage-as.c
+++ b/lib/get-rusage-as.c
@@ -49,7 +49,7 @@
      get_rusage_as_via_iterator() is 4 KB higher than
      get_rusage_as_via_setrlimit().
 
-   MacOS X:
+   Mac OS X:
      a) setrlimit with RLIMIT_AS succeeds but does not really work: The OS
         ignores RLIMIT_AS. mmap() of a page always succeeds, therefore
         get_rusage_as_via_setrlimit() is always 0.
@@ -146,7 +146,7 @@
 
 #if HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_as_via_setrlimit (void)
 {
   uintptr_t result;
@@ -310,7 +310,7 @@
 
 #else
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_as_via_setrlimit (void)
 {
   return 0;
@@ -331,7 +331,7 @@
   return 0;
 }
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_as_via_iterator (void)
 {
   uintptr_t total = 0;
@@ -343,7 +343,7 @@
 
 #else
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_as_via_iterator (void)
 {
   return 0;
@@ -355,7 +355,7 @@
 uintptr_t
 get_rusage_as (void)
 {
-#if (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __CYGWIN__ /* MacOS X, AIX, Cygwin */
+#if (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __CYGWIN__ /* Mac OS X, AIX, Cygwin */
   /* get_rusage_as_via_setrlimit() does not work.
      Prefer get_rusage_as_via_iterator().  */
   return get_rusage_as_via_iterator ();
--- a/lib/get-rusage-data.c
+++ b/lib/get-rusage-data.c
@@ -50,7 +50,7 @@
      Note that malloc() falls back on mmap() for large allocations and also
      for small allocations if there is not enough room in the data segment.
 
-   MacOS X:
+   Mac OS X:
      a) setrlimit with RLIMIT_DATA succeeds but does not really work: The OS
         ignores RLIMIT_DATA. Therefore get_rusage_data_via_setrlimit() is
         always 0.
@@ -150,7 +150,7 @@
 #  define errno_expected() (errno == EINVAL)
 # endif
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_data_via_setrlimit (void)
 {
   uintptr_t result;
@@ -306,7 +306,7 @@
 
 #else
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_data_via_setrlimit (void)
 {
   return 0;
@@ -337,7 +337,7 @@
   return 0;
 }
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_data_via_iterator (void)
 {
 # if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __BEOS__ || defined __HAIKU__
@@ -372,7 +372,7 @@
 
 #else
 
-static inline uintptr_t
+static uintptr_t
 get_rusage_data_via_iterator (void)
 {
   return 0;
@@ -384,7 +384,7 @@
 uintptr_t
 get_rusage_data (void)
 {
-#if (defined __APPLE__ && defined __MACH__) || defined __CYGWIN__ /* MacOS X, Cygwin */
+#if (defined __APPLE__ && defined __MACH__) || defined __CYGWIN__ /* Mac OS X, Cygwin */
   /* get_rusage_data_via_setrlimit() does not work.
      Prefer get_rusage_data_via_iterator().  */
   return get_rusage_data_via_iterator ();
--- a/lib/getaddrinfo.c
+++ b/lib/getaddrinfo.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -110,7 +109,7 @@
 }
 #endif
 
-static inline bool
+static bool
 validate_family (int family)
 {
   /* FIXME: Support more families. */
--- a/lib/getdelim.c
+++ b/lib/getdelim.c
@@ -13,9 +13,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Ported from glibc by Simon Josefsson. */
 
--- a/lib/getdomainname.c
+++ b/lib/getdomainname.c
@@ -44,7 +44,7 @@
 getdomainname (char *name, size_t len)
 #undef getdomainname
 {
-#if HAVE_GETDOMAINNAME                 /* MacOS X, FreeBSD, AIX, IRIX, OSF/1 */
+#if HAVE_GETDOMAINNAME                 /* Mac OS X, FreeBSD, AIX, IRIX, OSF/1 */
   extern int getdomainname (char *, int);
 
   if (len > INT_MAX)
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -27,7 +27,7 @@
 #include "msvc-inval.h"
 
 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
 _setmaxstdio_nothrow (int newmax)
 {
   int result;
--- a/lib/getfilecon.c
+++ b/lib/getfilecon.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering */
 
@@ -46,7 +45,7 @@
    "unlabeled" context.  Map both failures to a return value of -1, and
    set errno to ENOTSUP in the first case, and ENODATA in the latter.  */
 
-static inline int
+static int
 map_to_failure (int ret, security_context_t *con)
 {
   if (ret == 0)
--- a/lib/gethrxtime.c
+++ b/lib/gethrxtime.c
@@ -19,8 +19,11 @@
 
 #include <config.h>
 
+#define GETHRXTIME_INLINE _GL_EXTERN_INLINE
 #include "gethrxtime.h"
 
+#if ! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME)
+
 #include <sys/time.h>
 #include "timespec.h"
 
@@ -32,30 +35,30 @@
 xtime_t
 gethrxtime (void)
 {
-#if HAVE_NANOUPTIME
+# if HAVE_NANOUPTIME
   {
     struct timespec ts;
     nanouptime (&ts);
     return xtime_make (ts.tv_sec, ts.tv_nsec);
   }
-#else
+# else
 
-# if defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME
+#  if defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME
   {
     struct timespec ts;
     if (clock_gettime (CLOCK_MONOTONIC, &ts) == 0)
       return xtime_make (ts.tv_sec, ts.tv_nsec);
   }
-# endif
+#  endif
 
-# if HAVE_MICROUPTIME
+#  if HAVE_MICROUPTIME
   {
     struct timeval tv;
     microuptime (&tv);
     return xtime_make (tv.tv_sec, 1000 * tv.tv_usec);
   }
 
-# else
+#  else
   /* No monotonically increasing clocks are available; fall back on a
      clock that might jump backwards, since it's the best we can do.  */
   {
@@ -63,6 +66,8 @@
     gettime (&ts);
     return xtime_make (ts.tv_sec, ts.tv_nsec);
   }
+#  endif
 # endif
+}
+
 #endif
-}
--- a/lib/gethrxtime.h
+++ b/lib/gethrxtime.h
@@ -18,20 +18,35 @@
 /* Written by Paul Eggert.  */
 
 #ifndef GETHRXTIME_H_
-# define GETHRXTIME_H_ 1
+#define GETHRXTIME_H_ 1
+
+#include "xtime.h"
 
-# include "xtime.h"
+_GL_INLINE_HEADER_BEGIN
+#ifndef GETHRXTIME_INLINE
+# define GETHRXTIME_INLINE _GL_INLINE
+#endif
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
 
 /* Get the current time, as a count of the number of nanoseconds since
    an arbitrary epoch (e.g., the system boot time).  Prefer a
    high-resolution clock that is not subject to resetting or
    drifting.  */
 
-# if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME
-#  include <time.h>
-static inline xtime_t gethrxtime (void) { return gethrtime (); }
+#if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME
+# include <time.h>
+GETHRXTIME_INLINE xtime_t gethrxtime (void) { return gethrtime (); }
 # else
 xtime_t gethrxtime (void);
-# endif
+#endif
+
+_GL_INLINE_HEADER_END
+
+#ifdef  __cplusplus
+}
+#endif
 
 #endif
--- a/lib/getline.c
+++ b/lib/getline.c
@@ -12,9 +12,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson. */
 
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -28,7 +28,7 @@
                                 macro that comes with autoconf 2.13 or newer.
                                 If that isn't an option, then just put
                                 AC_CHECK_FUNCS(pstat_getdynamic) in your
-                                configure.in file.
+                                configure.ac file.
    HAVE_LIBPERFSTAT Define this if your system has the
                                 perfstat_cpu_total function in libperfstat (AIX).
    FIXUP_KERNEL_SYMBOL_ADDR()   Adjust address in returned struct nlist.
@@ -80,45 +80,23 @@
    We also #define LDAV_PRIVILEGED if a program will require
    special installation to be able to call getloadavg.  */
 
-/* "configure" defines CONFIGURING_GETLOADAVG to sidestep problems
-   with partially-configured source directories.  */
-
-#ifndef CONFIGURING_GETLOADAVG
-# include <config.h>
-# include <stdbool.h>
-#endif
+#include <config.h>
 
 /* Specification.  */
 #include <stdlib.h>
 
 #include <errno.h>
+#include <stdbool.h>
 #include <stdio.h>
 
 # include <sys/types.h>
 
-/* Both the Emacs and non-Emacs sections want this.  Some
-   configuration files' definitions for the LOAD_AVE_CVT macro (like
-   sparc.h's) use macros like FSCALE, defined here.  */
-# if defined (unix) || defined (__unix)
+# if HAVE_SYS_PARAM_H
 #  include <sys/param.h>
 # endif
 
 # include "intprops.h"
 
-/* The existing Emacs configuration files define a macro called
-   LOAD_AVE_CVT, which accepts a value of type LOAD_AVE_TYPE, and
-   returns the load average multiplied by 100.  What we actually want
-   is a macro called LDAV_CVT, which returns the load average as an
-   unmultiplied double.
-
-   For backwards compatibility, we'll define LDAV_CVT in terms of
-   LOAD_AVE_CVT, but future machine config files should just define
-   LDAV_CVT directly.  */
-
-# if !defined (LDAV_CVT) && defined (LOAD_AVE_CVT)
-#  define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0)
-# endif
-
 # if !defined (BSD) && defined (ultrix)
 /* Ultrix behaves like BSD on Vaxen.  */
 #  define BSD
--- a/lib/getlogin_r.c
+++ b/lib/getlogin_r.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert, Derek Price, and Bruno Haible.  */
 
--- a/lib/getpass.c
+++ b/lib/getpass.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
--- a/lib/getpass.h
+++ b/lib/getpass.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef GETPASS_H
 # define GETPASS_H
@@ -22,7 +21,7 @@
 /* Get getpass declaration, if available.  */
 # include <unistd.h>
 
-# if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS
+# if !HAVE_DECL_GETPASS
 /* Read a password of arbitrary length from /dev/tty or stdin.  */
 char *getpass (const char *prompt);
 
new file mode 100644
--- /dev/null
+++ b/lib/getrusage.c
@@ -0,0 +1,131 @@
+/* getrusage replacement for systems which lack it.
+
+   Copyright (C) 2012 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 Bruno Haible, 2012.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <sys/resource.h>
+
+#include <errno.h>
+#include <string.h>
+
+/* Get uint64_t.  */
+#include <stdint.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+#else
+
+# include <sys/times.h>
+# include <unistd.h>
+#endif
+
+int
+getrusage (int who, struct rusage *usage_p)
+{
+  if (who == RUSAGE_SELF || who == RUSAGE_CHILDREN)
+    {
+      /* Clear all unsupported members of 'struct rusage'.  */
+      memset (usage_p, '\0', sizeof (struct rusage));
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+      if (who == RUSAGE_SELF)
+        {
+          /* Fill in the ru_utime and ru_stime members.  */
+          FILETIME creation_time;
+          FILETIME exit_time;
+          FILETIME kernel_time;
+          FILETIME user_time;
+
+          if (GetProcessTimes (GetCurrentProcess (),
+                               &creation_time, &exit_time,
+                               &kernel_time, &user_time))
+            {
+              /* Convert to microseconds, rounding.  */
+              uint64_t kernel_usec =
+                ((((uint64_t) kernel_time.dwHighDateTime << 32)
+                  | (uint64_t) kernel_time.dwLowDateTime)
+                 + 5) / 10;
+              uint64_t user_usec =
+                ((((uint64_t) user_time.dwHighDateTime << 32)
+                  | (uint64_t) user_time.dwLowDateTime)
+                 + 5) / 10;
+
+              usage_p->ru_utime.tv_sec = user_usec / 1000000U;
+              usage_p->ru_utime.tv_usec = user_usec % 1000000U;
+              usage_p->ru_stime.tv_sec = kernel_usec / 1000000U;
+              usage_p->ru_stime.tv_usec = kernel_usec % 1000000U;
+            }
+        }
+#else
+      /* Fill in the ru_utime and ru_stime members.  */
+      {
+        struct tms time;
+
+        if (times (&time) != (clock_t) -1)
+          {
+            /* Number of clock ticks per second.  */
+            unsigned int clocks_per_second = sysconf (_SC_CLK_TCK);
+
+            if (clocks_per_second > 0)
+              {
+                clock_t user_ticks;
+                clock_t system_ticks;
+
+                uint64_t user_usec;
+                uint64_t system_usec;
+
+                if (who == RUSAGE_CHILDREN)
+                  {
+                    user_ticks   = time.tms_cutime;
+                    system_ticks = time.tms_cstime;
+                  }
+                else
+                  {
+                    user_ticks   = time.tms_utime;
+                    system_ticks = time.tms_stime;
+                  }
+
+                user_usec =
+                  (((uint64_t) user_ticks * (uint64_t) 1000000U)
+                   + clocks_per_second / 2) / clocks_per_second;
+                system_usec =
+                  (((uint64_t) system_ticks * (uint64_t) 1000000U)
+                   + clocks_per_second / 2) / clocks_per_second;
+
+                usage_p->ru_utime.tv_sec = user_usec / 1000000U;
+                usage_p->ru_utime.tv_usec = user_usec % 1000000U;
+                usage_p->ru_stime.tv_sec = system_usec / 1000000U;
+                usage_p->ru_stime.tv_usec = system_usec % 1000000U;
+              }
+          }
+      }
+#endif
+
+      return 0;
+    }
+  else
+    {
+      errno = EINVAL;
+      return -1;
+    }
+}
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBGETTEXT_H
 #define _LIBGETTEXT_H 1
@@ -184,9 +183,12 @@
 
 #include <string.h>
 
-#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
-   /* || __STDC_VERSION__ >= 199901L */ )
+#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
+     /* || __STDC_VERSION__ >= 199901L */ )
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
+#else
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
+#endif
 
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
 #include <stdlib.h>
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering */
 
@@ -110,7 +109,18 @@
   struct tm save = *localtime_buffer_addr;
 # endif
 
+# if defined timeval /* 'struct timeval' overridden by gnulib?  */
+#  undef timeval
+  struct timeval otv;
+  int result = gettimeofday (&otv, (struct timezone *) tz);
+  if (result == 0)
+    {
+      tv->tv_sec = otv.tv_sec;
+      tv->tv_usec = otv.tv_usec;
+    }
+# else
   int result = gettimeofday (tv, (struct timezone *) tz);
+# endif
 
 # if GETTIMEOFDAY_CLOBBERS_LOCALTIME
   *localtime_buffer_addr = save;
--- a/lib/git-merge-changelog.c
+++ b/lib/git-merge-changelog.c
@@ -75,7 +75,15 @@
           $ bzr extmerge ChangeLog
 
    Additionally, for hg users:
-     - Add to your $HOME/.hgrc a couple of lines in a section [merge-tools].
+     - Add to your $HOME/.hgrc the lines
+
+        [merge-patterns]
+        ChangeLog = git-merge-changelog
+
+        [merge-tools]
+        git-merge-changelog.executable = /usr/local/bin/git-merge-changelog
+        git-merge-changelog.args = $base $local $other
+
        See <http://www.selenic.com/mercurial/hgrc.5.html> section merge-tools
        for reference.
  */
@@ -958,7 +966,7 @@
   { NULL, 0, NULL, 0 }
 };
 
-/* Print a usage mesage and exit.  */
+/* Print a usage message and exit.  */
 static void
 usage (int status)
 {
@@ -990,7 +998,7 @@
       printf ("  -h, --help                  display this help and exit\n");
       printf ("  -V, --version               output version information and exit\n");
       printf ("\n");
-      fputs ("Report bugs to <bug-gnu-gettext@gnu.org>.\n",
+      fputs ("Report bugs to <bug-gnulib@gnu.org>.\n",
              stdout);
     }
 
--- a/lib/gl_anyrbtree_list1.h
+++ b/lib/gl_anyrbtree_list1.h
@@ -27,7 +27,7 @@
    Let's call this the "black-height" bh of the tree.  It follows that every
    such path contains exactly bh black and between 0 and bh red nodes.  (The
    extreme cases are a path containing only black nodes, and a path colored
-   alternatingly black-red-black-red-...-black-red.)  The height of the tree
+   alternately black-red-black-red-...-black-red.)  The height of the tree
    therefore is >= bh, <= 2*bh.
  */
 
--- a/lib/gl_anyrbtree_list2.h
+++ b/lib/gl_anyrbtree_list2.h
@@ -163,7 +163,7 @@
 
    Change the tree structure, update the branch sizes.
    The caller must update the colors and register D as child of its parent.  */
-static inline gl_list_node_t
+static gl_list_node_t
 rotate_left (gl_list_node_t b_node, gl_list_node_t d_node)
 {
   gl_list_node_t a_node = b_node->left;
@@ -197,7 +197,7 @@
 
    Change the tree structure, update the branch sizes.
    The caller must update the colors and register B as child of its parent.  */
-static inline gl_list_node_t
+static gl_list_node_t
 rotate_right (gl_list_node_t b_node, gl_list_node_t d_node)
 {
   gl_list_node_t a_node = b_node->left;
--- a/lib/gl_anytree_list2.h
+++ b/lib/gl_anytree_list2.h
@@ -137,7 +137,7 @@
 }
 
 /* Return the node at the given position < gl_tree_size (list).  */
-static inline gl_list_node_t
+static gl_list_node_t
 node_at (gl_list_node_t root, size_t position)
 {
   /* Here we know that root != NULL.  */
--- a/lib/gl_anytreehash_list1.h
+++ b/lib/gl_anytreehash_list1.h
@@ -29,7 +29,7 @@
 #define MULTIPLE_NODES_MAGIC  (void *) -1
 
 /* Resize the hash table if needed, after list->count was incremented.  */
-static inline void
+static void
 hash_resize_after_add (gl_list_t list)
 {
   size_t count = (list->root != 0 ? list->root->branch_size : 0);
@@ -87,7 +87,7 @@
 }
 
 /* Return the first element of a non-empty ordered set of nodes.  */
-static inline gl_list_node_t
+static gl_list_node_t
 gl_oset_first (gl_oset_t set)
 {
   gl_oset_iterator_t iter = gl_oset_iterator (set);
@@ -272,7 +272,7 @@
 /* Build up the hash table during initialization: Store all the nodes of
    list->root in the hash table.
    Return 0 upon success, -1 upon out-of-memory.  */
-static inline int
+static int
 add_nodes_to_buckets (gl_list_t list)
 {
   /* Iterate across all nodes.  */
--- a/lib/gl_array_oset.c
+++ b/lib/gl_array_oset.c
@@ -184,7 +184,7 @@
 /* Add the given element ELT at the given position,
    0 <= position <= gl_oset_size (set).
    Return 1 upon success, -1 upon out-of-memory.  */
-static inline int
+static int
 gl_array_nx_add_at (gl_oset_t set, size_t position, const void *elt)
 {
   size_t count = set->count;
@@ -204,7 +204,7 @@
 
 /* Remove the element at the given position,
    0 <= position < gl_oset_size (set).  */
-static inline void
+static void
 gl_array_remove_at (gl_oset_t set, size_t position)
 {
   size_t count = set->count;
--- a/lib/gl_linkedhash_list.c
+++ b/lib/gl_linkedhash_list.c
@@ -43,7 +43,7 @@
 #include "gl_anyhash_list2.h"
 
 /* Resize the hash table if needed, after list->count was incremented.  */
-static inline void
+static void
 hash_resize_after_add (gl_list_t list)
 {
   size_t count = list->count;
@@ -53,7 +53,7 @@
 }
 
 /* Add a node to the hash table structure.  */
-static inline void
+static void
 add_to_bucket (gl_list_t list, gl_list_node_t node)
 {
   size_t bucket = node->h.hashcode % list->table_size;
@@ -65,7 +65,7 @@
 #define add_to_bucket(list,node)  ((add_to_bucket) (list, node), 0)
 
 /* Remove a node from the hash table structure.  */
-static inline void
+static void
 remove_from_bucket (gl_list_t list, gl_list_node_t node)
 {
   size_t bucket = node->h.hashcode % list->table_size;
--- a/lib/gl_list.c
+++ b/lib/gl_list.c
@@ -1,283 +1,3 @@
-/* Abstract sequential list data type.
-   Copyright (C) 2006-2012 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2006.
-
-   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/>.  */
-
 #include <config.h>
-
-/* Specification.  */
+#define GL_LIST_INLINE _GL_EXTERN_INLINE
 #include "gl_list.h"
-
-#if !HAVE_INLINE
-
-/* Define all functions of this file as inline accesses to the
-   struct gl_list_implementation.
-   Use #define to avoid a warning because of extern vs. static.  */
-
-gl_list_t
-gl_list_nx_create_empty (gl_list_implementation_t implementation,
-                         gl_listelement_equals_fn equals_fn,
-                         gl_listelement_hashcode_fn hashcode_fn,
-                         gl_listelement_dispose_fn dispose_fn,
-                         bool allow_duplicates)
-{
-  return implementation->nx_create_empty (implementation, equals_fn,
-                                          hashcode_fn, dispose_fn,
-                                          allow_duplicates);
-}
-
-gl_list_t
-gl_list_nx_create (gl_list_implementation_t implementation,
-                   gl_listelement_equals_fn equals_fn,
-                   gl_listelement_hashcode_fn hashcode_fn,
-                   gl_listelement_dispose_fn dispose_fn,
-                   bool allow_duplicates,
-                   size_t count, const void **contents)
-{
-  return implementation->nx_create (implementation, equals_fn, hashcode_fn,
-                                    dispose_fn, allow_duplicates, count,
-                                    contents);
-}
-
-size_t
-gl_list_size (gl_list_t list)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->size (list);
-}
-
-const void *
-gl_list_node_value (gl_list_t list, gl_list_node_t node)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->node_value (list, node);
-}
-
-int
-gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
-                           const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->node_nx_set_value (list, node, elt);
-}
-
-gl_list_node_t
-gl_list_next_node (gl_list_t list, gl_list_node_t node)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->next_node (list, node);
-}
-
-gl_list_node_t
-gl_list_previous_node (gl_list_t list, gl_list_node_t node)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->previous_node (list, node);
-}
-
-const void *
-gl_list_get_at (gl_list_t list, size_t position)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->get_at (list, position);
-}
-
-gl_list_node_t
-gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->nx_set_at (list, position, elt);
-}
-
-gl_list_node_t
-gl_list_search (gl_list_t list, const void *elt)
-{
-  size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->search_from_to (list, 0, size, elt);
-}
-
-gl_list_node_t
-gl_list_search_from (gl_list_t list, size_t start_index, const void *elt)
-{
-  size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->search_from_to (list, start_index, size, elt);
-}
-
-gl_list_node_t
-gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->search_from_to (list, start_index, end_index, elt);
-}
-
-size_t
-gl_list_indexof (gl_list_t list, const void *elt)
-{
-  size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->indexof_from_to (list, 0, size, elt);
-}
-
-size_t
-gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt)
-{
-  size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->indexof_from_to (list, start_index, size, elt);
-}
-
-size_t
-gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->indexof_from_to (list, start_index, end_index, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_first (gl_list_t list, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->nx_add_first (list, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_last (gl_list_t list, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->nx_add_last (list, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->nx_add_before (list, node, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->nx_add_after (list, node, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->nx_add_at (list, position, elt);
-}
-
-bool
-gl_list_remove_node (gl_list_t list, gl_list_node_t node)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->remove_node (list, node);
-}
-
-bool
-gl_list_remove_at (gl_list_t list, size_t position)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->remove_at (list, position);
-}
-
-bool
-gl_list_remove (gl_list_t list, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->remove_elt (list, elt);
-}
-
-void
-gl_list_free (gl_list_t list)
-{
-  ((const struct gl_list_impl_base *) list)->vtable->list_free (list);
-}
-
-gl_list_iterator_t
-gl_list_iterator (gl_list_t list)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->iterator (list);
-}
-
-gl_list_iterator_t
-gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->iterator_from_to (list, start_index, end_index);
-}
-
-bool
-gl_list_iterator_next (gl_list_iterator_t *iterator,
-                       const void **eltp, gl_list_node_t *nodep)
-{
-  return iterator->vtable->iterator_next (iterator, eltp, nodep);
-}
-
-void
-gl_list_iterator_free (gl_list_iterator_t *iterator)
-{
-  iterator->vtable->iterator_free (iterator);
-}
-
-gl_list_node_t
-gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->sortedlist_search (list, compar, elt);
-}
-
-gl_list_node_t
-gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->sortedlist_search_from_to (list, compar, start_index, end_index,
-                                      elt);
-}
-
-size_t
-gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->sortedlist_indexof (list, compar, elt);
-}
-
-size_t
-gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->sortedlist_indexof_from_to (list, compar, start_index, end_index,
-                                       elt);
-}
-
-gl_list_node_t
-gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->sortedlist_nx_add (list, compar, elt);
-}
-
-bool
-gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
-  return ((const struct gl_list_impl_base *) list)->vtable
-         ->sortedlist_remove (list, compar, elt);
-}
-
-#endif
--- a/lib/gl_list.h
+++ b/lib/gl_list.h
@@ -21,6 +21,11 @@
 #include <stdbool.h>
 #include <stddef.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_LIST_INLINE
+# define GL_LIST_INLINE _GL_INLINE
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -539,14 +544,10 @@
   bool allow_duplicates;
 };
 
-#if HAVE_INLINE
+/* Define all functions of this file as accesses to the
+   struct gl_list_implementation.  */
 
-/* Define all functions of this file as inline accesses to the
-   struct gl_list_implementation.
-   Use #define to avoid a warning because of extern vs. static.  */
-
-# define gl_list_nx_create_empty gl_list_nx_create_empty_inline
-static inline gl_list_t
+GL_LIST_INLINE gl_list_t
 gl_list_nx_create_empty (gl_list_implementation_t implementation,
                          gl_listelement_equals_fn equals_fn,
                          gl_listelement_hashcode_fn hashcode_fn,
@@ -558,8 +559,7 @@
                                           allow_duplicates);
 }
 
-# define gl_list_nx_create gl_list_nx_create_inline
-static inline gl_list_t
+GL_LIST_INLINE gl_list_t
 gl_list_nx_create (gl_list_implementation_t implementation,
                    gl_listelement_equals_fn equals_fn,
                    gl_listelement_hashcode_fn hashcode_fn,
@@ -572,24 +572,21 @@
                                     contents);
 }
 
-# define gl_list_size gl_list_size_inline
-static inline size_t
+GL_LIST_INLINE size_t
 gl_list_size (gl_list_t list)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->size (list);
 }
 
-# define gl_list_node_value gl_list_node_value_inline
-static inline const void *
+GL_LIST_INLINE const void *
 gl_list_node_value (gl_list_t list, gl_list_node_t node)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->node_value (list, node);
 }
 
-# define gl_list_node_nx_set_value gl_list_node_nx_set_value_inline
-static inline int
+GL_LIST_INLINE int
 gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
                            const void *elt)
 {
@@ -597,40 +594,35 @@
          ->node_nx_set_value (list, node, elt);
 }
 
-# define gl_list_next_node gl_list_next_node_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_next_node (gl_list_t list, gl_list_node_t node)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->next_node (list, node);
 }
 
-# define gl_list_previous_node gl_list_previous_node_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_previous_node (gl_list_t list, gl_list_node_t node)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->previous_node (list, node);
 }
 
-# define gl_list_get_at gl_list_get_at_inline
-static inline const void *
+GL_LIST_INLINE const void *
 gl_list_get_at (gl_list_t list, size_t position)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->get_at (list, position);
 }
 
-# define gl_list_nx_set_at gl_list_nx_set_at_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->nx_set_at (list, position, elt);
 }
 
-# define gl_list_search gl_list_search_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_search (gl_list_t list, const void *elt)
 {
   size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -638,8 +630,7 @@
          ->search_from_to (list, 0, size, elt);
 }
 
-# define gl_list_search_from gl_list_search_from_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_search_from (gl_list_t list, size_t start_index, const void *elt)
 {
   size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -647,8 +638,7 @@
          ->search_from_to (list, start_index, size, elt);
 }
 
-# define gl_list_search_from_to gl_list_search_from_to_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
                         const void *elt)
 {
@@ -656,8 +646,7 @@
          ->search_from_to (list, start_index, end_index, elt);
 }
 
-# define gl_list_indexof gl_list_indexof_inline
-static inline size_t
+GL_LIST_INLINE size_t
 gl_list_indexof (gl_list_t list, const void *elt)
 {
   size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -665,8 +654,7 @@
          ->indexof_from_to (list, 0, size, elt);
 }
 
-# define gl_list_indexof_from gl_list_indexof_from_inline
-static inline size_t
+GL_LIST_INLINE size_t
 gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt)
 {
   size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -674,8 +662,7 @@
          ->indexof_from_to (list, start_index, size, elt);
 }
 
-# define gl_list_indexof_from_to gl_list_indexof_from_to_inline
-static inline size_t
+GL_LIST_INLINE size_t
 gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index,
                          const void *elt)
 {
@@ -683,118 +670,103 @@
          ->indexof_from_to (list, start_index, end_index, elt);
 }
 
-# define gl_list_nx_add_first gl_list_nx_add_first_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_nx_add_first (gl_list_t list, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->nx_add_first (list, elt);
 }
 
-# define gl_list_nx_add_last gl_list_nx_add_last_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_nx_add_last (gl_list_t list, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->nx_add_last (list, elt);
 }
 
-# define gl_list_nx_add_before gl_list_nx_add_before_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->nx_add_before (list, node, elt);
 }
 
-# define gl_list_nx_add_after gl_list_nx_add_after_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->nx_add_after (list, node, elt);
 }
 
-# define gl_list_nx_add_at gl_list_nx_add_at_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->nx_add_at (list, position, elt);
 }
 
-# define gl_list_remove_node gl_list_remove_node_inline
-static inline bool
+GL_LIST_INLINE bool
 gl_list_remove_node (gl_list_t list, gl_list_node_t node)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->remove_node (list, node);
 }
 
-# define gl_list_remove_at gl_list_remove_at_inline
-static inline bool
+GL_LIST_INLINE bool
 gl_list_remove_at (gl_list_t list, size_t position)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->remove_at (list, position);
 }
 
-# define gl_list_remove gl_list_remove_inline
-static inline bool
+GL_LIST_INLINE bool
 gl_list_remove (gl_list_t list, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->remove_elt (list, elt);
 }
 
-# define gl_list_free gl_list_free_inline
-static inline void
+GL_LIST_INLINE void
 gl_list_free (gl_list_t list)
 {
   ((const struct gl_list_impl_base *) list)->vtable->list_free (list);
 }
 
-# define gl_list_iterator gl_list_iterator_inline
-static inline gl_list_iterator_t
+GL_LIST_INLINE gl_list_iterator_t
 gl_list_iterator (gl_list_t list)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->iterator (list);
 }
 
-# define gl_list_iterator_from_to gl_list_iterator_from_to_inline
-static inline gl_list_iterator_t
+GL_LIST_INLINE gl_list_iterator_t
 gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->iterator_from_to (list, start_index, end_index);
 }
 
-# define gl_list_iterator_next gl_list_iterator_next_inline
-static inline bool
+GL_LIST_INLINE bool
 gl_list_iterator_next (gl_list_iterator_t *iterator,
                        const void **eltp, gl_list_node_t *nodep)
 {
   return iterator->vtable->iterator_next (iterator, eltp, nodep);
 }
 
-# define gl_list_iterator_free gl_list_iterator_free_inline
-static inline void
+GL_LIST_INLINE void
 gl_list_iterator_free (gl_list_iterator_t *iterator)
 {
   iterator->vtable->iterator_free (iterator);
 }
 
-# define gl_sortedlist_search gl_sortedlist_search_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->sortedlist_search (list, compar, elt);
 }
 
-# define gl_sortedlist_search_from_to gl_sortedlist_search_from_to_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
@@ -802,16 +774,14 @@
                                       elt);
 }
 
-# define gl_sortedlist_indexof gl_sortedlist_indexof_inline
-static inline size_t
+GL_LIST_INLINE size_t
 gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->sortedlist_indexof (list, compar, elt);
 }
 
-# define gl_sortedlist_indexof_from_to gl_sortedlist_indexof_from_to_inline
-static inline size_t
+GL_LIST_INLINE size_t
 gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
@@ -819,26 +789,24 @@
                                        elt);
 }
 
-# define gl_sortedlist_nx_add gl_sortedlist_nx_add_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
 gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->sortedlist_nx_add (list, compar, elt);
 }
 
-# define gl_sortedlist_remove gl_sortedlist_remove_inline
-static inline bool
+GL_LIST_INLINE bool
 gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
 {
   return ((const struct gl_list_impl_base *) list)->vtable
          ->sortedlist_remove (list, compar, elt);
 }
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_LIST_H */
--- a/lib/gl_oset.c
+++ b/lib/gl_oset.c
@@ -1,96 +1,3 @@
-/* Abstract ordered set data type.
-   Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2006.
-
-   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/>.  */
-
 #include <config.h>
-
-/* Specification.  */
+#define GL_OSET_INLINE _GL_EXTERN_INLINE
 #include "gl_oset.h"
-
-#if !HAVE_INLINE
-
-/* Define all functions of this file as inline accesses to the
-   struct gl_list_implementation.
-   Use #define to avoid a warning because of extern vs. static.  */
-
-gl_oset_t
-gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
-                         gl_setelement_compar_fn compar_fn,
-                         gl_setelement_dispose_fn dispose_fn)
-{
-  return implementation->nx_create_empty (implementation, compar_fn,
-                                          dispose_fn);
-}
-
-size_t
-gl_oset_size (gl_oset_t set)
-{
-  return ((const struct gl_oset_impl_base *) set)->vtable->size (set);
-}
-
-bool
-gl_oset_search (gl_oset_t set, const void *elt)
-{
-  return ((const struct gl_oset_impl_base *) set)->vtable->search (set, elt);
-}
-
-bool
-gl_oset_search_atleast (gl_oset_t set,
-                        gl_setelement_threshold_fn threshold_fn,
-                        const void *threshold, const void **eltp)
-{
-  return ((const struct gl_oset_impl_base *) set)->vtable
-         ->search_atleast (set, threshold_fn, threshold, eltp);
-}
-
-int
-gl_oset_nx_add (gl_oset_t set, const void *elt)
-{
-  return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
-}
-
-bool
-gl_oset_remove (gl_oset_t set, const void *elt)
-{
-  return ((const struct gl_oset_impl_base *) set)->vtable
-         ->remove_elt (set, elt);
-}
-
-void
-gl_oset_free (gl_oset_t set)
-{
-  ((const struct gl_oset_impl_base *) set)->vtable->oset_free (set);
-}
-
-gl_oset_iterator_t
-gl_oset_iterator (gl_oset_t set)
-{
-  return ((const struct gl_oset_impl_base *) set)->vtable->iterator (set);
-}
-
-bool
-gl_oset_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
-{
-  return iterator->vtable->iterator_next (iterator, eltp);
-}
-
-void
-gl_oset_iterator_free (gl_oset_iterator_t *iterator)
-{
-  iterator->vtable->iterator_free (iterator);
-}
-
-#endif
--- a/lib/gl_oset.h
+++ b/lib/gl_oset.h
@@ -21,6 +21,11 @@
 #include <stdbool.h>
 #include <stddef.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_OSET_INLINE
+# define GL_OSET_INLINE _GL_INLINE
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -197,14 +202,10 @@
   gl_setelement_dispose_fn dispose_fn;
 };
 
-#if HAVE_INLINE
+/* Define all functions of this file as accesses to the
+   struct gl_oset_implementation.  */
 
-/* Define all functions of this file as inline accesses to the
-   struct gl_oset_implementation.
-   Use #define to avoid a warning because of extern vs. static.  */
-
-# define gl_oset_nx_create_empty gl_oset_nx_create_empty_inline
-static inline gl_oset_t
+GL_OSET_INLINE gl_oset_t
 gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
                          gl_setelement_compar_fn compar_fn,
                          gl_setelement_dispose_fn dispose_fn)
@@ -213,22 +214,19 @@
                                           dispose_fn);
 }
 
-# define gl_oset_size gl_oset_size_inline
-static inline size_t
+GL_OSET_INLINE size_t
 gl_oset_size (gl_oset_t set)
 {
   return ((const struct gl_oset_impl_base *) set)->vtable->size (set);
 }
 
-# define gl_oset_search gl_oset_search_inline
-static inline bool
+GL_OSET_INLINE bool
 gl_oset_search (gl_oset_t set, const void *elt)
 {
   return ((const struct gl_oset_impl_base *) set)->vtable->search (set, elt);
 }
 
-# define gl_oset_search_atleast gl_oset_search_atleast_inline
-static inline bool
+GL_OSET_INLINE bool
 gl_oset_search_atleast (gl_oset_t set,
                         gl_setelement_threshold_fn threshold_fn,
                         const void *threshold, const void **eltp)
@@ -237,53 +235,47 @@
          ->search_atleast (set, threshold_fn, threshold, eltp);
 }
 
-# define gl_oset_nx_add gl_oset_nx_add_inline
-static inline int
+GL_OSET_INLINE int
 gl_oset_nx_add (gl_oset_t set, const void *elt)
 {
   return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
 }
 
-# define gl_oset_remove gl_oset_remove_inline
-static inline bool
+GL_OSET_INLINE bool
 gl_oset_remove (gl_oset_t set, const void *elt)
 {
   return ((const struct gl_oset_impl_base *) set)->vtable
          ->remove_elt (set, elt);
 }
 
-# define gl_oset_free gl_oset_free_inline
-static inline void
+GL_OSET_INLINE void
 gl_oset_free (gl_oset_t set)
 {
   ((const struct gl_oset_impl_base *) set)->vtable->oset_free (set);
 }
 
-# define gl_oset_iterator gl_oset_iterator_inline
-static inline gl_oset_iterator_t
+GL_OSET_INLINE gl_oset_iterator_t
 gl_oset_iterator (gl_oset_t set)
 {
   return ((const struct gl_oset_impl_base *) set)->vtable->iterator (set);
 }
 
-# define gl_oset_iterator_next gl_oset_iterator_next_inline
-static inline bool
+GL_OSET_INLINE bool
 gl_oset_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
 {
   return iterator->vtable->iterator_next (iterator, eltp);
 }
 
-# define gl_oset_iterator_free gl_oset_iterator_free_inline
-static inline void
+GL_OSET_INLINE void
 gl_oset_iterator_free (gl_oset_iterator_t *iterator)
 {
   iterator->vtable->iterator_free (iterator);
 }
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_OSET_H */
--- a/lib/gl_rbtree_oset.c
+++ b/lib/gl_rbtree_oset.c
@@ -32,7 +32,7 @@
    Let's call this the "black-height" bh of the tree.  It follows that every
    such path contains exactly bh black and between 0 and bh red nodes.  (The
    extreme cases are a path containing only black nodes, and a path colored
-   alternatingly black-red-black-red-...-black-red.)  The height of the tree
+   alternately black-red-black-red-...-black-red.)  The height of the tree
    therefore is >= bh, <= 2*bh.
  */
 
@@ -82,7 +82,7 @@
 
    Change the tree structure, update the branch sizes.
    The caller must update the colors and register D as child of its parent.  */
-static inline gl_oset_node_t
+static gl_oset_node_t
 rotate_left (gl_oset_node_t b_node, gl_oset_node_t d_node)
 {
   gl_oset_node_t c_node = d_node->left;
@@ -108,7 +108,7 @@
 
    Change the tree structure, update the branch sizes.
    The caller must update the colors and register B as child of its parent.  */
-static inline gl_oset_node_t
+static gl_oset_node_t
 rotate_right (gl_oset_node_t b_node, gl_oset_node_t d_node)
 {
   gl_oset_node_t c_node = b_node->right;
--- a/lib/gl_xlist.c
+++ b/lib/gl_xlist.c
@@ -1,128 +1,3 @@
-/* Abstract sequential list data type, with out-of-memory checking.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2009.
-
-   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/>.  */
-
 #include <config.h>
-
-/* Specification.  */
+#define GL_XLIST_INLINE _GL_EXTERN_INLINE
 #include "gl_xlist.h"
-
-#if !HAVE_INLINE
-
-gl_list_t
-gl_list_create_empty (gl_list_implementation_t implementation,
-                      gl_listelement_equals_fn equals_fn,
-                      gl_listelement_hashcode_fn hashcode_fn,
-                      gl_listelement_dispose_fn dispose_fn,
-                      bool allow_duplicates)
-{
-  gl_list_t result =
-    gl_list_nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn,
-                             allow_duplicates);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-gl_list_t
-gl_list_create (gl_list_implementation_t implementation,
-                gl_listelement_equals_fn equals_fn,
-                gl_listelement_hashcode_fn hashcode_fn,
-                gl_listelement_dispose_fn dispose_fn,
-                bool allow_duplicates,
-                size_t count, const void **contents)
-{
-  gl_list_t result =
-    gl_list_nx_create (implementation, equals_fn, hashcode_fn, dispose_fn,
-                       allow_duplicates, count, contents);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-void
-gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
-{
-  int result = gl_list_node_nx_set_value (list, node, elt);
-  if (result < 0)
-    xalloc_die ();
-}
-
-gl_list_node_t
-gl_list_set_at (gl_list_t list, size_t position, const void *elt)
-{
-  gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-gl_list_node_t
-gl_list_add_first (gl_list_t list, const void *elt)
-{
-  gl_list_node_t result = gl_list_nx_add_first (list, elt);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-gl_list_node_t
-gl_list_add_last (gl_list_t list, const void *elt)
-{
-  gl_list_node_t result = gl_list_nx_add_last (list, elt);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-gl_list_node_t
-gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
-{
-  gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-gl_list_node_t
-gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
-{
-  gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-gl_list_node_t
-gl_list_add_at (gl_list_t list, size_t position, const void *elt)
-{
-  gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-gl_list_node_t
-gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
-                   const void *elt)
-{
-  gl_list_node_t result = gl_sortedlist_nx_add (list, compar, elt);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-#endif
--- a/lib/gl_xlist.h
+++ b/lib/gl_xlist.h
@@ -21,6 +21,11 @@
 #include "gl_list.h"
 #include "xalloc.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_XLIST_INLINE
+# define GL_XLIST_INLINE _GL_INLINE
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -55,10 +60,7 @@
                                          gl_listelement_compar_fn compar,
                                          const void *elt);
 
-#if HAVE_INLINE
-
-# define gl_list_create_empty gl_list_create_empty_inline
-static inline gl_list_t
+GL_XLIST_INLINE gl_list_t
 gl_list_create_empty (gl_list_implementation_t implementation,
                       gl_listelement_equals_fn equals_fn,
                       gl_listelement_hashcode_fn hashcode_fn,
@@ -73,8 +75,7 @@
   return result;
 }
 
-# define gl_list_create gl_list_create_inline
-static inline gl_list_t
+GL_XLIST_INLINE gl_list_t
 gl_list_create (gl_list_implementation_t implementation,
                 gl_listelement_equals_fn equals_fn,
                 gl_listelement_hashcode_fn hashcode_fn,
@@ -90,8 +91,7 @@
   return result;
 }
 
-# define gl_list_node_set_value gl_list_node_set_value_inline
-static inline void
+GL_XLIST_INLINE void
 gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
 {
   int result = gl_list_node_nx_set_value (list, node, elt);
@@ -99,8 +99,7 @@
     xalloc_die ();
 }
 
-# define gl_list_set_at gl_list_set_at_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
 gl_list_set_at (gl_list_t list, size_t position, const void *elt)
 {
   gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
@@ -109,8 +108,7 @@
   return result;
 }
 
-# define gl_list_add_first gl_list_add_first_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
 gl_list_add_first (gl_list_t list, const void *elt)
 {
   gl_list_node_t result = gl_list_nx_add_first (list, elt);
@@ -119,8 +117,7 @@
   return result;
 }
 
-# define gl_list_add_last gl_list_add_last_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
 gl_list_add_last (gl_list_t list, const void *elt)
 {
   gl_list_node_t result = gl_list_nx_add_last (list, elt);
@@ -129,8 +126,7 @@
   return result;
 }
 
-# define gl_list_add_before gl_list_add_before_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
 gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
 {
   gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
@@ -139,8 +135,7 @@
   return result;
 }
 
-# define gl_list_add_after gl_list_add_after_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
 gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
 {
   gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
@@ -149,8 +144,7 @@
   return result;
 }
 
-# define gl_list_add_at gl_list_add_at_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
 gl_list_add_at (gl_list_t list, size_t position, const void *elt)
 {
   gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
@@ -159,8 +153,7 @@
   return result;
 }
 
-# define gl_sortedlist_add gl_sortedlist_add_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
 gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
                    const void *elt)
 {
@@ -170,10 +163,10 @@
   return result;
 }
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_XLIST_H */
--- a/lib/gl_xoset.c
+++ b/lib/gl_xoset.c
@@ -1,46 +1,3 @@
-/* Abstract ordered set data type, with out-of-memory checking.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2009.
-
-   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/>.  */
-
 #include <config.h>
-
-/* Specification.  */
+#define GL_XOSET_INLINE _GL_EXTERN_INLINE
 #include "gl_xoset.h"
-
-#if !HAVE_INLINE
-
-gl_oset_t
-gl_oset_create_empty (gl_oset_implementation_t implementation,
-                      gl_setelement_compar_fn compar_fn,
-                      gl_setelement_dispose_fn dispose_fn)
-{
-  gl_oset_t result =
-    gl_oset_nx_create_empty (implementation, compar_fn, dispose_fn);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-bool
-gl_oset_add (gl_oset_t set, const void *elt)
-{
-  int result = gl_oset_nx_add (set, elt);
-  if (result < 0)
-    xalloc_die ();
-  return result;
-}
-
-#endif
--- a/lib/gl_xoset.h
+++ b/lib/gl_xoset.h
@@ -21,6 +21,12 @@
 #include "gl_oset.h"
 #include "xalloc.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_XOSET_INLINE
+# define GL_XOSET_INLINE _GL_INLINE
+#endif
+
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -33,10 +39,7 @@
                                        gl_setelement_dispose_fn dispose_fn);
 extern bool gl_oset_add (gl_oset_t set, const void *elt);
 
-#if HAVE_INLINE
-
-# define gl_oset_create_empty gl_oset_create_empty_inline
-static inline gl_oset_t
+GL_XOSET_INLINE gl_oset_t
 gl_oset_create_empty (gl_oset_implementation_t implementation,
                       gl_setelement_compar_fn compar_fn,
                       gl_setelement_dispose_fn dispose_fn)
@@ -48,8 +51,7 @@
   return result;
 }
 
-# define gl_oset_add gl_oset_add_inline
-static inline bool
+GL_XOSET_INLINE bool
 gl_oset_add (gl_oset_t set, const void *elt)
 {
   int result = gl_oset_nx_add (set, elt);
@@ -58,10 +60,10 @@
   return result;
 }
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_XOSET_H */
--- a/lib/gl_xsublist.c
+++ b/lib/gl_xsublist.c
@@ -1,35 +1,3 @@
-/* Sequential list data type backed by another list, with out-of-memory
-   checking.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
-   Written by Bruno Haible <bruno@clisp.org>, 2009.
-
-   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/>.  */
-
 #include <config.h>
-
-/* Specification.  */
+#define GL_XSUBLIST_INLINE _GL_EXTERN_INLINE
 #include "gl_xsublist.h"
-
-#if !HAVE_INLINE
-
-gl_list_t
-gl_sublist_create (gl_list_t whole_list, size_t start_index, size_t end_index)
-{
-  gl_list_t result = gl_sublist_nx_create (whole_list, start_index, end_index);
-  if (result == NULL)
-    xalloc_die ();
-  return result;
-}
-
-#endif
--- a/lib/gl_xsublist.h
+++ b/lib/gl_xsublist.h
@@ -22,6 +22,11 @@
 #include "gl_sublist.h"
 #include "xalloc.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_XSUBLIST_INLINE
+# define GL_XSUBLIST_INLINE _GL_INLINE
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -29,13 +34,7 @@
 /* These functions are thin wrappers around the corresponding functions with
    _nx_ infix from gl_sublist.h.  Upon out-of-memory, they invoke
    xalloc_die (), instead of returning an error indicator.  */
-extern gl_list_t gl_sublist_create (gl_list_t whole_list,
-                                    size_t start_index, size_t end_index);
-
-#if HAVE_INLINE
-
-# define gl_sublist_create gl_sublist_create_inline
-static inline gl_list_t
+GL_XSUBLIST_INLINE gl_list_t
 gl_sublist_create (gl_list_t whole_list, size_t start_index, size_t end_index)
 {
   gl_list_t result = gl_sublist_nx_create (whole_list, start_index, end_index);
@@ -44,10 +43,10 @@
   return result;
 }
 
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_XSUBLIST_H */
--- a/lib/glob.in.h
+++ b/lib/glob.in.h
@@ -15,8 +15,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_GLOB_H
 #define _GL_GLOB_H
--- a/lib/glthread/cond.c
+++ b/lib/glthread/cond.c
@@ -12,14 +12,14 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Yoann Vandoorselaere <yoann@prelude-ids.org>, 2008,
    and Bruno Haible <bruno@clisp.org>, 2008.  */
 
 #include <config.h>
 
+#define _GLTHREAD_COND_INLINE _GL_EXTERN_INLINE
 #include "glthread/cond.h"
 
 /* ========================================================================= */
@@ -91,7 +91,7 @@
                    This field is immutable once initialized. */
 };
 
-static inline void
+static void
 gl_waitqueue_init (gl_waitqueue_t *wq)
 {
   wq->wq_list.wql_next = &wq->wq_list;
@@ -135,7 +135,7 @@
 /* Removes the current thread, represented by a 'struct gl_waitqueue_element *',
    from a wait queue.
    Returns true if is was found and removed, false if it was not present.  */
-static inline bool
+static bool
 gl_waitqueue_remove (gl_waitqueue_t *wq, struct gl_waitqueue_element *elt)
 {
   if (elt->link.wql_next != NULL && elt->link.wql_prev != NULL)
@@ -154,7 +154,7 @@
 }
 
 /* Notifies the first thread from a wait queue and dequeues it.  */
-static inline void
+static void
 gl_waitqueue_notify_first (gl_waitqueue_t *wq)
 {
   if (wq->wq_list.wql_next != &wq->wq_list)
@@ -179,7 +179,7 @@
 }
 
 /* Notifies all threads from a wait queue and dequeues them all.  */
-static inline void
+static void
 gl_waitqueue_notify_all (gl_waitqueue_t *wq)
 {
   struct gl_waitqueue_link *l;
--- a/lib/glthread/cond.h
+++ b/lib/glthread/cond.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Yoann Vandoorselaere <yoann@prelude-ids.org>, 2008.
    Based on Bruno Haible <bruno@clisp.org> lock.h */
@@ -56,6 +55,11 @@
 
 #include "glthread/lock.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GLTHREAD_COND_INLINE
+# define _GLTHREAD_COND_INLINE _GL_INLINE
+#endif
+
 /* ========================================================================= */
 
 #if USE_POSIX_THREADS
@@ -370,7 +374,7 @@
    while (0)
 #define gl_cond_timedwait(COND, LOCK, ABSTIME) \
   gl_cond_timedwait_func (&COND, &LOCK, ABSTIME)
-static inline bool
+_GLTHREAD_COND_INLINE bool
 gl_cond_timedwait_func (gl_cond_t *cond, gl_lock_t *lock, struct timespec *abstime)
 {
   int err = glthread_cond_timedwait (cond, lock, abstime);
@@ -406,4 +410,6 @@
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GLTHREAD_COND_H */
--- a/lib/glthread/lock.c
+++ b/lib/glthread/lock.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
    Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
@@ -683,7 +682,7 @@
 /* In this file, the waitqueues are implemented as circular arrays.  */
 #define gl_waitqueue_t gl_carray_waitqueue_t
 
-static inline void
+static void
 gl_waitqueue_init (gl_waitqueue_t *wq)
 {
   wq->array = NULL;
@@ -744,7 +743,7 @@
 }
 
 /* Notifies the first thread from a wait queue and dequeues it.  */
-static inline void
+static void
 gl_waitqueue_notify_first (gl_waitqueue_t *wq)
 {
   SetEvent (wq->array[wq->offset + 0]);
@@ -755,7 +754,7 @@
 }
 
 /* Notifies all threads from a wait queue and dequeues them all.  */
-static inline void
+static void
 gl_waitqueue_notify_all (gl_waitqueue_t *wq)
 {
   unsigned int i;
--- a/lib/glthread/lock.h
+++ b/lib/glthread/lock.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
    Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
--- a/lib/glthread/thread.c
+++ b/lib/glthread/thread.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
    Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
@@ -22,6 +21,7 @@
 #include <config.h>
 
 /* Specification.  */
+# define _GLTHREAD_THREAD_INLINE _GL_EXTERN_INLINE
 #include "glthread/thread.h"
 
 #include <stdlib.h>
@@ -86,7 +86,7 @@
 };
 
 /* Return a real HANDLE object for the current thread.  */
-static inline HANDLE
+static HANDLE
 get_current_thread_handle (void)
 {
   HANDLE this_handle;
--- a/lib/glthread/thread.h
+++ b/lib/glthread/thread.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2005.
    Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
@@ -75,6 +74,11 @@
 #include <errno.h>
 #include <stdlib.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GLTHREAD_THREAD_INLINE
+# define _GLTHREAD_THREAD_INLINE _GL_INLINE
+#endif
+
 /* ========================================================================= */
 
 #if USE_POSIX_THREADS
@@ -361,7 +365,7 @@
 extern "C" {
 #endif
 
-static inline gl_thread_t
+_GLTHREAD_THREAD_INLINE gl_thread_t
 gl_thread_create (void *(*func) (void *arg), void *arg)
 {
   gl_thread_t thread;
@@ -398,4 +402,6 @@
 }
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GLTHREAD_THREAD_H */
--- a/lib/glthread/threadlib.c
+++ b/lib/glthread/threadlib.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2005.  */
 
--- a/lib/glthread/yield.h
+++ b/lib/glthread/yield.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file contains a primitive for yielding the processor to other threads.
      extern void gl_thread_yield (void);
--- a/lib/grantpt.c
+++ b/lib/grantpt.c
@@ -21,7 +21,6 @@
 
 #include <assert.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <string.h>
 #include <sys/wait.h>
 #include <unistd.h>
@@ -50,8 +49,6 @@
 #if defined __OpenBSD__
   /* On OpenBSD, master and slave of a pseudo-terminal are allocated together,
      through an ioctl on /dev/ptm.  There is no need for grantpt().  */
-  if (fcntl (fd, F_GETFD) < 0)
-    return -1;
   return 0;
 #else
   /* This function is most often called from a process without 'root'
--- a/lib/group-member.c
+++ b/lib/group-member.c
@@ -21,52 +21,49 @@
 /* Specification.  */
 #include <unistd.h>
 
-#include <stdbool.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <stdlib.h>
 
-#include "xalloc.h"
+#include "xalloc-oversized.h"
+
+/* Most processes have no more than this many groups, and for these
+   processes we can avoid using malloc.  */
+enum { GROUPBUF_SIZE = 100 };
 
 struct group_info
   {
-    int n_groups;
     gid_t *group;
+    gid_t groupbuf[GROUPBUF_SIZE];
   };
 
 static void
 free_group_info (struct group_info const *g)
 {
-  free (g->group);
+  if (g->group != g->groupbuf)
+    free (g->group);
 }
 
-static bool
+static int
 get_group_info (struct group_info *gi)
 {
-  int n_groups;
-  int n_group_slots = getgroups (0, NULL);
-  gid_t *group;
-
-  if (n_group_slots < 0)
-    return false;
+  int n_groups = getgroups (GROUPBUF_SIZE, gi->groupbuf);
+  gi->group = gi->groupbuf;
 
-  /* Avoid xnmalloc, as it goes awry when SIZE_MAX < n_group_slots.  */
-  if (xalloc_oversized (n_group_slots, sizeof *group))
-    xalloc_die ();
-  group = xmalloc (n_group_slots * sizeof *group);
-  n_groups = getgroups (n_group_slots, group);
-
-  /* In case of error, the user loses. */
   if (n_groups < 0)
     {
-      free (group);
-      return false;
+      int n_group_slots = getgroups (0, NULL);
+      if (0 <= n_group_slots
+          && ! xalloc_oversized (n_group_slots, sizeof *gi->group))
+        {
+          gi->group = malloc (n_group_slots * sizeof *gi->group);
+          if (gi->group)
+            n_groups = getgroups (n_group_slots, gi->group);
+        }
     }
 
-  gi->n_groups = n_groups;
-  gi->group = group;
-
-  return true;
+  /* In case of error, the user loses.  */
+  return n_groups;
 }
 
 /* Return non-zero if GID is one that we have in our groups list.
@@ -80,13 +77,11 @@
   int i;
   int found;
   struct group_info gi;
-
-  if (! get_group_info (&gi))
-    return 0;
+  int n_groups = get_group_info (&gi);
 
   /* Search through the list looking for GID. */
   found = 0;
-  for (i = 0; i < gi.n_groups; i++)
+  for (i = 0; i < n_groups; i++)
     {
       if (gid == gi.group[i])
         {
new file mode 100644
--- /dev/null
+++ b/lib/hash-pjw-bare.c
@@ -0,0 +1,42 @@
+/* hash-pjw-bare.c -- compute a hash value from a provided buffer.
+
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser 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
+   Lesser General Public License for more details.
+
+   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>
+
+#include "hash-pjw-bare.h"
+
+#include <limits.h>
+
+#define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+/* Return a hash of the N bytes of X using the method described by
+   Bruno Haible in http://www.haible.de/bruno/hashfunc.html.
+   Note that while many hash functions reduce their result via modulo
+   to a 0..table_size-1 range, this function does not do that.  */
+
+size_t
+hash_pjw_bare (const void *x, size_t n)
+{
+  const unsigned char *s = x;
+  size_t h = 0;
+  unsigned i;
+
+  for (i = 0; i < n; i++)
+    h = s[i] + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+  return h;
+}
new file mode 100644
--- /dev/null
+++ b/lib/hash-pjw-bare.h
@@ -0,0 +1,24 @@
+/* hash-pjw-bare.h -- declaration for a simple hash function
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser 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
+   Lesser General Public License for more details.
+
+   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 <stddef.h>
+
+/* Compute a hash code for a buffer starting at X and of size N,
+   and return the hash code.  Note that unlike hash_pjw(), it does not
+   return it modulo a table size.
+   The result is platform dependent: it depends on the size of the 'size_t'
+   type and on the signedness of the 'char' type.  */
+extern size_t hash_pjw_bare (const void *x, size_t n) _GL_ATTRIBUTE_PURE;
--- a/lib/hmac-md5.c
+++ b/lib/hmac-md5.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  */
 
--- a/lib/hmac-sha1.c
+++ b/lib/hmac-sha1.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  */
 
--- a/lib/hmac.h
+++ b/lib/hmac.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  */
 
new file mode 100644
--- /dev/null
+++ b/lib/hypot.c
@@ -0,0 +1,79 @@
+/* Hypotenuse of a right-angled triangle.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+double
+hypot (double x, double y)
+{
+  if (isfinite (x) && isfinite (y))
+    {
+      /* Determine absolute values.  */
+      x = fabs (x);
+      y = fabs (y);
+
+      {
+        /* Find the bigger and the smaller one.  */
+        double a;
+        double b;
+
+        if (x >= y)
+          {
+            a = x;
+            b = y;
+          }
+        else
+          {
+            a = y;
+            b = x;
+          }
+        /* Now 0 <= b <= a.  */
+
+        {
+          int e;
+          double an;
+          double bn;
+
+          /* Write a = an * 2^e, b = bn * 2^e with 0 <= bn <= an < 1.  */
+          an = frexp (a, &e);
+          bn = ldexp (b, - e);
+
+          {
+            double cn;
+
+            /* Through the normalization, no unneeded overflow or underflow
+               will occur here.  */
+            cn = sqrt (an * an + bn * bn);
+            return ldexp (cn, e);
+          }
+        }
+      }
+    }
+  else
+    {
+      if (isinf (x) || isinf (y))
+        /* x or y is infinite.  Return +Infinity.  */
+        return HUGE_VAL;
+      else
+        /* x or y is NaN.  Return NaN.  */
+        return x + y;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/lib/hypotf.c
@@ -0,0 +1,26 @@
+/* Hypotenuse of a right-angled triangle.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+float
+hypotf (float x, float y)
+{
+  return (float) hypot ((double) x, (double) y);
+}
new file mode 100644
--- /dev/null
+++ b/lib/hypotl.c
@@ -0,0 +1,91 @@
+/* Hypotenuse of a right-angled triangle.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+hypotl (long double x, long double y)
+{
+  return hypot (x, y);
+}
+
+#else
+
+long double
+hypotl (long double x, long double y)
+{
+  if (isfinite (x) && isfinite (y))
+    {
+      /* Determine absolute values.  */
+      x = fabsl (x);
+      y = fabsl (y);
+
+      {
+        /* Find the bigger and the smaller one.  */
+        long double a;
+        long double b;
+
+        if (x >= y)
+          {
+            a = x;
+            b = y;
+          }
+        else
+          {
+            a = y;
+            b = x;
+          }
+        /* Now 0 <= b <= a.  */
+
+        {
+          int e;
+          long double an;
+          long double bn;
+
+          /* Write a = an * 2^e, b = bn * 2^e with 0 <= bn <= an < 1.  */
+          an = frexpl (a, &e);
+          bn = ldexpl (b, - e);
+
+          {
+            long double cn;
+
+            /* Through the normalization, no unneeded overflow or underflow
+               will occur here.  */
+            cn = sqrtl (an * an + bn * bn);
+            return ldexpl (cn, e);
+          }
+        }
+      }
+    }
+  else
+    {
+      if (isinf (x) || isinf (y))
+        /* x or y is infinite.  Return +Infinity.  */
+        return HUGE_VALL;
+      else
+        /* x or y is NaN.  Return NaN.  */
+        return x + y;
+    }
+}
+
+#endif
--- a/lib/iconv.c
+++ b/lib/iconv.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/iconv.in.h
+++ b/lib/iconv.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_ICONV_H
 
--- a/lib/iconv_close.c
+++ b/lib/iconv_close.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/iconv_open.c
+++ b/lib/iconv_open.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -57,7 +56,7 @@
      iconv() to these encoding inserts a BOM, which is wrong.
      We do not need to handle conversion between arbitrary encodings and
      UTF-{16,32}{BE,LE}, because the 'striconveh' module implements two-step
-     conversion throough UTF-8.
+     conversion through UTF-8.
      The _ICONV_* constants are chosen to be disjoint from any iconv_t
      returned by the system's iconv_open() functions.  Recall that iconv_t
      is a scalar type.  */
--- a/lib/idpriv-drop.c
+++ b/lib/idpriv-drop.c
@@ -42,7 +42,7 @@
      setresuid.  */
   if (setresgid (gid, gid, gid) < 0)
     return -1;
-#elif HAVE_SETREGID /* MacOS X, NetBSD, AIX, IRIX, Solaris, OSF/1, Cygwin */
+#elif HAVE_SETREGID /* Mac OS X, NetBSD, AIX, IRIX, Solaris, OSF/1, Cygwin */
   if (setregid (gid, gid) < 0)
     return -1;
 #elif HAVE_SETEGID /* Solaris 2.4 */
@@ -61,7 +61,7 @@
      is used seems to vary a lot."  */
   if (setresuid (uid, uid, uid) < 0)
     return -1;
-#elif HAVE_SETREUID /* MacOS X, NetBSD, AIX, IRIX, Solaris, OSF/1, Cygwin */
+#elif HAVE_SETREUID /* Mac OS X, NetBSD, AIX, IRIX, Solaris, OSF/1, Cygwin */
   if (setreuid (uid, uid) < 0)
     return -1;
 #elif HAVE_SETEUID /* Solaris 2.4 */
--- a/lib/idpriv-droptemp.c
+++ b/lib/idpriv-droptemp.c
@@ -51,7 +51,7 @@
 # if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */
   if (setresgid (-1, gid, saved_gid) < 0)
     return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
   if (setregid (-1, gid) < 0)
     return -1;
 # endif
@@ -62,7 +62,7 @@
      figure 14.  */
   if (setresuid (-1, uid, saved_uid) < 0)
     return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
   if (setreuid (-1, uid) < 0)
     return -1;
 # endif
@@ -138,7 +138,7 @@
      figure 14.  */
   if (setresuid (-1, saved_uid, -1) < 0)
     return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
   if (setreuid (-1, saved_uid) < 0)
     return -1;
 # endif
@@ -147,7 +147,7 @@
 # if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */
   if (setresgid (-1, saved_gid, -1) < 0)
     return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
   if (setregid (-1, saved_gid) < 0)
     return -1;
 # endif
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -35,16 +35,6 @@
 #ifndef _GL_IGNORE_VALUE_H
 # define _GL_IGNORE_VALUE_H
 
-# ifndef _GL_ATTRIBUTE_DEPRECATED
-/* The __attribute__((__deprecated__)) feature
-   is available in gcc versions 3.1 and newer.  */
-#  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)
-#   define _GL_ATTRIBUTE_DEPRECATED /* empty */
-#  else
-#   define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-#  endif
-# endif
-
 /* The __attribute__((__warn_unused_result__)) feature
    is available in gcc versions 3.4 and newer,
    while the typeof feature has been available since 2.7 at least.  */
new file mode 100644
--- /dev/null
+++ b/lib/ilogb.c
@@ -0,0 +1,68 @@
+/* Floating-point exponent.
+   Copyright (C) 2012 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/>.  */
+
+#if ! (defined USE_LONG_DOUBLE || defined USE_FLOAT)
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include <math.h>
+
+#include <limits.h>
+
+#ifdef USE_LONG_DOUBLE
+# define ILOGB ilogbl
+# define DOUBLE long double
+# define L_(literal) literal##L
+# define FREXP frexpl
+# define ISNAN isnanl
+#elif ! defined USE_FLOAT
+# define ILOGB ilogb
+# define DOUBLE double
+# define L_(literal) literal
+# define FREXP frexp
+# define ISNAN isnand
+#else /* defined USE_FLOAT */
+# define ILOGB ilogbf
+# define DOUBLE float
+# define L_(literal) literal##f
+# define FREXP frexpf
+# define ISNAN isnanf
+#endif
+
+int
+ILOGB (DOUBLE x)
+{
+  if (isfinite (x))
+    {
+      if (x == L_(0.0))
+        return FP_ILOGB0;
+      else
+        {
+          int e;
+
+          (void) FREXP (x, &e);
+          return e - 1;
+        }
+    }
+  else
+    {
+      if (ISNAN (x))
+        return FP_ILOGBNAN;
+      else
+        return INT_MAX;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/lib/ilogbf.c
@@ -0,0 +1,23 @@
+/* Floating-point exponent.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#define USE_FLOAT
+#include "ilogb.c"
new file mode 100644
--- /dev/null
+++ b/lib/ilogbl.c
@@ -0,0 +1,35 @@
+/* Floating-point exponent.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+int
+ilogbl (long double x)
+{
+  return ilogb (x);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "ilogb.c"
+
+#endif
--- a/lib/inet_ntop.c
+++ b/lib/inet_ntop.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /*
  * Copyright (c) 1996-1999 by Internet Software Consortium.
@@ -38,6 +37,16 @@
 /* Specification.  */
 #include <arpa/inet.h>
 
+/* Use this to suppress gcc's "...may be used before initialized" warnings.
+   Beware: The Code argument must not contain commas.  */
+#ifndef IF_LINT
+# ifdef lint
+#  define IF_LINT(Code) Code
+# else
+#  define IF_LINT(Code) /* empty */
+# endif
+#endif
+
 #if HAVE_DECL_INET_NTOP
 
 # undef inet_ntop
@@ -167,6 +176,8 @@
     words[i / 2] = (src[i] << 8) | src[i + 1];
   best.base = -1;
   cur.base = -1;
+  IF_LINT(best.len = 0);
+  IF_LINT(cur.len = 0);
   for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
     {
       if (words[i] == 0)
--- a/lib/integer_length.c
+++ b/lib/integer_length.c
@@ -25,6 +25,12 @@
 
 #include "float+.h"
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 #define NBITS (sizeof (unsigned int) * CHAR_BIT)
 
 int
--- a/lib/ioctl.c
+++ b/lib/ioctl.c
@@ -46,7 +46,13 @@
 
 # include <errno.h>
 
+/* Get HANDLE.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
 # include "fd-hook.h"
+/* Get _get_osfhandle.  */
+# include "msvc-nothrow.h"
 
 static int
 primary_ioctl (int fd, int request, void *arg)
@@ -55,7 +61,10 @@
      fds non-blocking, use the gnulib 'nonblocking' module, until
      gnulib implements fcntl F_GETFL / F_SETFL with O_NONBLOCK.  */
 
-  errno = ENOSYS;
+  if ((HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE)
+    errno = ENOSYS;
+  else
+    errno = EBADF;
   return -1;
 }
 
--- a/lib/isatty.c
+++ b/lib/isatty.c
@@ -34,10 +34,10 @@
 
 /* Optimized test whether a HANDLE refers to a console.
    See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>.  */
-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
 
 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
 _isatty_nothrow (int fd)
 {
   int result;
@@ -48,8 +48,7 @@
     }
   CATCH_MSVC_INVAL
     {
-      result = -1;
-      errno = EBADF;
+      result = 0;
     }
   DONE_MSVC_INVAL;
 
@@ -59,15 +58,24 @@
 # define _isatty_nothrow _isatty
 #endif
 
+/* Determine whether FD refers to a console device.  Return 1 if yes.
+   Return 0 and set errno if no. (ptsname_r relies on the errno value.)  */
 int
 isatty (int fd)
 {
-  /* _isatty (fd) tests whether GetFileType of the handle is FILE_TYPE_CHAR.  */
+  HANDLE h = (HANDLE) _get_osfhandle (fd);
+  if (h == INVALID_HANDLE_VALUE)
+    {
+      errno = EBADF;
+      return 0;
+    }
+  /* _isatty (fd) tests whether GetFileType of the handle is FILE_TYPE_CHAR.
+     But it does not set errno when it returns 0.  */
   if (_isatty_nothrow (fd))
     {
-      HANDLE h = (HANDLE) _get_osfhandle (fd);
-      return IsConsoleHandle (h);
+      if (IsConsoleHandle (h))
+        return 1;
     }
-  else
-    return 0;
+  errno = ENOTTY;
+  return 0;
 }
--- a/lib/isfinite.c
+++ b/lib/isfinite.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ben Pfaff <blp@gnu.org>, 2007. */
 
--- a/lib/isinf.c
+++ b/lib/isinf.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ben Pfaff <blp@gnu.org>, 2008. */
 
--- a/lib/isnanf-nolibm.h
+++ b/lib/isnanf-nolibm.h
@@ -24,6 +24,13 @@
 # elif defined isnan
 #  undef isnanf
 #  define isnanf(x) isnan ((float)(x))
+# else
+   /* Get declaration of isnanf(), if not declared in <math.h>.  */
+#  if defined __sgi
+   /* We can't include <ieeefp.h>, because it conflicts with our definition of
+      isnand.  Therefore declare isnanf separately.  */
+extern int isnanf (float x);
+#  endif
 # endif
 #else
 /* Test whether X is a NaN.  */
--- a/lib/iswblank.c
+++ b/lib/iswblank.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/langinfo.in.h
+++ b/lib/langinfo.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /*
  * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
--- a/lib/link.c
+++ b/lib/link.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>.  */
 
@@ -30,7 +29,7 @@
 #include <stdlib.h>
 
 #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
-# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
 #endif
 
 #if defined _WIN32 || defined __WIN32__
@@ -543,5 +542,12 @@
   if (codeset[0] == '\0')
     codeset = "ASCII";
 
+#ifdef DARWIN7
+  /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
+     (the default codeset) does not work when MB_CUR_MAX is 1.  */
+  if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
+    codeset = "ASCII";
+#endif
+
   return codeset;
 }
--- a/lib/localcharset.h
+++ b/lib/localcharset.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LOCALCHARSET_H
 #define _LOCALCHARSET_H
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -30,7 +30,7 @@
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
 
-/* MacOS X 10.5 defines the locale_t type in <xlocale.h>.  */
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>.  */
 #if @HAVE_XLOCALE_H@
 # include <xlocale.h>
 #endif
@@ -47,6 +47,111 @@
 # define LC_MESSAGES 1729
 #endif
 
+/* Bionic libc's 'struct lconv' is just a dummy.  */
+#if @REPLACE_STRUCT_LCONV@
+# define lconv rpl_lconv
+struct lconv
+{
+  /* All 'char *' are actually 'const char *'.  */
+
+  /* Members that depend on the LC_NUMERIC category of the locale.  See
+     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
+
+  /* Symbol used as decimal point.  */
+  char *decimal_point;
+  /* Symbol used to separate groups of digits to the left of the decimal
+     point.  */
+  char *thousands_sep;
+  /* Definition of the size of groups of digits to the left of the decimal
+     point.  */
+  char *grouping;
+
+  /* Members that depend on the LC_MONETARY category of the locale.  See
+     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
+
+  /* Symbol used as decimal point.  */
+  char *mon_decimal_point;
+  /* Symbol used to separate groups of digits to the left of the decimal
+     point.  */
+  char *mon_thousands_sep;
+  /* Definition of the size of groups of digits to the left of the decimal
+     point.  */
+  char *mon_grouping;
+  /* Sign used to indicate a value >= 0.  */
+  char *positive_sign;
+  /* Sign used to indicate a value < 0.  */
+  char *negative_sign;
+
+  /* For formatting local currency.  */
+  /* Currency symbol (3 characters) followed by separator (1 character).  */
+  char *currency_symbol;
+  /* Number of digits after the decimal point.  */
+  char frac_digits;
+  /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char p_cs_precedes;
+  /* For values >= 0: Position of the sign.  */
+  char p_sign_posn;
+  /* For values >= 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char p_sep_by_space;
+  /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char n_cs_precedes;
+  /* For values < 0: Position of the sign.  */
+  char n_sign_posn;
+  /* For values < 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char n_sep_by_space;
+
+  /* For formatting international currency.  */
+  /* Currency symbol (3 characters) followed by separator (1 character).  */
+  char *int_curr_symbol;
+  /* Number of digits after the decimal point.  */
+  char int_frac_digits;
+  /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char int_p_cs_precedes;
+  /* For values >= 0: Position of the sign.  */
+  char int_p_sign_posn;
+  /* For values >= 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char int_p_sep_by_space;
+  /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+     comes after the number.  */
+  char int_n_cs_precedes;
+  /* For values < 0: Position of the sign.  */
+  char int_n_sign_posn;
+  /* For values < 0: Placement of spaces between currency symbol, sign, and
+     number.  */
+  char int_n_sep_by_space;
+};
+#endif
+
+#if @GNULIB_LOCALECONV@
+# if @REPLACE_LOCALECONV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef localeconv
+#   define localeconv rpl_localeconv
+#  endif
+_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void));
+_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
+# else
+_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
+# endif
+_GL_CXXALIASWARN (localeconv);
+#elif @REPLACE_STRUCT_LCONV@
+# undef localeconv
+# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
+#elif defined GNULIB_POSIXCHECK
+# undef localeconv
+# if HAVE_RAW_DECL_LOCALECONV
+_GL_WARN_ON_USE (localeconv,
+                 "localeconv returns too few information on some platforms - "
+                 "use gnulib module localeconv for portability");
+# endif
+#endif
+
 #if @GNULIB_SETLOCALE@
 # if @REPLACE_SETLOCALE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
new file mode 100644
--- /dev/null
+++ b/lib/localeconv.c
@@ -0,0 +1,103 @@
+/* Query locale dependent information for formatting numbers.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <locale.h>
+
+#if HAVE_STRUCT_LCONV_DECIMAL_POINT
+
+/* Override for platforms where 'struct lconv' lacks the int_p_*, int_n_*
+   members.  */
+
+struct lconv *
+localeconv (void)
+{
+  static struct lconv result;
+# undef lconv
+# undef localeconv
+  struct lconv *sys_result = localeconv ();
+
+  result.decimal_point = sys_result->decimal_point;
+  result.thousands_sep = sys_result->thousands_sep;
+  result.grouping = sys_result->grouping;
+  result.mon_decimal_point = sys_result->mon_decimal_point;
+  result.mon_thousands_sep = sys_result->mon_thousands_sep;
+  result.mon_grouping = sys_result->mon_grouping;
+  result.positive_sign = sys_result->positive_sign;
+  result.negative_sign = sys_result->negative_sign;
+  result.currency_symbol = sys_result->currency_symbol;
+  result.frac_digits = sys_result->frac_digits;
+  result.p_cs_precedes = sys_result->p_cs_precedes;
+  result.p_sign_posn = sys_result->p_sign_posn;
+  result.p_sep_by_space = sys_result->p_sep_by_space;
+  result.n_cs_precedes = sys_result->n_cs_precedes;
+  result.n_sign_posn = sys_result->n_sign_posn;
+  result.n_sep_by_space = sys_result->n_sep_by_space;
+  result.int_curr_symbol = sys_result->int_curr_symbol;
+  result.int_frac_digits = sys_result->int_frac_digits;
+  result.int_p_cs_precedes = sys_result->p_cs_precedes;
+  result.int_p_sign_posn = sys_result->p_sign_posn;
+  result.int_p_sep_by_space = sys_result->p_sep_by_space;
+  result.int_n_cs_precedes = sys_result->n_cs_precedes;
+  result.int_n_sign_posn = sys_result->n_sign_posn;
+  result.int_n_sep_by_space = sys_result->n_sep_by_space;
+
+  return &result;
+}
+
+#else
+
+/* Override for platforms where 'struct lconv' is a dummy.  */
+
+# include <limits.h>
+
+struct lconv *
+localeconv (void)
+{
+  static /*const*/ struct lconv result =
+    {
+      /* decimal_point */ ".",
+      /* thousands_sep */ "",
+      /* grouping */ "",
+      /* mon_decimal_point */ "",
+      /* mon_thousands_sep */ "",
+      /* mon_grouping */ "",
+      /* positive_sign */ "",
+      /* negative_sign */ "",
+      /* currency_symbol */ "",
+      /* frac_digits */ CHAR_MAX,
+      /* p_cs_precedes */ CHAR_MAX,
+      /* p_sign_posn */ CHAR_MAX,
+      /* p_sep_by_space */ CHAR_MAX,
+      /* n_cs_precedes */ CHAR_MAX,
+      /* n_sign_posn */ CHAR_MAX,
+      /* n_sep_by_space */ CHAR_MAX,
+      /* int_curr_symbol */ "",
+      /* int_frac_digits */ CHAR_MAX,
+      /* int_p_cs_precedes */ CHAR_MAX,
+      /* int_p_sign_posn */ CHAR_MAX,
+      /* int_p_sep_by_space */ CHAR_MAX,
+      /* int_n_cs_precedes */ CHAR_MAX,
+      /* int_n_sign_posn */ CHAR_MAX,
+      /* int_n_sep_by_space */ CHAR_MAX
+    };
+
+  return &result;
+}
+
+#endif
--- a/lib/localename.c
+++ b/lib/localename.c
@@ -16,7 +16,7 @@
 
 /* Written by Ulrich Drepper <drepper@gnu.org>, 1995.  */
 /* Native Windows code written by Tor Lillqvist <tml@iki.fi>.  */
-/* MacOS X code written by Bruno Haible <bruno@clisp.org>.  */
+/* Mac OS X code written by Bruno Haible <bruno@clisp.org>.  */
 
 #include <config.h>
 
@@ -34,7 +34,7 @@
 #include <string.h>
 
 #if HAVE_USELOCALE
-/* MacOS X 10.5 defines the locale_t type in <xlocale.h>.  */
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>.  */
 # if defined __APPLE__ && defined __MACH__
 #  include <xlocale.h>
 # endif
@@ -1128,11 +1128,11 @@
 
 
 #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-/* MacOS X 10.2 or newer */
+/* Mac OS X 10.2 or newer */
 
-/* Canonicalize a MacOS X locale name to a Unix locale name.
+/* Canonicalize a Mac OS X locale name to a Unix locale name.
    NAME is a sufficiently large buffer.
-   On input, it contains the MacOS X locale name.
+   On input, it contains the Mac OS X locale name.
    On output, it contains the Unix locale name.  */
 # if !defined IN_LIBINTL
 static
@@ -1145,9 +1145,9 @@
      http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
 
   /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
-     ISO 3166) names.  Prior to MacOS X 10.3, there is no API for doing this.
+     ISO 3166) names.  Prior to Mac OS X 10.3, there is no API for doing this.
      Therefore we do it ourselves, using a table based on the results of the
-     MacOS X 10.3.8 function
+     Mac OS X 10.3.8 function
      CFLocaleCreateCanonicalLocaleIdentifierFromString().  */
   typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
           legacy_entry;
@@ -1290,26 +1290,26 @@
   typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
           langtag_entry;
   static const langtag_entry langtag_table[] = {
-    /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn".
+    /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn".
        The default script for az on Unix is Latin.  */
     { "az-Latn", "az" },
-    /* MacOS X has "ga-dots".  Does not yet exist on Unix.  */
+    /* Mac OS X has "ga-dots".  Does not yet exist on Unix.  */
     { "ga-dots", "ga" },
-    /* MacOS X has "kk-Cyrl".  Does not yet exist on Unix.  */
-    /* MacOS X has "mn-Cyrl", "mn-Mong".
+    /* Mac OS X has "kk-Cyrl".  Does not yet exist on Unix.  */
+    /* Mac OS X has "mn-Cyrl", "mn-Mong".
        The default script for mn on Unix is Cyrillic.  */
     { "mn-Cyrl", "mn" },
-    /* MacOS X has "ms-Arab", "ms-Latn".
+    /* Mac OS X has "ms-Arab", "ms-Latn".
        The default script for ms on Unix is Latin.  */
     { "ms-Latn", "ms" },
-    /* MacOS X has "tg-Cyrl".
+    /* Mac OS X has "tg-Cyrl".
        The default script for tg on Unix is Cyrillic.  */
     { "tg-Cyrl", "tg" },
-    /* MacOS X has "tk-Cyrl".  Does not yet exist on Unix.  */
-    /* MacOS X has "tt-Cyrl".
+    /* Mac OS X has "tk-Cyrl".  Does not yet exist on Unix.  */
+    /* Mac OS X has "tt-Cyrl".
        The default script for tt on Unix is Cyrillic.  */
     { "tt-Cyrl", "tt" },
-    /* MacOS X has "zh-Hans", "zh-Hant".
+    /* Mac OS X has "zh-Hans", "zh-Hant".
        Country codes are used to distinguish these on Unix.  */
     { "zh-Hans", "zh_CN" },
     { "zh-Hant", "zh_TW" }
@@ -2505,7 +2505,7 @@
 #endif
 
 
-#if HAVE_USELOCALE /* glibc or MacOS X */
+#if HAVE_USELOCALE /* glibc or Mac OS X */
 
 /* Simple hash set of strings.  We don't want to drag in lots of hash table
    code here.  */
@@ -2616,133 +2616,34 @@
              nl_langinfo (_NL_LOCALE_NAME (category)).  */
           name = thread_locale->__names[category];
         return name;
-#  endif
-#  if defined __APPLE__ && defined __MACH__ /* MacOS X */
-        /* The locale name is found deep in an undocumented data structure.
-           Since it's stored in a buffer of size 32 and newlocale() rejects
-           locale names of length > 31, we can assume that it is NUL terminated
-           in this buffer. But we need to make a copy of the locale name, of
-           indefinite extent.  */
-        struct _xlocale_part1_v0 /* used in MacOS X 10.5 */
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            __darwin_mbstate_t __mbs[10];
-            int64_t __magic;
-          };
-        struct _xlocale_part1_v1 /* used in MacOS X >= 10.6.0 */
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            __darwin_mbstate_t __mbs[10];
-            /*pthread_lock_t*/ int __lock;
-            int64_t __magic;
-          };
-        struct _xlocale_part2
-          {
-            int64_t __magic;
-            unsigned char __collate_load_error;
-            unsigned char __collate_substitute_nontrivial;
-            unsigned char _messages_using_locale;
-            unsigned char _monetary_using_locale;
-            unsigned char _numeric_using_locale;
-            unsigned char _time_using_locale;
-            unsigned char __mlocale_changed;
-            unsigned char __nlocale_changed;
-            unsigned char __numeric_fp_cvt;
-            struct __xlocale_st_collate *__lc_collate;
-            struct __xlocale_st_runelocale *__lc_ctype;
-            struct __xlocale_st_messages *__lc_messages;
-            struct __xlocale_st_monetary *__lc_monetary;
-            struct __xlocale_st_numeric *__lc_numeric;
-            struct _xlocale *__lc_numeric_loc;
-            struct __xlocale_st_time *__lc_time;
-            /* more */
-          };
-        struct __xlocale_st_collate
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char __encoding[32];
-            /* more */
-          };
-        struct __xlocale_st_runelocale
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char __ctype_encoding[32];
-            /* more */
-          };
-        struct __xlocale_st_messages
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_messages_locale_buf;
-            /* more */
-          };
-        struct __xlocale_st_monetary
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_monetary_locale_buf;
-            /* more */
-          };
-        struct __xlocale_st_numeric {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_numeric_locale_buf;
-            /* more */
-          };
-        struct __xlocale_st_time {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_time_locale_buf;
-            /* more */
-          };
-        struct _xlocale_part2 *tlp;
-        if (((struct _xlocale_part1_v0 *) thread_locale)->__magic
-            == 0x786C6F63616C6530LL)
-          /* MacOS X 10.5 */
-          tlp =
-            (struct _xlocale_part2 *)
-            &((struct _xlocale_part1_v0 *) thread_locale)->__magic;
-        else if (((struct _xlocale_part1_v1 *) thread_locale)->__magic
-                 == 0x786C6F63616C6530LL)
-          /* MacOS X >= 10.6.0 */
-          tlp =
-            (struct _xlocale_part2 *)
-            &((struct _xlocale_part1_v1 *) thread_locale)->__magic;
-        else
-          /* Unsupported version of MacOS X: The internals of 'struct _xlocale'
-             have changed again.  */
-          return "";
+#  elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+        /* FreeBSD, Mac OS X */
+        int mask;
+
         switch (category)
           {
           case LC_CTYPE:
-            return tlp->__lc_ctype->__ctype_encoding;
+            mask = LC_CTYPE_MASK;
+            break;
           case LC_NUMERIC:
-            return tlp->_numeric_using_locale
-                   ? tlp->__lc_numeric->_numeric_locale_buf
-                   : "C";
+            mask = LC_NUMERIC_MASK;
+            break;
           case LC_TIME:
-            return tlp->_time_using_locale
-                   ? tlp->__lc_time->_time_locale_buf
-                   : "C";
+            mask = LC_TIME_MASK;
+            break;
           case LC_COLLATE:
-            return !tlp->__collate_load_error
-                   ? tlp->__lc_collate->__encoding
-                   : "C";
+            mask = LC_COLLATE_MASK;
+            break;
           case LC_MONETARY:
-            return tlp->_monetary_using_locale
-                   ? tlp->__lc_monetary->_monetary_locale_buf
-                   : "C";
+            mask = LC_MONETARY_MASK;
+            break;
           case LC_MESSAGES:
-            return tlp->_messages_using_locale
-                   ? tlp->__lc_messages->_messages_locale_buf
-                   : "C";
+            mask = LC_MESSAGES_MASK;
+            break;
           default: /* We shouldn't get here.  */
             return "";
           }
+        return querylocale (mask, thread_locale);
 #  endif
       }
   }
@@ -2784,8 +2685,8 @@
   /* On other systems we ignore what setlocale reports and instead look at the
      environment variables directly.  This is necessary
        1. on systems which have a facility for customizing the default locale
-          (MacOS X, native Windows, Cygwin) and where the system's setlocale()
-          function ignores this default locale (MacOS X, Cygwin), in two cases:
+          (Mac OS X, native Windows, Cygwin) and where the system's setlocale()
+          function ignores this default locale (Mac OS X, Cygwin), in two cases:
           a. when the user missed to use the setlocale() override from libintl
              (for example by not including <libintl.h>),
           b. when setlocale supports only the "C" locale, such as on Cygwin
@@ -2820,7 +2721,7 @@
   if (retval != NULL && retval[0] != '\0')
     {
 #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-      /* MacOS X 10.2 or newer.
+      /* Mac OS X 10.2 or newer.
          Ignore invalid LANG value set by the Terminal application.  */
       if (strcmp (retval, "UTF-8") != 0)
 #endif
@@ -2847,10 +2748,10 @@
       locale, customizing it for each location.  POSIX:2001 does not require
       such a facility.
 
-     The systems with such a facility are MacOS X and Windows: They provide a
+     The systems with such a facility are Mac OS X and Windows: They provide a
      GUI that allows the user to choose a locale.
-       - On MacOS X, by default, none of LC_* or LANG are set.  Starting with
-         MacOS X 10.4 or 10.5, LANG is set for processes launched by the
+       - On Mac OS X, by default, none of LC_* or LANG are set.  Starting with
+         Mac OS X 10.4 or 10.5, LANG is set for processes launched by the
          'Terminal' application (but sometimes to an incorrect value "UTF-8").
          When no environment variable is set, setlocale (LC_ALL, "") uses the
          "C" locale.
@@ -2880,7 +2781,7 @@
      codeset.  */
 
 # if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-  /* MacOS X 10.2 or newer */
+  /* Mac OS X 10.2 or newer */
   {
     /* Cache the locale name, since CoreFoundation calls are expensive.  */
     static const char *cached_localename;
@@ -2888,7 +2789,7 @@
     if (cached_localename == NULL)
       {
         char namebuf[256];
-#  if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */
+#  if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */
         CFLocaleRef locale = CFLocaleCopyCurrent ();
         CFStringRef name = CFLocaleGetIdentifier (locale);
 
@@ -2899,7 +2800,7 @@
             cached_localename = strdup (namebuf);
           }
         CFRelease (locale);
-#  elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
+#  elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.2 or newer */
         CFTypeRef value =
           CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
                                      kCFPreferencesCurrentApplication);
new file mode 100644
--- /dev/null
+++ b/lib/log.c
@@ -0,0 +1,38 @@
+/* Logarithm.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+double
+log (double x)
+#undef log
+{
+  if (x <= 0.0)
+    {
+      /* Work around the OSF/1 5.1 bug.  */
+      if (x == 0.0)
+        /* Return -Infinity.  */
+        return -1.0 / 0.0;
+      /* Work around the NetBSD 5.1, Solaris 11 2011-11 bug.  */
+      else /* x < 0.0 */
+        /* Return NaN.  */
+        return 0.0 / 0.0;
+    }
+  return log (x);
+}
new file mode 100644
--- /dev/null
+++ b/lib/log10.c
@@ -0,0 +1,38 @@
+/* Base 10 logarithmic function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+double
+log10 (double x)
+#undef log10
+{
+  if (x <= 0.0)
+    {
+      /* Work around the OSF/1 5.1 bug.  */
+      if (x == 0.0)
+        /* Return -Infinity.  */
+        return -1.0 / 0.0;
+      /* Work around the NetBSD 5.1, Solaris 11 2011-11 bug.  */
+      else /* x < 0.0 */
+        /* Return NaN.  */
+        return 0.0 / 0.0;
+    }
+  return log10 (x);
+}
--- a/lib/log10f.c
+++ b/lib/log10f.c
@@ -21,6 +21,22 @@
 
 float
 log10f (float x)
+#undef log10f
 {
+#if HAVE_LOG10F
+  if (x <= 0.0f)
+    {
+      /* Work around the OSF/1 5.1 bug.  */
+      if (x == 0.0f)
+        /* Return -Infinity.  */
+        return -1.0f / 0.0f;
+      /* Work around the NetBSD 5.1 bug.  */
+      else /* x < 0.0 */
+        /* Return NaN.  */
+        return 0.0f / 0.0f;
+    }
+  return log10f (x);
+#else
   return (float) log10 ((double) x);
+#endif
 }
new file mode 100644
--- /dev/null
+++ b/lib/log10l.c
@@ -0,0 +1,65 @@
+/* Base 10 logarithmic function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+log10l (long double x)
+{
+  return log10 (x);
+}
+
+#elif HAVE_LOG10L
+
+# include <float.h>
+
+long double
+log10l (long double x)
+# undef log10l
+{
+  /* Work around the OSF/1 5.1 bug.  */
+  if (x == 0.0L)
+    /* Return -Infinity.  */
+    return -1.0L / 0.0L;
+  {
+    long double y = log10l (x);
+# ifdef __sgi
+    /* Normalize the +Infinity value.  */
+    if (y > LDBL_MAX)
+      y = 1.0L / 0.0L;
+# endif
+    return y;
+  }
+}
+
+#else
+
+/* 1 / log(10) */
+static const long double inv_log10 =
+  0.43429448190325182765112891891660508229439700580366656611445378316586464920887L;
+
+long double
+log10l (long double x)
+{
+  return logl (x) * inv_log10;
+}
+
+#endif
new file mode 100644
--- /dev/null
+++ b/lib/log1p.c
@@ -0,0 +1,518 @@
+/* Natural logarithm of 1 plus argument.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+double
+log1p (double x)
+{
+  if (isnand (x))
+    return x;
+
+  if (x <= -1.0)
+    {
+      if (x == -1.0)
+        /* Return -Infinity.  */
+        return - HUGE_VAL;
+      else
+        {
+          /* Return NaN.  */
+#if defined _MSC_VER || (defined __sgi && !defined __GNUC__)
+          static double zero;
+          return zero / zero;
+#else
+          return 0.0 / 0.0;
+#endif
+        }
+    }
+
+  if (x < -0.5 || x > 1.0)
+    return log (1.0 + x);
+  /* Here -0.5 <= x <= 1.0.  */
+
+  if (x == 0.0)
+    /* Return a zero with the same sign as x.  */
+    return x;
+
+  /* Decompose x into
+       1 + x = (1 + m/256) * (1 + y)
+     where
+       m is an integer, -128 <= m <= 256,
+       y is a number, |y| <= 1/256.
+     y is computed as
+       y = (256 * x - m) / (256 + m).
+     Then
+       log(1+x) = log(m/256) + log(1+y)
+     The first summand is a table lookup.
+     The second summand is computed
+       - either through the power series
+           log(1+y) = y
+                      - 1/2 * y^2
+                      + 1/3 * y^3
+                      - 1/4 * y^4
+                      + 1/5 * y^5
+                      - 1/6 * y^6
+                      + 1/7 * y^7
+                      - 1/8 * y^8
+                      + 1/9 * y^9
+                      - 1/10 * y^10
+                      + 1/11 * y^11
+                      - 1/12 * y^12
+                      + 1/13 * y^13
+                      - 1/14 * y^14
+                      + 1/15 * y^15
+                      - ...
+       - or as log(1+y) = log((1+z)/(1-z)) = 2 * atanh(z)
+         where z = y/(2+y)
+         and atanh(z) is computed through its power series:
+           atanh(z) = z
+                      + 1/3 * z^3
+                      + 1/5 * z^5
+                      + 1/7 * z^7
+                      + 1/9 * z^9
+                      + 1/11 * z^11
+                      + 1/13 * z^13
+                      + 1/15 * z^15
+                      + ...
+         Since |z| <= 1/511 < 0.002, the relative contribution of the z^9
+         term is < 1/9*0.002^8 < 2^-60 <= 2^-DBL_MANT_DIG, therefore we
+         can truncate the series after the z^7 term.  */
+
+  {
+    double m = round (x * 256.0);
+    double y = ((x * 256.0) - m) / (m + 256.0);
+    double z = y / (2.0 + y);
+
+/* Coefficients of the power series for atanh(z).  */
+#define ATANH_COEFF_1  1.0
+#define ATANH_COEFF_3  0.333333333333333333333333333333333333334
+#define ATANH_COEFF_5  0.2
+#define ATANH_COEFF_7  0.142857142857142857142857142857142857143
+#define ATANH_COEFF_9  0.1111111111111111111111111111111111111113
+#define ATANH_COEFF_11 0.090909090909090909090909090909090909091
+#define ATANH_COEFF_13 0.076923076923076923076923076923076923077
+#define ATANH_COEFF_15 0.066666666666666666666666666666666666667
+
+    double z2 = z * z;
+    double atanh_z =
+      (((ATANH_COEFF_7
+         * z2 + ATANH_COEFF_5)
+        * z2 + ATANH_COEFF_3)
+       * z2 + ATANH_COEFF_1)
+      * z;
+
+    /* log_table[i] = log((i + 128) / 256).
+       Computed in GNU clisp through
+         (setf (long-float-digits) 128)
+         (setq a 0L0)
+         (setf (long-float-digits) 256)
+         (dotimes (i 385)
+           (format t "        ~D,~%"
+                   (float (log (* (/ (+ i 128) 256) 1L0)) a)))  */
+    static const double log_table[385] =
+      {
+        -0.693147180559945309417232121458176568075,
+        -0.6853650401178903604697692213970398044,
+        -0.677642994023980055266378075415729732197,
+        -0.669980121278410931188432960495886651496,
+        -0.662375521893191621046203913861404403985,
+        -0.65482831625780871022347679633437927773,
+        -0.647337644528651106250552853843513225963,
+        -0.639902666041133026551361927671647791137,
+        -0.632522558743510466836625989417756304788,
+        -0.625196518651437560022666843685547154042,
+        -0.617923759322357783718626781474514153438,
+        -0.61070351134887071814907205278986876216,
+        -0.60353502187025817679728065207969203929,
+        -0.59641755410139419712166106497071313106,
+        -0.58935038687830174459117031769420187977,
+        -0.582332814219655195222425952134964639978,
+        -0.575364144903561854878438011987654863008,
+        -0.568443702058988073553825606077313299585,
+        -0.561570822771226036828515992768693405624,
+        -0.554744857700826173731906247856527380683,
+        -0.547965170715447412135297057717612244552,
+        -0.541231138534103334345428696561292056747,
+        -0.534542150383306725323860946832334992828,
+        -0.527897607664638146541620672180936254347,
+        -0.52129692363328608707713317540302930314,
+        -0.514739523087127012297831879947234599722,
+        -0.50822484206593331675332852879892694707,
+        -0.50175232756031585480793331389686769463,
+        -0.495321437230025429054660050261215099,
+        -0.488931639131254417913411735261937295862,
+        -0.482582411452595671747679308725825054355,
+        -0.476273242259330949798142595713829069596,
+        -0.470003629245735553650937031148342064701,
+        -0.463773079495099479425751396412036696525,
+        -0.457581109247178400339643902517133157939,
+        -0.451427243672800141272924605544662667972,
+        -0.445311016655364052636629355711651820077,
+        -0.43923197057898186527990882355156990061,
+        -0.4331896561230192424451526269158655235,
+        -0.427183632062807368078106194920633178807,
+        -0.421213465076303550585562626925177406092,
+        -0.415278729556489003230882088534775334993,
+        -0.409379007429300711070330899107921801414,
+        -0.403513887976902632538339065932507598071,
+        -0.397682967666109433030550215403212372894,
+        -0.391885849981783528404356583224421075418,
+        -0.386122145265033447342107580922798666387,
+        -0.380391470556048421030985561769857535915,
+        -0.374693449441410693606984907867576972481,
+        -0.369027711905733333326561361023189215893,
+        -0.363393894187477327602809309537386757124,
+        -0.357791638638807479160052541644010369001,
+        -0.352220593589352099112142921677820359633,
+        -0.346680413213736728498769933032403617363,
+        -0.341170757402767124761784665198737642087,
+        -0.33569129163814153519122263131727209364,
+        -0.330241686870576856279407775480686721935,
+        -0.324821619401237656369001967407777741178,
+        -0.31943077076636122859621528874235306143,
+        -0.314068827624975851026378775827156709194,
+        -0.308735481649613269682442058976885699557,
+        -0.303430429419920096046768517454655701024,
+        -0.298153372319076331310838085093194799765,
+        -0.292904016432932602487907019463045397996,
+        -0.287682072451780927439219005993827431504,
+        -0.282487255574676923482925918282353780414,
+        -0.277319285416234343803903228503274262719,
+        -0.272177885915815673288364959951380595626,
+        -0.267062785249045246292687241862699949179,
+        -0.261973715741573968558059642502581569596,
+        -0.256910413785027239068190798397055267412,
+        -0.251872619755070079927735679796875342712,
+        -0.2468600779315257978846419408385075613265,
+        -0.24187253642048672427253973837916408939,
+        -0.2369097470783577150364265832942468196375,
+        -0.2319714654377751430492321958603212094726,
+        -0.2270574506353460848586128739534071682175,
+        -0.222167465341154296870334265401817316702,
+        -0.2173012756899813951520225351537951559,
+        -0.212458651214193401740613666010165016867,
+        -0.2076393647782445016154410442673876674964,
+        -0.202843192514751471266885961812429707545,
+        -0.1980699137620937948192675366153429027185,
+        -0.193319311003495979595900706211132426563,
+        -0.188591169807550022358923589720001638093,
+        -0.183885278770137362613157202229852743197,
+        -0.179201429457710992616226033183958974965,
+        -0.174539416351899677264255125093377869519,
+        -0.169899036795397472900424896523305726435,
+        -0.165280090939102924303339903679875604517,
+        -0.160682381690473465543308397998034325468,
+        -0.156105714663061654850502877304344269052,
+        -0.1515498981272009378406898175577424691056,
+        -0.1470147429618096590348349122269674042104,
+        -0.142500062607283030157283942253263107981,
+        -0.1380056730194437167017517619422725179055,
+        -0.1335313926245226231463436209313499745895,
+        -0.129077042275142343345847831367985856258,
+        -0.124642445207276597338493356591214304499,
+        -0.1202274269981598003244753948319154994493,
+        -0.115831815525121705099120059938680166568,
+        -0.1114554409253228268966213677328042273655,
+        -0.1070981355563671005131126851708522185606,
+        -0.1027597339577689347753154133345778104976,
+        -0.098440072813252519902888574928971234883,
+        -0.094138990913861910035632096996525066015,
+        -0.0898563291218610470766469347968659624282,
+        -0.0855919303354035139161469686670511961825,
+        -0.0813456394539524058873423550293617843895,
+        -0.077117303344431289769666193261475917783,
+        -0.072906770808087780565737488890929711303,
+        -0.0687138925480518083746933774035034481663,
+        -0.064538521137571171672923915683992928129,
+        -0.0603805109889074798714456529545968095868,
+        -0.0562397183228760777967376942769773768851,
+        -0.0521160011390140183616307870527840213665,
+        -0.0480092191863606077520036253234446621373,
+        -0.0439192339348354905263921515528654458042,
+        -0.0398459085471996706586162402473026835046,
+        -0.0357891078515852792753420982122404025613,
+        -0.0317486983145803011569962827485256299276,
+        -0.0277245480148548604671395114515163869272,
+        -0.0237165266173160421183468505286730579517,
+        -0.0197245053477785891192717326571593033246,
+        -0.015748356968139168607549511460828269521,
+        -0.0117879557520422404691605618900871263399,
+        -0.0078431774610258928731840424909435816546,
+        -0.00391389932113632909231778364357266484272,
+        0.0,
+        0.00389864041565732301393734309584290701073,
+        0.00778214044205494894746290006113676367813,
+        0.01165061721997527413559144280921434893315,
+        0.0155041865359652541508540460424468358779,
+        0.01934296284313093463590553454155047018545,
+        0.0231670592815343782287991609622899165794,
+        0.0269765876982020757480692925396595457815,
+        0.0307716586667536883710282075967721640917,
+        0.0345523815066597334073715005898328652816,
+        0.038318864302136599193755325123797290346,
+        0.042071213920687054375203805926962379448,
+        0.045809536031294203166679267614663342114,
+        0.049533935122276630882096208829824573267,
+        0.0532445145188122828658701937865287769396,
+        0.0569413764001384247590131015404494943015,
+        0.0606246218164348425806061320404202632862,
+        0.0642943507053972572162284502656114944857,
+        0.0679506619085077493945652777726294140346,
+        0.071593653187008817925605272752092034269,
+        0.075223421237587525698605339983662414637,
+        0.078840061707776024531540577859198294559,
+        0.082443669211074591268160068668307805914,
+        0.086034337341803153381797826721996075141,
+        0.0896121586896871326199514693784845287854,
+        0.093177224854183289768781353027759396216,
+        0.096729626458551112295571056487463437015,
+        0.1002694531636751493081301751297276601964,
+        0.1037967936816435648260618037639746883066,
+        0.1073117357890880506671750303711543368066,
+        0.1108143663402901141948061693232119280986,
+        0.1143047712800586336342591448151747734094,
+        0.1177830356563834545387941094705217050686,
+        0.1212492436328696851612122640808405265723,
+        0.1247034785009572358634065153808632684918,
+        0.128145822691930038174109886961074873852,
+        0.1315763577887192725887161286894831624516,
+        0.134995164537504830601983291147085645626,
+        0.138402322859119135685325873601649187393,
+        0.1417979118602573498789527352804727189846,
+        0.1451820098444978972819350637405643235226,
+        0.1485546943231371429098223170672938691604,
+        0.151916042025841975071803424896884511328,
+        0.1552661289111239515223833017101021786436,
+        0.1586050301766385840933711746258415752456,
+        0.161932820269313253240338285123614220592,
+        0.165249572895307162875611449277240313729,
+        0.1685553610298066669415865321701023169345,
+        0.171850256926659222340098946055147264935,
+        0.1751343321278491480142914649863898412374,
+        0.1784076574728182971194002415109419683545,
+        0.181670303107634678260605595617079739242,
+        0.184922338494011992663903592659249621006,
+        0.1881638324181829868259905803105539806714,
+        0.191394852999629454609298807561308873447,
+        0.194615467699671658858138593767269731516,
+        0.1978257433299198803625720711969614690756,
+        0.201025746060590741340908337591797808969,
+        0.204215541428690891503820386196239272214,
+        0.2073951943460705871587455788490062338536,
+        0.210564769107349637669552812732351513721,
+        0.2137243293977181388619051976331987647734,
+        0.216873938300614359619089525744347498479,
+        0.220013658305282095907358638661628360712,
+        0.2231435513142097557662950903098345033745,
+        0.226263678650453389361787082280390161607,
+        0.229374101064845829991480725046139871551,
+        0.232474878743094064920705078095567528222,
+        0.235566071312766909077588218941043410137,
+        0.2386477378501750099171491363522813392526,
+        0.241719936887145168144307515913513900104,
+        0.244782726417690916434704717466314811104,
+        0.247836163904581256780602765746524747999,
+        0.25088030628580941658844644154994089393,
+        0.253915209980963444137323297906606667466,
+        0.256940930897500425446759867911224262093,
+        0.259957524436926066972079494542311044577,
+        0.26296504550088135182072917321108602859,
+        0.265963548497137941339125926537543389269,
+        0.268953087345503958932974357924497845489,
+        0.271933715483641758831669494532999161983,
+        0.274905485872799249167009582983018668293,
+        0.277868451003456306186350032923401233082,
+        0.280822662900887784639519758873134832073,
+        0.28376817313064459834690122235025476666,
+        0.286705032803954314653250930842073965668,
+        0.289633292583042676878893055525668970004,
+        0.292553002686377439978201258664126644308,
+        0.295464212893835876386681906054964195182,
+        0.298366972551797281464900430293496918012,
+        0.301261330578161781012875538233755492657,
+        0.304147335467296717015819874720446989991,
+        0.30702503529491186207512454053537790169,
+        0.309894477722864687861624550833227164546,
+        0.31275571000389688838624655968831903216,
+        0.315608778986303334901366180667483174144,
+        0.318453731118534615810247213590599595595,
+        0.321290612453734292057863145522557457887,
+        0.324119468654211976090670760434987352183,
+        0.326940344995853320592356894073809191681,
+        0.329753286372467981814422811920789810952,
+        0.332558337300076601412275626573419425269,
+        0.335355541921137830257179579814166199074,
+        0.338144944008716397710235913939267433111,
+        0.340926586970593210305089199780356208443,
+        0.34370051385331844468019789211029452987,
+        0.346466767346208580918462188425772950712,
+        0.349225389785288304181275421187371759687,
+        0.35197642315717818465544745625943892599,
+        0.354719909102929028355011218999317665826,
+        0.357455888921803774226009490140904474434,
+        0.360184403575007796281574967493016620926,
+        0.362905493689368453137824345977489846141,
+        0.365619199560964711319396875217046453067,
+        0.368325561158707653048230154050398826898,
+        0.371024618127872663911964910806824955394,
+        0.373716409793584080821016832715823506644,
+        0.376400975164253065997877633436251593315,
+        0.379078352934969458390853345631019858882,
+        0.38174858149084833985966626493567607862,
+        0.384411698910332039734790062481290868519,
+        0.387067742968448287898902502261817665695,
+        0.38971675114002521337046360400352086705,
+        0.392358760602863872479379611988215363485,
+        0.39499380824086897810639403636498176831,
+        0.397621930647138489104829072973405554918,
+        0.40024316412701270692932510199513117008,
+        0.402857544701083514655197565487057707577,
+        0.405465108108164381978013115464349136572,
+        0.408065889808221748430198682969084124381,
+        0.410659924985268385934306203175822787661,
+        0.41324724855021933092547601552548590025,
+        0.415827895143710965613328892954902305356,
+        0.418401899138883817510763261966760106515,
+        0.42096929464412963612886716150679597245,
+        0.423530115505803295718430478017910109426,
+        0.426084395310900063124544879595476618897,
+        0.428632167389698760206812276426639053152,
+        0.43117346481837134085917247895559499848,
+        0.433708320421559393435847903042186017095,
+        0.436236766774918070349041323061121300663,
+        0.438758836207627937745575058511446738878,
+        0.441274560804875229489496441661301225362,
+        0.443783972410300981171768440588146426918,
+        0.446287102628419511532590180619669006749,
+        0.448783982827006710512822115683937186274,
+        0.451274644139458585144692383079012478686,
+        0.453759117467120506644794794442263270651,
+        0.456237433481587594380805538163929748437,
+        0.458709622626976664843883309250877913511,
+        0.461175715122170166367999925597855358603,
+        0.463635740963032513092182277331163919118,
+        0.466089729924599224558619247504769399859,
+        0.468537711563239270375665237462973542708,
+        0.470979715218791012546897856056359251373,
+        0.473415770016672131372578393236978550606,
+        0.475845904869963914265209586304381412175,
+        0.478270148481470280383546145497464809096,
+        0.480688529345751907676618455448011551209,
+        0.48310107575113582273837458485214554795,
+        0.485507815781700807801791077190788900579,
+        0.487908777319238973246173184132656942487,
+        0.490303988045193838150346159645746860531,
+        0.492693475442575255695076950020077845328,
+        0.495077266797851514597964584842833665358,
+        0.497455389202818942250859256731684928918,
+        0.499827869556449329821331415247044141512,
+        0.502194734566715494273584171951812573586,
+        0.504556010752395287058308531738174929982,
+        0.506911724444854354113196312660089270034,
+        0.509261901789807946804074919228323824878,
+        0.51160656874906207851888487520338193135,
+        0.51394575110223431680100608827421759311,
+        0.51627947444845449617281928478756106467,
+        0.518607764208045632152976996364798698556,
+        0.520930645624185312409809834659637709188,
+        0.52324814376454783651680722493487084164,
+        0.525560283522927371382427602307131424923,
+        0.527867089620842385113892217778300963557,
+        0.530168586609121617841419630845212405063,
+        0.532464798869471843873923723460142242606,
+        0.534755750616027675477923292032637111077,
+        0.537041465896883654566729244153832299024,
+        0.539321968595608874655355158077341155752,
+        0.54159728243274437157654230390043409897,
+        0.543867430967283517663338989065998323965,
+        0.546132437598135650382397209231209163864,
+        0.548392325565573162748150286179863158565,
+        0.550647117952662279259948179204913460093,
+        0.552896837686677737580717902230624314327,
+        0.55514150754050159271548035951590405017,
+        0.557381150134006357049816540361233647898,
+        0.559615787935422686270888500526826593487,
+        0.561845443262691817915664819160697456814,
+        0.564070138284802966071384290090190711817,
+        0.566289895023115872590849979337124343595,
+        0.568504735352668712078738764866962263577,
+        0.5707146810034715448536245647415894503,
+        0.572919753561785509092756726626261068625,
+        0.575119974471387940421742546569273429365,
+        0.577315365034823604318112061519496401506,
+        0.579505946414642223855274409488070989814,
+        0.58169173963462248252061075372537234071,
+        0.583872765580982679097413356975291104927,
+        0.586049045003578208904119436287324349516,
+        0.588220598517086043034868221609113995052,
+        0.590387446602176374641916708123598757576,
+        0.59254960960667159874199020959329739696,
+        0.594707107746692789514343546529205333192,
+        0.59685996110779383658731192302565801002,
+        0.59900818964608339938160002446165150206,
+        0.601151813189334836191674317068856441547,
+        0.603290851438084262340585186661310605647,
+        0.6054253239667168894375677681414899356,
+        0.607555250224541795501085152791125371894,
+        0.609680649536855273481833501660588408785,
+        0.611801541105992903529889766428814783686,
+        0.613917944012370492196929119645563790777,
+        0.616029877215514019647565928196700650293,
+        0.618137359555078733872689126674816271683,
+        0.620240409751857528851494632567246856773,
+        0.62233904640877874159710264120869663505,
+        0.62443328801189350104253874405467311991,
+        0.626523152931352759778820859734204069282,
+        0.628608659422374137744308205774183639946,
+        0.6306898256261987050837261409313532241,
+        0.63276666957103782954578646850357975849,
+        0.634839209173010211969493840510489008123,
+        0.63690746223706923162049442718119919119,
+        0.63897144645792072137962398326473680873,
+        0.64103117942093129105560133440539254671,
+        0.643086678603027315392053859585132960477,
+        0.645137961373584701665228496134731905937,
+        0.647185044995309550122320631377863036675,
+        0.64922794662510981889083996990531112227,
+        0.651266683314958103396333353349672108398,
+        0.653301272012745638758615881210873884572,
+        0.65533172956312763209494967856962559648,
+        0.657358072708360030141890023245936165513,
+        0.659380318089127826115336413370955804038,
+        0.661398482245365008260235838709650938148,
+        0.66341258161706625109695030429080128179,
+        0.665422632545090448950092610006660181147,
+        0.667428651271956189947234166318980478403,
+        0.669430653942629267298885270929503510123,
+        0.67142865660530232331713904200189252584,
+        0.67342267521216672029796038880101726475,
+        0.67541272562017673108090414397019748722,
+        0.677398823591806140809682609997348298556,
+        0.67938098479579735014710062847376425181,
+        0.681359224807903068948071559568089441735,
+        0.683333559111620688164363148387750369654,
+        0.68530400309891941654404807896723298642,
+        0.687270572070960267497006884394346103924,
+        0.689233281238808980324914337814603903233,
+        0.691192145724141958859604629216309755938,
+        0.693147180559945309417232121458176568075
+      };
+    return log_table[128 + (int)m] + 2.0 * atanh_z;
+  }
+}
new file mode 100644
--- /dev/null
+++ b/lib/log1pf.c
@@ -0,0 +1,26 @@
+/* Natural logarithm of 1 plus argument.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+float
+log1pf (float x)
+{
+  return (float) log1p ((double) x);
+}
new file mode 100644
--- /dev/null
+++ b/lib/log1pl.c
@@ -0,0 +1,533 @@
+/* Natural logarithm of 1 plus argument.
+   Copyright (C) 2011-2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+log1pl (long double x)
+{
+  return log1p (x);
+}
+
+#else
+
+long double
+log1pl (long double x)
+{
+  if (isnanl (x))
+    return x;
+
+  if (x <= -1.0L)
+    {
+      if (x == -1.0L)
+        /* Return -Infinity.  */
+        return - HUGE_VALL;
+      else
+        {
+          /* Return NaN.  */
+#if defined _MSC_VER || (defined __sgi && !defined __GNUC__)
+          static long double zero;
+          return zero / zero;
+#else
+          return 0.0L / 0.0L;
+#endif
+        }
+    }
+
+  if (x < -0.5L || x > 1.0L)
+    return logl (1.0L + x);
+  /* Here -0.5 <= x <= 1.0.  */
+
+  if (x == 0.0L)
+    /* Return a zero with the same sign as x.  */
+    return x;
+
+  /* Decompose x into
+       1 + x = (1 + m/256) * (1 + y)
+     where
+       m is an integer, -128 <= m <= 256,
+       y is a number, |y| <= 1/256.
+     y is computed as
+       y = (256 * x - m) / (256 + m).
+     Then
+       log(1+x) = log(m/256) + log(1+y)
+     The first summand is a table lookup.
+     The second summand is computed
+       - either through the power series
+           log(1+y) = y
+                      - 1/2 * y^2
+                      + 1/3 * y^3
+                      - 1/4 * y^4
+                      + 1/5 * y^5
+                      - 1/6 * y^6
+                      + 1/7 * y^7
+                      - 1/8 * y^8
+                      + 1/9 * y^9
+                      - 1/10 * y^10
+                      + 1/11 * y^11
+                      - 1/12 * y^12
+                      + 1/13 * y^13
+                      - 1/14 * y^14
+                      + 1/15 * y^15
+                      - ...
+       - or as log(1+y) = log((1+z)/(1-z)) = 2 * atanh(z)
+         where z = y/(2+y)
+         and atanh(z) is computed through its power series:
+           atanh(z) = z
+                      + 1/3 * z^3
+                      + 1/5 * z^5
+                      + 1/7 * z^7
+                      + 1/9 * z^9
+                      + 1/11 * z^11
+                      + 1/13 * z^13
+                      + 1/15 * z^15
+                      + ...
+         Since |z| <= 1/511 < 0.002, the relative contribution of the z^15
+         term is < 1/15*0.002^14 < 2^-120 <= 2^-LDBL_MANT_DIG, therefore we
+         can truncate the series after the z^13 term.  */
+
+  {
+    long double m = roundl (x * 256.0L);
+    long double y = ((x * 256.0L) - m) / (m + 256.0L);
+    long double z = y / (2.0L + y);
+
+/* Coefficients of the power series for atanh(z).  */
+#define ATANH_COEFF_1  1.0L
+#define ATANH_COEFF_3  0.333333333333333333333333333333333333334L
+#define ATANH_COEFF_5  0.2L
+#define ATANH_COEFF_7  0.142857142857142857142857142857142857143L
+#define ATANH_COEFF_9  0.1111111111111111111111111111111111111113L
+#define ATANH_COEFF_11 0.090909090909090909090909090909090909091L
+#define ATANH_COEFF_13 0.076923076923076923076923076923076923077L
+#define ATANH_COEFF_15 0.066666666666666666666666666666666666667L
+
+    long double z2 = z * z;
+    long double atanh_z =
+      ((((((ATANH_COEFF_13
+            * z2 + ATANH_COEFF_11)
+           * z2 + ATANH_COEFF_9)
+          * z2 + ATANH_COEFF_7)
+         * z2 + ATANH_COEFF_5)
+        * z2 + ATANH_COEFF_3)
+       * z2 + ATANH_COEFF_1)
+      * z;
+
+    /* logl_table[i] = log((i + 128) / 256).
+       Computed in GNU clisp through
+         (setf (long-float-digits) 128)
+         (setq a 0L0)
+         (setf (long-float-digits) 256)
+         (dotimes (i 385)
+           (format t "        ~D,~%"
+                   (float (log (* (/ (+ i 128) 256) 1L0)) a)))  */
+    static const long double logl_table[385] =
+      {
+        -0.693147180559945309417232121458176568075L,
+        -0.6853650401178903604697692213970398044L,
+        -0.677642994023980055266378075415729732197L,
+        -0.669980121278410931188432960495886651496L,
+        -0.662375521893191621046203913861404403985L,
+        -0.65482831625780871022347679633437927773L,
+        -0.647337644528651106250552853843513225963L,
+        -0.639902666041133026551361927671647791137L,
+        -0.632522558743510466836625989417756304788L,
+        -0.625196518651437560022666843685547154042L,
+        -0.617923759322357783718626781474514153438L,
+        -0.61070351134887071814907205278986876216L,
+        -0.60353502187025817679728065207969203929L,
+        -0.59641755410139419712166106497071313106L,
+        -0.58935038687830174459117031769420187977L,
+        -0.582332814219655195222425952134964639978L,
+        -0.575364144903561854878438011987654863008L,
+        -0.568443702058988073553825606077313299585L,
+        -0.561570822771226036828515992768693405624L,
+        -0.554744857700826173731906247856527380683L,
+        -0.547965170715447412135297057717612244552L,
+        -0.541231138534103334345428696561292056747L,
+        -0.534542150383306725323860946832334992828L,
+        -0.527897607664638146541620672180936254347L,
+        -0.52129692363328608707713317540302930314L,
+        -0.514739523087127012297831879947234599722L,
+        -0.50822484206593331675332852879892694707L,
+        -0.50175232756031585480793331389686769463L,
+        -0.495321437230025429054660050261215099L,
+        -0.488931639131254417913411735261937295862L,
+        -0.482582411452595671747679308725825054355L,
+        -0.476273242259330949798142595713829069596L,
+        -0.470003629245735553650937031148342064701L,
+        -0.463773079495099479425751396412036696525L,
+        -0.457581109247178400339643902517133157939L,
+        -0.451427243672800141272924605544662667972L,
+        -0.445311016655364052636629355711651820077L,
+        -0.43923197057898186527990882355156990061L,
+        -0.4331896561230192424451526269158655235L,
+        -0.427183632062807368078106194920633178807L,
+        -0.421213465076303550585562626925177406092L,
+        -0.415278729556489003230882088534775334993L,
+        -0.409379007429300711070330899107921801414L,
+        -0.403513887976902632538339065932507598071L,
+        -0.397682967666109433030550215403212372894L,
+        -0.391885849981783528404356583224421075418L,
+        -0.386122145265033447342107580922798666387L,
+        -0.380391470556048421030985561769857535915L,
+        -0.374693449441410693606984907867576972481L,
+        -0.369027711905733333326561361023189215893L,
+        -0.363393894187477327602809309537386757124L,
+        -0.357791638638807479160052541644010369001L,
+        -0.352220593589352099112142921677820359633L,
+        -0.346680413213736728498769933032403617363L,
+        -0.341170757402767124761784665198737642087L,
+        -0.33569129163814153519122263131727209364L,
+        -0.330241686870576856279407775480686721935L,
+        -0.324821619401237656369001967407777741178L,
+        -0.31943077076636122859621528874235306143L,
+        -0.314068827624975851026378775827156709194L,
+        -0.308735481649613269682442058976885699557L,
+        -0.303430429419920096046768517454655701024L,
+        -0.298153372319076331310838085093194799765L,
+        -0.292904016432932602487907019463045397996L,
+        -0.287682072451780927439219005993827431504L,
+        -0.282487255574676923482925918282353780414L,
+        -0.277319285416234343803903228503274262719L,
+        -0.272177885915815673288364959951380595626L,
+        -0.267062785249045246292687241862699949179L,
+        -0.261973715741573968558059642502581569596L,
+        -0.256910413785027239068190798397055267412L,
+        -0.251872619755070079927735679796875342712L,
+        -0.2468600779315257978846419408385075613265L,
+        -0.24187253642048672427253973837916408939L,
+        -0.2369097470783577150364265832942468196375L,
+        -0.2319714654377751430492321958603212094726L,
+        -0.2270574506353460848586128739534071682175L,
+        -0.222167465341154296870334265401817316702L,
+        -0.2173012756899813951520225351537951559L,
+        -0.212458651214193401740613666010165016867L,
+        -0.2076393647782445016154410442673876674964L,
+        -0.202843192514751471266885961812429707545L,
+        -0.1980699137620937948192675366153429027185L,
+        -0.193319311003495979595900706211132426563L,
+        -0.188591169807550022358923589720001638093L,
+        -0.183885278770137362613157202229852743197L,
+        -0.179201429457710992616226033183958974965L,
+        -0.174539416351899677264255125093377869519L,
+        -0.169899036795397472900424896523305726435L,
+        -0.165280090939102924303339903679875604517L,
+        -0.160682381690473465543308397998034325468L,
+        -0.156105714663061654850502877304344269052L,
+        -0.1515498981272009378406898175577424691056L,
+        -0.1470147429618096590348349122269674042104L,
+        -0.142500062607283030157283942253263107981L,
+        -0.1380056730194437167017517619422725179055L,
+        -0.1335313926245226231463436209313499745895L,
+        -0.129077042275142343345847831367985856258L,
+        -0.124642445207276597338493356591214304499L,
+        -0.1202274269981598003244753948319154994493L,
+        -0.115831815525121705099120059938680166568L,
+        -0.1114554409253228268966213677328042273655L,
+        -0.1070981355563671005131126851708522185606L,
+        -0.1027597339577689347753154133345778104976L,
+        -0.098440072813252519902888574928971234883L,
+        -0.094138990913861910035632096996525066015L,
+        -0.0898563291218610470766469347968659624282L,
+        -0.0855919303354035139161469686670511961825L,
+        -0.0813456394539524058873423550293617843895L,
+        -0.077117303344431289769666193261475917783L,
+        -0.072906770808087780565737488890929711303L,
+        -0.0687138925480518083746933774035034481663L,
+        -0.064538521137571171672923915683992928129L,
+        -0.0603805109889074798714456529545968095868L,
+        -0.0562397183228760777967376942769773768851L,
+        -0.0521160011390140183616307870527840213665L,
+        -0.0480092191863606077520036253234446621373L,
+        -0.0439192339348354905263921515528654458042L,
+        -0.0398459085471996706586162402473026835046L,
+        -0.0357891078515852792753420982122404025613L,
+        -0.0317486983145803011569962827485256299276L,
+        -0.0277245480148548604671395114515163869272L,
+        -0.0237165266173160421183468505286730579517L,
+        -0.0197245053477785891192717326571593033246L,
+        -0.015748356968139168607549511460828269521L,
+        -0.0117879557520422404691605618900871263399L,
+        -0.0078431774610258928731840424909435816546L,
+        -0.00391389932113632909231778364357266484272L,
+        0.0L,
+        0.00389864041565732301393734309584290701073L,
+        0.00778214044205494894746290006113676367813L,
+        0.01165061721997527413559144280921434893315L,
+        0.0155041865359652541508540460424468358779L,
+        0.01934296284313093463590553454155047018545L,
+        0.0231670592815343782287991609622899165794L,
+        0.0269765876982020757480692925396595457815L,
+        0.0307716586667536883710282075967721640917L,
+        0.0345523815066597334073715005898328652816L,
+        0.038318864302136599193755325123797290346L,
+        0.042071213920687054375203805926962379448L,
+        0.045809536031294203166679267614663342114L,
+        0.049533935122276630882096208829824573267L,
+        0.0532445145188122828658701937865287769396L,
+        0.0569413764001384247590131015404494943015L,
+        0.0606246218164348425806061320404202632862L,
+        0.0642943507053972572162284502656114944857L,
+        0.0679506619085077493945652777726294140346L,
+        0.071593653187008817925605272752092034269L,
+        0.075223421237587525698605339983662414637L,
+        0.078840061707776024531540577859198294559L,
+        0.082443669211074591268160068668307805914L,
+        0.086034337341803153381797826721996075141L,
+        0.0896121586896871326199514693784845287854L,
+        0.093177224854183289768781353027759396216L,
+        0.096729626458551112295571056487463437015L,
+        0.1002694531636751493081301751297276601964L,
+        0.1037967936816435648260618037639746883066L,
+        0.1073117357890880506671750303711543368066L,
+        0.1108143663402901141948061693232119280986L,
+        0.1143047712800586336342591448151747734094L,
+        0.1177830356563834545387941094705217050686L,
+        0.1212492436328696851612122640808405265723L,
+        0.1247034785009572358634065153808632684918L,
+        0.128145822691930038174109886961074873852L,
+        0.1315763577887192725887161286894831624516L,
+        0.134995164537504830601983291147085645626L,
+        0.138402322859119135685325873601649187393L,
+        0.1417979118602573498789527352804727189846L,
+        0.1451820098444978972819350637405643235226L,
+        0.1485546943231371429098223170672938691604L,
+        0.151916042025841975071803424896884511328L,
+        0.1552661289111239515223833017101021786436L,
+        0.1586050301766385840933711746258415752456L,
+        0.161932820269313253240338285123614220592L,
+        0.165249572895307162875611449277240313729L,
+        0.1685553610298066669415865321701023169345L,
+        0.171850256926659222340098946055147264935L,
+        0.1751343321278491480142914649863898412374L,
+        0.1784076574728182971194002415109419683545L,
+        0.181670303107634678260605595617079739242L,
+        0.184922338494011992663903592659249621006L,
+        0.1881638324181829868259905803105539806714L,
+        0.191394852999629454609298807561308873447L,
+        0.194615467699671658858138593767269731516L,
+        0.1978257433299198803625720711969614690756L,
+        0.201025746060590741340908337591797808969L,
+        0.204215541428690891503820386196239272214L,
+        0.2073951943460705871587455788490062338536L,
+        0.210564769107349637669552812732351513721L,
+        0.2137243293977181388619051976331987647734L,
+        0.216873938300614359619089525744347498479L,
+        0.220013658305282095907358638661628360712L,
+        0.2231435513142097557662950903098345033745L,
+        0.226263678650453389361787082280390161607L,
+        0.229374101064845829991480725046139871551L,
+        0.232474878743094064920705078095567528222L,
+        0.235566071312766909077588218941043410137L,
+        0.2386477378501750099171491363522813392526L,
+        0.241719936887145168144307515913513900104L,
+        0.244782726417690916434704717466314811104L,
+        0.247836163904581256780602765746524747999L,
+        0.25088030628580941658844644154994089393L,
+        0.253915209980963444137323297906606667466L,
+        0.256940930897500425446759867911224262093L,
+        0.259957524436926066972079494542311044577L,
+        0.26296504550088135182072917321108602859L,
+        0.265963548497137941339125926537543389269L,
+        0.268953087345503958932974357924497845489L,
+        0.271933715483641758831669494532999161983L,
+        0.274905485872799249167009582983018668293L,
+        0.277868451003456306186350032923401233082L,
+        0.280822662900887784639519758873134832073L,
+        0.28376817313064459834690122235025476666L,
+        0.286705032803954314653250930842073965668L,
+        0.289633292583042676878893055525668970004L,
+        0.292553002686377439978201258664126644308L,
+        0.295464212893835876386681906054964195182L,
+        0.298366972551797281464900430293496918012L,
+        0.301261330578161781012875538233755492657L,
+        0.304147335467296717015819874720446989991L,
+        0.30702503529491186207512454053537790169L,
+        0.309894477722864687861624550833227164546L,
+        0.31275571000389688838624655968831903216L,
+        0.315608778986303334901366180667483174144L,
+        0.318453731118534615810247213590599595595L,
+        0.321290612453734292057863145522557457887L,
+        0.324119468654211976090670760434987352183L,
+        0.326940344995853320592356894073809191681L,
+        0.329753286372467981814422811920789810952L,
+        0.332558337300076601412275626573419425269L,
+        0.335355541921137830257179579814166199074L,
+        0.338144944008716397710235913939267433111L,
+        0.340926586970593210305089199780356208443L,
+        0.34370051385331844468019789211029452987L,
+        0.346466767346208580918462188425772950712L,
+        0.349225389785288304181275421187371759687L,
+        0.35197642315717818465544745625943892599L,
+        0.354719909102929028355011218999317665826L,
+        0.357455888921803774226009490140904474434L,
+        0.360184403575007796281574967493016620926L,
+        0.362905493689368453137824345977489846141L,
+        0.365619199560964711319396875217046453067L,
+        0.368325561158707653048230154050398826898L,
+        0.371024618127872663911964910806824955394L,
+        0.373716409793584080821016832715823506644L,
+        0.376400975164253065997877633436251593315L,
+        0.379078352934969458390853345631019858882L,
+        0.38174858149084833985966626493567607862L,
+        0.384411698910332039734790062481290868519L,
+        0.387067742968448287898902502261817665695L,
+        0.38971675114002521337046360400352086705L,
+        0.392358760602863872479379611988215363485L,
+        0.39499380824086897810639403636498176831L,
+        0.397621930647138489104829072973405554918L,
+        0.40024316412701270692932510199513117008L,
+        0.402857544701083514655197565487057707577L,
+        0.405465108108164381978013115464349136572L,
+        0.408065889808221748430198682969084124381L,
+        0.410659924985268385934306203175822787661L,
+        0.41324724855021933092547601552548590025L,
+        0.415827895143710965613328892954902305356L,
+        0.418401899138883817510763261966760106515L,
+        0.42096929464412963612886716150679597245L,
+        0.423530115505803295718430478017910109426L,
+        0.426084395310900063124544879595476618897L,
+        0.428632167389698760206812276426639053152L,
+        0.43117346481837134085917247895559499848L,
+        0.433708320421559393435847903042186017095L,
+        0.436236766774918070349041323061121300663L,
+        0.438758836207627937745575058511446738878L,
+        0.441274560804875229489496441661301225362L,
+        0.443783972410300981171768440588146426918L,
+        0.446287102628419511532590180619669006749L,
+        0.448783982827006710512822115683937186274L,
+        0.451274644139458585144692383079012478686L,
+        0.453759117467120506644794794442263270651L,
+        0.456237433481587594380805538163929748437L,
+        0.458709622626976664843883309250877913511L,
+        0.461175715122170166367999925597855358603L,
+        0.463635740963032513092182277331163919118L,
+        0.466089729924599224558619247504769399859L,
+        0.468537711563239270375665237462973542708L,
+        0.470979715218791012546897856056359251373L,
+        0.473415770016672131372578393236978550606L,
+        0.475845904869963914265209586304381412175L,
+        0.478270148481470280383546145497464809096L,
+        0.480688529345751907676618455448011551209L,
+        0.48310107575113582273837458485214554795L,
+        0.485507815781700807801791077190788900579L,
+        0.487908777319238973246173184132656942487L,
+        0.490303988045193838150346159645746860531L,
+        0.492693475442575255695076950020077845328L,
+        0.495077266797851514597964584842833665358L,
+        0.497455389202818942250859256731684928918L,
+        0.499827869556449329821331415247044141512L,
+        0.502194734566715494273584171951812573586L,
+        0.504556010752395287058308531738174929982L,
+        0.506911724444854354113196312660089270034L,
+        0.509261901789807946804074919228323824878L,
+        0.51160656874906207851888487520338193135L,
+        0.51394575110223431680100608827421759311L,
+        0.51627947444845449617281928478756106467L,
+        0.518607764208045632152976996364798698556L,
+        0.520930645624185312409809834659637709188L,
+        0.52324814376454783651680722493487084164L,
+        0.525560283522927371382427602307131424923L,
+        0.527867089620842385113892217778300963557L,
+        0.530168586609121617841419630845212405063L,
+        0.532464798869471843873923723460142242606L,
+        0.534755750616027675477923292032637111077L,
+        0.537041465896883654566729244153832299024L,
+        0.539321968595608874655355158077341155752L,
+        0.54159728243274437157654230390043409897L,
+        0.543867430967283517663338989065998323965L,
+        0.546132437598135650382397209231209163864L,
+        0.548392325565573162748150286179863158565L,
+        0.550647117952662279259948179204913460093L,
+        0.552896837686677737580717902230624314327L,
+        0.55514150754050159271548035951590405017L,
+        0.557381150134006357049816540361233647898L,
+        0.559615787935422686270888500526826593487L,
+        0.561845443262691817915664819160697456814L,
+        0.564070138284802966071384290090190711817L,
+        0.566289895023115872590849979337124343595L,
+        0.568504735352668712078738764866962263577L,
+        0.5707146810034715448536245647415894503L,
+        0.572919753561785509092756726626261068625L,
+        0.575119974471387940421742546569273429365L,
+        0.577315365034823604318112061519496401506L,
+        0.579505946414642223855274409488070989814L,
+        0.58169173963462248252061075372537234071L,
+        0.583872765580982679097413356975291104927L,
+        0.586049045003578208904119436287324349516L,
+        0.588220598517086043034868221609113995052L,
+        0.590387446602176374641916708123598757576L,
+        0.59254960960667159874199020959329739696L,
+        0.594707107746692789514343546529205333192L,
+        0.59685996110779383658731192302565801002L,
+        0.59900818964608339938160002446165150206L,
+        0.601151813189334836191674317068856441547L,
+        0.603290851438084262340585186661310605647L,
+        0.6054253239667168894375677681414899356L,
+        0.607555250224541795501085152791125371894L,
+        0.609680649536855273481833501660588408785L,
+        0.611801541105992903529889766428814783686L,
+        0.613917944012370492196929119645563790777L,
+        0.616029877215514019647565928196700650293L,
+        0.618137359555078733872689126674816271683L,
+        0.620240409751857528851494632567246856773L,
+        0.62233904640877874159710264120869663505L,
+        0.62443328801189350104253874405467311991L,
+        0.626523152931352759778820859734204069282L,
+        0.628608659422374137744308205774183639946L,
+        0.6306898256261987050837261409313532241L,
+        0.63276666957103782954578646850357975849L,
+        0.634839209173010211969493840510489008123L,
+        0.63690746223706923162049442718119919119L,
+        0.63897144645792072137962398326473680873L,
+        0.64103117942093129105560133440539254671L,
+        0.643086678603027315392053859585132960477L,
+        0.645137961373584701665228496134731905937L,
+        0.647185044995309550122320631377863036675L,
+        0.64922794662510981889083996990531112227L,
+        0.651266683314958103396333353349672108398L,
+        0.653301272012745638758615881210873884572L,
+        0.65533172956312763209494967856962559648L,
+        0.657358072708360030141890023245936165513L,
+        0.659380318089127826115336413370955804038L,
+        0.661398482245365008260235838709650938148L,
+        0.66341258161706625109695030429080128179L,
+        0.665422632545090448950092610006660181147L,
+        0.667428651271956189947234166318980478403L,
+        0.669430653942629267298885270929503510123L,
+        0.67142865660530232331713904200189252584L,
+        0.67342267521216672029796038880101726475L,
+        0.67541272562017673108090414397019748722L,
+        0.677398823591806140809682609997348298556L,
+        0.67938098479579735014710062847376425181L,
+        0.681359224807903068948071559568089441735L,
+        0.683333559111620688164363148387750369654L,
+        0.68530400309891941654404807896723298642L,
+        0.687270572070960267497006884394346103924L,
+        0.689233281238808980324914337814603903233L,
+        0.691192145724141958859604629216309755938L,
+        0.693147180559945309417232121458176568075L
+      };
+    return logl_table[128 + (int)m] + 2.0L * atanh_z;
+  }
+}
+
+#endif
new file mode 100644
--- /dev/null
+++ b/lib/log2.c
@@ -0,0 +1,73 @@
+/* Base 2 logarithm.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+/* Best possible approximation of log(2) as a 'double'.  */
+#define LOG2 0.693147180559945309417232121458176568075
+
+/* Best possible approximation of 1/log(2) as a 'double'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743
+
+/* sqrt(0.5).  */
+#define SQRT_HALF 0.707106781186547524400844362104849039284
+
+double
+log2 (double x)
+{
+  if (isnand (x))
+    return x;
+
+  if (x <= 0.0)
+    {
+      if (x == 0.0)
+        /* Return -Infinity.  */
+        return - HUGE_VAL;
+      else
+        {
+          /* Return NaN.  */
+#if defined _MSC_VER || (defined __sgi && !defined __GNUC__)
+          static double zero;
+          return zero / zero;
+#else
+          return 0.0 / 0.0;
+#endif
+        }
+    }
+
+  /* Decompose x into
+       x = 2^e * y
+     where
+       e is an integer,
+       1/2 < y < 2.
+     Then log2(x) = e + log2(y) = e + log(y)/log(2).  */
+  {
+    int e;
+    double y;
+
+    y = frexp (x, &e);
+    if (y < SQRT_HALF)
+      {
+        y = 2.0 * y;
+        e = e - 1;
+      }
+
+    return (double) e + log (y) * LOG2_INVERSE;
+  }
+}
new file mode 100644
--- /dev/null
+++ b/lib/log2f.c
@@ -0,0 +1,85 @@
+/* Base 2 logarithm.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_LOG2
+
+float
+log2f (float x)
+{
+  return (float) log2 ((double) x);
+}
+
+#else
+
+/* Best possible approximation of log(2) as a 'float'.  */
+#define LOG2 0.693147180559945309417232121458176568075f
+
+/* Best possible approximation of 1/log(2) as a 'float'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743f
+
+/* sqrt(0.5).  */
+#define SQRT_HALF 0.707106781186547524400844362104849039284f
+
+float
+log2f (float x)
+{
+  if (isnanf (x))
+    return x;
+
+  if (x <= 0.0f)
+    {
+      if (x == 0.0f)
+        /* Return -Infinity.  */
+        return - HUGE_VALF;
+      else
+        {
+          /* Return NaN.  */
+#if defined _MSC_VER
+          static float zero;
+          return zero / zero;
+#else
+          return 0.0f / 0.0f;
+#endif
+        }
+    }
+
+  /* Decompose x into
+       x = 2^e * y
+     where
+       e is an integer,
+       1/2 < y < 2.
+     Then log2(x) = e + log2(y) = e + log(y)/log(2).  */
+  {
+    int e;
+    float y;
+
+    y = frexpf (x, &e);
+    if (y < SQRT_HALF)
+      {
+        y = 2.0f * y;
+        e = e - 1;
+      }
+
+    return (float) e + logf (y) * LOG2_INVERSE;
+  }
+}
+
+#endif
new file mode 100644
--- /dev/null
+++ b/lib/log2l.c
@@ -0,0 +1,85 @@
+/* Base 2 logarithm.
+   Copyright (C) 2011-2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+log2l (long double x)
+{
+  return log2 (x);
+}
+
+#else
+
+/* Best possible approximation of log(2) as a 'long double'.  */
+#define LOG2 0.693147180559945309417232121458176568075L
+
+/* Best possible approximation of 1/log(2) as a 'long double'.  */
+#define LOG2_INVERSE 1.44269504088896340735992468100189213743L
+
+/* sqrt(0.5).  */
+#define SQRT_HALF 0.707106781186547524400844362104849039284L
+
+long double
+log2l (long double x)
+{
+  if (isnanl (x))
+    return x;
+
+  if (x <= 0.0L)
+    {
+      if (x == 0.0L)
+        /* Return -Infinity.  */
+        return - HUGE_VALL;
+      else
+        {
+          /* Return NaN.  */
+#if defined _MSC_VER || (defined __sgi && !defined __GNUC__)
+          static long double zero;
+          return zero / zero;
+#else
+          return 0.0L / 0.0L;
+#endif
+        }
+    }
+
+  /* Decompose x into
+       x = 2^e * y
+     where
+       e is an integer,
+       1/2 < y < 2.
+     Then log2(x) = e + log2(y) = e + log(y)/log(2).  */
+  {
+    int e;
+    long double y;
+
+    y = frexpl (x, &e);
+    if (y < SQRT_HALF)
+      {
+        y = 2.0L * y;
+        e = e - 1;
+      }
+
+    return (long double) e + logl (y) * LOG2_INVERSE;
+  }
+}
+
+#endif
new file mode 100644
--- /dev/null
+++ b/lib/logb.c
@@ -0,0 +1,71 @@
+/* Floating-point exponent.
+   Copyright (C) 2012 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/>.  */
+
+#if ! (defined USE_LONG_DOUBLE || defined USE_FLOAT)
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include <math.h>
+
+#ifdef USE_LONG_DOUBLE
+# define LOGB logbl
+# define DOUBLE long double
+# define L_(literal) literal##L
+# define HUGEVAL HUGE_VALL
+# define FREXP frexpl
+# define ISNAN isnanl
+#elif ! defined USE_FLOAT
+# define LOGB logb
+# define DOUBLE double
+# define L_(literal) literal
+# define HUGEVAL HUGE_VAL
+# define FREXP frexp
+# define ISNAN isnand
+#else /* defined USE_FLOAT */
+# define LOGB logbf
+# define DOUBLE float
+# define L_(literal) literal##f
+# define HUGEVAL HUGE_VALF
+# define FREXP frexpf
+# define ISNAN isnanf
+#endif
+
+DOUBLE
+LOGB (DOUBLE x)
+{
+  if (isfinite (x))
+    {
+      if (x == L_(0.0))
+        /* Return -Infinity.  */
+        return - HUGEVAL;
+      else
+        {
+          int e;
+
+          (void) FREXP (x, &e);
+          return (DOUBLE) (e - 1);
+        }
+    }
+  else
+    {
+      if (ISNAN (x))
+        return x; /* NaN */
+      else
+        /* Return +Infinity.  */
+        return HUGEVAL;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/lib/logbf.c
@@ -0,0 +1,23 @@
+/* Floating-point exponent.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#define USE_FLOAT
+#include "logb.c"
new file mode 100644
--- /dev/null
+++ b/lib/logbl.c
@@ -0,0 +1,35 @@
+/* Floating-point exponent.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+logbl (long double x)
+{
+  return logb (x);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "logb.c"
+
+#endif
--- a/lib/logf.c
+++ b/lib/logf.c
@@ -21,6 +21,22 @@
 
 float
 logf (float x)
+#undef logf
 {
+#if HAVE_LOGF
+  if (x <= 0.0f)
+    {
+      /* Work around the OSF/1 5.1 bug.  */
+      if (x == 0.0f)
+        /* Return -Infinity.  */
+        return -1.0f / 0.0f;
+      /* Work around the NetBSD 5.1 bug.  */
+      else /* x < 0.0 */
+        /* Return NaN.  */
+        return 0.0f / 0.0f;
+    }
+  return logf (x);
+#else
   return (float) log ((double) x);
+#endif
 }
--- a/lib/logl.c
+++ b/lib/logl.c
@@ -26,8 +26,23 @@
   return log (x);
 }
 
+#elif HAVE_LOGL
+
+long double
+logl (long double x)
+# undef logl
+{
+  /* Work around the OSF/1 5.1 bug.  */
+  if (x == 0.0L)
+    /* Return -Infinity.  */
+    return -1.0L / 0.0L;
+  return logl (x);
+}
+
 #else
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_logl.c.  */
+
 /*                                                      logll.c
  *
  * Natural logarithm for 128-bit long double precision.
--- a/lib/lseek.c
+++ b/lib/lseek.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -60,5 +59,9 @@
       return -1;
     }
 #endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+  return _lseeki64 (fd, offset, whence);
+#else
   return lseek (fd, offset, whence);
+#endif
 }
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -35,7 +35,7 @@
 # include <sys/stat.h>
 # undef __need_system_sys_stat_h
 
-static inline int
+static int
 orig_lstat (const char *filename, struct stat *buf)
 {
   return lstat (filename, buf);
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering and Bruno Haible */
 
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #define _GL_USE_STDLIB_ALLOC 1
 #include <config.h>
@@ -22,6 +21,8 @@
 /* Specification.  */
 #include "malloca.h"
 
+#include <stdint.h>
+
 #include "verify.h"
 
 /* The speed critical point in this file is freea() applied to an alloca()
@@ -85,7 +86,7 @@
           ((int *) p)[-1] = MAGIC_NUMBER;
 
           /* Enter p into the hash table.  */
-          slot = (unsigned long) p % HASH_TABLE_SIZE;
+          slot = (uintptr_t) p % HASH_TABLE_SIZE;
           ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
           mmalloca_results[slot] = p;
 
@@ -118,7 +119,7 @@
         {
           /* Looks like a mmalloca() result.  To see whether it really is one,
              perform a lookup in the hash table.  */
-          size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
+          size_t slot = (uintptr_t) p % HASH_TABLE_SIZE;
           void **chain = &mmalloca_results[slot];
           for (; *chain != NULL;)
             {
--- a/lib/malloca.h
+++ b/lib/malloca.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _MALLOCA_H
 #define _MALLOCA_H
@@ -43,7 +42,7 @@
    and a page size can be as small as 4096 bytes.  So we cannot safely
    allocate anything larger than 4096 bytes.  Also care for the possibility
    of a few compiler-allocated temporary stack slots.
-   This must be a macro, not an inline function.  */
+   This must be a macro, not a function.  */
 # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
 #else
 # define safe_alloca(N) ((void) (N), NULL)
new file mode 100644
--- /dev/null
+++ b/lib/math.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_MATH_INLINE _GL_EXTERN_INLINE
+#include "math.h"
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -28,6 +28,10 @@
 #ifndef _@GUARD_PREFIX@_MATH_H
 #define _@GUARD_PREFIX@_MATH_H
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_MATH_INLINE
+# define _GL_MATH_INLINE _GL_INLINE
+#endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -78,17 +82,17 @@
    classification macros with an argument of real-floating (that is,
    one of float, double, or long double).  */
 #define _GL_WARN_REAL_FLOATING_DECL(func) \
-static inline int                                                   \
+_GL_MATH_INLINE int                                                 \
 rpl_ ## func ## f (float f)                                         \
 {                                                                   \
   return func (f);                                                  \
 }                                                                   \
-static inline int                                                   \
+_GL_MATH_INLINE int                                                 \
 rpl_ ## func ## d (double d)                                        \
 {                                                                   \
   return func (d);                                                  \
 }                                                                   \
-static inline int                                                   \
+_GL_MATH_INLINE int                                                 \
 rpl_ ## func ## l (long double l)                                   \
 {                                                                   \
   return func (l);                                                  \
@@ -124,7 +128,7 @@
   /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
      choke on the expression 0.0 / 0.0.  */
 #  if defined __DECC || defined _MSC_VER
-static float
+_GL_MATH_INLINE float
 _NaN ()
 {
   static float zero = 0.0f;
@@ -141,8 +145,64 @@
 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
    than a floating point constant.  */
 #if @REPLACE_HUGE_VAL@
+# undef HUGE_VALF
+# define HUGE_VALF (1.0f / 0.0f)
 # undef HUGE_VAL
 # define HUGE_VAL (1.0 / 0.0)
+# undef HUGE_VALL
+# define HUGE_VALL (1.0L / 0.0L)
+#endif
+
+/* HUGE_VALF is a 'float' Infinity.  */
+#ifndef HUGE_VALF
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f.  */
+#  define HUGE_VALF (1e25f * 1e25f)
+# else
+#  define HUGE_VALF (1.0f / 0.0f)
+# endif
+#endif
+
+/* HUGE_VAL is a 'double' Infinity.  */
+#ifndef HUGE_VAL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0.  */
+#  define HUGE_VAL (1e250 * 1e250)
+# else
+#  define HUGE_VAL (1.0 / 0.0)
+# endif
+#endif
+
+/* HUGE_VALL is a 'long double' Infinity.  */
+#ifndef HUGE_VALL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L.  */
+#  define HUGE_VALL (1e250L * 1e250L)
+# else
+#  define HUGE_VALL (1.0L / 0.0L)
+# endif
+#endif
+
+
+/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined.  */
+#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
+# if defined __NetBSD__ || defined __sgi
+  /* NetBSD, IRIX 6.5: match what ilogb() does */
+#  define FP_ILOGB0   (- 2147483647 - 1) /* INT_MIN */
+#  define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
+# elif defined _AIX
+  /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
+#  define FP_ILOGB0   (- 2147483647 - 1) /* INT_MIN */
+#  define FP_ILOGBNAN 2147483647 /* INT_MAX */
+# elif defined __sun
+  /* Solaris 9: match what ilogb() does */
+#  define FP_ILOGB0   (- 2147483647) /* - INT_MAX */
+#  define FP_ILOGBNAN 2147483647 /* INT_MAX */
+# else
+  /* Gnulib defined values.  */
+#  define FP_ILOGB0   (- 2147483647) /* - INT_MAX */
+#  define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
+# endif
 #endif
 
 
@@ -163,6 +223,7 @@
 
 #if @GNULIB_ACOSL@
 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
+#  undef acosl
 _GL_FUNCDECL_SYS (acosl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (acosl, long double, (long double x));
@@ -171,7 +232,7 @@
 # undef acosl
 # if HAVE_RAW_DECL_ACOSL
 _GL_WARN_ON_USE (acosl, "acosl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module acosl for portability");
 # endif
 #endif
 
@@ -193,6 +254,7 @@
 
 #if @GNULIB_ASINL@
 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
+#  undef asinl
 _GL_FUNCDECL_SYS (asinl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (asinl, long double, (long double x));
@@ -201,7 +263,7 @@
 # undef asinl
 # if HAVE_RAW_DECL_ASINL
 _GL_WARN_ON_USE (asinl, "asinl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module asinl for portability");
 # endif
 #endif
 
@@ -223,6 +285,7 @@
 
 #if @GNULIB_ATANL@
 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
+#  undef atanl
 _GL_FUNCDECL_SYS (atanl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (atanl, long double, (long double x));
@@ -231,7 +294,7 @@
 # undef atanl
 # if HAVE_RAW_DECL_ATANL
 _GL_WARN_ON_USE (atanl, "atanl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module atanl for portability");
 # endif
 #endif
 
@@ -252,6 +315,67 @@
 #endif
 
 
+#if @GNULIB_CBRTF@
+# if @REPLACE_CBRTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef cbrtf
+#   define cbrtf rpl_cbrtf
+#  endif
+_GL_FUNCDECL_RPL (cbrtf, float, (float x));
+_GL_CXXALIAS_RPL (cbrtf, float, (float x));
+# else
+#  if !@HAVE_DECL_CBRTF@
+_GL_FUNCDECL_SYS (cbrtf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (cbrtf, float, (float x));
+# endif
+_GL_CXXALIASWARN (cbrtf);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtf
+# if HAVE_RAW_DECL_CBRTF
+_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
+                 "use gnulib module cbrtf for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRT@
+# if !@HAVE_CBRT@
+_GL_FUNCDECL_SYS (cbrt, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (cbrt, double, (double x));
+_GL_CXXALIASWARN (cbrt);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrt
+# if HAVE_RAW_DECL_CBRT
+_GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
+                 "use gnulib module cbrt for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRTL@
+# if @REPLACE_CBRTL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef cbrtl
+#   define cbrtl rpl_cbrtl
+#  endif
+_GL_FUNCDECL_RPL (cbrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
+# else
+#  if !@HAVE_DECL_CBRTL@
+_GL_FUNCDECL_SYS (cbrtl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (cbrtl);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtl
+# if HAVE_RAW_DECL_CBRTL
+_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
+                 "use gnulib module cbrtl for portability");
+# endif
+#endif
+
+
 #if @GNULIB_CEILF@
 # if @REPLACE_CEILF@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -262,6 +386,7 @@
 _GL_CXXALIAS_RPL (ceilf, float, (float x));
 # else
 #  if !@HAVE_DECL_CEILF@
+#   undef ceilf
 _GL_FUNCDECL_SYS (ceilf, float, (float x));
 #  endif
 _GL_CXXALIAS_SYS (ceilf, float, (float x));
@@ -298,6 +423,7 @@
 _GL_CXXALIAS_RPL (ceill, long double, (long double x));
 # else
 #  if !@HAVE_DECL_CEILL@
+#   undef ceill
 _GL_FUNCDECL_SYS (ceill, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (ceill, long double, (long double x));
@@ -313,7 +439,7 @@
 
 
 #if @GNULIB_COPYSIGNF@
-# if !@HAVE_COPYSIGNF@
+# if !@HAVE_DECL_COPYSIGNF@
 _GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
 # endif
 _GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
@@ -372,6 +498,7 @@
 
 #if @GNULIB_COSL@
 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
+#  undef cosl
 _GL_FUNCDECL_SYS (cosl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (cosl, long double, (long double x));
@@ -380,7 +507,7 @@
 # undef cosl
 # if HAVE_RAW_DECL_COSL
 _GL_WARN_ON_USE (cosl, "cosl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module cosl for portability");
 # endif
 #endif
 
@@ -418,6 +545,7 @@
 
 #if @GNULIB_EXPL@
 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
+#  undef expl
 _GL_FUNCDECL_SYS (expl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (expl, long double, (long double x));
@@ -426,7 +554,131 @@
 # undef expl
 # if HAVE_RAW_DECL_EXPL
 _GL_WARN_ON_USE (expl, "expl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module expl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXP2F@
+# if !@HAVE_DECL_EXP2F@
+_GL_FUNCDECL_SYS (exp2f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (exp2f, float, (float x));
+_GL_CXXALIASWARN (exp2f);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2f
+# if HAVE_RAW_DECL_EXP2F
+_GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
+                 "use gnulib module exp2f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2@
+# if @REPLACE_EXP2@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef exp2
+#   define exp2 rpl_exp2
+#  endif
+_GL_FUNCDECL_RPL (exp2, double, (double x));
+_GL_CXXALIAS_RPL (exp2, double, (double x));
+# else
+#  if !@HAVE_DECL_EXP2@
+_GL_FUNCDECL_SYS (exp2, double, (double x));
+#  endif
+_GL_CXXALIAS_SYS (exp2, double, (double x));
+# endif
+_GL_CXXALIASWARN (exp2);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2
+# if HAVE_RAW_DECL_EXP2
+_GL_WARN_ON_USE (exp2, "exp2 is unportable - "
+                 "use gnulib module exp2 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2L@
+# if @REPLACE_EXP2L@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef exp2l
+#   define exp2l rpl_exp2l
+#  endif
+_GL_FUNCDECL_RPL (exp2l, long double, (long double x));
+_GL_CXXALIAS_RPL (exp2l, long double, (long double x));
+# else
+#  if !@HAVE_DECL_EXP2L@
+#   undef exp2l
+_GL_FUNCDECL_SYS (exp2l, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (exp2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (exp2l);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2l
+# if HAVE_RAW_DECL_EXP2L
+_GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
+                 "use gnulib module exp2l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPM1F@
+# if @REPLACE_EXPM1F@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef expm1f
+#   define expm1f rpl_expm1f
+#  endif
+_GL_FUNCDECL_RPL (expm1f, float, (float x));
+_GL_CXXALIAS_RPL (expm1f, float, (float x));
+# else
+#  if !@HAVE_EXPM1F@
+_GL_FUNCDECL_SYS (expm1f, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (expm1f, float, (float x));
+# endif
+_GL_CXXALIASWARN (expm1f);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1f
+# if HAVE_RAW_DECL_EXPM1F
+_GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
+                 "use gnulib module expm1f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1@
+# if @REPLACE_EXPM1@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef expm1
+#   define expm1 rpl_expm1
+#  endif
+_GL_FUNCDECL_RPL (expm1, double, (double x));
+_GL_CXXALIAS_RPL (expm1, double, (double x));
+# else
+#  if !@HAVE_EXPM1@
+_GL_FUNCDECL_SYS (expm1, double, (double x));
+#  endif
+_GL_CXXALIAS_SYS (expm1, double, (double x));
+# endif
+_GL_CXXALIASWARN (expm1);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1
+# if HAVE_RAW_DECL_EXPM1
+_GL_WARN_ON_USE (expm1, "expm1 is unportable - "
+                 "use gnulib module expm1 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1L@
+# if !@HAVE_DECL_EXPM1L@
+#  undef expm1l
+_GL_FUNCDECL_SYS (expm1l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (expm1l, long double, (long double x));
+_GL_CXXALIASWARN (expm1l);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1l
+# if HAVE_RAW_DECL_EXPM1L
+_GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
+                 "use gnulib module expm1l for portability");
 # endif
 #endif
 
@@ -446,6 +698,30 @@
 # endif
 #endif
 
+#if @GNULIB_FABSL@
+# if @REPLACE_FABSL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fabsl
+#   define fabsl rpl_fabsl
+#  endif
+_GL_FUNCDECL_RPL (fabsl, long double, (long double x));
+_GL_CXXALIAS_RPL (fabsl, long double, (long double x));
+# else
+#  if !@HAVE_FABSL@
+#   undef fabsl
+_GL_FUNCDECL_SYS (fabsl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (fabsl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (fabsl);
+#elif defined GNULIB_POSIXCHECK
+# undef fabsl
+# if HAVE_RAW_DECL_FABSL
+_GL_WARN_ON_USE (fabsl, "fabsl is unportable - "
+                 "use gnulib module fabsl for portability");
+# endif
+#endif
+
 
 #if @GNULIB_FLOORF@
 # if @REPLACE_FLOORF@
@@ -457,6 +733,7 @@
 _GL_CXXALIAS_RPL (floorf, float, (float x));
 # else
 #  if !@HAVE_DECL_FLOORF@
+#   undef floorf
 _GL_FUNCDECL_SYS (floorf, float, (float x));
 #  endif
 _GL_CXXALIAS_SYS (floorf, float, (float x));
@@ -493,6 +770,7 @@
 _GL_CXXALIAS_RPL (floorl, long double, (long double x));
 # else
 #  if !@HAVE_DECL_FLOORL@
+#   undef floorl
 _GL_FUNCDECL_SYS (floorl, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (floorl, long double, (long double x));
@@ -565,6 +843,7 @@
                   (long double x, long double y, long double z));
 # else
 #  if !@HAVE_FMAL@
+#   undef fmal
 _GL_FUNCDECL_SYS (fmal, long double,
                   (long double x, long double y, long double z));
 #  endif
@@ -582,11 +861,20 @@
 
 
 #if @GNULIB_FMODF@
-# if !@HAVE_FMODF@
-#  undef fmodf
+# if @REPLACE_FMODF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fmodf
+#   define fmodf rpl_fmodf
+#  endif
+_GL_FUNCDECL_RPL (fmodf, float, (float x, float y));
+_GL_CXXALIAS_RPL (fmodf, float, (float x, float y));
+# else
+#  if !@HAVE_FMODF@
+#   undef fmodf
 _GL_FUNCDECL_SYS (fmodf, float, (float x, float y));
+#  endif
+_GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
 # endif
-_GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
 _GL_CXXALIASWARN (fmodf);
 #elif defined GNULIB_POSIXCHECK
 # undef fmodf
@@ -596,6 +884,50 @@
 # endif
 #endif
 
+#if @GNULIB_FMOD@
+# if @REPLACE_FMOD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fmod
+#   define fmod rpl_fmod
+#  endif
+_GL_FUNCDECL_RPL (fmod, double, (double x, double y));
+_GL_CXXALIAS_RPL (fmod, double, (double x, double y));
+# else
+_GL_CXXALIAS_SYS (fmod, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (fmod);
+#elif defined GNULIB_POSIXCHECK
+# undef fmod
+# if HAVE_RAW_DECL_FMOD
+_GL_WARN_ON_USE (fmod, "fmod has portability problems - "
+                 "use gnulib module fmod for portability");
+# endif
+#endif
+
+#if @GNULIB_FMODL@
+# if @REPLACE_FMODL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fmodl
+#   define fmodl rpl_fmodl
+#  endif
+_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y));
+# else
+#  if !@HAVE_FMODL@
+#   undef fmodl
+_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
+#  endif
+_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (fmodl);
+#elif defined GNULIB_POSIXCHECK
+# undef fmodl
+# if HAVE_RAW_DECL_FMODL
+_GL_WARN_ON_USE (fmodl, "fmodl is unportable - "
+                 "use gnulib module fmodl for portability");
+# endif
+#endif
+
 
 /* Write x as
      x = mantissa * 2^exp
@@ -689,6 +1021,137 @@
 #endif
 
 
+/* Return sqrt(x^2+y^2).  */
+#if @GNULIB_HYPOTF@
+# if @REPLACE_HYPOTF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef hypotf
+#   define hypotf rpl_hypotf
+#  endif
+_GL_FUNCDECL_RPL (hypotf, float, (float x, float y));
+_GL_CXXALIAS_RPL (hypotf, float, (float x, float y));
+# else
+#  if !@HAVE_HYPOTF@
+_GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
+#  endif
+_GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (hypotf);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotf
+# if HAVE_RAW_DECL_HYPOTF
+_GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
+                 "use gnulib module hypotf for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2).  */
+#if @GNULIB_HYPOT@
+# if @REPLACE_HYPOT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef hypot
+#   define hypot rpl_hypot
+#  endif
+_GL_FUNCDECL_RPL (hypot, double, (double x, double y));
+_GL_CXXALIAS_RPL (hypot, double, (double x, double y));
+# else
+_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (hypot);
+#elif defined GNULIB_POSIXCHECK
+# undef hypot
+# if HAVE_RAW_DECL_HYPOT
+_GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
+                 "use gnulib module hypot for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2).  */
+#if @GNULIB_HYPOTL@
+# if @REPLACE_HYPOTL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef hypotl
+#   define hypotl rpl_hypotl
+#  endif
+_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y));
+# else
+#  if !@HAVE_HYPOTL@
+_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
+#  endif
+_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (hypotl);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotl
+# if HAVE_RAW_DECL_HYPOTL
+_GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
+                 "use gnulib module hypotl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ILOGBF@
+# if @REPLACE_ILOGBF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ilogbf
+#   define ilogbf rpl_ilogbf
+#  endif
+_GL_FUNCDECL_RPL (ilogbf, int, (float x));
+_GL_CXXALIAS_RPL (ilogbf, int, (float x));
+# else
+#  if !@HAVE_ILOGBF@
+_GL_FUNCDECL_SYS (ilogbf, int, (float x));
+#  endif
+_GL_CXXALIAS_SYS (ilogbf, int, (float x));
+# endif
+_GL_CXXALIASWARN (ilogbf);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogbf
+# if HAVE_RAW_DECL_ILOGBF
+_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - "
+                 "use gnulib module ilogbf for portability");
+# endif
+#endif
+
+#if @GNULIB_ILOGB@
+# if @REPLACE_ILOGB@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ilogb
+#   define ilogb rpl_ilogb
+#  endif
+_GL_FUNCDECL_RPL (ilogb, int, (double x));
+_GL_CXXALIAS_RPL (ilogb, int, (double x));
+# else
+#  if !@HAVE_ILOGB@
+_GL_FUNCDECL_SYS (ilogb, int, (double x));
+#  endif
+_GL_CXXALIAS_SYS (ilogb, int, (double x));
+# endif
+_GL_CXXALIASWARN (ilogb);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogb
+# if HAVE_RAW_DECL_ILOGB
+_GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
+                 "use gnulib module ilogb for portability");
+# endif
+#endif
+
+#if @GNULIB_ILOGBL@
+# if !@HAVE_ILOGBL@
+_GL_FUNCDECL_SYS (ilogbl, int, (long double x));
+# endif
+_GL_CXXALIAS_SYS (ilogbl, int, (long double x));
+_GL_CXXALIASWARN (ilogbl);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogbl
+# if HAVE_RAW_DECL_ILOGBL
+_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
+                 "use gnulib module ilogbl for portability");
+# endif
+#endif
+
+
 /* Return x * 2^exp.  */
 #if @GNULIB_LDEXPF@
 # if !@HAVE_LDEXPF@
@@ -733,25 +1196,21 @@
 #endif
 
 
-#if @GNULIB_LOGB@
-# if !@HAVE_DECL_LOGB@
-_GL_EXTERN_C double logb (double x);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef logb
-# if HAVE_RAW_DECL_LOGB
-_GL_WARN_ON_USE (logb, "logb is unportable - "
-                 "use gnulib module logb for portability");
+#if @GNULIB_LOGF@
+# if @REPLACE_LOGF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef logf
+#   define logf rpl_logf
+#  endif
+_GL_FUNCDECL_RPL (logf, float, (float x));
+_GL_CXXALIAS_RPL (logf, float, (float x));
+# else
+#  if !@HAVE_LOGF@
+#   undef logf
+_GL_FUNCDECL_SYS (logf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (logf, float, (float x));
 # endif
-#endif
-
-
-#if @GNULIB_LOGF@
-# if !@HAVE_LOGF@
-#  undef logf
-_GL_FUNCDECL_SYS (logf, float, (float x));
-# endif
-_GL_CXXALIAS_SYS (logf, float, (float x));
 _GL_CXXALIASWARN (logf);
 #elif defined GNULIB_POSIXCHECK
 # undef logf
@@ -761,27 +1220,66 @@
 # endif
 #endif
 
+#if @GNULIB_LOG@
+# if @REPLACE_LOG@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log
+#   define log rpl_log
+#  endif
+_GL_FUNCDECL_RPL (log, double, (double x));
+_GL_CXXALIAS_RPL (log, double, (double x));
+# else
+_GL_CXXALIAS_SYS (log, double, (double x));
+# endif
+_GL_CXXALIASWARN (log);
+#elif defined GNULIB_POSIXCHECK
+# undef log
+# if HAVE_RAW_DECL_LOG
+_GL_WARN_ON_USE (log, "log has portability problems - "
+                 "use gnulib module log for portability");
+# endif
+#endif
+
 #if @GNULIB_LOGL@
-# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+# if @REPLACE_LOGL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef logl
+#   define logl rpl_logl
+#  endif
+_GL_FUNCDECL_RPL (logl, long double, (long double x));
+_GL_CXXALIAS_RPL (logl, long double, (long double x));
+# else
+#  if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+#   undef logl
 _GL_FUNCDECL_SYS (logl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (logl, long double, (long double x));
 # endif
-_GL_CXXALIAS_SYS (logl, long double, (long double x));
 _GL_CXXALIASWARN (logl);
 #elif defined GNULIB_POSIXCHECK
 # undef logl
 # if HAVE_RAW_DECL_LOGL
 _GL_WARN_ON_USE (logl, "logl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module logl for portability");
 # endif
 #endif
 
 
 #if @GNULIB_LOG10F@
-# if !@HAVE_LOG10F@
-#  undef log10f
+# if @REPLACE_LOG10F@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log10f
+#   define log10f rpl_log10f
+#  endif
+_GL_FUNCDECL_RPL (log10f, float, (float x));
+_GL_CXXALIAS_RPL (log10f, float, (float x));
+# else
+#  if !@HAVE_LOG10F@
+#   undef log10f
 _GL_FUNCDECL_SYS (log10f, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (log10f, float, (float x));
 # endif
-_GL_CXXALIAS_SYS (log10f, float, (float x));
 _GL_CXXALIASWARN (log10f);
 #elif defined GNULIB_POSIXCHECK
 # undef log10f
@@ -791,13 +1289,278 @@
 # endif
 #endif
 
+#if @GNULIB_LOG10@
+# if @REPLACE_LOG10@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log10
+#   define log10 rpl_log10
+#  endif
+_GL_FUNCDECL_RPL (log10, double, (double x));
+_GL_CXXALIAS_RPL (log10, double, (double x));
+# else
+_GL_CXXALIAS_SYS (log10, double, (double x));
+# endif
+_GL_CXXALIASWARN (log10);
+#elif defined GNULIB_POSIXCHECK
+# undef log10
+# if HAVE_RAW_DECL_LOG10
+_GL_WARN_ON_USE (log10, "log10 has portability problems - "
+                 "use gnulib module log10 for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG10L@
+# if @REPLACE_LOG10L@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log10l
+#   define log10l rpl_log10l
+#  endif
+_GL_FUNCDECL_RPL (log10l, long double, (long double x));
+_GL_CXXALIAS_RPL (log10l, long double, (long double x));
+# else
+#  if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
+#   undef log10l
+_GL_FUNCDECL_SYS (log10l, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (log10l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log10l);
+#elif defined GNULIB_POSIXCHECK
+# undef log10l
+# if HAVE_RAW_DECL_LOG10L
+_GL_WARN_ON_USE (log10l, "log10l is unportable - "
+                 "use gnulib module log10l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG1PF@
+# if @REPLACE_LOG1PF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log1pf
+#   define log1pf rpl_log1pf
+#  endif
+_GL_FUNCDECL_RPL (log1pf, float, (float x));
+_GL_CXXALIAS_RPL (log1pf, float, (float x));
+# else
+#  if !@HAVE_LOG1PF@
+_GL_FUNCDECL_SYS (log1pf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIASWARN (log1pf);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pf
+# if HAVE_RAW_DECL_LOG1PF
+_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
+                 "use gnulib module log1pf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1P@
+# if @REPLACE_LOG1P@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log1p
+#   define log1p rpl_log1p
+#  endif
+_GL_FUNCDECL_RPL (log1p, double, (double x));
+_GL_CXXALIAS_RPL (log1p, double, (double x));
+# else
+#  if !@HAVE_LOG1P@
+_GL_FUNCDECL_SYS (log1p, double, (double x));
+#  endif
+_GL_CXXALIAS_SYS (log1p, double, (double x));
+# endif
+_GL_CXXALIASWARN (log1p);
+#elif defined GNULIB_POSIXCHECK
+# undef log1p
+# if HAVE_RAW_DECL_LOG1P
+_GL_WARN_ON_USE (log1p, "log1p has portability problems - "
+                 "use gnulib module log1p for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1PL@
+# if @REPLACE_LOG1PL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log1pl
+#   define log1pl rpl_log1pl
+#  endif
+_GL_FUNCDECL_RPL (log1pl, long double, (long double x));
+_GL_CXXALIAS_RPL (log1pl, long double, (long double x));
+# else
+#  if !@HAVE_LOG1PL@
+_GL_FUNCDECL_SYS (log1pl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log1pl);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pl
+# if HAVE_RAW_DECL_LOG1PL
+_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
+                 "use gnulib module log1pl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG2F@
+# if @REPLACE_LOG2F@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log2f
+#   define log2f rpl_log2f
+#  endif
+_GL_FUNCDECL_RPL (log2f, float, (float x));
+_GL_CXXALIAS_RPL (log2f, float, (float x));
+# else
+#  if !@HAVE_DECL_LOG2F@
+#   undef log2f
+_GL_FUNCDECL_SYS (log2f, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (log2f, float, (float x));
+# endif
+_GL_CXXALIASWARN (log2f);
+#elif defined GNULIB_POSIXCHECK
+# undef log2f
+# if HAVE_RAW_DECL_LOG2F
+_GL_WARN_ON_USE (log2f, "log2f is unportable - "
+                 "use gnulib module log2f for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2@
+# if @REPLACE_LOG2@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log2
+#   define log2 rpl_log2
+#  endif
+_GL_FUNCDECL_RPL (log2, double, (double x));
+_GL_CXXALIAS_RPL (log2, double, (double x));
+# else
+#  if !@HAVE_DECL_LOG2@
+#   undef log2
+_GL_FUNCDECL_SYS (log2, double, (double x));
+#  endif
+_GL_CXXALIAS_SYS (log2, double, (double x));
+# endif
+_GL_CXXALIASWARN (log2);
+#elif defined GNULIB_POSIXCHECK
+# undef log2
+# if HAVE_RAW_DECL_LOG2
+_GL_WARN_ON_USE (log2, "log2 is unportable - "
+                 "use gnulib module log2 for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2L@
+# if @REPLACE_LOG2L@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef log2l
+#   define log2l rpl_log2l
+#  endif
+_GL_FUNCDECL_RPL (log2l, long double, (long double x));
+_GL_CXXALIAS_RPL (log2l, long double, (long double x));
+# else
+#  if !@HAVE_DECL_LOG2L@
+_GL_FUNCDECL_SYS (log2l, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (log2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log2l);
+#elif defined GNULIB_POSIXCHECK
+# undef log2l
+# if HAVE_RAW_DECL_LOG2L
+_GL_WARN_ON_USE (log2l, "log2l is unportable - "
+                 "use gnulib module log2l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOGBF@
+# if @REPLACE_LOGBF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef logbf
+#   define logbf rpl_logbf
+#  endif
+_GL_FUNCDECL_RPL (logbf, float, (float x));
+_GL_CXXALIAS_RPL (logbf, float, (float x));
+# else
+#  if !@HAVE_LOGBF@
+_GL_FUNCDECL_SYS (logbf, float, (float x));
+#  endif
+_GL_CXXALIAS_SYS (logbf, float, (float x));
+# endif
+_GL_CXXALIASWARN (logbf);
+#elif defined GNULIB_POSIXCHECK
+# undef logbf
+# if HAVE_RAW_DECL_LOGBF
+_GL_WARN_ON_USE (logbf, "logbf is unportable - "
+                 "use gnulib module logbf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOGB@
+# if @REPLACE_LOGB@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef logb
+#   define logb rpl_logb
+#  endif
+_GL_FUNCDECL_RPL (logb, double, (double x));
+_GL_CXXALIAS_RPL (logb, double, (double x));
+# else
+#  if !@HAVE_DECL_LOGB@
+_GL_FUNCDECL_SYS (logb, double, (double x));
+#  endif
+_GL_CXXALIAS_SYS (logb, double, (double x));
+# endif
+_GL_CXXALIASWARN (logb);
+#elif defined GNULIB_POSIXCHECK
+# undef logb
+# if HAVE_RAW_DECL_LOGB
+_GL_WARN_ON_USE (logb, "logb is unportable - "
+                 "use gnulib module logb for portability");
+# endif
+#endif
+
+#if @GNULIB_LOGBL@
+# if @REPLACE_LOGBL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef logbl
+#   define logbl rpl_logbl
+#  endif
+_GL_FUNCDECL_RPL (logbl, long double, (long double x));
+_GL_CXXALIAS_RPL (logbl, long double, (long double x));
+# else
+#  if !@HAVE_LOGBL@
+_GL_FUNCDECL_SYS (logbl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (logbl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (logbl);
+#elif defined GNULIB_POSIXCHECK
+# undef logbl
+# if HAVE_RAW_DECL_LOGBL
+_GL_WARN_ON_USE (logbl, "logbl is unportable - "
+                 "use gnulib module logbl for portability");
+# endif
+#endif
+
 
 #if @GNULIB_MODFF@
-# if !@HAVE_MODFF@
-#  undef modff
+# if @REPLACE_MODFF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef modff
+#   define modff rpl_modff
+#  endif
+_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr));
+# else
+#  if !@HAVE_MODFF@
+#   undef modff
 _GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
 # endif
-_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
 _GL_CXXALIASWARN (modff);
 #elif defined GNULIB_POSIXCHECK
 # undef modff
@@ -807,6 +1570,52 @@
 # endif
 #endif
 
+#if @GNULIB_MODF@
+# if @REPLACE_MODF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef modf
+#   define modf rpl_modf
+#  endif
+_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
+# else
+_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
+# endif
+_GL_CXXALIASWARN (modf);
+#elif defined GNULIB_POSIXCHECK
+# undef modf
+# if HAVE_RAW_DECL_MODF
+_GL_WARN_ON_USE (modf, "modf has portability problems - "
+                 "use gnulib module modf for portability");
+# endif
+#endif
+
+#if @GNULIB_MODFL@
+# if @REPLACE_MODFL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef modfl
+#   define modfl rpl_modfl
+#  endif
+_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr)
+                                      _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr));
+# else
+#  if !@HAVE_MODFL@
+#   undef modfl
+_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
+                                      _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
+# endif
+_GL_CXXALIASWARN (modfl);
+#elif defined GNULIB_POSIXCHECK
+# undef modfl
+# if HAVE_RAW_DECL_MODFL
+_GL_WARN_ON_USE (modfl, "modfl is unportable - "
+                 "use gnulib module modfl for portability");
+# endif
+#endif
+
 
 #if @GNULIB_POWF@
 # if !@HAVE_POWF@
@@ -824,8 +1633,79 @@
 #endif
 
 
+#if @GNULIB_REMAINDERF@
+# if @REPLACE_REMAINDERF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef remainderf
+#   define remainderf rpl_remainderf
+#  endif
+_GL_FUNCDECL_RPL (remainderf, float, (float x, float y));
+_GL_CXXALIAS_RPL (remainderf, float, (float x, float y));
+# else
+#  if !@HAVE_REMAINDERF@
+_GL_FUNCDECL_SYS (remainderf, float, (float x, float y));
+#  endif
+_GL_CXXALIAS_SYS (remainderf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (remainderf);
+#elif defined GNULIB_POSIXCHECK
+# undef remainderf
+# if HAVE_RAW_DECL_REMAINDERF
+_GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
+                 "use gnulib module remainderf for portability");
+# endif
+#endif
+
+#if @GNULIB_REMAINDER@
+# if @REPLACE_REMAINDER@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef remainder
+#   define remainder rpl_remainder
+#  endif
+_GL_FUNCDECL_RPL (remainder, double, (double x, double y));
+_GL_CXXALIAS_RPL (remainder, double, (double x, double y));
+# else
+#  if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
+_GL_FUNCDECL_SYS (remainder, double, (double x, double y));
+#  endif
+_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (remainder);
+#elif defined GNULIB_POSIXCHECK
+# undef remainder
+# if HAVE_RAW_DECL_REMAINDER
+_GL_WARN_ON_USE (remainder, "remainder is unportable - "
+                 "use gnulib module remainder for portability");
+# endif
+#endif
+
+#if @GNULIB_REMAINDERL@
+# if @REPLACE_REMAINDERL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef remainderl
+#   define remainderl rpl_remainderl
+#  endif
+_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
+# else
+#  if !@HAVE_DECL_REMAINDERL@
+#   undef remainderl
+_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
+#  endif
+_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (remainderl);
+#elif defined GNULIB_POSIXCHECK
+# undef remainderl
+# if HAVE_RAW_DECL_REMAINDERL
+_GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
+                 "use gnulib module remainderl for portability");
+# endif
+#endif
+
+
 #if @GNULIB_RINTF@
-# if !@HAVE_RINTF@
+# if !@HAVE_DECL_RINTF@
 _GL_FUNCDECL_SYS (rintf, float, (float x));
 # endif
 _GL_CXXALIAS_SYS (rintf, float, (float x));
@@ -923,6 +1803,7 @@
 _GL_CXXALIAS_RPL (roundl, long double, (long double x));
 # else
 #  if !@HAVE_DECL_ROUNDL@
+#   undef roundl
 _GL_FUNCDECL_SYS (roundl, long double, (long double x));
 #  endif
 _GL_CXXALIAS_SYS (roundl, long double, (long double x));
@@ -954,6 +1835,7 @@
 
 #if @GNULIB_SINL@
 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
+#  undef sinl
 _GL_FUNCDECL_SYS (sinl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (sinl, long double, (long double x));
@@ -962,7 +1844,7 @@
 # undef sinl
 # if HAVE_RAW_DECL_SINL
 _GL_WARN_ON_USE (sinl, "sinl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module sinl for portability");
 # endif
 #endif
 
@@ -999,16 +1881,26 @@
 #endif
 
 #if @GNULIB_SQRTL@
-# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+# if @REPLACE_SQRTL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef sqrtl
+#   define sqrtl rpl_sqrtl
+#  endif
+_GL_FUNCDECL_RPL (sqrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (sqrtl, long double, (long double x));
+# else
+#  if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+#   undef sqrtl
 _GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
+#  endif
+_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
 # endif
-_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
 _GL_CXXALIASWARN (sqrtl);
 #elif defined GNULIB_POSIXCHECK
 # undef sqrtl
 # if HAVE_RAW_DECL_SQRTL
 _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module sqrtl for portability");
 # endif
 #endif
 
@@ -1030,6 +1922,7 @@
 
 #if @GNULIB_TANL@
 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
+#  undef tanl
 _GL_FUNCDECL_SYS (tanl, long double, (long double x));
 # endif
 _GL_CXXALIAS_SYS (tanl, long double, (long double x));
@@ -1038,7 +1931,7 @@
 # undef tanl
 # if HAVE_RAW_DECL_TANL
 _GL_WARN_ON_USE (tanl, "tanl is unportable - "
-                 "use gnulib module mathl for portability");
+                 "use gnulib module tanl for portability");
 # endif
 #endif
 
@@ -1376,6 +2269,7 @@
 # endif
 #endif
 
+_GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_MATH_H */
 #endif /* _@GUARD_PREFIX@_MATH_H */
--- a/lib/mbchar.c
+++ b/lib/mbchar.c
@@ -16,6 +16,8 @@
 
 #include <config.h>
 
+#define MBCHAR_INLINE _GL_EXTERN_INLINE
+
 #include <limits.h>
 
 #include "mbchar.h"
--- a/lib/mbchar.h
+++ b/lib/mbchar.h
@@ -156,6 +156,11 @@
 #include <wchar.h>
 #include <wctype.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef MBCHAR_INLINE
+# define MBCHAR_INLINE _GL_INLINE
+#endif
+
 #define MBCHAR_BUF_SIZE 24
 
 struct mbchar
@@ -235,7 +240,7 @@
 /* Unprintable characters appear as a small box of width 1.  */
 #define MB_UNPRINTABLE_WIDTH 1
 
-static inline int
+MBCHAR_INLINE int
 mb_width_aux (wint_t wc)
 {
   int w = wcwidth (wc);
@@ -256,7 +261,7 @@
    (mbc)->wc = (mbc)->buf[0] = (sc))
 
 /* Copying a character.  */
-static inline void
+MBCHAR_INLINE void
 mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc)
 {
   if (old_mbc->ptr == &old_mbc->buf[0])
@@ -304,7 +309,7 @@
 
 extern const unsigned int is_basic_table[];
 
-static inline bool
+MBCHAR_INLINE bool
 is_basic (char c)
 {
   return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31))
@@ -313,7 +318,7 @@
 
 #else
 
-static inline bool
+MBCHAR_INLINE bool
 is_basic (char c)
 {
   switch (c)
@@ -347,4 +352,6 @@
 
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _MBCHAR_H */
new file mode 100644
--- /dev/null
+++ b/lib/mbfile.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define MBFILE_INLINE _GL_EXTERN_INLINE
+#include "mbfile.h"
--- a/lib/mbfile.h
+++ b/lib/mbfile.h
@@ -62,6 +62,11 @@
 
 #include "mbchar.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef MBFILE_INLINE
+# define MBFILE_INLINE _GL_INLINE
+#endif
+
 struct mbfile_multi {
   FILE *fp;
   bool eof_seen;
@@ -72,7 +77,7 @@
   struct mbchar pushback;
 };
 
-static inline void
+MBFILE_INLINE void
 mbfile_multi_getc (struct mbchar *mbc, struct mbfile_multi *mbf)
 {
   size_t bytes;
@@ -215,7 +220,7 @@
   return;
 }
 
-static inline void
+MBFILE_INLINE void
 mbfile_multi_ungetc (const struct mbchar *mbc, struct mbfile_multi *mbf)
 {
   mb_copy (&mbf->pushback, mbc);
@@ -239,4 +244,6 @@
 
 #define mb_iseof(mbc) ((mbc).bytes == 0)
 
+_GL_INLINE_HEADER_BEGIN
+
 #endif /* _MBFILE_H */
new file mode 100644
--- /dev/null
+++ b/lib/mbiter.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define MBITER_INLINE _GL_EXTERN_INLINE
+#include "mbiter.h"
--- a/lib/mbiter.h
+++ b/lib/mbiter.h
@@ -47,9 +47,9 @@
      initializes the iterator, starting at startptr and crossing length bytes.
 
    mbi_avail (iter)
-     returns true if there are more multibyte chracters available before
+     returns true if there are more multibyte characters available before
      the end of string is reached. In this case, mbi_cur (iter) is
-     initialized to the next multibyte chracter.
+     initialized to the next multibyte character.
 
    mbi_advance (iter)
      advances the iterator by one multibyte character.
@@ -97,6 +97,11 @@
 
 #include "mbchar.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef MBITER_INLINE
+# define MBITER_INLINE _GL_INLINE
+#endif
+
 struct mbiter_multi
 {
   const char *limit;    /* pointer to end of string */
@@ -112,7 +117,7 @@
         */
 };
 
-static inline void
+MBITER_INLINE void
 mbiter_multi_next (struct mbiter_multi *iter)
 {
   if (iter->next_done)
@@ -172,14 +177,14 @@
   iter->next_done = true;
 }
 
-static inline void
+MBITER_INLINE void
 mbiter_multi_reloc (struct mbiter_multi *iter, ptrdiff_t ptrdiff)
 {
   iter->cur.ptr += ptrdiff;
   iter->limit += ptrdiff;
 }
 
-static inline void
+MBITER_INLINE void
 mbiter_multi_copy (struct mbiter_multi *new_iter, const struct mbiter_multi *old_iter)
 {
   new_iter->limit = old_iter->limit;
@@ -212,4 +217,6 @@
 /* Copying an iterator.  */
 #define mbi_copy mbiter_multi_copy
 
+_GL_INLINE_HEADER_END
+
 #endif /* _MBITER_H */
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -128,7 +128,7 @@
       {
         const char *encoding = locale_charset ();
 
-        if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+        if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
           {
             /* Cf. unistr/u8-mblen.c.  */
             unsigned char c = (unsigned char) p[0];
@@ -185,7 +185,8 @@
         /* As a reference for this code, you can use the GNU libiconv
            implementation.  Look for uses of the RET_TOOFEW macro.  */
 
-        if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+        if (STREQ_OPT (encoding,
+                       "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
           {
             if (m == 1)
               {
@@ -208,9 +209,12 @@
               }
             goto invalid;
           }
-        if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
-            || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
-            || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+        if (STREQ_OPT (encoding,
+                       "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+            || STREQ_OPT (encoding,
+                          "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+            || STREQ_OPT (encoding,
+                          "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
           {
             if (m == 1)
               {
@@ -221,7 +225,8 @@
               }
             goto invalid;
           }
-        if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+        if (STREQ_OPT (encoding,
+                       "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
           {
             if (m == 1)
               {
@@ -239,7 +244,8 @@
               }
             goto invalid;
           }
-        if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+        if (STREQ_OPT (encoding,
+                       "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
           {
             if (m == 1)
               {
@@ -272,7 +278,7 @@
               }
             goto invalid;
           }
-        if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+        if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
           {
             if (m == 1)
               {
--- a/lib/mbsrtowcs-state.c
+++ b/lib/mbsrtowcs-state.c
@@ -22,7 +22,7 @@
 /* Internal state used by the functions mbsrtowcs() and mbsnrtowcs().  */
 mbstate_t _gl_mbsrtowcs_state
 /* The state must initially be in the "initial state"; so, zero-initialize it.
-   On most systems, putting it into BSS is sufficient.  Not so on MacOS X 10.3,
+   On most systems, putting it into BSS is sufficient.  Not so on Mac OS X 10.3,
    see <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>.
    When it needs an initializer, use 0 or {0} as initializer? 0 only works
    when mbstate_t is a scalar type (such as when gnulib defines it, or on
new file mode 100644
--- /dev/null
+++ b/lib/mbuiter.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define MBUITER_INLINE _GL_EXTERN_INLINE
+#include "mbuiter.h"
--- a/lib/mbuiter.h
+++ b/lib/mbuiter.h
@@ -55,9 +55,9 @@
      initializes the iterator, starting at startptr.
 
    mbui_avail (iter)
-     returns true if there are more multibyte chracters available before
+     returns true if there are more multibyte characters available before
      the end of string is reached. In this case, mbui_cur (iter) is
-     initialized to the next multibyte chracter.
+     initialized to the next multibyte character.
 
    mbui_advance (iter)
      advances the iterator by one multibyte character.
@@ -106,6 +106,11 @@
 #include "mbchar.h"
 #include "strnlen1.h"
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef MBUITER_INLINE
+# define MBUITER_INLINE _GL_INLINE
+#endif
+
 struct mbuiter_multi
 {
   bool in_shift;        /* true if next byte may not be interpreted as ASCII */
@@ -120,7 +125,7 @@
         */
 };
 
-static inline void
+MBUITER_INLINE void
 mbuiter_multi_next (struct mbuiter_multi *iter)
 {
   if (iter->next_done)
@@ -181,13 +186,13 @@
   iter->next_done = true;
 }
 
-static inline void
+MBUITER_INLINE void
 mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff)
 {
   iter->cur.ptr += ptrdiff;
 }
 
-static inline void
+MBUITER_INLINE void
 mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter)
 {
   if ((new_iter->in_shift = old_iter->in_shift))
@@ -219,4 +224,6 @@
 /* Copying an iterator.  */
 #define mbui_copy mbuiter_multi_copy
 
+_GL_INLINE_HEADER_END
+
 #endif /* _MBUITER_H */
--- a/lib/md2.c
+++ b/lib/md2.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Adapted by Simon Josefsson from public domain Libtomcrypt 1.06 by
    Tom St Denis. */
--- a/lib/md2.h
+++ b/lib/md2.h
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef MD2_H
 # define MD2_H 1
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Adapted by Simon Josefsson from gnulib md5.? and Libgcrypt
    cipher/md4.c . */
@@ -68,7 +67,7 @@
 /* Copy the 4 byte value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
@@ -302,13 +301,13 @@
   uint32_t B = ctx->B;
   uint32_t C = ctx->C;
   uint32_t D = ctx->D;
+  uint32_t lolen = len;
 
   /* First increment the byte count.  RFC 1320 specifies the possible
      length of the file up to 2^64 bits.  Here we only compute the
      number of bytes.  Do a double word increment.  */
-  ctx->total[0] += len;
-  if (ctx->total[0] < len)
-    ++ctx->total[1];
+  ctx->total[0] += lolen;
+  ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
 
   /* Process all bytes in the buffer with 64 bytes in each round of
      the loop.  */
--- a/lib/md4.h
+++ b/lib/md4.h
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef MD4_H
 # define MD4_H 1
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -15,8 +15,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.  */
 
@@ -84,7 +83,7 @@
 /* Copy the 4 byte value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
@@ -313,13 +312,13 @@
   uint32_t B = ctx->B;
   uint32_t C = ctx->C;
   uint32_t D = ctx->D;
+  uint32_t lolen = len;
 
   /* First increment the byte count.  RFC 1321 specifies the possible
      length of the file up to 2^64 bits.  Here we only compute the
      number of bytes.  Do a double word increment.  */
-  ctx->total[0] += len;
-  if (ctx->total[0] < len)
-    ++ctx->total[1];
+  ctx->total[0] += lolen;
+  ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
 
   /* Process all bytes in the buffer with 64 bytes in each round of
      the loop.  */
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -15,8 +15,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _MD5_H
 #define _MD5_H 1
--- a/lib/memchr2.c
+++ b/lib/memchr2.c
@@ -125,7 +125,7 @@
      significant bytes (positions j+1..3), but it does not matter since we
      already have a non-zero bit at position 8*j+7.
 
-     Similary, we compute tmp2 =
+     Similarly, we compute tmp2 =
        ((longword2 - repeated_one) & ~longword2) & (repeated_one << 7).
 
      The test whether any byte in longword1 or longword2 is zero is equivalent
--- a/lib/memcoll.c
+++ b/lib/memcoll.c
@@ -31,7 +31,7 @@
    nonzero sizes, and the last byte in each block must be a null byte.
    Set errno to an error number if there is an error, and to zero
    otherwise.  */
-static inline int
+static int
 strcoll_loop (char const *s1, size_t s1size, char const *s2, size_t s2size)
 {
   int diff;
--- a/lib/memmem.c
+++ b/lib/memmem.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This particular implementation was written by Eric Blake, 2008.  */
 
--- a/lib/mempcpy.c
+++ b/lib/mempcpy.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/memset.c
+++ b/lib/memset.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/memxor.c
+++ b/lib/memxor.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  The interface was inspired by memxor
    in Niels Möller's Nettle. */
--- a/lib/memxor.h
+++ b/lib/memxor.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  The interface was inspired by memxor
    in Niels Möller's Nettle. */
--- a/lib/minmax.h
+++ b/lib/minmax.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _MINMAX_H
 #define _MINMAX_H
--- a/lib/mkdir-p.c
+++ b/lib/mkdir-p.c
@@ -115,7 +115,7 @@
       if (0 <= prefix_len)
         {
           /* If the ownership might change, or if the directory will be
-             writeable to other users and its special mode bits may
+             writable to other users and its special mode bits may
              change after the directory is created, create it with
              more restrictive permissions at first, so unauthorized
              users cannot nip in before the directory is ready.  */
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -1,21 +1,21 @@
 /* Convert a 'struct tm' to a time_t value.
-   Copyright (C) 1993-1999, 2002-2007, 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert <eggert@twinsun.com>.
 
-   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 2, or (at your option)
-   any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library 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.
+   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 along
-   with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 /* Define this to have a standalone program to test this implementation of
    mktime.  */
@@ -36,7 +36,7 @@
 
 #include <limits.h>
 
-#include <string.h>             /* For the real memcpy prototype.  */
+#include <string.h>		/* For the real memcpy prototype.  */
 
 #if DEBUG
 # include <stdio.h>
@@ -53,12 +53,14 @@
 
    Define WRAPV to 1 if the assumption is valid and if
      #pragma GCC optimize ("wrapv")
-   does not trigger GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51793>.
+   does not trigger GCC bug 51793
+   <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51793>.
    Otherwise, define it to 0; this forces the use of slower code that,
    while not guaranteed by the C Standard, works on all production
    platforms that we know about.  */
 #ifndef WRAPV
-# if ((__GNUC__ == 4 && 4 <= __GNUC_MINOR__) || 4 < __GNUC__) && defined __GLIBC__
+# if (((__GNUC__ == 4 && 4 <= __GNUC_MINOR__) || 4 < __GNUC__) \
+      && defined __GLIBC__)
 #  pragma GCC optimize ("wrapv")
 #  define WRAPV 1
 # else
@@ -114,12 +116,12 @@
    your host.  */
 #define TYPE_MINIMUM(t) \
   ((t) (! TYPE_SIGNED (t) \
-        ? (t) 0 \
-        : ~ TYPE_MAXIMUM (t)))
+	? (t) 0 \
+	: ~ TYPE_MAXIMUM (t)))
 #define TYPE_MAXIMUM(t) \
   ((t) (! TYPE_SIGNED (t) \
-        ? (t) -1 \
-        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+	? (t) -1 \
+	: ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
 
 #ifndef TIME_T_MIN
 # define TIME_T_MIN TYPE_MINIMUM (time_t)
@@ -131,16 +133,16 @@
 
 verify (time_t_is_integer, TYPE_IS_INTEGER (time_t));
 verify (twos_complement_arithmetic,
-        (TYPE_TWOS_COMPLEMENT (int)
-         && TYPE_TWOS_COMPLEMENT (long_int)
-         && TYPE_TWOS_COMPLEMENT (time_t)));
+	(TYPE_TWOS_COMPLEMENT (int)
+	 && TYPE_TWOS_COMPLEMENT (long_int)
+	 && TYPE_TWOS_COMPLEMENT (time_t)));
 
 #define EPOCH_YEAR 1970
 #define TM_YEAR_BASE 1900
 verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
 
 /* Return 1 if YEAR + TM_YEAR_BASE is a leap year.  */
-static inline int
+static int
 leapyear (long_int year)
 {
   /* Don't add YEAR to TM_YEAR_BASE, as that might overflow.
@@ -148,7 +150,7 @@
   return
     ((year & 3) == 0
      && (year % 100 != 0
-         || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3)));
+	 || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3)));
 }
 
 /* How many days come before each month (0-12).  */
@@ -180,7 +182,7 @@
 static int
 isdst_differ (int a, int b)
 {
-  return (!a != !b) & (0 <= a) & (0 <= b);
+  return (!a != !b) && (0 <= a) && (0 <= b);
 }
 
 /* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
@@ -194,9 +196,9 @@
    The result may overflow.  It is the caller's responsibility to
    detect overflow.  */
 
-static inline time_t
+static time_t
 ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1,
-            int year0, int yday0, int hour0, int min0, int sec0)
+	    int year0, int yday0, int hour0, int min0, int sec0)
 {
   verify (C99_integer_division, -1 / 2 == 0);
 
@@ -277,15 +279,15 @@
    yield a value equal to *T.  */
 static time_t
 guess_time_tm (long_int year, long_int yday, int hour, int min, int sec,
-               const time_t *t, const struct tm *tp)
+	       const time_t *t, const struct tm *tp)
 {
   if (tp)
     {
       time_t d = ydhms_diff (year, yday, hour, min, sec,
-                             tp->tm_year, tp->tm_yday,
-                             tp->tm_hour, tp->tm_min, tp->tm_sec);
+			     tp->tm_year, tp->tm_yday,
+			     tp->tm_hour, tp->tm_min, tp->tm_sec);
       if (time_t_add_ok (*t, d))
-        return *t + d;
+	return *t + d;
     }
 
   /* Overflow occurred one way or another.  Return the nearest result
@@ -294,8 +296,8 @@
      match; and don't oscillate between two values, as that would
      confuse the spring-forward gap detector.  */
   return (*t < TIME_T_MIDPOINT
-          ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN)
-          : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX));
+	  ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN)
+	  : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX));
 }
 
 /* Use CONVERT to convert *T to a broken down time in *TP.
@@ -303,7 +305,7 @@
    it is the nearest in-range value and then convert that.  */
 static struct tm *
 ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
-                time_t *t, struct tm *tp)
+		time_t *t, struct tm *tp)
 {
   struct tm *r = convert (t, tp);
 
@@ -313,25 +315,25 @@
       time_t ok = 0;
 
       /* BAD is a known unconvertible time_t, and OK is a known good one.
-         Use binary search to narrow the range between BAD and OK until
-         they differ by 1.  */
+	 Use binary search to narrow the range between BAD and OK until
+	 they differ by 1.  */
       while (bad != ok + (bad < 0 ? -1 : 1))
-        {
-          time_t mid = *t = time_t_avg (ok, bad);
-          r = convert (t, tp);
-          if (r)
-            ok = mid;
-          else
-            bad = mid;
-        }
+	{
+	  time_t mid = *t = time_t_avg (ok, bad);
+	  r = convert (t, tp);
+	  if (r)
+	    ok = mid;
+	  else
+	    bad = mid;
+	}
 
       if (!r && ok)
-        {
-          /* The last conversion attempt failed;
-             revert to the most recent successful attempt.  */
-          *t = ok;
-          r = convert (t, tp);
-        }
+	{
+	  /* The last conversion attempt failed;
+	     revert to the most recent successful attempt.  */
+	  *t = ok;
+	  r = convert (t, tp);
+	}
     }
 
   return r;
@@ -346,8 +348,8 @@
    This function is external because it is used also by timegm.c.  */
 time_t
 __mktime_internal (struct tm *tp,
-                   struct tm *(*convert) (const time_t *, struct tm *),
-                   time_t *offset)
+		   struct tm *(*convert) (const time_t *, struct tm *),
+		   time_t *offset)
 {
   time_t t, gt, t0, t1, t2;
   struct tm tm;
@@ -386,8 +388,8 @@
   /* Calculate day of year from year, month, and day of month.
      The result need not be in range.  */
   int mon_yday = ((__mon_yday[leapyear (year)]
-                   [mon_remainder + 12 * negative_mon_remainder])
-                  - 1);
+		   [mon_remainder + 12 * negative_mon_remainder])
+		  - 1);
   long_int lmday = mday;
   long_int yday = mon_yday + lmday;
 
@@ -398,33 +400,33 @@
   if (LEAP_SECONDS_POSSIBLE)
     {
       /* Handle out-of-range seconds specially,
-         since ydhms_tm_diff assumes every minute has 60 seconds.  */
+	 since ydhms_tm_diff assumes every minute has 60 seconds.  */
       if (sec < 0)
-        sec = 0;
+	sec = 0;
       if (59 < sec)
-        sec = 59;
+	sec = 59;
     }
 
   /* Invert CONVERT by probing.  First assume the same offset as last
      time.  */
 
   t0 = ydhms_diff (year, yday, hour, min, sec,
-                   EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset);
+		   EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset);
 
   if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
     {
       /* time_t isn't large enough to rule out overflows, so check
-         for major overflows.  A gross check suffices, since if t0
-         has overflowed, it is off by a multiple of TIME_T_MAX -
-         TIME_T_MIN + 1.  So ignore any component of the difference
-         that is bounded by a small value.  */
+	 for major overflows.  A gross check suffices, since if t0
+	 has overflowed, it is off by a multiple of TIME_T_MAX -
+	 TIME_T_MIN + 1.  So ignore any component of the difference
+	 that is bounded by a small value.  */
 
       /* Approximate log base 2 of the number of time units per
-         biennium.  A biennium is 2 years; use this unit instead of
-         years to avoid integer overflow.  For example, 2 average
-         Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds,
-         which is 63113904 seconds, and rint (log2 (63113904)) is
-         26.  */
+	 biennium.  A biennium is 2 years; use this unit instead of
+	 years to avoid integer overflow.  For example, 2 average
+	 Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds,
+	 which is 63113904 seconds, and rint (log2 (63113904)) is
+	 26.  */
       int ALOG2_SECONDS_PER_BIENNIUM = 26;
       int ALOG2_MINUTES_PER_BIENNIUM = 20;
       int ALOG2_HOURS_PER_BIENNIUM = 14;
@@ -432,64 +434,64 @@
       int LOG2_YEARS_PER_BIENNIUM = 1;
 
       int approx_requested_biennia =
-        (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM)
-         - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM)
-         + SHR (mday, ALOG2_DAYS_PER_BIENNIUM)
-         + SHR (hour, ALOG2_HOURS_PER_BIENNIUM)
-         + SHR (min, ALOG2_MINUTES_PER_BIENNIUM)
-         + (LEAP_SECONDS_POSSIBLE
-            ? 0
-            : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM)));
+	(SHR (year_requested, LOG2_YEARS_PER_BIENNIUM)
+	 - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM)
+	 + SHR (mday, ALOG2_DAYS_PER_BIENNIUM)
+	 + SHR (hour, ALOG2_HOURS_PER_BIENNIUM)
+	 + SHR (min, ALOG2_MINUTES_PER_BIENNIUM)
+	 + (LEAP_SECONDS_POSSIBLE
+	    ? 0
+	    : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM)));
 
       int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM);
       int diff = approx_biennia - approx_requested_biennia;
-      int abs_diff = diff < 0 ? -1 - diff : diff;
+      int approx_abs_diff = diff < 0 ? -1 - diff : diff;
 
       /* IRIX 4.0.5 cc miscalculates TIME_T_MIN / 3: it erroneously
-         gives a positive value of 715827882.  Setting a variable
-         first then doing math on it seems to work.
-         (ghazi@caip.rutgers.edu) */
+	 gives a positive value of 715827882.  Setting a variable
+	 first then doing math on it seems to work.
+	 (ghazi@caip.rutgers.edu) */
       time_t time_t_max = TIME_T_MAX;
       time_t time_t_min = TIME_T_MIN;
       time_t overflow_threshold =
-        (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM;
+	(time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM;
 
-      if (overflow_threshold < abs_diff)
-        {
-          /* Overflow occurred.  Try repairing it; this might work if
-             the time zone offset is enough to undo the overflow.  */
-          time_t repaired_t0 = -1 - t0;
-          approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM);
-          diff = approx_biennia - approx_requested_biennia;
-          abs_diff = diff < 0 ? -1 - diff : diff;
-          if (overflow_threshold < abs_diff)
-            return -1;
-          guessed_offset += repaired_t0 - t0;
-          t0 = repaired_t0;
-        }
+      if (overflow_threshold < approx_abs_diff)
+	{
+	  /* Overflow occurred.  Try repairing it; this might work if
+	     the time zone offset is enough to undo the overflow.  */
+	  time_t repaired_t0 = -1 - t0;
+	  approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM);
+	  diff = approx_biennia - approx_requested_biennia;
+	  approx_abs_diff = diff < 0 ? -1 - diff : diff;
+	  if (overflow_threshold < approx_abs_diff)
+	    return -1;
+	  guessed_offset += repaired_t0 - t0;
+	  t0 = repaired_t0;
+	}
     }
 
   /* Repeatedly use the error to improve the guess.  */
 
   for (t = t1 = t2 = t0, dst2 = 0;
        (gt = guess_time_tm (year, yday, hour, min, sec, &t,
-                            ranged_convert (convert, &t, &tm)),
-        t != gt);
+			    ranged_convert (convert, &t, &tm)),
+	t != gt);
        t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0)
     if (t == t1 && t != t2
-        && (tm.tm_isdst < 0
-            || (isdst < 0
-                ? dst2 <= (tm.tm_isdst != 0)
-                : (isdst != 0) != (tm.tm_isdst != 0))))
+	&& (tm.tm_isdst < 0
+	    || (isdst < 0
+		? dst2 <= (tm.tm_isdst != 0)
+		: (isdst != 0) != (tm.tm_isdst != 0))))
       /* We can't possibly find a match, as we are oscillating
-         between two values.  The requested time probably falls
-         within a spring-forward gap of size GT - T.  Follow the common
-         practice in this case, which is to return a time that is GT - T
-         away from the requested time, preferring a time whose
-         tm_isdst differs from the requested value.  (If no tm_isdst
-         was requested and only one of the two values has a nonzero
-         tm_isdst, prefer that value.)  In practice, this is more
-         useful than returning -1.  */
+	 between two values.  The requested time probably falls
+	 within a spring-forward gap of size GT - T.  Follow the common
+	 practice in this case, which is to return a time that is GT - T
+	 away from the requested time, preferring a time whose
+	 tm_isdst differs from the requested value.  (If no tm_isdst
+	 was requested and only one of the two values has a nonzero
+	 tm_isdst, prefer that value.)  In practice, this is more
+	 useful than returning -1.  */
       goto offset_found;
     else if (--remaining_probes == 0)
       return -1;
@@ -499,50 +501,50 @@
   if (isdst_differ (isdst, tm.tm_isdst))
     {
       /* tm.tm_isdst has the wrong value.  Look for a neighboring
-         time with the right value, and use its UTC offset.
+	 time with the right value, and use its UTC offset.
 
-         Heuristic: probe the adjacent timestamps in both directions,
-         looking for the desired isdst.  This should work for all real
-         time zone histories in the tz database.  */
+	 Heuristic: probe the adjacent timestamps in both directions,
+	 looking for the desired isdst.  This should work for all real
+	 time zone histories in the tz database.  */
 
       /* Distance between probes when looking for a DST boundary.  In
-         tzdata2003a, the shortest period of DST is 601200 seconds
-         (e.g., America/Recife starting 2000-10-08 01:00), and the
-         shortest period of non-DST surrounded by DST is 694800
-         seconds (Africa/Tunis starting 1943-04-17 01:00).  Use the
-         minimum of these two values, so we don't miss these short
-         periods when probing.  */
+	 tzdata2003a, the shortest period of DST is 601200 seconds
+	 (e.g., America/Recife starting 2000-10-08 01:00), and the
+	 shortest period of non-DST surrounded by DST is 694800
+	 seconds (Africa/Tunis starting 1943-04-17 01:00).  Use the
+	 minimum of these two values, so we don't miss these short
+	 periods when probing.  */
       int stride = 601200;
 
       /* The longest period of DST in tzdata2003a is 536454000 seconds
-         (e.g., America/Jujuy starting 1946-10-01 01:00).  The longest
-         period of non-DST is much longer, but it makes no real sense
-         to search for more than a year of non-DST, so use the DST
-         max.  */
+	 (e.g., America/Jujuy starting 1946-10-01 01:00).  The longest
+	 period of non-DST is much longer, but it makes no real sense
+	 to search for more than a year of non-DST, so use the DST
+	 max.  */
       int duration_max = 536454000;
 
       /* Search in both directions, so the maximum distance is half
-         the duration; add the stride to avoid off-by-1 problems.  */
+	 the duration; add the stride to avoid off-by-1 problems.  */
       int delta_bound = duration_max / 2 + stride;
 
       int delta, direction;
 
       for (delta = stride; delta < delta_bound; delta += stride)
-        for (direction = -1; direction <= 1; direction += 2)
-          if (time_t_int_add_ok (t, delta * direction))
-            {
-              time_t ot = t + delta * direction;
-              struct tm otm;
-              ranged_convert (convert, &ot, &otm);
-              if (! isdst_differ (isdst, otm.tm_isdst))
-                {
-                  /* We found the desired tm_isdst.
-                     Extrapolate back to the desired time.  */
-                  t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm);
-                  ranged_convert (convert, &t, &tm);
-                  goto offset_found;
-                }
-            }
+	for (direction = -1; direction <= 1; direction += 2)
+	  if (time_t_int_add_ok (t, delta * direction))
+	    {
+	      time_t ot = t + delta * direction;
+	      struct tm otm;
+	      ranged_convert (convert, &ot, &otm);
+	      if (! isdst_differ (isdst, otm.tm_isdst))
+		{
+		  /* We found the desired tm_isdst.
+		     Extrapolate back to the desired time.  */
+		  t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm);
+		  ranged_convert (convert, &t, &tm);
+		  goto offset_found;
+		}
+	    }
     }
 
  offset_found:
@@ -551,16 +553,16 @@
   if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec)
     {
       /* Adjust time to reflect the tm_sec requested, not the normalized value.
-         Also, repair any damage from a false match due to a leap second.  */
+	 Also, repair any damage from a false match due to a leap second.  */
       int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec;
       if (! time_t_int_add_ok (t, sec_requested))
-        return -1;
+	return -1;
       t1 = t + sec_requested;
       if (! time_t_int_add_ok (t1, sec_adjustment))
-        return -1;
+	return -1;
       t2 = t1 + sec_adjustment;
       if (! convert (&t2, &tm))
-        return -1;
+	return -1;
       t = t2;
     }
 
@@ -604,13 +606,13 @@
 not_equal_tm (const struct tm *a, const struct tm *b)
 {
   return ((a->tm_sec ^ b->tm_sec)
-          | (a->tm_min ^ b->tm_min)
-          | (a->tm_hour ^ b->tm_hour)
-          | (a->tm_mday ^ b->tm_mday)
-          | (a->tm_mon ^ b->tm_mon)
-          | (a->tm_year ^ b->tm_year)
-          | (a->tm_yday ^ b->tm_yday)
-          | isdst_differ (a->tm_isdst, b->tm_isdst));
+	  | (a->tm_min ^ b->tm_min)
+	  | (a->tm_hour ^ b->tm_hour)
+	  | (a->tm_mday ^ b->tm_mday)
+	  | (a->tm_mon ^ b->tm_mon)
+	  | (a->tm_year ^ b->tm_year)
+	  | (a->tm_yday ^ b->tm_yday)
+	  | isdst_differ (a->tm_isdst, b->tm_isdst));
 }
 
 static void
@@ -618,9 +620,9 @@
 {
   if (tp)
     printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d",
-            tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday,
-            tp->tm_hour, tp->tm_min, tp->tm_sec,
-            tp->tm_yday, tp->tm_wday, tp->tm_isdst);
+	    tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday,
+	    tp->tm_hour, tp->tm_min, tp->tm_sec,
+	    tp->tm_yday, tp->tm_wday, tp->tm_isdst);
   else
     printf ("0");
 }
@@ -652,11 +654,11 @@
 
   if ((argc == 3 || argc == 4)
       && (sscanf (argv[1], "%d-%d-%d%c",
-                  &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer)
-          == 3)
+		  &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer)
+	  == 3)
       && (sscanf (argv[2], "%d:%d:%d%c",
-                  &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer)
-          == 3))
+		  &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer)
+	  == 3))
     {
       tm.tm_year -= TM_YEAR_BASE;
       tm.tm_mon--;
@@ -665,10 +667,10 @@
       tl = mktime (&tmk);
       lt = localtime (&tl);
       if (lt)
-        {
-          tml = *lt;
-          lt = &tml;
-        }
+	{
+	  tml = *lt;
+	  lt = &tml;
+	}
       printf ("mktime returns %ld == ", (long int) tl);
       print_tm (&tmk);
       printf ("\n");
@@ -681,51 +683,51 @@
       time_t to = atol (argv[3]);
 
       if (argc == 4)
-        for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
-          {
-            lt = localtime (&tl);
-            if (lt)
-              {
-                tmk = tml = *lt;
-                tk = mktime (&tmk);
-                status |= check_result (tk, tmk, tl, &tml);
-              }
-            else
-              {
-                printf ("localtime (%ld) yields 0\n", (long int) tl);
-                status = 1;
-              }
-            tl1 = tl + by;
-            if ((tl1 < tl) != (by < 0))
-              break;
-          }
+	for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
+	  {
+	    lt = localtime (&tl);
+	    if (lt)
+	      {
+		tmk = tml = *lt;
+		tk = mktime (&tmk);
+		status |= check_result (tk, tmk, tl, &tml);
+	      }
+	    else
+	      {
+		printf ("localtime (%ld) yields 0\n", (long int) tl);
+		status = 1;
+	      }
+	    tl1 = tl + by;
+	    if ((tl1 < tl) != (by < 0))
+	      break;
+	  }
       else
-        for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
-          {
-            /* Null benchmark.  */
-            lt = localtime (&tl);
-            if (lt)
-              {
-                tmk = tml = *lt;
-                tk = tl;
-                status |= check_result (tk, tmk, tl, &tml);
-              }
-            else
-              {
-                printf ("localtime (%ld) yields 0\n", (long int) tl);
-                status = 1;
-              }
-            tl1 = tl + by;
-            if ((tl1 < tl) != (by < 0))
-              break;
-          }
+	for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
+	  {
+	    /* Null benchmark.  */
+	    lt = localtime (&tl);
+	    if (lt)
+	      {
+		tmk = tml = *lt;
+		tk = tl;
+		status |= check_result (tk, tmk, tl, &tml);
+	      }
+	    else
+	      {
+		printf ("localtime (%ld) yields 0\n", (long int) tl);
+		status = 1;
+	      }
+	    tl1 = tl + by;
+	    if ((tl1 < tl) != (by < 0))
+	      break;
+	  }
     }
   else
     printf ("Usage:\
 \t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\
 \t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\
 \t%s FROM BY TO - # Do not test those values (for benchmark).\n",
-            argv[0], argv[0], argv[0]);
+	    argv[0], argv[0], argv[0]);
 
   return status;
 }
--- a/lib/modechange.c
+++ b/lib/modechange.c
@@ -136,6 +136,7 @@
   /* The array of mode-change directives to be returned.  */
   struct mode_change *mc;
   size_t used = 0;
+  char const *p;
 
   if ('0' <= *mode_string && *mode_string < '8')
     {
@@ -143,40 +144,43 @@
       mode_t mode;
       mode_t mentioned;
 
+      p = mode_string;
       do
         {
-          octal_mode = 8 * octal_mode + *mode_string++ - '0';
+          octal_mode = 8 * octal_mode + *p++ - '0';
           if (ALLM < octal_mode)
             return NULL;
         }
-      while ('0' <= *mode_string && *mode_string < '8');
+      while ('0' <= *p && *p < '8');
 
-      if (*mode_string)
+      if (*p)
         return NULL;
 
       mode = octal_to_mode (octal_mode);
-      mentioned = (mode & (S_ISUID | S_ISGID)) | S_ISVTX | S_IRWXUGO;
+      mentioned = (p - mode_string < 5
+                   ? (mode & (S_ISUID | S_ISGID)) | S_ISVTX | S_IRWXUGO
+                   : CHMOD_MODE_BITS);
       return make_node_op_equals (mode, mentioned);
     }
 
   /* Allocate enough space to hold the result.  */
   {
     size_t needed = 1;
-    char const *p;
     for (p = mode_string; *p; p++)
       needed += (*p == '=' || *p == '+' || *p == '-');
     mc = xnmalloc (needed, sizeof *mc);
   }
 
-  /* One loop iteration for each '[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.  */
-  for (;; mode_string++)
+  /* One loop iteration for each
+     '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+'.  */
+  for (p = mode_string; ; p++)
     {
       /* Which bits in the mode are operated on.  */
       mode_t affected = 0;
 
       /* Turn on all the bits in 'affected' for each group given.  */
-      for (;; mode_string++)
-        switch (*mode_string)
+      for (;; p++)
+        switch (*p)
           {
           default:
             goto invalid;
@@ -199,35 +203,60 @@
 
       do
         {
-          char op = *mode_string++;
+          char op = *p++;
           mode_t value;
+          mode_t mentioned = 0;
           char flag = MODE_COPY_EXISTING;
           struct mode_change *change;
 
-          switch (*mode_string++)
+          switch (*p)
             {
+            case '0': case '1': case '2': case '3':
+            case '4': case '5': case '6': case '7':
+              {
+                unsigned int octal_mode = 0;
+
+                do
+                  {
+                    octal_mode = 8 * octal_mode + *p++ - '0';
+                    if (ALLM < octal_mode)
+                      return NULL;
+                  }
+                while ('0' <= *p && *p < '8');
+
+                if (affected || (*p && *p != ','))
+                  return NULL;
+                affected = mentioned = CHMOD_MODE_BITS;
+                value = octal_to_mode (octal_mode);
+                flag = MODE_ORDINARY_CHANGE;
+                break;
+              }
+
             case 'u':
               /* Set the affected bits to the value of the "u" bits
                  on the same file.  */
               value = S_IRWXU;
+              p++;
               break;
             case 'g':
               /* Set the affected bits to the value of the "g" bits
                  on the same file.  */
               value = S_IRWXG;
+              p++;
               break;
             case 'o':
               /* Set the affected bits to the value of the "o" bits
                  on the same file.  */
               value = S_IRWXO;
+              p++;
               break;
 
             default:
               value = 0;
               flag = MODE_ORDINARY_CHANGE;
 
-              for (mode_string--;; mode_string++)
-                switch (*mode_string)
+              for (;; p++)
+                switch (*p)
                   {
                   case 'r':
                     value |= S_IRUSR | S_IRGRP | S_IROTH;
@@ -260,16 +289,16 @@
           change->flag = flag;
           change->affected = affected;
           change->value = value;
-          change->mentioned = (affected ? affected & value : value);
+          change->mentioned =
+            (mentioned ? mentioned : affected ? affected & value : value);
         }
-      while (*mode_string == '=' || *mode_string == '+'
-             || *mode_string == '-');
+      while (*p == '=' || *p == '+' || *p == '-');
 
-      if (*mode_string != ',')
+      if (*p != ',')
         break;
     }
 
-  if (*mode_string == 0)
+  if (*p == 0)
     {
       mc[used].flag = MODE_DONE;
       return mc;
new file mode 100644
--- /dev/null
+++ b/lib/modf.c
@@ -0,0 +1,44 @@
+/* Get signed integer and fractional parts of a floating-point number.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+double
+modf (double x, double *iptr)
+{
+  if (isfinite (x))
+    {
+      double integer_part = trunc (x);
+      *iptr = integer_part;
+      return x - integer_part;
+    }
+  else
+    {
+      if (isinf (x))
+        {
+          *iptr = x;
+          return 1.0 / x;
+        }
+      else /* isnand (x) */
+        {
+          *iptr = x;
+          return x;
+        }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/lib/modfl.c
@@ -0,0 +1,59 @@
+/* Get signed integer and fractional parts of a floating-point number.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+modfl (long double x, long double *iptr)
+{
+  double integer_part;
+  double fractional_part = modf (x, &integer_part);
+  *iptr = integer_part;
+  return fractional_part;
+}
+
+#else
+
+long double
+modfl (long double x, long double *iptr)
+{
+  if (isfinite (x))
+    {
+      long double integer_part = truncl (x);
+      *iptr = integer_part;
+      return x - integer_part;
+    }
+  else
+    {
+      if (isinf (x))
+        {
+          *iptr = x;
+          return 1.0L / x;
+        }
+      else /* isnanl (x) */
+        {
+          *iptr = x;
+          return x;
+        }
+    }
+}
+
+#endif
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -149,16 +149,27 @@
 #undef opendir
 #undef closedir
 
-#ifndef ME_DUMMY
-# define ME_DUMMY(Fs_name, Fs_type)             \
-    (strcmp (Fs_type, "autofs") == 0            \
-     || strcmp (Fs_type, "none") == 0           \
-     || strcmp (Fs_type, "proc") == 0           \
-     || strcmp (Fs_type, "subfs") == 0          \
-     /* for NetBSD 3.0 */                       \
-     || strcmp (Fs_type, "kernfs") == 0         \
-     /* for Irix 6.5 */                         \
-     || strcmp (Fs_type, "ignore") == 0)
+#define ME_DUMMY_0(Fs_name, Fs_type)            \
+  (strcmp (Fs_type, "autofs") == 0              \
+   || strcmp (Fs_type, "proc") == 0             \
+   || strcmp (Fs_type, "subfs") == 0            \
+   /* for NetBSD 3.0 */                         \
+   || strcmp (Fs_type, "kernfs") == 0           \
+   /* for Irix 6.5 */                           \
+   || strcmp (Fs_type, "ignore") == 0)
+
+/* Historically, we have marked as "dummy" any file system of type "none",
+   but now that programs like du need to know about bind-mounted directories,
+   we grant an exception to any with "bind" in its list of mount options.
+   I.e., those are *not* dummy entries.  */
+#ifdef MOUNTED_GETMNTENT1
+# define ME_DUMMY(Fs_name, Fs_type, Fs_ent)	\
+  (ME_DUMMY_0 (Fs_name, Fs_type)		\
+   || (strcmp (Fs_type, "none") == 0		\
+       && !hasmntopt (Fs_ent, "bind")))
+#else
+# define ME_DUMMY(Fs_name, Fs_type)		\
+  (ME_DUMMY_0 (Fs_name, Fs_type) || strcmp (Fs_type, "none") == 0)
 #endif
 
 #ifdef __CYGWIN__
@@ -419,7 +430,7 @@
         me->me_mountdir = xstrdup (mnt->mnt_dir);
         me->me_type = xstrdup (mnt->mnt_type);
         me->me_type_malloced = 1;
-        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, mnt);
         me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
         me->me_dev = dev_from_mount_options (mnt->mnt_opts);
 
--- a/lib/msvc-inval.c
+++ b/lib/msvc-inval.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/msvc-inval.h
+++ b/lib/msvc-inval.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _MSVC_INVAL_H
 #define _MSVC_INVAL_H
--- a/lib/msvc-nothrow.c
+++ b/lib/msvc-nothrow.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/msvc-nothrow.h
+++ b/lib/msvc-nothrow.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _MSVC_NOTHROW_H
 #define _MSVC_NOTHROW_H
new file mode 100644
--- /dev/null
+++ b/lib/net_if.in.h
@@ -0,0 +1,53 @@
+/* Substitute for <net/if.h>.
+   Copyright (C) 2007-2012 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 2, 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/>.  */
+
+#ifndef _@GUARD_PREFIX@_NET_IF_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if @HAVE_NET_IF_H@
+
+/* On some platforms, <net/if.h> assumes prior inclusion of
+   <sys/socket.h>.  */
+# include <sys/socket.h>
+
+/* The include_next requires a split double-inclusion guard.  */
+# @INCLUDE_NEXT@ @NEXT_NET_IF_H@
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_NET_IF_H
+#define _@GUARD_PREFIX@_NET_IF_H
+
+#if !@HAVE_NET_IF_H@
+
+/* A platform that lacks <net/if.h>.  */
+
+struct if_nameindex
+{
+  unsigned if_index;
+  char *if_name;
+};
+
+# define IF_NAMESIZE 1 /* Without if_* functions, this supports only "". */
+
+#endif
+
+#endif /* _@GUARD_PREFIX@_NET_IF_H */
+#endif /* _@GUARD_PREFIX@_NET_IF_H */
--- a/lib/netdb.in.h
+++ b/lib/netdb.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file is supposed to be used on platforms that lack <netdb.h>.
    It is intended to provide definitions and prototypes needed by an
--- a/lib/netinet_in.in.h
+++ b/lib/netinet_in.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_NETINET_IN_H
 
--- a/lib/nproc.c
+++ b/lib/nproc.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Glen Lenker and Bruno Haible.  */
 
@@ -257,7 +256,7 @@
       }
 
 #if defined _SC_NPROCESSORS_ONLN
-      { /* This works on glibc, MacOS X 10.5, FreeBSD, AIX, OSF/1, Solaris,
+      { /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, OSF/1, Solaris,
            Cygwin, Haiku.  */
         long int nprocs = sysconf (_SC_NPROCESSORS_ONLN);
         if (nprocs > 0)
@@ -268,7 +267,7 @@
   else /* query == NPROC_ALL */
     {
 #if defined _SC_NPROCESSORS_CONF
-      { /* This works on glibc, MacOS X 10.5, FreeBSD, AIX, OSF/1, Solaris,
+      { /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, OSF/1, Solaris,
            Cygwin, Haiku.  */
         long int nprocs = sysconf (_SC_NPROCESSORS_CONF);
 
@@ -333,7 +332,7 @@
      NPROC_CURRENT and NPROC_ALL.  */
 
 #if HAVE_SYSCTL && defined HW_NCPU
-  { /* This works on MacOS X, FreeBSD, NetBSD, OpenBSD.  */
+  { /* This works on Mac OS X, FreeBSD, NetBSD, OpenBSD.  */
     int nprocs;
     size_t len = sizeof (nprocs);
     static int mib[2] = { CTL_HW, HW_NCPU };
--- a/lib/nproc.h
+++ b/lib/nproc.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Glen Lenker and Bruno Haible.  */
 
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -122,7 +122,7 @@
 
 #define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
 
-/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
+/* Similar to _BPTR_ALIGN (B, P, A), except optimize the common case
    where pointers can be converted to integers, aligned as integers,
    and converted back again.  If PTR_INT_TYPE is narrower than a
    pointer (e.g., the AS/400), play it safe and compute the alignment
@@ -253,7 +253,7 @@
 
 #define obstack_memory_used(h) _obstack_memory_used (h)
 
-#if defined __GNUC__ && defined __STDC__ && __STDC__
+#if defined __GNUC__
 /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
    does not implement __extension__.  But that compiler doesn't define
    __GNUC_MINOR__.  */
@@ -405,7 +405,7 @@
      __o->next_free = __o->object_base = (char *)__obj;                 \
    else (__obstack_free) (__o, __obj); })
 
-#else /* not __GNUC__ or not __STDC__ */
+#else /* not __GNUC__ */
 
 # define obstack_object_size(h) \
  (unsigned) ((h)->next_free - (h)->object_base)
@@ -503,7 +503,7 @@
             = (h)->temp.tempint + (char *) (h)->chunk)                  \
    : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
 
-#endif /* not __GNUC__ or not __STDC__ */
+#endif /* not __GNUC__ */
 
 #ifdef __cplusplus
 }       /* C++ */
--- a/lib/obstack_printf.c
+++ b/lib/obstack_printf.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/open.c
+++ b/lib/open.c
@@ -27,7 +27,7 @@
 #include <sys/types.h>
 #undef __need_system_fcntl_h
 
-static inline int
+static int
 orig_open (const char *filename, int flags, mode_t mode)
 {
   return open (filename, flags, mode);
--- a/lib/openat.c
+++ b/lib/openat.c
@@ -28,7 +28,7 @@
 #undef __need_system_fcntl_h
 
 #if HAVE_OPENAT
-static inline int
+static int
 orig_openat (int fd, char const *filename, int flags, mode_t mode)
 {
   return openat (fd, filename, flags, mode);
--- a/lib/openat.h
+++ b/lib/openat.h
@@ -26,6 +26,8 @@
 #include <unistd.h>
 #include <stdbool.h>
 
+_GL_INLINE_HEADER_BEGIN
+
 #if !HAVE_OPENAT
 
 int openat_permissive (int fd, char const *file, int flags, mode_t mode,
@@ -49,13 +51,17 @@
 
 #if GNULIB_FCHOWNAT
 
-static inline int
+# ifndef FCHOWNAT_INLINE
+#  define FCHOWNAT_INLINE _GL_INLINE
+# endif
+
+FCHOWNAT_INLINE int
 chownat (int fd, char const *file, uid_t owner, gid_t group)
 {
   return fchownat (fd, file, owner, group, 0);
 }
 
-static inline int
+FCHOWNAT_INLINE int
 lchownat (int fd, char const *file, uid_t owner, gid_t group)
 {
   return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW);
@@ -65,13 +71,17 @@
 
 #if GNULIB_FCHMODAT
 
-static inline int
+# ifndef FCHMODAT_INLINE
+#  define FCHMODAT_INLINE _GL_INLINE
+# endif
+
+FCHMODAT_INLINE int
 chmodat (int fd, char const *file, mode_t mode)
 {
   return fchmodat (fd, file, mode, 0);
 }
 
-static inline int
+FCHMODAT_INLINE int
 lchmodat (int fd, char const *file, mode_t mode)
 {
   return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW);
@@ -81,13 +91,17 @@
 
 #if GNULIB_FSTATAT
 
-static inline int
+# ifndef FSTATAT_INLINE
+#  define FSTATAT_INLINE _GL_INLINE
+# endif
+
+FSTATAT_INLINE int
 statat (int fd, char const *name, struct stat *st)
 {
   return fstatat (fd, name, st, 0);
 }
 
-static inline int
+FSTATAT_INLINE int
 lstatat (int fd, char const *name, struct stat *st)
 {
   return fstatat (fd, name, st, AT_SYMLINK_NOFOLLOW);
@@ -101,4 +115,6 @@
    wrappers are not provided for accessat or euidaccessat, so as to
    avoid dragging in -lgen on some platforms.  */
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_HEADER_OPENAT */
--- a/lib/parse-datetime.y
+++ b/lib/parse-datetime.y
@@ -113,6 +113,11 @@
 typedef time_t long_time_t;
 #endif
 
+/* Convert a possibly-signed character to an unsigned character.  This is
+   a bit safer than casting to unsigned char, since it catches some type
+   errors that the cast doesn't.  */
+static unsigned char to_uchar (char ch) { return ch; }
+
 /* Lots of this code assumes time_t and time_t-like values fit into
    long_time_t.  */
 verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t)
@@ -204,7 +209,7 @@
   size_t times_seen;
   size_t zones_seen;
 
-  /* Table of local time zone abbrevations, terminated by a null entry.  */
+  /* Table of local time zone abbreviations, terminated by a null entry.  */
   table local_time_zone_table[3];
 } parser_control;
 
@@ -1171,7 +1176,8 @@
         }
 
       if (c != '(')
-        return *pc->input++;
+        return to_uchar (*pc->input++);
+
       count = 0;
       do
         {
@@ -1394,7 +1400,7 @@
       && ! strcmp (pc.local_time_zone_table[0].name,
                    pc.local_time_zone_table[1].name))
     {
-      /* This locale uses the same abbrevation for standard and
+      /* This locale uses the same abbreviation for standard and
          daylight times.  So if we see that abbreviation, we don't
          know whether it's daylight time.  */
       pc.local_time_zone_table[0].value = -1;
--- a/lib/parse-duration.c
+++ b/lib/parse-duration.c
@@ -54,14 +54,14 @@
 #define TIME_MAX        0x7FFFFFFF
 
 /* Wrapper around strtoul that does not require a cast.  */
-static unsigned long inline
+static unsigned long
 str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
 {
   return strtoul (str, (char **)ppz, base);
 }
 
 /* Wrapper around strtol that does not require a cast.  */
-static long inline
+static long
 str_const_to_l (cch_t * str, cch_t ** ppz, int base)
 {
   return strtol (str, (char **)ppz, base);
@@ -70,7 +70,7 @@
 /* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
    with errno set as an error situation, and returning BAD_TIME
    with errno set in an error situation.  */
-static time_t inline
+static time_t
 scale_n_add (time_t base, time_t val, int scale)
 {
   if (base == BAD_TIME)
--- a/lib/parse-duration.h
+++ b/lib/parse-duration.h
@@ -31,7 +31,7 @@
   the string may contain:  NNN Y NNN M NNN W NNN d NNN h NNN m NNN s
   This represents NNN years, NNN months, NNN weeks, NNN days, NNN hours,
     NNN minutes and NNN seconds.
-  The embeded white space is optional.
+  The embedded white space is optional.
   These terms must appear in this order.
   Case is significant:  'M' is months and 'm' is minutes.
   The final "s" is optional.
--- a/lib/passfd.c
+++ b/lib/passfd.c
@@ -31,7 +31,7 @@
 #include "cloexec.h"
 
 /* The code that uses CMSG_FIRSTHDR is enabled on
-   Linux, MacOS X, FreeBSD, OpenBSD, NetBSD, AIX, OSF/1, Cygwin.
+   Linux, Mac OS X, FreeBSD, OpenBSD, NetBSD, AIX, OSF/1, Cygwin.
    The code that uses HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS is enabled on
    HP-UX, IRIX, Solaris.  */
 
@@ -101,7 +101,7 @@
 /* recvfd receives a file descriptor through the socket.
    The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>).
 
-   Return 0 on success, or -1 with errno set in case of error.
+   Return the fd on success, or -1 with errno set in case of error.
 */
 int
 recvfd (int sock, int flags)
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _PATHMAX_H
 # define _PATHMAX_H
new file mode 100644
--- /dev/null
+++ b/lib/pipe-filter-aux.c
@@ -0,0 +1,43 @@
+/* Auxiliary code for filtering of data through a subprocess.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#define PIPE_FILTER_AUX_INLINE _GL_EXTERN_INLINE
+
+#include "pipe-filter.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <windows.h>
+#else
+# include <signal.h>
+# include <sys/select.h>
+#endif
+
+#include "error.h"
+#include "spawn-pipe.h"
+#include "wait-process.h"
+#include "gettext.h"
+
+#define _(str) gettext (str)
+
+#include "pipe-filter-aux.h"
--- a/lib/pipe-filter-aux.h
+++ b/lib/pipe-filter-aux.h
@@ -15,6 +15,10 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef PIPE_FILTER_AUX_INLINE
+# define PIPE_FILTER_AUX_INLINE _GL_INLINE
+#endif
 
 #ifndef SSIZE_MAX
 # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
@@ -39,7 +43,7 @@
    These functions can return -1/EINTR even though we don't have any
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
-static inline int
+PIPE_FILTER_AUX_INLINE int
 nonintr_close (int fd)
 {
   int retval;
@@ -53,7 +57,7 @@
 #undef close /* avoid warning related to gnulib module unistd */
 #define close nonintr_close
 
-static inline ssize_t
+PIPE_FILTER_AUX_INLINE ssize_t
 nonintr_read (int fd, void *buf, size_t count)
 {
   ssize_t retval;
@@ -66,7 +70,7 @@
 }
 #define read nonintr_read
 
-static inline ssize_t
+PIPE_FILTER_AUX_INLINE ssize_t
 nonintr_write (int fd, const void *buf, size_t count)
 {
   ssize_t retval;
@@ -82,7 +86,7 @@
 
 # if HAVE_SELECT
 
-static inline int
+PIPE_FILTER_AUX_INLINE int
 nonintr_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
                 struct timeval *timeout)
 {
@@ -111,3 +115,5 @@
 #  define IS_EAGAIN(errcode) ((errcode) == EAGAIN)
 # endif
 #endif
+
+_GL_INLINE_HEADER_END
--- a/lib/pipe-filter-gi.c
+++ b/lib/pipe-filter-gi.c
@@ -81,7 +81,7 @@
 
 /* Perform additional initializations.
    Return 0 if successful, -1 upon failure.  */
-static inline int filter_init (struct pipe_filter_gi *filter);
+static int filter_init (struct pipe_filter_gi *filter);
 
 /* Write count bytes starting at buf, while at the same time invoking the
    read iterator (the functions prepare_read/done_read) when needed.  */
@@ -91,8 +91,8 @@
 /* Perform cleanup actions at the end.
    finish_reading is true if there was no error, or false if some error
    occurred already.  */
-static inline void filter_cleanup (struct pipe_filter_gi *filter,
-                                   bool finish_reading);
+static void filter_cleanup (struct pipe_filter_gi *filter,
+                            bool finish_reading);
 
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@@ -136,7 +136,7 @@
   abort ();
 }
 
-static inline int
+static int
 filter_init (struct pipe_filter_gi *filter)
 {
   InitializeCriticalSection (&filter->lock);
@@ -200,7 +200,7 @@
     }
 }
 
-static inline void
+static void
 filter_cleanup (struct pipe_filter_gi *filter, bool finish_reading)
 {
   if (finish_reading)
@@ -218,7 +218,7 @@
 #else
 /* Unix API.  */
 
-static inline int
+static int
 filter_init (struct pipe_filter_gi *filter)
 {
 #if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
@@ -459,7 +459,7 @@
    Return 0 upon success, or (only if exit_on_error is false):
    - -1 with errno set upon failure,
    - the positive exit code of the subprocess if that failed.  */
-static inline int
+static int
 filter_retcode (struct pipe_filter_gi *filter)
 {
   if (filter->writer_errno != 0)
--- a/lib/pipe-filter-ii.c
+++ b/lib/pipe-filter-ii.c
@@ -348,7 +348,7 @@
             if (buf != NULL)
               {
                 /* Writing to a pipe in non-blocking mode is tricky: The
-                   write() call may fail with EAGAIN, simply because suffcient
+                   write() call may fail with EAGAIN, simply because sufficient
                    space is not available in the pipe. See POSIX:2008
                    <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>.
                    This happens actually on AIX and IRIX, when bufsize >= 8192
--- a/lib/pipe-filter.h
+++ b/lib/pipe-filter.h
@@ -119,7 +119,7 @@
    true, otherwise return 127.
    Callback arguments are as described above.
 
-   Data is alternatingly written to the subprocess, through the functions
+   Data is alternately written to the subprocess, through the functions
    prepare_write and done_write, and read from the subprocess, through the
    functions prepare_read and done_read.
 
@@ -167,7 +167,7 @@
    true, otherwise return NULL and set errno.
 
    The caller will write to the subprocess through pipe_filter_gi_write
-   and finally call pipe_filter_gi_write.  During such calls, the
+   and finally call pipe_filter_gi_close.  During such calls, the
    prepare_read and done_read function may be called to process any data
    that the subprocess has written.
 
--- a/lib/pipe.c
+++ b/lib/pipe.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/pipe2.c
+++ b/lib/pipe2.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -16,8 +16,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Tell gcc not to warn about the (nfd < 0) tests, below.  */
 #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
@@ -73,7 +72,7 @@
 
 /* Optimized test whether a HANDLE refers to a console.
    See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>.  */
-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
 
 static BOOL
 IsSocketHandle (HANDLE h)
@@ -304,6 +303,10 @@
                || socket_errno == ECONNABORTED || socket_errno == ENETRESET)
         happened |= POLLHUP;
 
+      /* some systems can't use recv() on non-socket, including HP NonStop */
+      else if (socket_errno == ENOTSOCK)
+        happened |= (POLLIN | POLLRDNORM) & sought;
+
       else
         happened |= POLLERR;
     }
@@ -351,7 +354,7 @@
 
   /* EFAULT is not necessary to implement, but let's do it in the
      simplest case. */
-  if (!pfd)
+  if (!pfd && nfd)
     {
       errno = EFAULT;
       return -1;
@@ -599,7 +602,7 @@
 
   if (!rc && timeout == INFTIM)
     {
-      SwitchToThread();
+      SleepEx (1, TRUE);
       goto restart;
     }
 
--- a/lib/poll.in.h
+++ b/lib/poll.in.h
@@ -16,8 +16,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_POLL_H
 
@@ -45,7 +44,7 @@
 /* fake a poll(2) environment */
 # define POLLIN      0x0001      /* any readable data available   */
 # define POLLPRI     0x0002      /* OOB/Urgent readable data      */
-# define POLLOUT     0x0004      /* file descriptor is writeable  */
+# define POLLOUT     0x0004      /* file descriptor is writable   */
 # define POLLERR     0x0008      /* some poll error occurred      */
 # define POLLHUP     0x0010      /* file descriptor was "hung up" */
 # define POLLNVAL    0x0020      /* requested events "invalid"    */
--- a/lib/popen.c
+++ b/lib/popen.c
@@ -21,7 +21,24 @@
 /* Specification.  */
 #include <stdio.h>
 
-#if HAVE_POPEN
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Windows API.  */
+
+# include <string.h>
+
+FILE *
+popen (const char *filename, const char *mode)
+{
+  /* Use binary mode by default.  */
+  if (strcmp (mode, "r") == 0)
+    mode = "rb";
+  else if (strcmp (mode, "w") == 0)
+    mode = "wb";
+
+  return _popen (filename, mode);
+}
+
+#else
 
 # include <errno.h>
 # include <fcntl.h>
@@ -33,7 +50,7 @@
 FILE *
 rpl_popen (const char *filename, const char *mode)
 {
-  /* The mingw popen works fine, and all other platforms have fcntl.
+  /* All other platforms have popen and fcntl.
      The bug of the child clobbering its own file descriptors if stdin
      or stdout was closed in the parent can be worked around by
      opening those two fds as close-on-exec to begin with.  */
@@ -42,7 +59,7 @@
      the fd leaks into subsequent popen calls.  We could work around
      this by maintaining a list of all fd's opened by popen, and
      temporarily marking them cloexec around the real popen call, but
-     we would also have to override pclose, and the bookkeepping seems
+     we would also have to override pclose, and the bookkeeping seems
      extreme given that cygwin 1.7 no longer has the bug.  */
   FILE *result;
   int cloexec0 = fcntl (STDIN_FILENO, F_GETFD);
@@ -83,21 +100,4 @@
   return result;
 }
 
-#else
-/* Native Windows API.  */
-
-# include <string.h>
-
-FILE *
-popen (const char *filename, const char *mode)
-{
-  /* Use binary mode by default.  */
-  if (strcmp (mode, "r") == 0)
-    mode = "rb";
-  else if (strcmp (mode, "w") == 0)
-    mode = "wb";
-
-  return _popen (filename, mode);
-}
-
 #endif
--- a/lib/posix_openpt.c
+++ b/lib/posix_openpt.c
@@ -28,12 +28,12 @@
 
 /* posix_openpt() is already provided on
      glibc >= 2.2.1 (but is a stub on GNU/Hurd),
-     MacOS X >= 10.4,
+     Mac OS X >= 10.4,
      FreeBSD >= 5.1 (lived in src/lib/libc/stdlib/grantpt.c before 8.0),
      NetBSD >= 3.0,
      AIX >= 5.2, HP-UX >= 11.31, Solaris >= 10, Cygwin >= 1.7.
    Thus, this replacement function is compiled on
-     MacOS X 10.3, OpenBSD 4.9, Minix 3.1.8,
+     Mac OS X 10.3, OpenBSD 4.9, Minix 3.1.8,
      AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9,
      Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
    Among these:
@@ -87,19 +87,19 @@
   else
     master = -1;
 
-#else /* MacOS X, Minix, HP-UX, IRIX, OSF/1, Solaris 9, Cygwin 1.5 */
+#else /* Mac OS X, Minix, HP-UX, IRIX, OSF/1, Solaris 9, Cygwin 1.5 */
 
   /* Most systems that lack posix_openpt() have /dev/ptmx.  */
   master = open ("/dev/ptmx", flags);
 
   /* If all this does not work, we could try to open, one by one:
-     - On MacOS X: /dev/pty[p-w][0-9a-f]
-     - On *BSD:    /dev/pty[p-sP-S][0-9a-v]
-     - On Minix:   /dev/pty[p-q][0-9a-f]
-     - On AIX:     /dev/ptyp[0-9a-f]
-     - On HP-UX:   /dev/pty[p-r][0-9a-f]
-     - On OSF/1:   /dev/pty[p-q][0-9a-f]
-     - On Solaris: /dev/pty[p-r][0-9a-f]
+     - On Mac OS X: /dev/pty[p-w][0-9a-f]
+     - On *BSD:     /dev/pty[p-sP-S][0-9a-v]
+     - On Minix:    /dev/pty[p-q][0-9a-f]
+     - On AIX:      /dev/ptyp[0-9a-f]
+     - On HP-UX:    /dev/pty[p-r][0-9a-f]
+     - On OSF/1:    /dev/pty[p-q][0-9a-f]
+     - On Solaris:  /dev/pty[p-r][0-9a-f]
    */
 
 #endif
--- a/lib/printf-args.c
+++ b/lib/printf-args.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file can be parametrized with the following macros:
      ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
--- a/lib/printf-args.h
+++ b/lib/printf-args.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _PRINTF_ARGS_H
 #define _PRINTF_ARGS_H
--- a/lib/printf-parse.c
+++ b/lib/printf-parse.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file can be parametrized with the following macros:
      CHAR_T             The element type of the format string.
@@ -402,7 +401,7 @@
                       cp++;
                     }
 #if defined __APPLE__ && defined __MACH__
-                  /* On MacOS X 10.3, PRIdMAX is defined as "qd".
+                  /* On Mac OS X 10.3, PRIdMAX is defined as "qd".
                      We cannot change it to "lld" because PRIdMAX must also
                      be understood by the system's printf routines.  */
                   else if (*cp == 'q')
--- a/lib/printf-parse.h
+++ b/lib/printf-parse.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _PRINTF_PARSE_H
 #define _PRINTF_PARSE_H
--- a/lib/priv-set.c
+++ b/lib/priv-set.c
@@ -18,6 +18,9 @@
    Written by David Bartley.  */
 
 #include <config.h>
+
+#define PRIV_SET_INLINE _GL_EXTERN_INLINE
+
 #include "priv-set.h"
 
 #if HAVE_GETPPRIV && HAVE_PRIV_H
--- a/lib/priv-set.h
+++ b/lib/priv-set.h
@@ -17,6 +17,11 @@
 
    Written by David Bartley.  */
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef PRIV_SET_INLINE
+# define PRIV_SET_INLINE _GL_INLINE
+#endif
+
 #if HAVE_GETPPRIV && HAVE_PRIV_H
 
 # include <priv.h>
@@ -25,26 +30,32 @@
 int priv_set_remove (const char *priv);
 int priv_set_restore (const char *priv);
 
-static inline int priv_set_remove_linkdir (void)
+PRIV_SET_INLINE int
+priv_set_remove_linkdir (void)
 {
   return priv_set_remove (PRIV_SYS_LINKDIR);
 }
 
-static inline int priv_set_restore_linkdir (void)
+PRIV_SET_INLINE int
+priv_set_restore_linkdir (void)
 {
   return priv_set_restore (PRIV_SYS_LINKDIR);
 }
 
 #else
 
-static inline int priv_set_remove_linkdir (void)
+PRIV_SET_INLINE int
+priv_set_remove_linkdir (void)
 {
   return -1;
 }
 
-static inline int priv_set_restore_linkdir (void)
+PRIV_SET_INLINE int
+priv_set_restore_linkdir (void)
 {
   return -1;
 }
 
 #endif
+
+_GL_INLINE_HEADER_END
--- a/lib/progreloc.c
+++ b/lib/progreloc.c
@@ -30,7 +30,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 
-/* Get declaration of _NSGetExecutablePath on MacOS X 10.2 or newer.  */
+/* Get declaration of _NSGetExecutablePath on Mac OS X 10.2 or newer.  */
 #if HAVE_MACH_O_DYLD_H
 # include <mach-o/dyld.h>
 #endif
@@ -202,7 +202,7 @@
   }
 # endif
 # if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH
-  /* On MacOS X 10.2 or newer, the function
+  /* On Mac OS X 10.2 or newer, the function
        int _NSGetExecutablePath (char *buf, uint32_t *bufsize);
      can be used to retrieve the executable's full path.  */
   char location[4096];
--- a/lib/pselect.c
+++ b/lib/pselect.c
@@ -15,8 +15,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* written by Paul Eggert */
 
@@ -34,6 +33,8 @@
    pointer parameter stands for no descriptors, an infinite timeout,
    or an unaffected signal mask.  */
 
+#if !HAVE_PSELECT
+
 int
 pselect (int nfds, fd_set *restrict rfds,
          fd_set *restrict wfds, fd_set *restrict xfds,
@@ -75,3 +76,35 @@
 
   return select_result;
 }
+
+#else /* HAVE_PSELECT */
+# include <unistd.h>
+# undef pselect
+
+int
+rpl_pselect (int nfds, fd_set *restrict rfds,
+	     fd_set *restrict wfds, fd_set *restrict xfds,
+             struct timespec const *restrict timeout,
+	     sigset_t const *restrict sigmask)
+{
+  int i;
+
+  /* FreeBSD 8.2 has a bug: it does not always detect invalid fds.  */
+  if (nfds < 0 || nfds > FD_SETSIZE)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  for (i = 0; i < nfds; i++)
+    {
+      if (((rfds && FD_ISSET (i, rfds))
+           || (wfds && FD_ISSET (i, wfds))
+           || (xfds && FD_ISSET (i, xfds)))
+          && dup2 (i, i) != i)
+        return -1;
+    }
+
+  return pselect (nfds, rfds, wfds, xfds, timeout, sigmask);
+}
+
+#endif
--- a/lib/pt_chown.c
+++ b/lib/pt_chown.c
@@ -25,6 +25,8 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "root-uid.h"
+
 #include "pty-private.h"
 
 /* For security reasons, we try to minimize the dependencies on libraries
@@ -75,7 +77,7 @@
 {
   uid_t euid = geteuid ();
 
-  if (argc == 1 && euid == 0)
+  if (argc == 1 && euid == ROOT_UID)
     {
       /* Normal invocation of this program is with no arguments and
          with privileges.  */
@@ -152,7 +154,7 @@
   }
 
   /* Check if we are properly installed.  */
-  if (euid != 0)
+  if (euid != ROOT_UID)
     {
       fprintf (stderr, "pt_chown: needs to be installed setuid 'root'\n");
       return FAIL_EXEC;
new file mode 100644
--- /dev/null
+++ b/lib/pthread.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_PTHREAD_INLINE _GL_EXTERN_INLINE
+#include "pthread.h"
--- a/lib/pthread.in.h
+++ b/lib/pthread.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert and Glen Lenker.  */
 
@@ -39,6 +38,11 @@
 #include <sys/types.h>
 #include <time.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_PTHREAD_INLINE
+# define _GL_PTHREAD_INLINE _GL_INLINE
+#endif
+
 #if ! @HAVE_PTHREAD_T@
 # if !GNULIB_defined_pthread_types
  typedef int pthread_t;
@@ -111,14 +115,14 @@
    know what to do, so that they elicit a compile-time error for
    now.  */
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_cond_destroy (pthread_cond_t *cond)
 {
   /* COND is never seriously used.  */
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_cond_init (pthread_cond_t *restrict cond,
                    pthread_condattr_t const *restrict attr)
 {
@@ -126,14 +130,14 @@
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_cond_signal (pthread_cond_t *cond)
 {
   /* No threads can currently be blocked on COND.  */
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_cond_wait (pthread_cond_t *restrict cond,
                    pthread_mutex_t *restrict mutex)
 {
@@ -142,7 +146,7 @@
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_create (pthread_t *restrict thread,
                 pthread_attr_t const *restrict attr,
                 void * (*start_routine) (void*), void *restrict arg)
@@ -151,14 +155,14 @@
   return EAGAIN;
 }
 
-static inline void
+_GL_PTHREAD_INLINE void
 pthread_exit (void *value)
 {
   /* There is just one thread, so the process exits.  */
   exit (0);
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_join (pthread_t thread, void **pvalue)
 {
   /* Properly-written applications never come here.  */
@@ -166,32 +170,32 @@
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutexattr_destroy (pthread_mutexattr_t *attr)
 {
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutexattr_init (pthread_mutexattr_t *attr)
 {
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutexattr_settype (pthread_mutexattr_t *attr, int attr_type)
 {
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutex_destroy (pthread_mutex_t *mutex)
 {
   /* MUTEX is never seriously used.  */
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutex_init (pthread_mutex_t *restrict mutex,
                     pthread_mutexattr_t const *restrict attr)
 {
@@ -199,7 +203,7 @@
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutex_lock (pthread_mutex_t *mutex)
 {
   /* There is only one thread, so it always gets the lock.  This
@@ -207,13 +211,13 @@
   return 0;
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutex_trylock (pthread_mutex_t *mutex)
 {
   return pthread_mutex_lock (mutex);
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_mutex_unlock (pthread_mutex_t *mutex)
 {
   /* There is only one thread, so it always unlocks successfully.
@@ -235,31 +239,31 @@
 
 typedef pthread_mutex_t pthread_spinlock_t;
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_spin_init (pthread_spinlock_t *lock, int pshared)
 {
   return pthread_mutex_init (lock, NULL);
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_spin_destroy (pthread_spinlock_t *lock)
 {
   return pthread_mutex_destroy (lock);
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_spin_lock (pthread_spinlock_t *lock)
 {
   return pthread_mutex_lock (lock);
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   return pthread_mutex_trylock (lock);
 }
 
-static inline int
+_GL_PTHREAD_INLINE int
 pthread_spin_unlock (pthread_spinlock_t *lock)
 {
   return pthread_mutex_unlock (lock);
@@ -270,5 +274,7 @@
 
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
 #endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
--- a/lib/pthread_sigmask.c
+++ b/lib/pthread_sigmask.c
@@ -22,6 +22,10 @@
 #include <errno.h>
 #include <stddef.h>
 
+#if PTHREAD_SIGMASK_INEFFECTIVE
+# include <string.h>
+#endif
+
 #if PTHREAD_SIGMASK_UNBLOCK_BUG
 # include <unistd.h>
 #endif
@@ -31,7 +35,22 @@
 #undef pthread_sigmask
 {
 #if HAVE_PTHREAD_SIGMASK
-  int ret = pthread_sigmask (how, new_mask, old_mask);
+  int ret;
+
+# if PTHREAD_SIGMASK_INEFFECTIVE
+  sigset_t omask, omask_copy;
+  sigset_t *old_mask_ptr = &omask;
+  sigemptyset (&omask);
+  /* Add a signal unlikely to be blocked, so that OMASK_COPY
+     is unlikely to match the actual mask.  */
+  sigaddset (&omask, SIGILL);
+  memcpy (&omask_copy, &omask, sizeof omask);
+# else
+  sigset_t *old_mask_ptr = old_mask;
+# endif
+
+  ret = pthread_sigmask (how, new_mask, old_mask_ptr);
+
 # if PTHREAD_SIGMASK_INEFFECTIVE
   if (ret == 0)
     {
@@ -39,12 +58,16 @@
          Don't cache the information: libpthread.so could be dynamically
          loaded after the program started and after pthread_sigmask was
          called for the first time.  */
-      if (pthread_sigmask (1729, NULL, NULL) == 0)
+      if (memcmp (&omask_copy, &omask, sizeof omask) == 0
+          && pthread_sigmask (1729, &omask_copy, NULL) == 0)
         {
           /* pthread_sigmask is currently ineffective.  The program is not
              linked to -lpthread.  So use sigprocmask instead.  */
           return (sigprocmask (how, new_mask, old_mask) < 0 ? errno : 0);
         }
+
+      if (old_mask)
+        memcpy (old_mask, &omask, sizeof omask);
     }
 # endif
 # if PTHREAD_SIGMASK_FAILS_WITH_ERRNO
--- a/lib/ptsname_r.c
+++ b/lib/ptsname_r.c
@@ -19,6 +19,7 @@
 #include <stdlib.h>
 
 #include <errno.h>
+#include <fcntl.h>
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -41,6 +42,25 @@
 
 #endif
 
+#ifdef __sun
+/* Get ioctl() and 'struct strioctl'.  */
+# include <stropts.h>
+/* Get ISPTM.  */
+# include <sys/stream.h>
+# include <sys/ptms.h>
+/* Get the major, minor macros.  */
+# include <sys/sysmacros.h>
+# include <stdio.h>
+#endif
+
+#if defined _AIX || defined __osf__
+/* Get ioctl(), ISPTM.  */
+# include <sys/ioctl.h>
+/* Get the major, minor macros.  */
+# include <sys/sysmacros.h>
+# include <stdio.h>
+#endif
+
 
 /* Store at most BUFLEN characters of the pathname of the slave pseudo
    terminal associated with the master FD is open on in BUF.
@@ -58,9 +78,91 @@
       return EINVAL;
     }
 
+#if defined __sun /* Solaris */
+  if (fstat (fd, &st) < 0)
+    return errno;
+  if (!(S_ISCHR (st.st_mode) && major (st.st_rdev) == 0))
+    {
+      errno = ENOTTY;
+      return errno;
+    }
+  {
+    /* Master ptys can be recognized through a STREAMS ioctl.  See
+       "STREAMS-based Pseudo-Terminal Subsystem"
+       <http://docs.oracle.com/cd/E18752_01/html/816-4855/termsub15-44781.html>
+       and "STREAMS ioctl commands"
+       <http://docs.oracle.com/cd/E18752_01/html/816-5177/streamio-7i.html>
+     */
+    struct strioctl ioctl_arg;
+    ioctl_arg.ic_cmd = ISPTM;
+    ioctl_arg.ic_timout = 0;
+    ioctl_arg.ic_len = 0;
+    ioctl_arg.ic_dp = NULL;
+
+    if (ioctl (fd, I_STR, &ioctl_arg) < 0)
+      {
+        errno = ENOTTY;
+        return errno;
+      }
+  }
+  {
+    char tmpbuf[9 + 10 + 1];
+    int n = sprintf (tmpbuf, "/dev/pts/%u", minor (st.st_rdev));
+    if (n >= buflen)
+      {
+        errno = ERANGE;
+        return errno;
+      }
+    memcpy (buf, tmpbuf, n + 1);
+  }
+#elif defined _AIX || defined __osf__ /* AIX, OSF/1 */
+  /* This implementation returns /dev/pts/N, like ptsname() does.
+     Whereas the generic implementation below returns /dev/ttypN.
+     Both are correct, but let's be consistent with ptsname().  */
+  if (fstat (fd, &st) < 0)
+    return errno;
+  if (!S_ISCHR (st.st_mode))
+    {
+      errno = ENOTTY;
+      return errno;
+    }
+  {
+    int ret;
+    int dev;
+    char tmpbuf[9 + 10 + 1];
+    int n;
+# ifdef _AIX
+    ret = ioctl (fd, ISPTM, &dev);
+# endif
+# ifdef __osf__
+    ret = ioctl (fd, ISPTM, NULL);
+    dev = ret;
+# endif
+    if (ret < 0)
+      {
+        errno = ENOTTY;
+        return errno;
+      }
+    n = sprintf (tmpbuf, "/dev/pts/%u", minor (dev));
+    if (n >= buflen)
+      {
+        errno = ERANGE;
+        return errno;
+      }
+    memcpy (buf, tmpbuf, n + 1);
+  }
+#else
   if (!__isatty (fd))
-    /* We rely on isatty to set errno properly (i.e. EBADF or ENOTTY).  */
-    return errno;
+    {
+#if ISATTY_FAILS_WITHOUT_SETTING_ERRNO && defined F_GETFL /* IRIX, Solaris */
+      /* Set errno.  */
+      if (fcntl (fd, F_GETFL) != -1)
+        errno = ENOTTY;
+#else
+      /* We rely on isatty to set errno properly (i.e. EBADF or ENOTTY).  */
+#endif
+      return errno;
+    }
 
   if (buflen < strlen (_PATH_TTY) + 3)
     {
@@ -75,7 +177,9 @@
       return errno;
     }
 
-  buf[sizeof (_PATH_DEV) - 1] = 't';
+  if (strncmp(buf, "/dev/pts/", strlen("/dev/pts/")) != 0)
+    buf[sizeof (_PATH_DEV) - 1] = 't';
+#endif
 
   if (__stat (buf, &st) < 0)
     return errno;
--- a/lib/pty-private.h
+++ b/lib/pty-private.h
@@ -14,9 +14,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #ifndef _PTY_PRIVATE_H
 #define _PTY_PRIVATE_H 1
--- a/lib/pty.in.h
+++ b/lib/pty.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_PTY_H
 
deleted file mode 100644
--- a/lib/quote.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* quote.c - quote arguments for output
-
-   Copyright (C) 1998-2001, 2003, 2005-2006, 2009-2012 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 <eggert@twinsun.com> */
-
-#include <config.h>
-
-#include "quotearg.h"
-#include "quote.h"
-
-/* Return an unambiguous printable representation of NAME,
-   allocated in slot N, suitable for diagnostics.  */
-char const *
-quote_n (int n, char const *name)
-{
-  return quotearg_n_style (n, locale_quoting_style, name);
-}
-
-/* Return an unambiguous printable representation of NAME,
-   suitable for diagnostics.  */
-char const *
-quote (char const *name)
-{
-  return quote_n (0, name);
-}
--- a/lib/quote.h
+++ b/lib/quote.h
@@ -15,6 +15,32 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef QUOTE_H_
+# define QUOTE_H_ 1
 
-char const *quote_n (int n, char const *name);
-char const *quote (char const *name);
+# include <stddef.h>
+
+/* The quoting options used by quote_n and quote.  Its type is incomplete,
+   so it's useful only in expressions like '&quote_quoting_options'.  */
+extern struct quoting_options quote_quoting_options;
+
+/* Return an unambiguous printable representation of ARG (of size
+   ARGSIZE), allocated in slot N, suitable for diagnostics.  If
+   ARGSIZE is SIZE_MAX, use the string length of the argument for
+   ARGSIZE.  */
+char const *quote_n_mem (int n, char const *arg, size_t argsize);
+
+/* Return an unambiguous printable representation of ARG (of size
+   ARGSIZE), suitable for diagnostics.  If ARGSIZE is SIZE_MAX, use
+   the string length of the argument for ARGSIZE.  */
+char const *quote_mem (char const *arg, size_t argsize);
+
+/* Return an unambiguous printable representation of ARG, allocated in
+   slot N, suitable for diagnostics.  */
+char const *quote_n (int n, char const *arg);
+
+/* Return an unambiguous printable representation of ARG, suitable for
+   diagnostics.  */
+char const *quote (char const *arg);
+
+#endif /* !QUOTE_H_ */
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -27,6 +27,7 @@
 #include <config.h>
 
 #include "quotearg.h"
+#include "quote.h"
 
 #include "xalloc.h"
 #include "c-strcaseeq.h"
@@ -177,7 +178,7 @@
 static struct quoting_options /* NOT PURE!! */
 quoting_options_from_style (enum quoting_style style)
 {
-  struct quoting_options o = { 0 };
+  struct quoting_options o = { 0, 0, { 0 }, NULL, NULL };
   if (style == custom_quoting_style)
     abort ();
   o.style = style;
@@ -926,3 +927,37 @@
   return quotearg_n_custom_mem (0, left_quote, right_quote, arg,
                                 argsize);
 }
+
+
+/* The quoting option used by the functions of quote.h.  */
+struct quoting_options quote_quoting_options =
+  {
+    locale_quoting_style,
+    0,
+    { 0 },
+    NULL, NULL
+  };
+
+char const *
+quote_n_mem (int n, char const *arg, size_t argsize)
+{
+  return quotearg_n_options (n, arg, argsize, &quote_quoting_options);
+}
+
+char const *
+quote_mem (char const *arg, size_t argsize)
+{
+  return quote_n_mem (0, arg, argsize);
+}
+
+char const *
+quote_n (int n, char const *arg)
+{
+  return quote_n_mem (n, arg, SIZE_MAX);
+}
+
+char const *
+quote (char const *arg)
+{
+  return quote_n (0, arg);
+}
--- a/lib/raise.c
+++ b/lib/raise.c
@@ -32,7 +32,7 @@
 # undef raise
 
 # if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
 raise_nothrow (int sig)
 {
   int result;
new file mode 100644
--- /dev/null
+++ b/lib/random.c
@@ -0,0 +1,187 @@
+/* Family of functions for random integers.
+   Copyright (C) 1995-1997, 2000-2002, 2012 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/>.  */
+
+/*
+ * This is derived from the Berkeley source:
+ *      @(#)random.c    5.5 (Berkeley) 7/6/88
+ * It was reworked for the GNU C Library by Roland McGrath.
+ * Rewritten to use reentrant functions by Ulrich Drepper, 1995.
+ */
+
+/*
+   Copyright (C) 1983 Regents of the University of California.
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   4. Neither the name of the University nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.*/
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <stdint.h>
+#include <time.h>
+
+/* This file can assume the 'struct random_data' and associated *_r functions
+   from gnulib.  */
+
+/* Linear congruential.  */
+#define TYPE_0          0
+#define BREAK_0         8
+#define DEG_0           0
+#define SEP_0           0
+
+/* x**7 + x**3 + 1.  */
+#define TYPE_1          1
+#define BREAK_1         32
+#define DEG_1           7
+#define SEP_1           3
+
+/* x**15 + x + 1.  */
+#define TYPE_2          2
+#define BREAK_2         64
+#define DEG_2           15
+#define SEP_2           1
+
+/* x**31 + x**3 + 1.  */
+#define TYPE_3          3
+#define BREAK_3         128
+#define DEG_3           31
+#define SEP_3           3
+
+/* x**63 + x + 1.  */
+#define TYPE_4          4
+#define BREAK_4         256
+#define DEG_4           63
+#define SEP_4           1
+
+/* Array versions of the above information to make code run faster.
+   Relies on fact that TYPE_i == i.  */
+
+#define MAX_TYPES       5       /* Max number of types above.  */
+
+/* Initially, everything is set up as if from:
+        initstate(1, randtbl, 128);
+   Note that this initialization takes advantage of the fact that srandom
+   advances the front and rear pointers 10*rand_deg times, and hence the
+   rear pointer which starts at 0 will also end up at zero; thus the zeroth
+   element of the state information, which contains info about the current
+   position of the rear pointer is just
+        (MAX_TYPES * (rptr - state)) + TYPE_3 == TYPE_3.  */
+
+static int32_t randtbl[DEG_3 + 1] =
+  {
+    TYPE_3,
+
+    -1726662223, 379960547, 1735697613, 1040273694, 1313901226,
+    1627687941, -179304937, -2073333483, 1780058412, -1989503057,
+    -615974602, 344556628, 939512070, -1249116260, 1507946756,
+    -812545463, 154635395, 1388815473, -1926676823, 525320961,
+    -1009028674, 968117788, -123449607, 1284210865, 435012392,
+    -2017506339, -911064859, -370259173, 1132637927, 1398500161,
+    -205601318,
+  };
+
+static struct random_data generator =
+  {
+/* FPTR and RPTR are two pointers into the state info, a front and a rear
+   pointer.  These two pointers are always rand_sep places aparts, as they
+   cycle through the state information.  (Yes, this does mean we could get
+   away with just one pointer, but the code for random is more efficient
+   this way).  The pointers are left positioned as they would be from the call:
+        initstate(1, randtbl, 128);
+   (The position of the rear pointer, rptr, is really 0 (as explained above
+   in the initialization of randtbl) because the state table pointer is set
+   to point to randtbl[1] (as explained below).)  */
+
+    /* fptr */ &randtbl[SEP_3 + 1],
+    /* rptr */ &randtbl[1],
+
+/* The following things are the pointer to the state information table,
+   the type of the current generator, the degree of the current polynomial
+   being used, and the separation between the two pointers.
+   Note that for efficiency of random, we remember the first location of
+   the state information, not the zeroth.  Hence it is valid to access
+   state[-1], which is used to store the type of the R.N.G.
+   Also, we remember the last location, since this is more efficient than
+   indexing every time to find the address of the last element to see if
+   the front and rear pointers have wrapped.  */
+
+    /* state */ &randtbl[1],
+
+    /* rand_type */ TYPE_3,
+    /* rand_deg */ DEG_3,
+    /* rand_sep */ SEP_3,
+
+    /* end_ptr */ &randtbl[sizeof (randtbl) / sizeof (randtbl[0])]
+};
+
+long
+random (void)
+{
+  int32_t val;
+
+  if (random_r (&generator, &val) < 0)
+    abort (); /* should not happen */
+  return val;
+}
+
+void
+srandom (unsigned int seed)
+{
+  (void) srandom_r (seed, &generator); /* may fail! */
+}
+
+char *
+initstate (unsigned int seed, char *buf, size_t buf_size)
+{
+  char *old_state = (char *) ((int32_t *) generator.state - 1);
+  if (initstate_r (seed, buf, buf_size, &generator) < 0)
+    return NULL; /* failed */
+  return old_state;
+}
+
+char *
+setstate (char *arg_state)
+{
+  char *old_state = (char *) ((int32_t *) generator.state - 1);
+  if (setstate_r (arg_state, &generator) < 0)
+    return NULL; /* failed */
+  return old_state;
+}
--- a/lib/random_r.c
+++ b/lib/random_r.c
@@ -57,11 +57,13 @@
    below.  */
 #define _GL_ARG_NONNULL(params)
 
+/* Specification.  */
+#include <stdlib.h>
+
 #include <errno.h>
 #include <limits.h>
 #include <stddef.h>
-#include <stdlib.h>
-#include <inttypes.h>
+#include <stdint.h>
 
 
 /* An improved random number generation package.  In addition to the standard
--- a/lib/read-file.c
+++ b/lib/read-file.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/read-file.h
+++ b/lib/read-file.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef READ_FILE_H
 #define READ_FILE_H
--- a/lib/read.c
+++ b/lib/read.c
@@ -34,7 +34,7 @@
 # undef read
 
 # if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline ssize_t
+static ssize_t
 read_nothrow (int fd, void *buf, size_t count)
 {
   ssize_t result;
--- a/lib/readtokens.c
+++ b/lib/readtokens.c
@@ -18,7 +18,7 @@
 
    Written by Jim Meyering. */
 
-/* This almost supercedes xreadline stuff -- using delim="\n"
+/* This almost supersedes xreadline stuff -- using delim="\n"
    gives the same functionality, except that these functions
    would never return empty lines. */
 
@@ -26,6 +26,7 @@
 
 #include "readtokens.h"
 
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -46,6 +47,22 @@
   tokenbuffer->buffer = NULL;
 }
 
+typedef size_t word;
+enum { bits_per_word = sizeof (word) * CHAR_BIT };
+
+static bool
+get_nth_bit (size_t n, word const *bitset)
+{
+  return bitset[n / bits_per_word] >> n % bits_per_word & 1;
+}
+
+static void
+set_nth_bit (size_t n, word *bitset)
+{
+  size_t one = 1;
+  bitset[n / bits_per_word] |= one << n % bits_per_word;
+}
+
 /* Read a token from STREAM into TOKENBUFFER.
    A token is delimited by any of the N_DELIM bytes in DELIM.
    Upon return, the token is in tokenbuffer->buffer and
@@ -57,7 +74,7 @@
    by testing ferror (STREAM).
 
    This function works properly on lines containing NUL bytes
-   and on files do not end with a delimiter.  */
+   and on files that do not end with a delimiter.  */
 
 size_t
 readtoken (FILE *stream,
@@ -68,42 +85,17 @@
   char *p;
   int c;
   size_t i, n;
-  static const char *saved_delim = NULL;
-  static char isdelim[256];
-  bool same_delimiters;
+  word isdelim[(UCHAR_MAX + bits_per_word) / bits_per_word];
 
-  if (delim == NULL && saved_delim == NULL)
-    abort ();
-
-  same_delimiters = false;
-  if (delim != saved_delim && saved_delim != NULL)
+  memset (isdelim, 0, sizeof isdelim);
+  for (i = 0; i < n_delim; i++)
     {
-      same_delimiters = true;
-      for (i = 0; i < n_delim; i++)
-        {
-          if (delim[i] != saved_delim[i])
-            {
-              same_delimiters = false;
-              break;
-            }
-        }
+      unsigned char ch = delim[i];
+      set_nth_bit (ch, isdelim);
     }
 
-  if (!same_delimiters)
-    {
-      size_t j;
-      saved_delim = delim;
-      memset (isdelim, 0, sizeof isdelim);
-      for (j = 0; j < n_delim; j++)
-        {
-          unsigned char ch = delim[j];
-          isdelim[ch] = 1;
-        }
-    }
-
-  /* FIXME: don't fool with this caching.  Use strchr instead.  */
   /* skip over any leading delimiters */
-  for (c = getc (stream); c >= 0 && isdelim[c]; c = getc (stream))
+  for (c = getc (stream); c >= 0 && get_nth_bit (c, isdelim); c = getc (stream))
     {
       /* empty */
     }
@@ -124,7 +116,7 @@
           p[i] = 0;
           break;
         }
-      if (isdelim[c])
+      if (get_nth_bit (c, isdelim))
         {
           p[i] = 0;
           break;
--- a/lib/readutmp.c
+++ b/lib/readutmp.c
@@ -61,7 +61,7 @@
 
 /* Is the utmp entry U desired by the user who asked for OPTIONS?  */
 
-static inline bool
+static bool
 desirable_utmp_entry (STRUCT_UTMP const *u, int options)
 {
   bool user_proc = IS_USER_PROCESS (u);
@@ -69,8 +69,8 @@
     return false;
   if ((options & READ_UTMP_CHECK_PIDS)
       && user_proc
-      && (UT_PID (u) <= 0
-          || (kill (UT_PID (u), 0) < 0 && errno == ESRCH)))
+      && 0 < UT_PID (u)
+      && (kill (UT_PID (u), 0) < 0 && errno == ESRCH))
     return false;
   return true;
 }
--- a/lib/ref-add.sin
+++ b/lib/ref-add.sin
@@ -13,8 +13,7 @@
 #   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, write to the Free Software Foundation,
-#   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#   with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # Written by Bruno Haible <haible@clisp.cons.org>.
 #
--- a/lib/ref-del.sin
+++ b/lib/ref-del.sin
@@ -13,8 +13,7 @@
 #   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, write to the Free Software Foundation,
-#   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#   with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # Written by Bruno Haible <haible@clisp.cons.org>.
 #
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
 					  size_t length, reg_syntax_t syntax);
@@ -273,7 +272,7 @@
 re_compile_fastmap (bufp)
     struct re_pattern_buffer *bufp;
 {
-  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  re_dfa_t *dfa = bufp->buffer;
   char *fastmap = bufp->fastmap;
 
   memset (fastmap, '\0', sizeof (char) * SBC_MAX);
@@ -307,7 +306,7 @@
 re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
 			 char *fastmap)
 {
-  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  re_dfa_t *dfa = bufp->buffer;
   Idx node_cnt;
   bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
   for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
@@ -586,19 +585,23 @@
 static const bitset_t utf8_sb_map =
 {
   /* Set the first 128 bits.  */
-# if 4 * BITSET_WORD_BITS < ASCII_CHARS
-#  error "bitset_word_t is narrower than 32 bits"
-# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
+# ifdef __GNUC__
+  [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
+# else
+#  if 4 * BITSET_WORD_BITS < ASCII_CHARS
+#   error "bitset_word_t is narrower than 32 bits"
+#  elif 3 * BITSET_WORD_BITS < ASCII_CHARS
   BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
-# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
+#  elif 2 * BITSET_WORD_BITS < ASCII_CHARS
   BITSET_WORD_MAX, BITSET_WORD_MAX,
-# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
+#  elif 1 * BITSET_WORD_BITS < ASCII_CHARS
   BITSET_WORD_MAX,
-# endif
+#  endif
   (BITSET_WORD_MAX
    >> (SBC_MAX % BITSET_WORD_BITS == 0
        ? 0
        : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
+# endif
 };
 #endif
 
@@ -657,7 +660,7 @@
 regfree (preg)
     regex_t *preg;
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   if (BE (dfa != NULL, 1))
     free_dfa_content (dfa);
   preg->buffer = NULL;
@@ -764,7 +767,7 @@
   preg->regs_allocated = REGS_UNALLOCATED;
 
   /* Initialize the dfa.  */
-  dfa = (re_dfa_t *) preg->buffer;
+  dfa = preg->buffer;
   if (BE (preg->allocated < sizeof (re_dfa_t), 0))
     {
       /* If zero allocated, but buffer is non-null, try to realloc
@@ -775,7 +778,7 @@
       if (dfa == NULL)
 	return REG_ESPACE;
       preg->allocated = sizeof (re_dfa_t);
-      preg->buffer = (unsigned char *) dfa;
+      preg->buffer = dfa;
     }
   preg->used = sizeof (re_dfa_t);
 
@@ -850,7 +853,7 @@
 {
   __re_size_t table_size;
 #ifndef _LIBC
-  char *codeset_name;
+  const char *codeset_name;
 #endif
 #ifdef RE_ENABLE_I18N
   size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
@@ -873,7 +876,7 @@
      calculation below, and for similar doubling calculations
      elsewhere.  And it's <= rather than <, because some of the
      doubling calculations add 1 afterwards.  */
-  if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0))
+  if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0))
     return REG_ESPACE;
 
   dfa->nodes_alloc = pat_len + 1;
@@ -896,8 +899,10 @@
 		       != 0);
 #else
   codeset_name = nl_langinfo (CODESET);
-  if (strcasecmp (codeset_name, "UTF-8") == 0
-      || strcasecmp (codeset_name, "UTF8") == 0)
+  if ((codeset_name[0] == 'U' || codeset_name[0] == 'u')
+      && (codeset_name[1] == 'T' || codeset_name[1] == 't')
+      && (codeset_name[2] == 'F' || codeset_name[2] == 'f')
+      && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0)
     dfa->is_utf8 = 1;
 
   /* We check exhaustively in the loop below if this charset is a
@@ -947,9 +952,43 @@
 internal_function
 init_word_char (re_dfa_t *dfa)
 {
-  int i, j, ch;
   dfa->word_ops_used = 1;
-  for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+  int i = 0;
+  int j;
+  int ch = 0;
+  if (BE (dfa->map_notascii == 0, 1))
+    {
+      bitset_word_t bits0 = 0x00000000;
+      bitset_word_t bits1 = 0x03ff0000;
+      bitset_word_t bits2 = 0x87fffffe;
+      bitset_word_t bits3 = 0x07fffffe;
+      if (BITSET_WORD_BITS == 64)
+	{
+	  dfa->word_char[0] = bits1 << 31 << 1 | bits0;
+	  dfa->word_char[1] = bits3 << 31 << 1 | bits2;
+	  i = 2;
+	}
+      else if (BITSET_WORD_BITS == 32)
+	{
+	  dfa->word_char[0] = bits0;
+	  dfa->word_char[1] = bits1;
+	  dfa->word_char[2] = bits2;
+	  dfa->word_char[3] = bits3;
+	  i = 4;
+	}
+      else
+        goto general_case;
+      ch = 128;
+
+      if (BE (dfa->is_utf8, 1))
+	{
+	  memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8);
+	  return;
+	}
+    }
+
+ general_case:
+  for (; i < BITSET_WORDS; ++i)
     for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
       if (isalnum (ch) || ch == '_')
 	dfa->word_char[i] |= (bitset_word_t) 1 << j;
@@ -960,7 +999,7 @@
 static void
 free_workarea_compile (regex_t *preg)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_storage_t *storage, *next;
   for (storage = dfa->str_tree_storage; storage; storage = next)
     {
@@ -1144,7 +1183,7 @@
 static reg_errcode_t
 analyze (regex_t *preg)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   reg_errcode_t ret;
 
   /* Allocate arrays.  */
@@ -1325,7 +1364,7 @@
 static bin_tree_t *
 lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *body = node->left;
   bin_tree_t *op, *cls, *tree1, *tree;
 
@@ -2092,7 +2131,7 @@
 
 /* Entry point of the parser.
    Parse the regular expression REGEXP and return the structure tree.
-   If an error is occured, ERR is set by error code, and return NULL.
+   If an error occurs, ERR is set by error code, and return NULL.
    This function build the following tree, from regular expression <reg_exp>:
 	   CAT
 	   / \
@@ -2106,7 +2145,7 @@
 parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
        reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree, *eor, *root;
   re_token_t current_token;
   dfa->syntax = syntax;
@@ -2140,7 +2179,7 @@
 parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
 	       reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree, *branch = NULL;
   tree = parse_branch (regexp, preg, token, syntax, nest, err);
   if (BE (*err != REG_NOERROR && tree == NULL, 0))
@@ -2182,7 +2221,7 @@
 	      reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
   bin_tree_t *tree, *expr;
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   tree = parse_expression (regexp, preg, token, syntax, nest, err);
   if (BE (*err != REG_NOERROR && tree == NULL, 0))
     return NULL;
@@ -2193,16 +2232,21 @@
       expr = parse_expression (regexp, preg, token, syntax, nest, err);
       if (BE (*err != REG_NOERROR && expr == NULL, 0))
 	{
+	  if (tree != NULL)
+	    postorder (tree, free_tree, NULL);
 	  return NULL;
 	}
       if (tree != NULL && expr != NULL)
 	{
-	  tree = create_tree (dfa, tree, expr, CONCAT);
-	  if (tree == NULL)
+	  bin_tree_t *newtree = create_tree (dfa, tree, expr, CONCAT);
+	  if (newtree == NULL)
 	    {
+	      postorder (expr, free_tree, NULL);
+	      postorder (tree, free_tree, NULL);
 	      *err = REG_ESPACE;
 	      return NULL;
 	    }
+	  tree = newtree;
 	}
       else if (tree == NULL)
 	tree = expr;
@@ -2221,7 +2265,7 @@
 parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
 		  reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree;
   switch (token->type)
     {
@@ -2437,7 +2481,7 @@
 parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
 	       reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
 {
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
   bin_tree_t *tree;
   size_t cur_nsub;
   cur_nsub = preg->re_nsub++;
@@ -2451,7 +2495,11 @@
     {
       tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
       if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
-	*err = REG_EPAREN;
+	{
+	  if (tree != NULL)
+	    postorder (tree, free_tree, NULL);
+	  *err = REG_EPAREN;
+	}
       if (BE (*err != REG_NOERROR, 0))
 	return NULL;
     }
@@ -2529,6 +2577,12 @@
 	  *err = REG_BADBR;
 	  return NULL;
 	}
+
+      if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0))
+	{
+	  *err = REG_ESIZE;
+	  return NULL;
+	}
     }
   else
     {
@@ -2569,7 +2623,10 @@
     old_tree = NULL;
 
   if (elem->token.type == SUBEXP)
-    postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+    {
+      uintptr_t subidx = elem->token.opr.idx;
+      postorder (elem, mark_opt_subexp, (void *) subidx);
+    }
 
   tree = create_tree (dfa, elem, NULL,
 		      (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
@@ -2615,7 +2672,7 @@
      Build the range expression which starts from START_ELEM, and ends
      at END_ELEM.  The result are written to MBCSET and SBCSET.
      RANGE_ALLOC is the allocated size of mbcset->range_starts, and
-     mbcset->range_ends, is a pointer argument sinse we may
+     mbcset->range_ends, is a pointer argument since we may
      update it.  */
 
 static reg_errcode_t
@@ -2749,11 +2806,12 @@
 
 static reg_errcode_t
 internal_function
-build_collating_symbol (bitset_t sbcset,
 # ifdef RE_ENABLE_I18N
-			re_charset_t *mbcset, Idx *coll_sym_alloc,
-# endif
-			const unsigned char *name)
+build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
+			Idx *coll_sym_alloc, const unsigned char *name)
+# else /* not RE_ENABLE_I18N */
+build_collating_symbol (bitset_t sbcset, const unsigned char *name)
+# endif /* not RE_ENABLE_I18N */
 {
   size_t name_len = strlen ((const char *) name);
   if (BE (name_len != 1, 0))
@@ -2781,8 +2839,8 @@
   const int32_t *symb_table;
   const unsigned char *extra;
 
-  /* Local function for parse_bracket_exp used in _LIBC environement.
-     Seek the collating symbol entry correspondings to NAME.
+  /* Local function for parse_bracket_exp used in _LIBC environment.
+     Seek the collating symbol entry corresponding to NAME.
      Return the index of the symbol in the SYMB_TABLE.  */
 
   auto inline int32_t
@@ -2885,11 +2943,11 @@
       return UINT_MAX;
     }
 
-  /* Local function for parse_bracket_exp used in _LIBC environement.
+  /* Local function for parse_bracket_exp used in _LIBC environment.
      Build the range expression which starts from START_ELEM, and ends
      at END_ELEM.  The result are written to MBCSET and SBCSET.
      RANGE_ALLOC is the allocated size of mbcset->range_starts, and
-     mbcset->range_ends, is a pointer argument sinse we may
+     mbcset->range_ends, is a pointer argument since we may
      update it.  */
 
   auto inline reg_errcode_t
@@ -2969,11 +3027,11 @@
       return REG_NOERROR;
     }
 
-  /* Local function for parse_bracket_exp used in _LIBC environement.
+  /* Local function for parse_bracket_exp used in _LIBC environment.
      Build the collating element which is represented by NAME.
      The result are written to MBCSET and SBCSET.
      COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
-     pointer argument sinse we may update it.  */
+     pointer argument since we may update it.  */
 
   auto inline reg_errcode_t
   __attribute ((always_inline))
@@ -3075,6 +3133,10 @@
   if (BE (sbcset == NULL, 0))
 #endif /* RE_ENABLE_I18N */
     {
+      re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+      re_free (mbcset);
+#endif
       *err = REG_ESPACE;
       return NULL;
     }
@@ -3413,7 +3475,7 @@
      Build the equivalence class which is represented by NAME.
      The result are written to MBCSET and SBCSET.
      EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
-     is a pointer argument sinse we may update it.  */
+     is a pointer argument since we may update it.  */
 
 static reg_errcode_t
 #ifdef RE_ENABLE_I18N
@@ -3444,19 +3506,18 @@
 						   _NL_COLLATE_EXTRAMB);
       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
 						_NL_COLLATE_INDIRECTMB);
-      idx1 = findidx (&cp);
-      if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+      idx1 = findidx (&cp, -1);
+      if (BE (idx1 == 0 || *cp != '\0', 0))
 	/* This isn't a valid character.  */
 	return REG_ECOLLATE;
 
-      /* Build single byte matcing table for this equivalence class.  */
-      char_buf[1] = (unsigned char) '\0';
+      /* Build single byte matching table for this equivalence class.  */
       len = weights[idx1 & 0xffffff];
       for (ch = 0; ch < SBC_MAX; ++ch)
 	{
 	  char_buf[0] = ch;
 	  cp = char_buf;
-	  idx2 = findidx (&cp);
+	  idx2 = findidx (&cp, 1);
 /*
 	  idx2 = table[ch];
 */
@@ -3509,7 +3570,7 @@
      Build the character class which is represented by NAME.
      The result are written to MBCSET and SBCSET.
      CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
-     is a pointer argument sinse we may update it.  */
+     is a pointer argument since we may update it.  */
 
 static reg_errcode_t
 #ifdef RE_ENABLE_I18N
@@ -3705,6 +3766,7 @@
 /* This is intended for the expressions like "a{1,3}".
    Fetch a number from 'input', and return the number.
    Return REG_MISSING if the number field is empty like "{,1}".
+   Return RE_DUP_MAX + 1 if the number field is too large.
    Return REG_ERROR if an error occurred.  */
 
 static Idx
@@ -3723,8 +3785,9 @@
       num = ((token->type != CHARACTER || c < '0' || '9' < c
 	      || num == REG_ERROR)
 	     ? REG_ERROR
-	     : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0'));
-      num = (num > RE_DUP_MAX) ? REG_ERROR : num;
+	     : num == REG_MISSING
+	     ? c - '0'
+	     : MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
     }
   return num;
 }
@@ -3798,7 +3861,7 @@
 static reg_errcode_t
 mark_opt_subexp (void *extra, bin_tree_t *node)
 {
-  Idx idx = (Idx) (long) extra;
+  Idx idx = (uintptr_t) extra;
   if (node->token.type == SUBEXP && node->token.opr.idx == idx)
     node->token.opt_subexp = 1;
 
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -14,12 +14,20 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC
+# include <config.h>
 
-#include <config.h>
+# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+#  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+# endif
+# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+#  pragma GCC diagnostic ignored "-Wtype-limits"
+# endif
+#endif
 
-/* Make sure noone compiles this code with a C++ compiler.  */
+/* Make sure no one compiles this code with a C++ compiler.  */
 #if defined __cplusplus && defined _LIBC
 # error "This is C code, use a C compiler"
 #endif
@@ -53,7 +61,6 @@
    GNU regex allows.  Include it before <regex.h>, which correctly
    #undefs RE_DUP_MAX and sets it to the right value.  */
 #include <limits.h>
-#include <strings.h>
 
 #include <regex.h>
 #include "regex_internal.h"
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2012
+   Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -15,8 +15,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _REGEX_H
 #define _REGEX_H 1
@@ -28,13 +27,10 @@
 extern "C" {
 #endif
 
-/* Define __USE_GNU_REGEX to declare GNU extensions that violate the
+/* Define __USE_GNU to declare GNU extensions that violate the
    POSIX name space rules.  */
-#undef __USE_GNU_REGEX
-#if (defined _GNU_SOURCE					\
-     || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE	\
-	 && !defined _XOPEN_SOURCE))
-# define __USE_GNU_REGEX 1
+#ifdef _GNU_SOURCE
+# define __USE_GNU 1
 #endif
 
 #ifdef _REGEX_LARGE_OFFSETS
@@ -45,16 +41,6 @@
    supported within glibc itself, and glibc users should not define
    _REGEX_LARGE_OFFSETS.  */
 
-/* The type of the offset of a byte within a string.
-   For historical reasons POSIX 1003.1-2004 requires that regoff_t be
-   at least as wide as off_t.  However, many common POSIX platforms set
-   regoff_t to the more-sensible ssize_t and the Open Group has
-   signalled its intention to change the requirement to be that
-   regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
-   60 (2005-08-25).  We don't know of any hosts where ssize_t or
-   ptrdiff_t is wider than ssize_t, so ssize_t is safe.  */
-typedef ssize_t regoff_t;
-
 /* The type of nonnegative object indexes.  Traditionally, GNU regex
    uses 'int' for these.  Code that uses __re_idx_t should work
    regardless of whether the type is signed.  */
@@ -69,10 +55,8 @@
 
 #else
 
-/* Use types that are binary-compatible with the traditional GNU regex
-   implementation, which mishandles strings longer than INT_MAX.  */
-
-typedef int regoff_t;
+/* The traditional GNU regex implementation mishandles strings longer
+   than INT_MAX.  */
 typedef int __re_idx_t;
 typedef unsigned int __re_size_t;
 typedef unsigned long int __re_long_size_t;
@@ -93,8 +77,7 @@
    add or remove a bit, only one other definition need change.  */
 typedef unsigned long int reg_syntax_t;
 
-#ifdef __USE_GNU_REGEX
-
+#ifdef __USE_GNU
 /* If this bit is not set, then \ inside a bracket expression is literal.
    If set, then such a \ quotes the following character.  */
 # define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
@@ -225,8 +208,7 @@
 /* If this bit is set, then no_sub will be set to 1 during
    re_compile_pattern.  */
 # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
-
-#endif /* defined __USE_GNU_REGEX */
+#endif
 
 /* This global variable defines the particular regexp syntax to use (for
    some interfaces).  When a regexp is compiled, the syntax used is
@@ -234,7 +216,7 @@
    already-compiled regexps.  */
 extern reg_syntax_t re_syntax_options;
 
-#ifdef __USE_GNU_REGEX
+#ifdef __USE_GNU
 /* Define combinations of the above bits for the standard possibilities.
    (The [[[ comments delimit what gets put into the Texinfo file, so
    don't delete them!)  */
@@ -246,16 +228,19 @@
    | RE_NO_BK_PARENS              | RE_NO_BK_REFS			\
    | RE_NO_BK_VBAR                | RE_NO_EMPTY_RANGES			\
    | RE_DOT_NEWLINE		  | RE_CONTEXT_INDEP_ANCHORS		\
+   | RE_CHAR_CLASSES							\
    | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
 
 # define RE_SYNTAX_GNU_AWK						\
-  ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG)	\
-   & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS		\
-       | RE_CONTEXT_INVALID_OPS ))
+  ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS		\
+    | RE_INVALID_INTERVAL_ORD)						\
+   & ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS				\
+      | RE_CONTEXT_INVALID_OPS ))
 
 # define RE_SYNTAX_POSIX_AWK						\
   (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS		\
-   | RE_INTERVALS	    | RE_NO_GNU_OPS)
+   | RE_INTERVALS	    | RE_NO_GNU_OPS				\
+   | RE_INVALID_INTERVAL_ORD)
 
 # define RE_SYNTAX_GREP							\
   (RE_BK_PLUS_QM              | RE_CHAR_CLASSES				\
@@ -306,13 +291,12 @@
    | RE_NO_BK_VBAR	    | RE_UNMATCHED_RIGHT_PAREN_ORD)
 /* [[[end syntaxes]]] */
 
-#endif /* defined __USE_GNU_REGEX */
-
-#ifdef __USE_GNU_REGEX
-
 /* Maximum number of duplicates an interval can allow.  POSIX-conforming
    systems might define this in <limits.h>, but we want our
    value, so remove any previous define.  */
+# ifdef _REGEX_INCLUDE_LIMITS_H
+#  include <limits.h>
+# endif
 # ifdef RE_DUP_MAX
 #  undef RE_DUP_MAX
 # endif
@@ -320,13 +304,12 @@
 /* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
    the counter as a 2-byte signed integer.  This is no longer true, so
    RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
-   ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+   ((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined.
    However, there would be a huge performance problem if someone
    actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
    its historical value.  */
 # define RE_DUP_MAX (0x7fff)
-
-#endif /* defined __USE_GNU_REGEX */
+#endif
 
 
 /* POSIX 'cflags' bits (i.e., information for 'regcomp').  */
@@ -392,11 +375,11 @@
 
   /* Error codes we've added.  */
   _REG_EEND,		/* Premature end.  */
-  _REG_ESIZE,		/* Compiled pattern bigger than 2^16 bytes.  */
+  _REG_ESIZE,		/* Too large (e.g., repeat count too large).  */
   _REG_ERPAREN		/* Unmatched ) or \); not returned from regcomp.  */
 } reg_errcode_t;
 
-#ifdef _XOPEN_SOURCE
+#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K
 # define REG_ENOSYS	_REG_ENOSYS
 #endif
 #define REG_NOERROR	_REG_NOERROR
@@ -417,62 +400,50 @@
 #define REG_ESIZE	_REG_ESIZE
 #define REG_ERPAREN	_REG_ERPAREN
 
-/* struct re_pattern_buffer normally uses member names like 'buffer'
-   that POSIX does not allow.  In POSIX mode these members have names
-   with leading 're_' (e.g., 're_buffer').  */
-#ifdef __USE_GNU_REGEX
-# define _REG_RE_NAME(id) id
-# define _REG_RM_NAME(id) id
-#else
-# define _REG_RE_NAME(id) re_##id
-# define _REG_RM_NAME(id) rm_##id
+/* This data structure represents a compiled pattern.  Before calling
+   the pattern compiler, the fields 'buffer', 'allocated', 'fastmap',
+   and 'translate' can be set.  After the pattern has been compiled,
+   the fields 're_nsub', 'not_bol' and 'not_eol' are available.  All
+   other fields are private to the regex routines.  */
+
+#ifndef RE_TRANSLATE_TYPE
+# define __RE_TRANSLATE_TYPE unsigned char *
+# ifdef __USE_GNU
+#  define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
+# endif
 #endif
 
-/* The user can specify the type of the re_translate member by
-   defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned
-   char *.  This pollutes the POSIX name space, so in POSIX mode just
-   use unsigned char *.  */
-#ifdef __USE_GNU_REGEX
-# ifndef RE_TRANSLATE_TYPE
-#  define RE_TRANSLATE_TYPE unsigned char *
-# endif
-# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE
+#ifdef __USE_GNU
+# define __REPB_PREFIX(name) name
 #else
-# define REG_TRANSLATE_TYPE unsigned char *
+# define __REPB_PREFIX(name) __##name
 #endif
 
-/* This data structure represents a compiled pattern.  Before calling
-   the pattern compiler, the fields 'buffer', 'allocated', 'fastmap',
-   'translate', and 'no_sub' can be set.  After the pattern has been
-   compiled, the 're_nsub' field is available.  All other fields are
-   private to the regex routines.  */
-
 struct re_pattern_buffer
 {
-  /* Space that holds the compiled pattern.  It is declared as
-     'unsigned char *' because its elements are sometimes used as
-     array indexes.  */
-  unsigned char *_REG_RE_NAME (buffer);
+  /* Space that holds the compiled pattern.  The type
+     'struct re_dfa_t' is private and is not declared here.  */
+  struct re_dfa_t *__REPB_PREFIX(buffer);
 
   /* Number of bytes to which 'buffer' points.  */
-  __re_long_size_t _REG_RE_NAME (allocated);
+  __re_long_size_t __REPB_PREFIX(allocated);
 
   /* Number of bytes actually used in 'buffer'.  */
-  __re_long_size_t _REG_RE_NAME (used);
+  __re_long_size_t __REPB_PREFIX(used);
 
   /* Syntax setting with which the pattern was compiled.  */
-  reg_syntax_t _REG_RE_NAME (syntax);
+  reg_syntax_t __REPB_PREFIX(syntax);
 
   /* Pointer to a fastmap, if any, otherwise zero.  re_search uses the
      fastmap, if there is one, to skip over impossible starting points
      for matches.  */
-  char *_REG_RE_NAME (fastmap);
+  char *__REPB_PREFIX(fastmap);
 
   /* Either a translate table to apply to all characters before
      comparing them, or zero for no translation.  The translation is
      applied to a pattern when it is compiled and to a string when it
      is matched.  */
-  REG_TRANSLATE_TYPE _REG_RE_NAME (translate);
+  __RE_TRANSLATE_TYPE __REPB_PREFIX(translate);
 
   /* Number of subexpressions found by the compiler.  */
   size_t re_nsub;
@@ -481,57 +452,70 @@
      Well, in truth it's used only in 're_search_2', to see whether or
      not we should use the fastmap, so we don't set this absolutely
      perfectly; see 're_compile_fastmap' (the "duplicate" case).  */
-  unsigned int _REG_RE_NAME (can_be_null) : 1;
+  unsigned __REPB_PREFIX(can_be_null) : 1;
 
   /* If REGS_UNALLOCATED, allocate space in the 'regs' structure
      for 'max (RE_NREGS, re_nsub + 1)' groups.
      If REGS_REALLOCATE, reallocate space if necessary.
      If REGS_FIXED, use what's there.  */
-#ifdef __USE_GNU_REGEX
+#ifdef __USE_GNU
 # define REGS_UNALLOCATED 0
 # define REGS_REALLOCATE 1
 # define REGS_FIXED 2
 #endif
-  unsigned int _REG_RE_NAME (regs_allocated) : 2;
+  unsigned __REPB_PREFIX(regs_allocated) : 2;
 
   /* Set to zero when 're_compile_pattern' compiles a pattern; set to
      one by 're_compile_fastmap' if it updates the fastmap.  */
-  unsigned int _REG_RE_NAME (fastmap_accurate) : 1;
+  unsigned __REPB_PREFIX(fastmap_accurate) : 1;
 
   /* If set, 're_match_2' does not return information about
      subexpressions.  */
-  unsigned int _REG_RE_NAME (no_sub) : 1;
+  unsigned __REPB_PREFIX(no_sub) : 1;
 
   /* If set, a beginning-of-line anchor doesn't match at the beginning
      of the string.  */
-  unsigned int _REG_RE_NAME (not_bol) : 1;
+  unsigned __REPB_PREFIX(not_bol) : 1;
 
   /* Similarly for an end-of-line anchor.  */
-  unsigned int _REG_RE_NAME (not_eol) : 1;
+  unsigned __REPB_PREFIX(not_eol) : 1;
 
   /* If true, an anchor at a newline matches.  */
-  unsigned int _REG_RE_NAME (newline_anchor) : 1;
-
-/* [[[end pattern_buffer]]] */
+  unsigned __REPB_PREFIX(newline_anchor) : 1;
 };
 
 typedef struct re_pattern_buffer regex_t;
 
+/* Type for byte offsets within the string.  POSIX mandates this.  */
+#ifdef _REGEX_LARGE_OFFSETS
+/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as
+   ptrdiff_t and ssize_t.  We don't know of any hosts where ptrdiff_t
+   is wider than ssize_t, so ssize_t is safe.  */
+typedef ssize_t regoff_t;
+#else
+/* The traditional GNU regex implementation mishandles strings longer
+   than INT_MAX.  */
+typedef int regoff_t;
+#endif
+
+
+#ifdef __USE_GNU
 /* This is the structure we store register match data in.  See
    regex.texinfo for a full description of what registers match.  */
 struct re_registers
 {
-  __re_size_t _REG_RM_NAME (num_regs);
-  regoff_t *_REG_RM_NAME (start);
-  regoff_t *_REG_RM_NAME (end);
+  __re_size_t num_regs;
+  regoff_t *start;
+  regoff_t *end;
 };
 
 
 /* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
    're_match_2' returns information about at least this many registers
    the first time a 'regs' structure is passed.  */
-#if !defined RE_NREGS && defined __USE_GNU_REGEX
-# define RE_NREGS 30
+# ifndef RE_NREGS
+#  define RE_NREGS 30
+# endif
 #endif
 
 
@@ -546,13 +530,19 @@
 
 /* Declarations for routines.  */
 
+#ifdef __USE_GNU
 /* Sets the current default syntax to SYNTAX, and return the old syntax.
    You can also simply assign to the 're_syntax_options' variable.  */
 extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
 
 /* Compile the regular expression PATTERN, with length LENGTH
    and syntax given by the global 're_syntax_options', into the buffer
-   BUFFER.  Return NULL if successful, and an error string if not.  */
+   BUFFER.  Return NULL if successful, and an error string if not.
+
+   To free the allocated storage, you must call 'regfree' on BUFFER.
+   Note that the translate table must either have been initialised by
+   'regcomp', with a malloc'ed value, or set to NULL before calling
+   'regfree'.  */
 extern const char *re_compile_pattern (const char *__pattern, size_t __length,
 				       struct re_pattern_buffer *__buffer);
 
@@ -609,14 +599,15 @@
    register data.
 
    Unless this function is called, the first search or match using
-   BUFFER will allocate its own register data, without freeing the old
-   data.  */
+   BUFFER will allocate its own register data, without
+   freeing the old data.  */
 extern void re_set_registers (struct re_pattern_buffer *__buffer,
 			      struct re_registers *__regs,
 			      __re_size_t __num_regs,
 			      regoff_t *__starts, regoff_t *__ends);
+#endif	/* Use GNU */
 
-#if defined _REGEX_RE_COMP || defined _LIBC
+#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
 # ifndef _CRAY
 /* 4.2 bsd compatibility.  */
 extern char *re_comp (const char *);
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 static void re_string_construct_common (const char *str, Idx len,
 					re_string_t *pstr,
@@ -134,9 +133,9 @@
     {
       wint_t *new_wcs;
 
-      /* Avoid overflow.  */
-      size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
-      if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
+      /* Avoid overflow in realloc.  */
+      const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
+      if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0))
 	return REG_ESPACE;
 
       new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
@@ -236,13 +235,8 @@
       else
 	p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
       mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
-      if (BE (mbclen == (size_t) -2, 0))
-	{
-	  /* The buffer doesn't have enough space, finish to build.  */
-	  pstr->cur_state = prev_st;
-	  break;
-	}
-      else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
+      if (BE (mbclen == (size_t) -1 || mbclen == 0
+	      || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0))
 	{
 	  /* We treat these cases as a singlebyte character.  */
 	  mbclen = 1;
@@ -251,6 +245,12 @@
 	    wc = pstr->trans[wc];
 	  pstr->cur_state = prev_st;
 	}
+      else if (BE (mbclen == (size_t) -2, 0))
+	{
+	  /* The buffer doesn't have enough space, finish to build.  */
+	  pstr->cur_state = prev_st;
+	  break;
+	}
 
       /* Write wide character and padding.  */
       pstr->wcs[byte_idx++] = wc;
@@ -333,9 +333,11 @@
 	      for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
 		pstr->wcs[byte_idx++] = WEOF;
 	    }
-	  else if (mbclen == (size_t) -1 || mbclen == 0)
+	  else if (mbclen == (size_t) -1 || mbclen == 0
+		   || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
 	    {
-	      /* It is an invalid character or '\0'.  Just use the byte.  */
+	      /* It is an invalid character, an incomplete character
+		 at the end of the string, or '\0'.  Just use the byte.  */
 	      int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
 	      pstr->mbs[byte_idx] = ch;
 	      /* And also cast it to wide char.  */
@@ -448,7 +450,8 @@
 	    for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
 	      pstr->wcs[byte_idx++] = WEOF;
 	  }
-	else if (mbclen == (size_t) -1 || mbclen == 0)
+	else if (mbclen == (size_t) -1 || mbclen == 0
+		 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
 	  {
 	    /* It is an invalid character or '\0'.  Just use the byte.  */
 	    int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
@@ -495,8 +498,7 @@
        rawbuf_idx < new_raw_idx;)
     {
       wchar_t wc2;
-      Idx remain_len;
-      remain_len = pstr->len - rawbuf_idx;
+      Idx remain_len = pstr->raw_len - rawbuf_idx;
       prev_st = pstr->cur_state;
       mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
 			  remain_len, &pstr->cur_state);
@@ -732,21 +734,21 @@
 			  mbstate_t cur_state;
 			  wchar_t wc2;
 			  Idx mlen = raw + pstr->len - p;
+			  unsigned char buf[6];
 			  size_t mbclen;
 
-#if 0 /* dead code: buf is set but never used */
-			  unsigned char buf[6];
+			  const unsigned char *pp = p;
 			  if (BE (pstr->trans != NULL, 0))
 			    {
 			      int i = mlen < 6 ? mlen : 6;
 			      while (--i >= 0)
 				buf[i] = pstr->trans[p[i]];
+			      pp = buf;
 			    }
-#endif
 			  /* XXX Don't use mbrtowc, we know which conversion
 			     to use (UTF-8 -> UCS4).  */
 			  memset (&cur_state, 0, sizeof (cur_state));
-			  mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+			  mbclen = __mbrtowc (&wc2, (const char *) pp, mlen,
 					      &cur_state);
 			  if (raw + offset - p <= mbclen
 			      && mbclen < (size_t) -2)
@@ -868,7 +870,7 @@
 }
 
 static unsigned char
-internal_function __attribute ((pure))
+internal_function
 re_string_fetch_byte_case (re_string_t *pstr)
 {
   if (BE (!pstr->mbs_allocated, 1))
@@ -1412,13 +1414,12 @@
       Idx *new_nexts, *new_indices;
       re_node_set *new_edests, *new_eclosures;
       re_token_t *new_nodes;
-      size_t max_object_size =
-	MAX (sizeof (re_token_t),
-	     MAX (sizeof (re_node_set),
-		  sizeof (Idx)));
 
-      /* Avoid overflows.  */
-      if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
+      /* Avoid overflows in realloc.  */
+      const size_t max_object_size = MAX (sizeof (re_token_t),
+					  MAX (sizeof (re_node_set),
+					       sizeof (Idx)));
+      if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
 	return REG_MISSING;
 
       new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
@@ -1453,7 +1454,7 @@
   return dfa->nodes_len++;
 }
 
-static inline re_hashval_t
+static re_hashval_t
 internal_function
 calc_state_hash (const re_node_set *nodes, unsigned int context)
 {
@@ -1579,7 +1580,7 @@
     {
       Idx elem = newstate->nodes.elems[i];
       if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
-	if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0))
+	if (! re_node_set_insert_last (&newstate->non_eps_nodes, elem))
 	  return REG_ESPACE;
     }
 
@@ -1614,7 +1615,7 @@
   re_free (state);
 }
 
-/* Create the new state which is independ of contexts.
+/* Create the new state which is independent of contexts.
    Return the new state if succeeded, otherwise return NULL.  */
 
 static re_dfastate_t *
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -14,15 +14,13 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _REGEX_INTERNAL_H
 #define _REGEX_INTERNAL_H 1
 
 #include <assert.h>
 #include <ctype.h>
-#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -32,13 +30,14 @@
 # include "localcharset.h"
 #endif
 #include <locale.h>
-
 #include <wchar.h>
 #include <wctype.h>
+#include <stdbool.h>
 #include <stdint.h>
 #if defined _LIBC
 # include <bits/libc-lock.h>
 #else
+# define __libc_lock_define(CLASS,NAME)
 # define __libc_lock_init(NAME) do { } while (0)
 # define __libc_lock_lock(NAME) do { } while (0)
 # define __libc_lock_unlock(NAME) do { } while (0)
@@ -76,11 +75,6 @@
 # define gettext_noop(String) String
 #endif
 
-/* For loser systems without the definition.  */
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
 #if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
 # define RE_ENABLE_I18N
 #endif
@@ -89,9 +83,6 @@
 # define BE(expr, val) __builtin_expect (expr, val)
 #else
 # define BE(expr, val) (expr)
-# ifdef _LIBC
-#  define inline
-# endif
 #endif
 
 /* Number of ASCII characters.  */
@@ -111,8 +102,8 @@
 # define __wctype wctype
 # define __iswctype iswctype
 # define __btowc btowc
+# define __mbrtowc mbrtowc
 # define __wcrtomb wcrtomb
-# define __mbrtowc mbrtowc
 # define __regfree regfree
 # define attribute_hidden
 #endif /* not _LIBC */
@@ -124,6 +115,11 @@
 #endif
 
 typedef __re_idx_t Idx;
+#ifdef _REGEX_LARGE_OFFSETS
+# define IDX_MAX (SIZE_MAX - 2)
+#else
+# define IDX_MAX INT_MAX
+#endif
 
 /* Special return value for failure to match.  */
 #define REG_MISSING ((Idx) -1)
@@ -418,19 +414,21 @@
 # define internal_function
 #endif
 
+#ifndef NOT_IN_libc
 static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
 						Idx new_buf_len)
      internal_function;
-#ifdef RE_ENABLE_I18N
+# ifdef RE_ENABLE_I18N
 static void build_wcs_buffer (re_string_t *pstr) internal_function;
 static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
-     internal_function;
-#endif /* RE_ENABLE_I18N */
+  internal_function;
+# endif /* RE_ENABLE_I18N */
 static void build_upper_buffer (re_string_t *pstr) internal_function;
 static void re_string_translate_buffer (re_string_t *pstr) internal_function;
 static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
 					  int eflags)
      internal_function __attribute ((pure));
+#endif
 #define re_string_peek_byte(pstr, offset) \
   ((pstr)->mbs[(pstr)->cur_idx + offset])
 #define re_string_fetch_byte(pstr) \
@@ -468,6 +466,9 @@
 #ifndef MAX
 # define MAX(a,b) ((a) < (b) ? (b) : (a))
 #endif
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
 
 #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
 #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
@@ -692,9 +693,7 @@
 #ifdef DEBUG
   char* re_str;
 #endif
-#ifdef _LIBC
   __libc_lock_define (, lock)
-#endif
 };
 
 #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
@@ -725,33 +724,33 @@
 } bracket_elem_t;
 
 
-/* Inline functions for bitset_t operation.  */
+/* Functions for bitset_t operation.  */
 
-static inline void
+static void
 bitset_set (bitset_t set, Idx i)
 {
   set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
 }
 
-static inline void
+static void
 bitset_clear (bitset_t set, Idx i)
 {
   set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
 }
 
-static inline bool
+static bool
 bitset_contain (const bitset_t set, Idx i)
 {
   return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
 }
 
-static inline void
+static void
 bitset_empty (bitset_t set)
 {
   memset (set, '\0', sizeof (bitset_t));
 }
 
-static inline void
+static void
 bitset_set_all (bitset_t set)
 {
   memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
@@ -760,13 +759,13 @@
       ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
 }
 
-static inline void
+static void
 bitset_copy (bitset_t dest, const bitset_t src)
 {
   memcpy (dest, src, sizeof (bitset_t));
 }
 
-static inline void
+static void
 bitset_not (bitset_t set)
 {
   int bitset_i;
@@ -778,7 +777,7 @@
        & ~set[BITSET_WORDS - 1]);
 }
 
-static inline void
+static void
 bitset_merge (bitset_t dest, const bitset_t src)
 {
   int bitset_i;
@@ -786,7 +785,7 @@
     dest[bitset_i] |= src[bitset_i];
 }
 
-static inline void
+static void
 bitset_mask (bitset_t dest, const bitset_t src)
 {
   int bitset_i;
@@ -795,8 +794,8 @@
 }
 
 #ifdef RE_ENABLE_I18N
-/* Inline functions for re_string.  */
-static inline int
+/* Functions for re_string.  */
+static int
 internal_function __attribute ((pure))
 re_string_char_size_at (const re_string_t *pstr, Idx idx)
 {
@@ -809,7 +808,7 @@
   return byte_idx;
 }
 
-static inline wint_t
+static wint_t
 internal_function __attribute ((pure))
 re_string_wchar_at (const re_string_t *pstr, Idx idx)
 {
@@ -818,15 +817,15 @@
   return (wint_t) pstr->wcs[idx];
 }
 
+# ifndef NOT_IN_libc
 static int
 internal_function __attribute ((pure))
 re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 {
-# ifdef _LIBC
+#  ifdef _LIBC
   const unsigned char *p, *extra;
   const int32_t *table, *indirect;
-  int32_t tmp;
-#  include <locale/weight.h>
+#   include <locale/weight.h>
   uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
 
   if (nrules != 0)
@@ -837,13 +836,14 @@
       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
 						_NL_COLLATE_INDIRECTMB);
       p = pstr->mbs + idx;
-      tmp = findidx (&p);
+      findidx (&p, pstr->len - idx);
       return p - pstr->mbs - idx;
     }
   else
-# endif /* _LIBC */
+#  endif /* _LIBC */
     return 1;
 }
+# endif
 #endif /* RE_ENABLE_I18N */
 
 #ifndef __GNUC_PREREQ
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
 				     Idx n) internal_function;
@@ -51,9 +50,8 @@
 				regoff_t range, Idx stop,
 				struct re_registers *regs,
 				bool ret_len) internal_function;
-static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
-				  Idx nregs, int regs_allocated)
-     internal_function;
+static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
+                              Idx nregs, int regs_allocated) internal_function;
 static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
      internal_function;
 static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
@@ -230,7 +228,7 @@
   reg_errcode_t err;
   Idx start, length;
 #ifdef _LIBC
-  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+  re_dfa_t *dfa = preg->buffer;
 #endif
 
   if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
@@ -365,7 +363,6 @@
 #endif
 
 static regoff_t
-internal_function
 re_search_2_stub (struct re_pattern_buffer *bufp,
 		  const char *string1, Idx length1,
 		  const char *string2, Idx length2,
@@ -413,7 +410,6 @@
    otherwise the position of the match is returned.  */
 
 static regoff_t
-internal_function
 re_search_stub (struct re_pattern_buffer *bufp,
 		const char *string, Idx length,
 		Idx start, regoff_t range, Idx stop, struct re_registers *regs,
@@ -425,7 +421,7 @@
   regoff_t rval;
   int eflags = 0;
 #ifdef _LIBC
-  re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+  re_dfa_t *dfa = bufp->buffer;
 #endif
   Idx last_start = start + range;
 
@@ -477,9 +473,9 @@
 
   rval = 0;
 
-  /* I hope we needn't fill ther regs with -1's when no match was found.  */
+  /* I hope we needn't fill their regs with -1's when no match was found.  */
   if (result != REG_NOERROR)
-    rval = -1;
+    rval = result == REG_NOMATCH ? -1 : -2;
   else if (regs != NULL)
     {
       /* If caller wants register contents data back, copy them.  */
@@ -505,8 +501,7 @@
   return rval;
 }
 
-static unsigned int
-internal_function
+static unsigned
 re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
 	      int regs_allocated)
 {
@@ -636,7 +631,7 @@
    (0 <= LAST_START && LAST_START <= LENGTH)  */
 
 static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
 re_search_internal (const regex_t *preg,
 		    const char *string, Idx length,
 		    Idx start, Idx last_start, Idx stop,
@@ -644,7 +639,7 @@
 		    int eflags)
 {
   reg_errcode_t err;
-  const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+  const re_dfa_t *dfa = preg->buffer;
   Idx left_lim, right_lim;
   int incr;
   bool fl_longest_match;
@@ -719,7 +714,8 @@
   if (nmatch > 1 || dfa->has_mb_node)
     {
       /* Avoid overflow.  */
-      if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0))
+      if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
+               <= mctx.input.bufs_len), 0))
 	{
 	  err = REG_ESPACE;
 	  goto free_return;
@@ -739,7 +735,7 @@
   mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
 			   : CONTEXT_NEWLINE | CONTEXT_BEGBUF;
 
-  /* Check incrementally whether of not the input string match.  */
+  /* Check incrementally whether the input string matches.  */
   incr = (last_start < start) ? -1 : 1;
   left_lim = (last_start < start) ? last_start : start;
   right_lim = (last_start < start) ? start : last_start;
@@ -921,7 +917,7 @@
 	    goto free_return;
 	}
 
-      /* At last, add the offset to the each registers, since we slided
+      /* At last, add the offset to each register, since we slid
 	 the buffers so that we could assume that the matching starts
 	 from 0.  */
       for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
@@ -971,7 +967,7 @@
 }
 
 static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
 prune_impossible_nodes (re_match_context_t *mctx)
 {
   const re_dfa_t *const dfa = mctx->dfa;
@@ -987,7 +983,7 @@
   halt_node = mctx->last_node;
 
   /* Avoid overflow.  */
-  if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0))
+  if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0))
     return REG_ESPACE;
 
   sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
@@ -1105,7 +1101,7 @@
    FL_LONGEST_MATCH means we want the POSIX longest matching.
    If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
    next place where we may want to try matching.
-   Note that the matcher assume that the maching starts from the current
+   Note that the matcher assumes that the matching starts from the current
    index of the buffer.  */
 
 static Idx
@@ -1174,7 +1170,8 @@
       re_dfastate_t *old_state = cur_state;
       Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
 
-      if (BE (next_char_idx >= mctx->input.bufs_len, 0)
+      if ((BE (next_char_idx >= mctx->input.bufs_len, 0)
+	   && mctx->input.bufs_len < mctx->input.len)
 	  || (BE (next_char_idx >= mctx->input.valid_len, 0)
 	      && mctx->input.valid_len < mctx->input.len))
 	{
@@ -1435,7 +1432,7 @@
 set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
 	  regmatch_t *pmatch, bool fl_backtrack)
 {
-  const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+  const re_dfa_t *dfa = preg->buffer;
   Idx idx, cur_node;
   re_node_set eps_via_nodes;
   struct re_fail_stack_t *fs;
@@ -1752,7 +1749,8 @@
 {
   Idx top = mctx->state_log_top;
 
-  if (next_state_log_idx >= mctx->input.bufs_len
+  if ((next_state_log_idx >= mctx->input.bufs_len
+       && mctx->input.bufs_len < mctx->input.len)
       || (next_state_log_idx >= mctx->input.valid_len
 	  && mctx->input.valid_len < mctx->input.len))
     {
@@ -2456,7 +2454,7 @@
 /* From the node set CUR_NODES, pick up the nodes whose types are
    OP_OPEN_SUBEXP and which have corresponding back references in the regular
    expression. And register them to use them later for evaluating the
-   correspoding back references.  */
+   corresponding back references.  */
 
 static reg_errcode_t
 internal_function
@@ -2936,9 +2934,12 @@
     {
       re_dfastate_t **new_array;
       Idx old_alloc = path->alloc;
-      Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1;
-      if (BE (new_alloc < old_alloc, 0)
-	  || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+      Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1;
+      Idx new_alloc;
+      if (BE (IDX_MAX - old_alloc < incr_alloc, 0))
+	return REG_ESPACE;
+      new_alloc = old_alloc + incr_alloc;
+      if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
 	return REG_ESPACE;
       new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
       if (BE (new_array == NULL, 0))
@@ -3387,7 +3388,7 @@
   dests_node = dests_alloc->dests_node;
   dests_ch = dests_alloc->dests_ch;
 
-  /* Initialize transiton table.  */
+  /* Initialize transition table.  */
   state->word_trtable = state->trtable = NULL;
 
   /* At first, group all nodes belonging to 'state' into several
@@ -3397,6 +3398,7 @@
     {
       if (dests_node_malloced)
 	free (dests_alloc);
+      /* Return false in case of an error, true otherwise.  */
       if (ndests == 0)
 	{
 	  state->trtable = (re_dfastate_t **)
@@ -3896,7 +3898,6 @@
 	  const int32_t *table, *indirect;
 	  const unsigned char *weights, *extra;
 	  const char *collseqwc;
-	  int32_t idx;
 	  /* This #include defines a local function!  */
 #  include <locale/weight.h>
 
@@ -3954,7 +3955,7 @@
 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
 	      indirect = (const int32_t *)
 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
-	      int32_t idx = findidx (&cp);
+	      int32_t idx = findidx (&cp, elem_len);
 	      if (idx > 0)
 		for (i = 0; i < cset->nequiv_classes; ++i)
 		  {
@@ -4066,7 +4067,7 @@
 	  /* Skip the collation sequence value.  */
 	  idx += sizeof (uint32_t);
 	  /* Skip the wide char sequence of the collating element.  */
-	  idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
+	  idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1);
 	  /* If we found the entry, return the sequence value.  */
 	  if (found)
 	    return *(uint32_t *) (extra + idx);
@@ -4140,11 +4141,12 @@
   re_string_t *pstr = &mctx->input;
 
   /* Avoid overflow.  */
-  if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+  if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2
+          <= pstr->bufs_len, 0))
     return REG_ESPACE;
 
-  /* Double the lengthes of the buffers.  */
-  ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+  /* Double the lengths of the buffers.  */
+  ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2));
   if (BE (ret != REG_NOERROR, 0))
     return ret;
 
@@ -4207,7 +4209,7 @@
       size_t max_object_size =
 	MAX (sizeof (struct re_backref_cache_entry),
 	     sizeof (re_sub_match_top_t *));
-      if (BE (SIZE_MAX / max_object_size < n, 0))
+      if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0))
 	return REG_ESPACE;
 
       mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
new file mode 100644
--- /dev/null
+++ b/lib/remainder.c
@@ -0,0 +1,106 @@
+/* Remainder.
+   Copyright (C) 2012 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/>.  */
+
+#if ! (defined USE_LONG_DOUBLE || defined USE_FLOAT)
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include <math.h>
+
+#ifdef USE_LONG_DOUBLE
+# define REMAINDER remainderl
+# define DOUBLE long double
+# define L_(literal) literal##L
+# define FABS fabsl
+# define FMOD fmodl
+# define ISNAN isnanl
+#elif ! defined USE_FLOAT
+# define REMAINDER remainder
+# define DOUBLE double
+# define L_(literal) literal
+# define FABS fabs
+# define FMOD fmod
+# define ISNAN isnand
+#else /* defined USE_FLOAT */
+# define REMAINDER remainderf
+# define DOUBLE float
+# define L_(literal) literal##f
+# define FABS fabsf
+# define FMOD fmodf
+# define ISNAN isnanf
+#endif
+
+#undef NAN
+#if defined _MSC_VER
+static DOUBLE zero;
+# define NAN (zero / zero)
+#else
+# define NAN (L_(0.0) / L_(0.0))
+#endif
+
+DOUBLE
+REMAINDER (DOUBLE x, DOUBLE y)
+{
+  if (isfinite (x) && isfinite (y) && y != L_(0.0))
+    {
+      if (x == L_(0.0))
+        /* Return x, regardless of the sign of y.  */
+        return x;
+
+      {
+        int negate = ((!signbit (x)) ^ (!signbit (y)));
+        DOUBLE r;
+
+        /* Take the absolute value of x and y.  */
+        x = FABS (x);
+        y = FABS (y);
+
+        /* Trivial case that requires no computation.  */
+        if (x <= L_(0.5) * y)
+          return (negate ? - x : x);
+
+        /* With a fixed y, the function x -> remainder(x,y) has a period 2*y.
+           Therefore we can reduce the argument x modulo 2*y.  And it's no
+           problem if 2*y overflows, since fmod(x,Inf) = x.  */
+        x = FMOD (x, L_(2.0) * y);
+
+        /* Consider the 3 cases:
+             0 <= x <= 0.5 * y
+             0.5 * y < x < 1.5 * y
+             1.5 * y <= x <= 2.0 * y  */
+        if (x <= L_(0.5) * y)
+          r = x;
+        else
+          {
+            r = x - y;
+            if (r > L_(0.5) * y)
+              r = x - L_(2.0) * y;
+          }
+        return (negate ? - r : r);
+      }
+    }
+  else
+    {
+      if (ISNAN (x) || ISNAN (y))
+        return x + y; /* NaN */
+      else if (isinf (y))
+        return x;
+      else
+        /* x infinite or y zero */
+        return NAN;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/lib/remainderf.c
@@ -0,0 +1,35 @@
+/* Remainder.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_REMAINDER
+
+float
+remainderf (float x, float y)
+{
+  return (float) remainder ((double) x, (double) y);
+}
+
+#else
+
+# define USE_FLOAT
+# include "remainder.c"
+
+#endif
new file mode 100644
--- /dev/null
+++ b/lib/remainderl.c
@@ -0,0 +1,35 @@
+/* Remainder.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <math.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+remainderl (long double x, long double y)
+{
+  return remainder (x, y);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "remainder.c"
+
+#endif
--- a/lib/rijndael-alg-fst.c
+++ b/lib/rijndael-alg-fst.c
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/rijndael-alg-fst.h
+++ b/lib/rijndael-alg-fst.h
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/rijndael-api-fst.c
+++ b/lib/rijndael-api-fst.c
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/rijndael-api-fst.h
+++ b/lib/rijndael-api-fst.h
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
--- a/lib/rint.c
+++ b/lib/rint.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if ! defined USE_LONG_DOUBLE
 # include <config.h>
@@ -54,6 +53,12 @@
 # define MINUS_ZERO L_(-0.0)
 #endif
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 DOUBLE
 RINT (DOUBLE x)
 {
--- a/lib/rintf.c
+++ b/lib/rintf.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #define USE_FLOAT
 #include "rint.c"
--- a/lib/rintl.c
+++ b/lib/rintl.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
new file mode 100644
--- /dev/null
+++ b/lib/root-uid.h
@@ -0,0 +1,30 @@
+/* The user ID that always has appropriate privileges in the POSIX sense.
+
+   Copyright 2012 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.  */
+
+#ifndef ROOT_UID_H_
+#define ROOT_UID_H_
+
+/* The user ID that always has appropriate privileges in the POSIX sense.  */
+#ifdef __TANDEM
+# define ROOT_UID 65535
+#else
+# define ROOT_UID 0
+#endif
+
+#endif
--- a/lib/round.c
+++ b/lib/round.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ben Pfaff <blp@gnu.org>, 2007.
    Based heavily on code by Bruno Haible. */
@@ -65,6 +64,12 @@
 # define MINUS_ZERO L_(-0.0)
 #endif
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 /* If we're being included from test-round2[f].c, it already defined names for
    our round implementations.  Otherwise, pick the preferred implementation for
    this machine. */
@@ -167,4 +172,3 @@
   return z;
 }
 #endif /* FLOOR_FREE_ROUND */
-
--- a/lib/roundf.c
+++ b/lib/roundf.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #define USE_FLOAT
 #include "round.c"
--- a/lib/roundl.c
+++ b/lib/roundl.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/safe-alloc.c
+++ b/lib/safe-alloc.c
@@ -29,7 +29,7 @@
 
 /* Return 1 if an array of N objects, each of size S, cannot exist due
    to size arithmetic overflow.  S must be positive and N must be
-   nonnegative.  This is a macro, not an inline function, so that it
+   nonnegative.  This is a macro, not a function, so that it
    works correctly even when SIZE_MAX < N.
 
    By gnulib convention, SIZE_MAX represents overflow in size
--- a/lib/safe-read.h
+++ b/lib/safe-read.h
@@ -17,7 +17,7 @@
 /* Some system calls may be interrupted and fail with errno = EINTR in the
    following situations:
      - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user
-       types Ctrl-Z) on some platforms: MacOS X.
+       types Ctrl-Z) on some platforms: Mac OS X.
      - The process receives a signal for which a signal handler was installed
        with sigaction() with an sa_flags field that does not contain
        SA_RESTART.
--- a/lib/safe-write.h
+++ b/lib/safe-write.h
@@ -17,7 +17,7 @@
 /* Some system calls may be interrupted and fail with errno = EINTR in the
    following situations:
      - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user
-       types Ctrl-Z) on some platforms: MacOS X.
+       types Ctrl-Z) on some platforms: Mac OS X.
      - The process receives a signal for which a signal handler was installed
        with sigaction() with an sa_flags field that does not contain
        SA_RESTART.
--- a/lib/savedir.c
+++ b/lib/savedir.c
@@ -105,7 +105,7 @@
   return name_space;
 }
 
-/* Like savedirstreamp (DIRP), except also close DIRP.  */
+/* Like streamsavedir (DIRP), except also close DIRP.  */
 
 static char *
 savedirstream (DIR *dirp)
--- a/lib/savewd.c
+++ b/lib/savewd.c
@@ -19,6 +19,8 @@
 
 #include <config.h>
 
+#define SAVEWD_INLINE _GL_EXTERN_INLINE
+
 #include "savewd.h"
 
 #include <assert.h>
@@ -254,7 +256,7 @@
    This is why savewd_chdir is broken out into another function;
    savewd_chdir's callers _can_ inspect the file system to decide
    whether to call savewd_chdir.  */
-static inline bool
+static bool
 savewd_delegating (struct savewd const *wd)
 {
   return wd->state == FORKING_STATE && 0 < wd->val.child;
--- a/lib/savewd.h
+++ b/lib/savewd.h
@@ -23,6 +23,11 @@
 #include <stdbool.h>
 #include <sys/types.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef SAVEWD_INLINE
+# define SAVEWD_INLINE _GL_INLINE
+#endif
+
 /* A saved working directory.  The member names and constants defined
    by this structure are private to the savewd module.  */
 struct savewd
@@ -67,7 +72,7 @@
 };
 
 /* Initialize a saved working directory object.  */
-static inline void
+SAVEWD_INLINE void
 savewd_init (struct savewd *wd)
 {
   wd->state = INITIAL_STATE;
@@ -117,7 +122,7 @@
 int savewd_restore (struct savewd *wd, int status);
 
 /* Return WD's error number, or 0 if WD is not in an error state.  */
-static inline int
+SAVEWD_INLINE int
 savewd_errno (struct savewd const *wd)
 {
   return (wd->state == ERROR_STATE ? wd->val.errnum : 0);
@@ -145,4 +150,6 @@
                           int (*act) (char *, struct savewd *, void *),
                           void *options);
 
+_GL_INLINE_HEADER_END
+
 #endif
--- a/lib/scandir.c
+++ b/lib/scandir.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/sched.in.h
+++ b/lib/sched.in.h
@@ -32,7 +32,7 @@
 /* Get pid_t.
    This is needed on glibc 2.11 (see
    glibc bug <http://sourceware.org/bugzilla/show_bug.cgi?id=13198>)
-   and MacOS X 10.5.  */
+   and Mac OS X 10.5.  */
 #include <sys/types.h>
 
 #if !@HAVE_STRUCT_SCHED_PARAM@
new file mode 100644
--- /dev/null
+++ b/lib/se-context.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define SE_CONTEXT_INLINE _GL_EXTERN_INLINE
+#include <selinux/context.h>
--- a/lib/se-context.in.h
+++ b/lib/se-context.in.h
@@ -3,26 +3,33 @@
 
 # include <errno.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef SE_CONTEXT_INLINE
+# define SE_CONTEXT_INLINE _GL_INLINE
+#endif
+
 /* The definition of _GL_UNUSED_PARAMETER is copied here.  */
 
 typedef int context_t;
-static inline context_t context_new (char const *s _GL_UNUSED_PARAMETER)
+SE_CONTEXT_INLINE context_t context_new (char const *s _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return 0; }
-static inline char *context_str (context_t con _GL_UNUSED_PARAMETER)
+SE_CONTEXT_INLINE char *context_str (context_t con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return (void *) 0; }
-static inline void context_free (context_t c _GL_UNUSED_PARAMETER) {}
+SE_CONTEXT_INLINE void context_free (context_t c _GL_UNUSED_PARAMETER) {}
 
-static inline int context_user_set (context_t sc _GL_UNUSED_PARAMETER,
-                                    char const *s _GL_UNUSED_PARAMETER)
+SE_CONTEXT_INLINE int context_user_set (context_t sc _GL_UNUSED_PARAMETER,
+                                        char const *s _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int context_role_set (context_t sc _GL_UNUSED_PARAMETER,
-                                    char const *s _GL_UNUSED_PARAMETER)
+SE_CONTEXT_INLINE int context_role_set (context_t sc _GL_UNUSED_PARAMETER,
+                                        char const *s _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int context_range_set (context_t sc _GL_UNUSED_PARAMETER,
-                                     char const *s _GL_UNUSED_PARAMETER)
+SE_CONTEXT_INLINE int context_range_set (context_t sc _GL_UNUSED_PARAMETER,
+                                         char const *s _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int context_type_set (context_t sc _GL_UNUSED_PARAMETER,
-                                    char const *s _GL_UNUSED_PARAMETER)
+SE_CONTEXT_INLINE int context_type_set (context_t sc _GL_UNUSED_PARAMETER,
+                                        char const *s _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
 
+_GL_INLINE_HEADER_END
+
 #endif
new file mode 100644
--- /dev/null
+++ b/lib/se-selinux.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define SE_SELINUX_INLINE _GL_EXTERN_INLINE
+#include <selinux/selinux.h>
--- a/lib/se-selinux.in.h
+++ b/lib/se-selinux.in.h
@@ -31,6 +31,11 @@
 #  include <sys/types.h>
 #  include <errno.h>
 
+_GL_INLINE_HEADER_BEGIN
+#  ifndef SE_SELINUX_INLINE
+#   define SE_SELINUX_INLINE _GL_INLINE
+#  endif
+
 /* The definition of _GL_UNUSED_PARAMETER is copied here.  */
 
 #  if !GNULIB_defined_security_types
@@ -39,59 +44,71 @@
 #   define security_context_t char*
 #   define is_selinux_enabled() 0
 
-static inline int getcon (security_context_t *con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+getcon (security_context_t *con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline void freecon (security_context_t con _GL_UNUSED_PARAMETER) {}
-
+SE_SELINUX_INLINE void
+freecon (security_context_t con _GL_UNUSED_PARAMETER) {}
 
-static inline int getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER)
-  { errno = ENOTSUP; return -1; }
-static inline int setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int matchpathcon (char const *file _GL_UNUSED_PARAMETER,
-                                mode_t m _GL_UNUSED_PARAMETER,
-                                security_context_t *con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER)
+  { errno = ENOTSUP; return -1; }
+SE_SELINUX_INLINE int
+matchpathcon (char const *file _GL_UNUSED_PARAMETER,
+              mode_t m _GL_UNUSED_PARAMETER,
+  security_context_t *con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int getfilecon (char const *file _GL_UNUSED_PARAMETER,
-                              security_context_t *con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+getfilecon (char const *file _GL_UNUSED_PARAMETER,
+            security_context_t *con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int lgetfilecon (char const *file _GL_UNUSED_PARAMETER,
-                               security_context_t *con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+lgetfilecon (char const *file _GL_UNUSED_PARAMETER,
+             security_context_t *con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int fgetfilecon (int fd,
-                               security_context_t *con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+fgetfilecon (int fd, security_context_t *con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int setfilecon (char const *file _GL_UNUSED_PARAMETER,
-                              security_context_t con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+setfilecon (char const *file _GL_UNUSED_PARAMETER,
+            security_context_t con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int lsetfilecon (char const *file _GL_UNUSED_PARAMETER,
-                               security_context_t con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+lsetfilecon (char const *file _GL_UNUSED_PARAMETER,
+             security_context_t con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int fsetfilecon (int fd _GL_UNUSED_PARAMETER,
-                               security_context_t con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+fsetfilecon (int fd _GL_UNUSED_PARAMETER,
+             security_context_t con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
 
-static inline int security_check_context
-    (security_context_t con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+security_check_context (security_context_t con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int security_check_context_raw
-    (security_context_t con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+security_check_context_raw (security_context_t con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int setexeccon (security_context_t con _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+setexeccon (security_context_t con _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int security_compute_create
-    (security_context_t scon _GL_UNUSED_PARAMETER,
-     security_context_t tcon _GL_UNUSED_PARAMETER,
-     security_class_t tclass _GL_UNUSED_PARAMETER,
-     security_context_t *newcon _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+security_compute_create (security_context_t scon _GL_UNUSED_PARAMETER,
+                         security_context_t tcon _GL_UNUSED_PARAMETER,
+                         security_class_t tclass _GL_UNUSED_PARAMETER,
+                         security_context_t *newcon _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
-static inline int matchpathcon_init_prefix
-    (char const *path _GL_UNUSED_PARAMETER,
-     char const *prefix _GL_UNUSED_PARAMETER)
+SE_SELINUX_INLINE int
+matchpathcon_init_prefix (char const *path _GL_UNUSED_PARAMETER,
+                          char const *prefix _GL_UNUSED_PARAMETER)
   { errno = ENOTSUP; return -1; }
 
 #   define GNULIB_defined_security_types 1
 #  endif
 
+_GL_INLINE_HEADER_BEGIN
+
 # endif
 #endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */
--- a/lib/search.in.h
+++ b/lib/search.in.h
@@ -158,7 +158,7 @@
        and after the right subtree traversal,
      - for leaf nodes: once.
    The arguments passed to ACTION are:
-     1. the node; it can be casted to a 'const void * const *', i.e. into a
+     1. the node; it can be cast to a 'const void * const *', i.e. into a
         pointer to the key,
      2. an indicator which visit of the node this is,
      3. the level of the node in the tree (0 for the root).  */
--- a/lib/select.c
+++ b/lib/select.c
@@ -16,8 +16,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <alloca.h>
@@ -37,8 +36,13 @@
 #include <conio.h>
 #include <time.h>
 
+/* Get the overridden 'struct timeval'.  */
+#include <sys/time.h>
+
 #include "msvc-nothrow.h"
 
+#undef select
+
 struct bitset {
   unsigned char in[FD_SETSIZE / CHAR_BIT];
   unsigned char out[FD_SETSIZE / CHAR_BIT];
@@ -80,7 +84,7 @@
 
 /* Optimized test whether a HANDLE refers to a console.
    See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>.  */
-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
 
 static BOOL
 IsSocketHandle (HANDLE h)
@@ -237,6 +241,7 @@
 int
 rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
             struct timeval *timeout)
+#undef timeval
 {
   static struct timeval tv0;
   static HANDLE hEvent;
@@ -380,6 +385,10 @@
         }
     }
 
+  /* Place a sentinel at the end of the array.  */
+  handle_array[nhandles] = NULL;
+
+restart:
   if (wait_timeout == 0 || nsock == 0)
     rc = 0;
   else
@@ -422,13 +431,44 @@
   if (rc == 0 && nsock > 0)
     rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0);
 
+  if (nhandles > 1)
+    {
+      /* Count results that are not counted in the return value of select.  */
+      nhandles = 1;
+      for (i = 0; i < nfds; i++)
+        {
+          if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0)
+            continue;
+
+          h = (HANDLE) _get_osfhandle (i);
+          if (h == handle_array[nhandles])
+            {
+              /* Not a socket.  */
+              nhandles++;
+              windows_poll_handle (h, i, &rbits, &wbits, &xbits);
+              if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))
+                  || wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))
+                  || xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
+                rc++;
+            }
+        }
+
+      if (rc == 0 && wait_timeout == INFINITE)
+        {
+          /* Sleep 1 millisecond to avoid busy wait and retry with the
+             original fd_sets.  */
+          memcpy (&handle_rfds, rfds, sizeof (fd_set));
+          memcpy (&handle_wfds, wfds, sizeof (fd_set));
+          memcpy (&handle_xfds, xfds, sizeof (fd_set));
+          SleepEx (1, TRUE);
+          goto restart;
+        }
+    }
+
   /* Now fill in the results.  */
   FD_ZERO (rfds);
   FD_ZERO (wfds);
   FD_ZERO (xfds);
-
-  /* Place a sentinel at the end of the array.  */
-  handle_array[nhandles] = NULL;
   nhandles = 1;
   for (i = 0; i < nfds; i++)
     {
@@ -438,8 +478,7 @@
       h = (HANDLE) _get_osfhandle (i);
       if (h != handle_array[nhandles])
         {
-          /* Perform handle->descriptor mapping.  Don't update rc, as these
-             results are counted in the return value of Winsock's select.  */
+          /* Perform handle->descriptor mapping.  */
           WSAEventSelect ((SOCKET) h, NULL, 0);
           if (FD_ISSET (h, &handle_rfds))
             FD_SET (i, rfds);
@@ -452,22 +491,12 @@
         {
           /* Not a socket.  */
           nhandles++;
-          windows_poll_handle (h, i, &rbits, &wbits, &xbits);
           if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
-            {
-              rc++;
-              FD_SET (i, rfds);
-            }
+            FD_SET (i, rfds);
           if (wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
-            {
-              rc++;
-              FD_SET (i, wfds);
-            }
+            FD_SET (i, wfds);
           if (xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
-            {
-              rc++;
-              FD_SET (i, xfds);
-            }
+            FD_SET (i, xfds);
         }
     }
 
@@ -477,6 +506,9 @@
 #else /* ! Native Windows.  */
 
 #include <sys/select.h>
+#include <stddef.h> /* NULL */
+#include <errno.h>
+#include <unistd.h>
 
 #undef select
 
@@ -484,6 +516,23 @@
 rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
             struct timeval *timeout)
 {
+  int i;
+
+  /* FreeBSD 8.2 has a bug: it does not always detect invalid fds.  */
+  if (nfds < 0 || nfds > FD_SETSIZE)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  for (i = 0; i < nfds; i++)
+    {
+      if (((rfds && FD_ISSET (i, rfds))
+           || (wfds && FD_ISSET (i, wfds))
+           || (xfds && FD_ISSET (i, xfds)))
+          && dup2 (i, i) != i)
+        return -1;
+    }
+
   /* Interix 3.5 has a bug: it does not support nfds == 0.  */
   if (nfds == 0)
     {
--- a/lib/set-mode-acl.c
+++ b/lib/set-mode-acl.c
@@ -19,6 +19,8 @@
 
 #include <config.h>
 
+#define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE
+
 #include "acl.h"
 
 #include "acl-internal.h"
@@ -56,7 +58,7 @@
 #if USE_ACL
 # if HAVE_ACL_GET_FILE
   /* POSIX 1003.1e draft 17 (abandoned) specific version.  */
-  /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
 #  if !HAVE_ACL_TYPE_EXTENDED
   /* Linux, FreeBSD, IRIX, Tru64 */
 
@@ -141,19 +143,19 @@
   return 0;
 
 #  else /* HAVE_ACL_TYPE_EXTENDED */
-  /* MacOS X */
+  /* Mac OS X */
 
-  /* On MacOS X,  acl_get_file (name, ACL_TYPE_ACCESS)
-     and          acl_get_file (name, ACL_TYPE_DEFAULT)
+  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
+     and           acl_get_file (name, ACL_TYPE_DEFAULT)
      always return NULL / EINVAL.  You have to use
-                  acl_get_file (name, ACL_TYPE_EXTENDED)
-     or           acl_get_fd (open (name, ...))
+                   acl_get_file (name, ACL_TYPE_EXTENDED)
+     or            acl_get_fd (open (name, ...))
      to retrieve an ACL.
      On the other hand,
-                  acl_set_file (name, ACL_TYPE_ACCESS, acl)
-     and          acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+                   acl_set_file (name, ACL_TYPE_ACCESS, acl)
+     and           acl_set_file (name, ACL_TYPE_DEFAULT, acl)
      have the same effect as
-                  acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+                   acl_set_file (name, ACL_TYPE_EXTENDED, acl):
      Each of these calls sets the file's ACL.  */
 
   acl_t acl;
@@ -197,7 +199,7 @@
   return chmod_or_fchmod (name, desc, mode);
 #  endif
 
-# elif HAVE_FACL && defined GETACLCNT /* Solaris, Cygwin, not HP-UX */
+# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
 
   int done_setacl = 0;
 
@@ -214,47 +216,60 @@
   int convention;
 
   {
+    /* Initially, try to read the entries into a stack-allocated buffer.
+       Use malloc if it does not fit.  */
+    enum
+      {
+        alloc_init = 4000 / sizeof (ace_t), /* >= 3 */
+        alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t))
+      };
+    ace_t buf[alloc_init];
+    size_t alloc = alloc_init;
+    ace_t *entries = buf;
+    ace_t *malloced = NULL;
     int count;
-    ace_t *entries;
 
     for (;;)
       {
-        if (desc != -1)
-          count = facl (desc, ACE_GETACLCNT, 0, NULL);
-        else
-          count = acl (name, ACE_GETACLCNT, 0, NULL);
-        if (count <= 0)
+        count = (desc != -1
+                 ? facl (desc, ACE_GETACL, alloc, entries)
+                 : acl (name, ACE_GETACL, alloc, entries));
+        if (count < 0 && errno == ENOSPC)
           {
-            convention = -1;
-            break;
-          }
-        entries = (ace_t *) malloc (count * sizeof (ace_t));
-        if (entries == NULL)
-          {
-            errno = ENOMEM;
-            return -1;
+            /* Increase the size of the buffer.  */
+            free (malloced);
+            if (alloc > alloc_max / 2)
+              {
+                errno = ENOMEM;
+                return -1;
+              }
+            alloc = 2 * alloc; /* <= alloc_max */
+            entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
+            if (entries == NULL)
+              {
+                errno = ENOMEM;
+                return -1;
+              }
+            continue;
           }
-        if ((desc != -1
-             ? facl (desc, ACE_GETACL, count, entries)
-             : acl (name, ACE_GETACL, count, entries))
-            == count)
-          {
-            int i;
+        break;
+      }
+
+    if (count <= 0)
+      convention = -1;
+    else
+      {
+        int i;
 
-            convention = 0;
-            for (i = 0; i < count; i++)
-              if (entries[i].a_flags & (OLD_ACE_OWNER | OLD_ACE_GROUP | OLD_ACE_OTHER))
-                {
-                  convention = 1;
-                  break;
-                }
-            free (entries);
-            break;
-          }
-        /* Huh? The number of ACL entries changed since the last call.
-           Repeat.  */
-        free (entries);
+        convention = 0;
+        for (i = 0; i < count; i++)
+          if (entries[i].a_flags & (OLD_ACE_OWNER | OLD_ACE_GROUP | OLD_ACE_OTHER))
+            {
+              convention = 1;
+              break;
+            }
       }
+    free (malloced);
   }
 
   if (convention >= 0)
@@ -677,8 +692,8 @@
 int
 set_acl (char const *name, int desc, mode_t mode)
 {
-  int r = qset_acl (name, desc, mode);
-  if (r != 0)
+  int ret = qset_acl (name, desc, mode);
+  if (ret != 0)
     error (0, errno, _("setting permissions for %s"), quote (name));
-  return r;
+  return ret;
 }
--- a/lib/sh-quote.c
+++ b/lib/sh-quote.c
@@ -69,11 +69,11 @@
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
 char *
-shell_quote_argv (char **argv)
+shell_quote_argv (char * const *argv)
 {
   if (*argv != NULL)
     {
-      char **argp;
+      char * const *argp;
       size_t length;
       char *command;
       char *p;
--- a/lib/sh-quote.h
+++ b/lib/sh-quote.h
@@ -15,12 +15,19 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef _SH_QUOTE_H
+#define _SH_QUOTE_H
+
 /* When passing a command to a shell, we must quote the program name and
    arguments, since Unix shells interpret characters like " ", "'", "<", ">",
-   "$" etc. in a special way.  */
+   "$", '*', '?' etc. in a special way.  */
 
 #include <stddef.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Returns the number of bytes needed for the quoted string.  */
 extern size_t shell_quote_length (const char *string);
 
@@ -33,4 +40,10 @@
 
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
-extern char * shell_quote_argv (char **argv);
+extern char * shell_quote_argv (char * const *argv);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SH_QUOTE_H */
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Scott G. Miller
    Credits:
@@ -71,7 +70,7 @@
 /* Copy the 4 byte value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
@@ -306,13 +305,13 @@
   uint32_t c = ctx->C;
   uint32_t d = ctx->D;
   uint32_t e = ctx->E;
+  uint32_t lolen = len;
 
   /* First increment the byte count.  RFC 1321 specifies the possible
      length of the file up to 2^64 bits.  Here we only compute the
      number of bytes.  Do a double word increment.  */
-  ctx->total[0] += len;
-  if (ctx->total[0] < len)
-    ++ctx->total[1];
+  ctx->total[0] += lolen;
+  ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
 
 #define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n))))
 
--- a/lib/sha1.h
+++ b/lib/sha1.h
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef SHA1_H
 # define SHA1_H 1
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -52,7 +52,7 @@
 
 /*
   Takes a pointer to a 256 bit block of data (eight 32 bit ints) and
-  intializes it to the start constants of the SHA256 algorithm.  This
+  initializes it to the start constants of the SHA256 algorithm.  This
   must be called before using hash in the call to sha256_hash
 */
 void
@@ -90,7 +90,7 @@
 /* Copy the value from v into the memory location pointed to by *cp,
    If your architecture allows unaligned access this is equivalent to
    * (uint32_t *) cp = v  */
-static inline void
+static void
 set_uint32 (char *cp, uint32_t v)
 {
   memcpy (cp, &v, sizeof v);
@@ -454,13 +454,13 @@
   uint32_t f = ctx->state[5];
   uint32_t g = ctx->state[6];
   uint32_t h = ctx->state[7];
+  uint32_t lolen = len;
 
   /* First increment the byte count.  FIPS PUB 180-2 specifies the possible
      length of the file up to 2^64 bits.  Here we only compute the
      number of bytes.  Do a double word increment.  */
-  ctx->total[0] += len;
-  if (ctx->total[0] < len)
-    ++ctx->total[1];
+  ctx->total[0] += lolen;
+  ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
 
 #define rol(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
 #define S0(x) (rol(x,25)^rol(x,14)^(x>>3))
--- a/lib/sha512.c
+++ b/lib/sha512.c
@@ -59,7 +59,7 @@
 
 /*
   Takes a pointer to a 512 bit block of data (eight 64 bit ints) and
-  intializes it to the start constants of the SHA512 algorithm.  This
+  initializes it to the start constants of the SHA512 algorithm.  This
   must be called before using hash in the call to sha512_hash
 */
 void
@@ -97,7 +97,7 @@
 /* Copy the value from V into the memory location pointed to by *CP,
    If your architecture allows unaligned access, this is equivalent to
    * (__typeof__ (v) *) cp = v  */
-static inline void
+static void
 set_uint64 (char *cp, u64 v)
 {
   memcpy (cp, &v, sizeof v);
@@ -485,13 +485,15 @@
   u64 f = ctx->state[5];
   u64 g = ctx->state[6];
   u64 h = ctx->state[7];
+  u64 lolen = u64size (len);
 
   /* First increment the byte count.  FIPS PUB 180-2 specifies the possible
      length of the file up to 2^128 bits.  Here we only compute the
      number of bytes.  Do a double word increment.  */
-  ctx->total[0] = u64plus (ctx->total[0], u64lo (len));
-  if (u64lt (ctx->total[0], u64lo (len)))
-    ctx->total[1] = u64plus (ctx->total[1], u64lo (1));
+  ctx->total[0] = u64plus (ctx->total[0], lolen);
+  ctx->total[1] = u64plus (ctx->total[1],
+                           u64plus (u64size (len >> 31 >> 31 >> 2),
+                                    u64lo (u64lt (ctx->total[0], lolen))));
 
 #define S0(x) u64xor (u64rol(x, 63), u64xor (u64rol (x, 56), u64shr (x, 7)))
 #define S1(x) u64xor (u64rol (x, 45), u64xor (u64rol (x, 3), u64shr (x, 6)))
new file mode 100644
--- /dev/null
+++ b/lib/sig-handler.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define SIG_HANDLER_INLINE _GL_EXTERN_INLINE
+#include "sig-handler.h"
--- a/lib/sig-handler.h
+++ b/lib/sig-handler.h
@@ -20,13 +20,18 @@
 
 #include <signal.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef SIG_HANDLER_INLINE
+# define SIG_HANDLER_INLINE _GL_INLINE
+#endif
+
 /* Convenience type when working with signal handlers.  */
 typedef void (*sa_handler_t) (int);
 
 /* Return the handler of a signal, as a sa_handler_t value regardless
    of its true type.  The resulting function can be compared to
    special values like SIG_IGN but it is not portable to call it.  */
-static inline sa_handler_t
+SIG_HANDLER_INLINE sa_handler_t
 get_handler (struct sigaction const *a)
 {
 #ifdef SA_SIGINFO
@@ -41,4 +46,6 @@
   return a->sa_handler;
 }
 
+_GL_INLINE_HEADER_END
+
 #endif /* _GL_SIG_HANDLER_H */
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -55,7 +55,7 @@
 #ifndef _@GUARD_PREFIX@_SIGNAL_H
 #define _@GUARD_PREFIX@_SIGNAL_H
 
-/* MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
    pthread_sigmask in <pthread.h>, not in <signal.h>.
    But avoid namespace pollution on glibc systems.*/
 #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
@@ -197,7 +197,7 @@
 
 /* Test whether a given signal is contained in a signal set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X.  */
+/* This function is defined as a macro on Mac OS X.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigismember
 #  endif
@@ -210,7 +210,7 @@
 
 /* Initialize a signal set to the empty set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X.  */
+/* This function is defined as a macro on Mac OS X.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigemptyset
 #  endif
@@ -222,7 +222,7 @@
 
 /* Add a signal to a signal set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X.  */
+/* This function is defined as a macro on Mac OS X.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigaddset
 #  endif
@@ -235,7 +235,7 @@
 
 /* Remove a signal from a signal set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X.  */
+/* This function is defined as a macro on Mac OS X.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigdelset
 #  endif
@@ -248,7 +248,7 @@
 
 /* Fill a signal set with all possible signals.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X.  */
+/* This function is defined as a macro on Mac OS X.  */
 #  if defined __cplusplus && defined GNULIB_NAMESPACE
 #   undef sigfillset
 #  endif
--- a/lib/sigprocmask.c
+++ b/lib/sigprocmask.c
@@ -63,7 +63,7 @@
 typedef void (*handler_t) (int);
 
 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline handler_t
+static handler_t
 signal_nothrow (int sig, handler_t handler)
 {
   handler_t result;
--- a/lib/sincosl.c
+++ b/lib/sincosl.c
@@ -24,6 +24,10 @@
 #include <float.h>
 #include <math.h>
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/k_sincosl.c
+   or            glibc/sysdeps/ieee754/ldbl-128/k_{sin,cos}l.c
+   and           glibc/sysdeps/ieee754/ldbl-128/t_sincosl.c.  */
+
 static const long double sin_c[] = {
 #define ONE sin_c[0]
   1.00000000000000000000000000000000000E+00L,   /* 3fff0000000000000000000000000000 */
--- a/lib/sinl.c
+++ b/lib/sinl.c
@@ -28,12 +28,14 @@
 
 #else
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_sinl.c.  */
+
 /* sinl(x)
  * Return sine function of x.
  *
  * kernel function:
  *      __kernel_sinl           ... sine function on [-pi/4,pi/4]
- *      __kernel_cosl           ... cose function on [-pi/4,pi/4]
+ *      __kernel_cosl           ... cosine function on [-pi/4,pi/4]
  *      __ieee754_rem_pio2l     ... argument reduction routine
  *
  * Method.
--- a/lib/size_max.h
+++ b/lib/size_max.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef GNULIB_SIZE_MAX_H
 #define GNULIB_SIZE_MAX_H
--- a/lib/sleep.c
+++ b/lib/sleep.c
@@ -35,7 +35,7 @@
   unsigned int remaining;
 
   /* Sleep for 1 second many times, because
-       1. Sleep is not interruptiple by Ctrl-C,
+       1. Sleep is not interruptible by Ctrl-C,
        2. we want to avoid arithmetic overflow while multiplying with 1000.  */
   for (remaining = seconds; remaining > 0; remaining--)
     Sleep (1000);
--- a/lib/snprintf.c
+++ b/lib/snprintf.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/spawn-pipe.c
+++ b/lib/spawn-pipe.c
@@ -60,7 +60,7 @@
    These functions can return -1/EINTR even though we don't have any
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
-static inline int
+static int
 nonintr_close (int fd)
 {
   int retval;
@@ -73,7 +73,8 @@
 }
 #define close nonintr_close
 
-static inline int
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+static int
 nonintr_open (const char *pathname, int oflag, mode_t mode)
 {
   int retval;
@@ -84,8 +85,9 @@
 
   return retval;
 }
-#undef open /* avoid warning on VMS */
-#define open nonintr_open
+# undef open /* avoid warning on VMS */
+# define open nonintr_open
+#endif
 
 #endif
 
--- a/lib/stat-size.h
+++ b/lib/stat-size.h
@@ -31,10 +31,6 @@
 #endif
 
 
-/* Much of the remainder of this file is not indented consistently
-   with the above, in order to make it easier to see that the text
-   is almost identical to part of the system.h header in coreutils.
-*/
 /* Get or fake the disk device blocksize.
    Usually defined by sys/param.h (if at all).  */
 #if !defined DEV_BSIZE && defined BSIZE
new file mode 100644
--- /dev/null
+++ b/lib/stat-time.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE
+#include "stat-time.h"
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -23,6 +23,11 @@
 #include <sys/stat.h>
 #include <time.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_STAT_TIME_INLINE
+# define _GL_STAT_TIME_INLINE _GL_INLINE
+#endif
+
 /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
    struct timespec, if available.  If not, then STAT_TIMESPEC_NS (ST,
    ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST,
@@ -46,7 +51,7 @@
 #endif
 
 /* Return the nanosecond component of *ST's access time.  */
-static inline long int
+_GL_STAT_TIME_INLINE long int
 get_stat_atime_ns (struct stat const *st)
 {
 # if defined STAT_TIMESPEC
@@ -59,7 +64,7 @@
 }
 
 /* Return the nanosecond component of *ST's status change time.  */
-static inline long int
+_GL_STAT_TIME_INLINE long int
 get_stat_ctime_ns (struct stat const *st)
 {
 # if defined STAT_TIMESPEC
@@ -72,7 +77,7 @@
 }
 
 /* Return the nanosecond component of *ST's data modification time.  */
-static inline long int
+_GL_STAT_TIME_INLINE long int
 get_stat_mtime_ns (struct stat const *st)
 {
 # if defined STAT_TIMESPEC
@@ -85,7 +90,7 @@
 }
 
 /* Return the nanosecond component of *ST's birth time.  */
-static inline long int
+_GL_STAT_TIME_INLINE long int
 get_stat_birthtime_ns (struct stat const *st)
 {
 # if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
@@ -100,7 +105,7 @@
 }
 
 /* Return *ST's access time.  */
-static inline struct timespec
+_GL_STAT_TIME_INLINE struct timespec
 get_stat_atime (struct stat const *st)
 {
 #ifdef STAT_TIMESPEC
@@ -114,7 +119,7 @@
 }
 
 /* Return *ST's status change time.  */
-static inline struct timespec
+_GL_STAT_TIME_INLINE struct timespec
 get_stat_ctime (struct stat const *st)
 {
 #ifdef STAT_TIMESPEC
@@ -128,7 +133,7 @@
 }
 
 /* Return *ST's data modification time.  */
-static inline struct timespec
+_GL_STAT_TIME_INLINE struct timespec
 get_stat_mtime (struct stat const *st)
 {
 #ifdef STAT_TIMESPEC
@@ -143,7 +148,7 @@
 
 /* Return *ST's birth time, if available; otherwise return a value
    with tv_sec and tv_nsec both equal to -1.  */
-static inline struct timespec
+_GL_STAT_TIME_INLINE struct timespec
 get_stat_birthtime (struct stat const *st)
 {
   struct timespec t;
@@ -186,4 +191,6 @@
   return t;
 }
 
+_GL_INLINE_HEADER_END
+
 #endif
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -27,7 +27,22 @@
 #include <sys/stat.h>
 #undef __need_system_sys_stat_h
 
-static inline int
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if _GL_WINDOWS_64_BIT_ST_SIZE
+#  undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
+#  define stat _stati64
+#  define REPLACE_FUNC_STAT_DIR 1
+#  undef REPLACE_FUNC_STAT_FILE
+# elif REPLACE_FUNC_STAT_FILE
+/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a.
+   Bypass it.  */
+#  define stat _stat
+#  define REPLACE_FUNC_STAT_DIR 1
+#  undef REPLACE_FUNC_STAT_FILE
+# endif
+#endif
+
+static int
 orig_stat (const char *filename, struct stat *buf)
 {
   return stat (filename, buf);
new file mode 100644
--- /dev/null
+++ b/lib/statat.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define FSTATAT_INLINE _GL_EXTERN_INLINE
+#include "openat.h"
--- a/lib/stdalign.in.h
+++ b/lib/stdalign.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert and Bruno Haible.  */
 
--- a/lib/stdarg.in.h
+++ b/lib/stdarg.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_STDARG_H
 
--- a/lib/stdbool.in.h
+++ b/lib/stdbool.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_STDBOOL_H
 #define _GL_STDBOOL_H
@@ -67,24 +66,19 @@
 # undef true
 #endif
 
-/* For the sake of symbolic names in gdb, we define true and false as
-   enum constants, not only as macros.
-   It is tempting to write
-      typedef enum { false = 0, true = 1 } _Bool;
-   so that gdb prints values of type 'bool' symbolically. But if we do
-   this, values of type '_Bool' may promote to 'int' or 'unsigned int'
-   (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
-   (see ISO C 99 6.3.1.1.(2)).  So we add a negative value to the
-   enum; this ensures that '_Bool' promotes to 'int'.  */
-#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+#ifdef __cplusplus
+# define _Bool bool
+# define bool bool
+#else
+# if defined __BEOS__ && !defined __HAIKU__
   /* A compiler known to have 'bool'.  */
   /* If the compiler already has both 'bool' and '_Bool', we can assume they
      are the same types.  */
-# if !@HAVE__BOOL@
+#  if !@HAVE__BOOL@
 typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
+#  endif
+# else
+#  if !defined __GNUC__
    /* If @HAVE__BOOL@:
         Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
         the built-in _Bool type is used.  See
@@ -104,19 +98,35 @@
           "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
         The only benefit of the enum, debuggability, is not important
         with these compilers.  So use 'signed char' and no enum.  */
-#  define _Bool signed char
-# else
+#   define _Bool signed char
+#  else
    /* With this compiler, trust the _Bool type if the compiler has it.  */
-#  if !@HAVE__BOOL@
+#   if !@HAVE__BOOL@
+   /* For the sake of symbolic names in gdb, define true and false as
+      enum constants, not only as macros.
+      It is tempting to write
+         typedef enum { false = 0, true = 1 } _Bool;
+      so that gdb prints values of type 'bool' symbolically.  But then
+      values of type '_Bool' might promote to 'int' or 'unsigned int'
+      (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+      (see ISO C 99 6.3.1.1.(2)).  So add a negative value to the
+      enum; this ensures that '_Bool' promotes to 'int'.  */
 typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+#   endif
 #  endif
 # endif
+# define bool _Bool
 #endif
-#define bool _Bool
 
 /* The other macros must be usable in preprocessor directives.  */
-#define false 0
-#define true 1
+#ifdef __cplusplus
+# define false false
+# define true true
+#else
+# define false 0
+# define true 1
+#endif
+
 #define __bool_true_false_are_defined 1
 
 #endif /* _GL_STDBOOL_H */
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /*
  * ISO C 99 <stdint.h> for platforms that lack it.
@@ -34,6 +33,16 @@
    <inttypes.h>.  */
 #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 
+/* On Android (Bionic libc), <sys/types.h> includes this file before
+   having defined 'time_t'.  Therefore in this case avoid including
+   other system header files; just include the system's <stdint.h>.
+   Ideally we should test __BIONIC__ here, but it is only defined after
+   <sys/cdefs.h> has been included; hence test __ANDROID__ instead.  */
+#if defined __ANDROID__ \
+    && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+#else
+
 /* Get those types that are already defined in other system include
    files, so that we can "#define int8_t signed char" below without
    worrying about a later system include file containing a "typedef
@@ -74,14 +83,15 @@
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    AIX 5.2 <sys/types.h> isn't needed and causes troubles.
-   MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+   Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
    <sys/types.h> after @NEXT_STDINT_H@.  */
 #if @HAVE_SYS_TYPES_H@ && ! defined _AIX
 # include <sys/types.h>
 #endif
 
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+   LONG_MIN, LONG_MAX, ULONG_MAX.  */
 #include <limits.h>
 
 #if @HAVE_INTTYPES_H@
@@ -237,8 +247,9 @@
 
 /* Here we assume a standard architecture where the hardware integer
    types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
-   are taken from the same list of types.  Assume that 'long int'
-   is fast enough for all narrower integers.  */
+   are taken from the same list of types.  The following code normally
+   uses types consistent with glibc, as that lessens the chance of
+   incompatibility with older GNU hosts.  */
 
 #undef int_fast8_t
 #undef uint_fast8_t
@@ -248,12 +259,21 @@
 #undef uint_fast32_t
 #undef int_fast64_t
 #undef uint_fast64_t
-typedef long int gl_int_fast8_t;
-typedef unsigned long int gl_uint_fast8_t;
-typedef long int gl_int_fast16_t;
-typedef unsigned long int gl_uint_fast16_t;
+typedef signed char gl_int_fast8_t;
+typedef unsigned char gl_uint_fast8_t;
+
+#ifdef __sun
+/* Define types compatible with SunOS 5.10, so that code compiled under
+   earlier SunOS versions works with code compiled under SunOS 5.10.  */
+typedef int gl_int_fast32_t;
+typedef unsigned int gl_uint_fast32_t;
+#else
 typedef long int gl_int_fast32_t;
 typedef unsigned long int gl_uint_fast32_t;
+#endif
+typedef gl_int_fast32_t gl_int_fast16_t;
+typedef gl_uint_fast32_t gl_uint_fast16_t;
+
 #define int_fast8_t gl_int_fast8_t
 #define uint_fast8_t gl_uint_fast8_t
 #define int_fast16_t gl_int_fast16_t
@@ -409,23 +429,29 @@
 #undef INT_FAST8_MIN
 #undef INT_FAST8_MAX
 #undef UINT_FAST8_MAX
-#define INT_FAST8_MIN  LONG_MIN
-#define INT_FAST8_MAX  LONG_MAX
-#define UINT_FAST8_MAX  ULONG_MAX
+#define INT_FAST8_MIN  SCHAR_MIN
+#define INT_FAST8_MAX  SCHAR_MAX
+#define UINT_FAST8_MAX  UCHAR_MAX
 
 #undef INT_FAST16_MIN
 #undef INT_FAST16_MAX
 #undef UINT_FAST16_MAX
-#define INT_FAST16_MIN  LONG_MIN
-#define INT_FAST16_MAX  LONG_MAX
-#define UINT_FAST16_MAX  ULONG_MAX
+#define INT_FAST16_MIN  INT_FAST32_MIN
+#define INT_FAST16_MAX  INT_FAST32_MAX
+#define UINT_FAST16_MAX  UINT_FAST32_MAX
 
 #undef INT_FAST32_MIN
 #undef INT_FAST32_MAX
 #undef UINT_FAST32_MAX
-#define INT_FAST32_MIN  LONG_MIN
-#define INT_FAST32_MAX  LONG_MAX
-#define UINT_FAST32_MAX  ULONG_MAX
+#ifdef __sun
+# define INT_FAST32_MIN  INT_MIN
+# define INT_FAST32_MAX  INT_MAX
+# define UINT_FAST32_MAX  UINT_MAX
+#else
+# define INT_FAST32_MIN  LONG_MIN
+# define INT_FAST32_MAX  LONG_MAX
+# define UINT_FAST32_MAX  ULONG_MAX
+#endif
 
 #undef INT_FAST64_MIN
 #undef INT_FAST64_MAX
@@ -606,4 +632,5 @@
 #endif
 
 #endif /* _@GUARD_PREFIX@_STDINT_H */
+#endif /* !(defined __ANDROID__ && ...) */
 #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -26,7 +26,9 @@
 # include <sys/param.h>
 #endif
 
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#include <errno.h>                             /* For detecting Plan9.  */
+
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
 
 # if defined __DragonFly__          /* DragonFly */
   /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.  */
@@ -64,7 +66,7 @@
       /* More fields, not relevant here.  */
     };
 #  define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
-# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */
+# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
 #  define fp_ub fp_->_ub
 # endif
 
--- a/lib/stdio-read.c
+++ b/lib/stdio-read.c
@@ -72,6 +72,9 @@
       return ret;                                                             \
     }
 
+/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
+   Otherwise we get a function definition conflict with mingw64's <stdio.h>.  */
+#  if GNULIB_SCANF
 int
 scanf (const char *format, ...)
 {
@@ -84,7 +87,11 @@
 
   return retval;
 }
+#  endif
 
+/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
+   Otherwise we get a function definition conflict with mingw64's <stdio.h>.  */
+#  if GNULIB_FSCANF
 int
 fscanf (FILE *stream, const char *format, ...)
 {
@@ -97,19 +104,28 @@
 
   return retval;
 }
+#  endif
 
+/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
+   Otherwise we get a function definition conflict with mingw64's <stdio.h>.  */
+#  if GNULIB_VSCANF
 int
 vscanf (const char *format, va_list args)
 {
   return vfscanf (stdin, format, args);
 }
+#  endif
 
+/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
+   Otherwise we get a function definition conflict with mingw64's <stdio.h>.  */
+#  if GNULIB_VFSCANF
 int
 vfscanf (FILE *stream, const char *format, va_list args)
 #undef vfscanf
 {
   CALL_WITH_ERRNO_FIX (int, vfscanf (stream, format, args), ret == EOF)
 }
+#  endif
 
 int
 getchar (void)
new file mode 100644
--- /dev/null
+++ b/lib/stdio.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
+#include "stdio.h"
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -47,13 +46,19 @@
 #ifndef _@GUARD_PREFIX@_STDIO_H
 #define _@GUARD_PREFIX@_STDIO_H
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_STDIO_INLINE
+# define _GL_STDIO_INLINE _GL_INLINE
+#endif
+
 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
 #include <stdarg.h>
 
 #include <stddef.h>
 
 /* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8
-   and eglibc 2.11.2.  */
+   and eglibc 2.11.2.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
@@ -581,7 +586,7 @@
    This affects only function declaration attributes, so it's not
    needed for C++.  */
 #  if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-static inline size_t _GL_ARG_NONNULL ((1, 4))
+_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
 rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
 {
   size_t r = fwrite (ptr, s, n, stream);
@@ -768,7 +773,7 @@
 #elif defined GNULIB_POSIXCHECK
 # undef pclose
 # if HAVE_RAW_DECL_PCLOSE
-_GL_WARN_ON_USE (pclose, "popen is unportable - "
+_GL_WARN_ON_USE (pclose, "pclose is unportable - "
                  "use gnulib module pclose for more portability");
 # endif
 #endif
@@ -1333,6 +1338,7 @@
                       "POSIX compliance");
 #endif
 
+_GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_STDIO_H */
 #endif /* _@GUARD_PREFIX@_STDIO_H */
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -49,6 +49,11 @@
 # include <sys/loadavg.h>
 #endif
 
+/* Native Windows platforms declare mktemp() in <io.h>.  */
+#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
 #if @GNULIB_RANDOM_R@
 
 /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
@@ -58,7 +63,7 @@
 #  include <random.h>
 # endif
 
-# if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@
+# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
 #  include <stdint.h>
 # endif
 
@@ -82,13 +87,21 @@
 #endif
 
 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
-/* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
-/* On MacOS X 10.5, only <unistd.h> declares mkstemps.  */
+/* On Mac OS X 10.3, only <unistd.h> declares mkstemp.  */
+/* On Mac OS X 10.5, only <unistd.h> declares mkstemps.  */
 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
 /* But avoid namespace pollution on glibc systems and native Windows.  */
 # include <unistd.h>
 #endif
 
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The attribute __pure__ was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
 /* The definition of _Noreturn is copied here.  */
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
@@ -133,7 +146,9 @@
 /* Parse a signed decimal integer.
    Returns the value of the integer.  Errors are not detected.  */
 # if !@HAVE_ATOLL@
-_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (atoll, long long, (const char *string)
+                                    _GL_ATTRIBUTE_PURE
+                                    _GL_ARG_NONNULL ((1)));
 # endif
 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
 _GL_CXXALIASWARN (atoll);
@@ -442,10 +457,19 @@
 #if @GNULIB_PTSNAME@
 /* Return the pathname of the pseudo-terminal slave associated with
    the master FD is open on, or NULL on errors.  */
-# if !@HAVE_PTSNAME@
+# if @REPLACE_PTSNAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ptsname
+#   define ptsname rpl_ptsname
+#  endif
+_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
+_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
+# else
+#  if !@HAVE_PTSNAME@
 _GL_FUNCDECL_SYS (ptsname, char *, (int fd));
+#  endif
+_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
 # endif
-_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
 _GL_CXXALIASWARN (ptsname);
 #elif defined GNULIB_POSIXCHECK
 # undef ptsname
@@ -504,12 +528,83 @@
 # endif
 #endif
 
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (random, long, (void));
+# endif
+_GL_CXXALIAS_SYS (random, long, (void));
+_GL_CXXALIASWARN (random);
+#elif defined GNULIB_POSIXCHECK
+# undef random
+# if HAVE_RAW_DECL_RANDOM
+_GL_WARN_ON_USE (random, "random is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
+# endif
+_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
+_GL_CXXALIASWARN (srandom);
+#elif defined GNULIB_POSIXCHECK
+# undef srandom
+# if HAVE_RAW_DECL_SRANDOM
+_GL_WARN_ON_USE (srandom, "srandom is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (initstate, char *,
+                  (unsigned int seed, char *buf, size_t buf_size)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (initstate, char *,
+                  (unsigned int seed, char *buf, size_t buf_size));
+_GL_CXXALIASWARN (initstate);
+#elif defined GNULIB_POSIXCHECK
+# undef initstate
+# if HAVE_RAW_DECL_INITSTATE_R
+_GL_WARN_ON_USE (initstate, "initstate is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
+_GL_CXXALIASWARN (setstate);
+#elif defined GNULIB_POSIXCHECK
+# undef setstate
+# if HAVE_RAW_DECL_SETSTATE_R
+_GL_WARN_ON_USE (setstate, "setstate is unportable - "
+                 "use gnulib module random for portability");
+# endif
+#endif
+
+
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef random_r
+#   define random_r rpl_random_r
+#  endif
+_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
+                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
                                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
 # endif
-_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
 _GL_CXXALIASWARN (random_r);
 #elif defined GNULIB_POSIXCHECK
 # undef random_r
@@ -520,13 +615,25 @@
 #endif
 
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef srandom_r
+#   define srandom_r rpl_srandom_r
+#  endif
+_GL_FUNCDECL_RPL (srandom_r, int,
+                  (unsigned int seed, struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (srandom_r, int,
+                  (unsigned int seed, struct random_data *rand_state));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (srandom_r, int,
                   (unsigned int seed, struct random_data *rand_state)
                   _GL_ARG_NONNULL ((2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (srandom_r, int,
                   (unsigned int seed, struct random_data *rand_state));
+# endif
 _GL_CXXALIASWARN (srandom_r);
 #elif defined GNULIB_POSIXCHECK
 # undef srandom_r
@@ -537,15 +644,29 @@
 #endif
 
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef initstate_r
+#   define initstate_r rpl_initstate_r
+#  endif
+_GL_FUNCDECL_RPL (initstate_r, int,
+                  (unsigned int seed, char *buf, size_t buf_size,
+                   struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((2, 4)));
+_GL_CXXALIAS_RPL (initstate_r, int,
+                  (unsigned int seed, char *buf, size_t buf_size,
+                   struct random_data *rand_state));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (initstate_r, int,
                   (unsigned int seed, char *buf, size_t buf_size,
                    struct random_data *rand_state)
                   _GL_ARG_NONNULL ((2, 4)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (initstate_r, int,
                   (unsigned int seed, char *buf, size_t buf_size,
                    struct random_data *rand_state));
+# endif
 _GL_CXXALIASWARN (initstate_r);
 #elif defined GNULIB_POSIXCHECK
 # undef initstate_r
@@ -556,13 +677,25 @@
 #endif
 
 #if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef setstate_r
+#   define setstate_r rpl_setstate_r
+#  endif
+_GL_FUNCDECL_RPL (setstate_r, int,
+                  (char *arg_state, struct random_data *rand_state)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (setstate_r, int,
+                  (char *arg_state, struct random_data *rand_state));
+# else
+#  if !@HAVE_RANDOM_R@
 _GL_FUNCDECL_SYS (setstate_r, int,
                   (char *arg_state, struct random_data *rand_state)
                   _GL_ARG_NONNULL ((1, 2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (setstate_r, int,
                   (char *arg_state, struct random_data *rand_state));
+# endif
 _GL_CXXALIASWARN (setstate_r);
 #elif defined GNULIB_POSIXCHECK
 # undef setstate_r
new file mode 100644
--- /dev/null
+++ b/lib/stdnoreturn.in.h
@@ -0,0 +1,50 @@
+/* A substitute for ISO C11 <stdnoreturn.h>.
+
+   Copyright 2012 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 2, 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.  */
+
+#ifndef noreturn
+
+/* ISO C11 <stdnoreturn.h> for platforms that lack it.
+
+   References:
+   ISO C11 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
+   section 7.23 */
+
+/* The definition of _Noreturn is copied here.  */
+
+#if 1200 <= _MSC_VER
+/* Standard include files on this platform contain declarations like
+   "__declspec (noreturn) void abort (void);".  "#define noreturn
+   _Noreturn" would cause this declaration to be rewritten to the
+   invalid "__declspec (__declspec (noreturn)) void abort (void);".
+   Instead, define noreturn to empty, so that such declarations are
+   rewritten to "__declspec () void abort (void);", which is
+   equivalent to "void abort (void);"; this gives up on noreturn's
+   advice to the compiler but at least it is valid code.  */
+# define noreturn /*empty*/
+#else
+# define noreturn _Noreturn
+#endif
+
+/* Did he ever return?
+   No he never returned
+   And his fate is still unlearn'd ...
+     -- Steiner J, Hawes BL.  M.T.A. (1949)  */
+
+#endif /* noreturn */
--- a/lib/str-kmp.h
+++ b/lib/str-kmp.h
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Before including this file, you need to define:
      UNIT                    The element type of the needle and haystack.
--- a/lib/str-two-way.h
+++ b/lib/str-two-way.h
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Before including this file, you need to include <config.h> and
    <string.h>, and define:
--- a/lib/strcasecmp.c
+++ b/lib/strcasecmp.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/strcasestr.c
+++ b/lib/strcasestr.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/strdup.c
+++ b/lib/strdup.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
--- a/lib/streq.h
+++ b/lib/streq.h
@@ -21,8 +21,8 @@
 
 #include <string.h>
 
-/* STREQ allows to optimize string comparison with a small literal string.
-     STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+/* STREQ_OPT allows to optimize string comparison with a small literal string.
+     STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
    is semantically equivalent to
      strcmp (s, "EUC-KR") == 0
    just faster.  */
@@ -163,12 +163,12 @@
     return 0;
 }
 
-#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
   streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
 
 #else
 
-#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
   (strcmp (s1, s2) == 0)
 
 #endif
--- a/lib/strerror-override.c
+++ b/lib/strerror-override.c
@@ -89,6 +89,8 @@
       return "No route to host";
     case EWOULDBLOCK:
       return "Operation would block";
+#endif
+#if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
     case ETXTBSY:
       return "Text file busy";
     case ENODATA:
@@ -97,10 +99,6 @@
       return "Out of streams resources";
     case ENOSTR:
       return "Device not a stream";
-    case ENOTRECOVERABLE:
-      return "State not recoverable";
-    case EOWNERDEAD:
-      return "Owner died";
     case ETIME:
       return "Timer expired";
     case EOTHER:
@@ -283,6 +281,21 @@
       return "Operation canceled";
 #endif
 
+#if GNULIB_defined_EOWNERDEAD
+    case EOWNERDEAD:
+      return "Owner died";
+#endif
+
+#if GNULIB_defined_ENOTRECOVERABLE
+    case ENOTRECOVERABLE:
+      return "State not recoverable";
+#endif
+
+#if GNULIB_defined_EILSEQ
+    case EILSEQ:
+      return "Invalid or incomplete multibyte or wide character";
+#endif
+
     default:
       return NULL;
     }
--- a/lib/strerror-override.h
+++ b/lib/strerror-override.h
@@ -30,6 +30,7 @@
    describing the error.  Otherwise return NULL.  */
 # if REPLACE_STRERROR_0 \
      || GNULIB_defined_ESOCK \
+     || GNULIB_defined_ESTREAMS \
      || GNULIB_defined_EWINSOCK \
      || GNULIB_defined_ENOMSG \
      || GNULIB_defined_EIDRM \
@@ -43,7 +44,10 @@
      || GNULIB_defined_ECONNABORTED \
      || GNULIB_defined_ESTALE \
      || GNULIB_defined_EDQUOT \
-     || GNULIB_defined_ECANCELED
+     || GNULIB_defined_ECANCELED \
+     || GNULIB_defined_EOWNERDEAD \
+     || GNULIB_defined_ENOTRECOVERABLE \
+     || GNULIB_defined_EILSEQ
 extern const char *strerror_override (int errnum);
 # else
 #  define strerror_override(ignored) NULL
--- a/lib/strerror_r.c
+++ b/lib/strerror_r.c
@@ -34,6 +34,7 @@
 #if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */
 
 # define USE_XPG_STRERROR_R 1
+extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
 
 #elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__)
 
@@ -161,8 +162,6 @@
 #if USE_XPG_STRERROR_R
 
     {
-      extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
-
       ret = __xpg_strerror_r (errnum, buf, buflen);
       if (ret < 0)
         ret = errno;
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -40,7 +40,7 @@
 extern char *tzname[];
 #endif
 
-/* Do multibyte processing if multibytes are supported, unless
+/* Do multibyte processing if multibyte encodings are supported, unless
    multibyte sequences are safe in formats.  Multibyte sequences are
    safe if they cannot contain byte sequences that look like format
    conversion specifications.  The multibyte encodings used by the
--- a/lib/striconv.c
+++ b/lib/striconv.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/striconv.h
+++ b/lib/striconv.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _STRICONV_H
 #define _STRICONV_H
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_STRING_H
 
@@ -725,10 +724,14 @@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define mbslen rpl_mbslen
 #  endif
-_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string)
+                                  _GL_ATTRIBUTE_PURE
+                                  _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
 # else
-_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
+                                  _GL_ATTRIBUTE_PURE
+                                  _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
 # endif
 _GL_CXXALIASWARN (mbslen);
@@ -738,6 +741,7 @@
 /* Return the number of multibyte characters in the character string starting
    at STRING and ending at STRING + LEN.  */
 _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1));
 #endif
 
@@ -751,10 +755,12 @@
 #   define mbschr rpl_mbschr /* avoid collision with HP-UX function */
 #  endif
 _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
+                                  _GL_ATTRIBUTE_PURE
                                   _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
 # else
 _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
+                                  _GL_ATTRIBUTE_PURE
                                   _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
 # endif
@@ -771,10 +777,12 @@
 #   define mbsrchr rpl_mbsrchr /* avoid collision with system function */
 #  endif
 _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
+                                   _GL_ATTRIBUTE_PURE
                                    _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
 # else
 _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
+                                   _GL_ATTRIBUTE_PURE
                                    _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
 # endif
@@ -787,6 +795,7 @@
    Unlike strstr(), this function works correctly in multibyte locales with
    encodings different from UTF-8.  */
 _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1, 2));
 #endif
 
@@ -798,6 +807,7 @@
    different lengths!
    Unlike strcasecmp(), this function works correctly in multibyte locales.  */
 _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1, 2));
 #endif
 
@@ -812,6 +822,7 @@
    Unlike strncasecmp(), this function works correctly in multibyte locales.
    But beware that N is not a byte count but a character count!  */
 _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1, 2));
 #endif
 
@@ -825,6 +836,7 @@
    Unlike strncasecmp(), this function works correctly in multibyte
    locales.  */
 _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1, 2));
 #endif
 
@@ -835,6 +847,7 @@
    strlen (haystack) < strlen (needle) !
    Unlike strcasestr(), this function works correctly in multibyte locales.  */
 _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1, 2));
 #endif
 
@@ -845,6 +858,7 @@
    if none exists.
    Unlike strcspn(), this function works correctly in multibyte locales.  */
 _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1, 2));
 #endif
 
@@ -858,10 +872,12 @@
 #   define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
 #  endif
 _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
+                                   _GL_ATTRIBUTE_PURE
                                    _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
 # else
 _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
+                                   _GL_ATTRIBUTE_PURE
                                    _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
 # endif
@@ -875,6 +891,7 @@
    if none exists.
    Unlike strspn(), this function works correctly in multibyte locales.  */
 _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
+     _GL_ATTRIBUTE_PURE
      _GL_ARG_NONNULL ((1, 2));
 #endif
 
@@ -994,6 +1011,7 @@
 #if @GNULIB_STRVERSCMP@
 # if !@HAVE_STRVERSCMP@
 _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
+                                   _GL_ATTRIBUTE_PURE
                                    _GL_ARG_NONNULL ((1, 2)));
 # endif
 _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
--- a/lib/strings.in.h
+++ b/lib/strings.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_STRINGS_H
 
--- a/lib/strncasecmp.c
+++ b/lib/strncasecmp.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/strndup.c
+++ b/lib/strndup.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/strnlen.c
+++ b/lib/strnlen.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/strpbrk.c
+++ b/lib/strpbrk.c
@@ -15,8 +15,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/strptime.c
+++ b/lib/strptime.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
@@ -240,7 +239,6 @@
   struct locale_data *const current = locale->__locales[LC_TIME];
 #endif
 
-  const char *rp_backup;
   int cnt;
   size_t val;
   int have_I, is_pm;
@@ -253,14 +251,14 @@
   int week_no;
 #ifdef _NL_CURRENT
   size_t num_eras;
+  struct era_entry *era = NULL;
+  const char *rp_backup;
 #endif
-  struct era_entry *era;
 
   have_I = is_pm = 0;
   century = -1;
   want_century = 0;
   want_era = 0;
-  era = NULL;
   week_no = 0;
 
   have_wday = want_xday = have_yday = have_mon = have_mday = have_uweek = 0;
@@ -290,10 +288,10 @@
 #ifndef _NL_CURRENT
       /* We need this for handling the 'E' modifier.  */
     start_over:
-#endif
-
+#else
       /* Make back up of current processing pointer.  */
       rp_backup = rp;
+#endif
 
       switch (*fmt++)
         {
@@ -675,7 +673,7 @@
              specify hours.  If fours digits are used, minutes are
              also specified.  */
           {
-            bool neg;
+            bool neg _GL_UNUSED;
             int n;
 
             val = 0;
--- a/lib/strsep.c
+++ b/lib/strsep.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
--- a/lib/strstr.c
+++ b/lib/strstr.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This particular implementation was written by Eric Blake, 2008.  */
 
--- a/lib/strtod.c
+++ b/lib/strtod.c
@@ -193,7 +193,7 @@
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static double
 compute_minus_zero (void)
--- a/lib/strverscmp.c
+++ b/lib/strverscmp.c
@@ -15,8 +15,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if !_LIBC
 # include <config.h>
--- a/lib/sys_file.in.h
+++ b/lib/sys_file.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Richard W.M. Jones.  */
 
--- a/lib/sys_ioctl.in.h
+++ b/lib/sys_ioctl.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
 
new file mode 100644
--- /dev/null
+++ b/lib/sys_resource.in.h
@@ -0,0 +1,111 @@
+/* Substitute for <sys/resource.h>.
+   Copyright (C) 2012 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 2, 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/>.  */
+
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+@PRAGMA_COLUMNS@
+
+#ifndef _@GUARD_PREFIX@_SYS_RESOURCE_H
+
+#if @HAVE_SYS_RESOURCE_H@
+
+/* On FreeBSD 5.0, <sys/resource.h> assumes prior inclusion of <sys/types.h>
+   and <sys/time.h>.  */
+# include <sys/types.h>
+# include <sys/time.h>
+
+/* The include_next requires a split double-inclusion guard.  */
+# @INCLUDE_NEXT@ @NEXT_SYS_RESOURCE_H@
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_RESOURCE_H
+#define _@GUARD_PREFIX@_SYS_RESOURCE_H
+
+#if !@HAVE_SYS_RESOURCE_H@
+/* A platform that lacks <sys/resource.h>.  */
+
+/* Get 'struct timeval'.  */
+# include <sys/time.h>
+
+/* Define the RUSAGE_* constants.  */
+# define RUSAGE_SELF 0
+# define RUSAGE_CHILDREN -1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if !GNULIB_defined_struct_rusage
+/* All known platforms that lack <sys/resource.h> also lack any declaration
+   of struct rusage in any other header.  */
+struct rusage
+{
+  struct timeval ru_utime;      /* CPU time used in user mode */
+  struct timeval ru_stime;      /* CPU time used in system mode (kernel) */
+  long ru_maxrss;
+  long ru_ixrss;
+  long ru_idrss;
+  long ru_isrss;
+  long ru_minflt;
+  long ru_majflt;
+  long ru_nswap;
+  long ru_inblock;
+  long ru_oublock;
+  long ru_msgsnd;
+  long ru_msgrcv;
+  long ru_nsignals;
+  long ru_nvcsw;
+  long ru_nivcsw;
+};
+#  define GNULIB_defined_struct_rusage 1
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Declare overridden functions.  */
+
+
+#if @GNULIB_GETRUSAGE@
+# if !@HAVE_GETRUSAGE@
+_GL_FUNCDECL_SYS (getrusage, int, (int who, struct rusage *usage_p)
+                                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (getrusage, int, (int who, struct rusage *usage_p));
+_GL_CXXALIASWARN (getrusage);
+#elif defined GNULIB_POSIXCHECK
+# undef getrusage
+# if HAVE_RAW_DECL_GETRUSAGE
+_GL_WARN_ON_USE (getrusage, "getrusage is unportable - "
+                 "use gnulib module getrusage for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SYS_RESOURCE_H */
+#endif /* _@GUARD_PREFIX@_SYS_RESOURCE_H */
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 # if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -42,6 +41,15 @@
 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H
 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
 
+/* On OpenBSD 5.0, <pthread.h> includes <sys/types.h>, which includes
+   <sys/select.h>.  At this point we cannot include <signal.h>, because that
+   includes gnulib's pthread.h override, which gives a syntax error because
+   /usr/include/pthread.h has not been completely processed.  Simply delegate
+   to the system's header in this case.  */
+#elif @HAVE_SYS_SELECT_H@ && defined __OpenBSD__ && (defined _PTHREAD_H_ && !defined PTHREAD_MUTEX_INITIALIZER)
+
+# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
+
 #else
 
 #ifndef _@GUARD_PREFIX@_SYS_SELECT_H
@@ -51,17 +59,11 @@
    in <signal.h> where it belongs.  */
 #include <sys/types.h>
 
-/* Get definition of 'sigset_t'.
-   But avoid namespace pollution on glibc systems.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <signal.h>
-#endif
-
 #if @HAVE_SYS_SELECT_H@
 
 /* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
    of 'struct timeval', and no definition of this type.
-   Also, MacOS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+   Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
    in <sys/time.h>.
    But avoid namespace pollution on glibc systems.  */
 # ifndef __GLIBC__
@@ -81,6 +83,14 @@
 
 #endif
 
+/* Get definition of 'sigset_t'.
+   But avoid namespace pollution on glibc systems.
+   Do this after the include_next (for the sake of OpenBSD 5.0) but before
+   the split double-inclusion guard (for the sake of Solaris).  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <signal.h>
+#endif
+
 #ifndef _@GUARD_PREFIX@_SYS_SELECT_H
 #define _@GUARD_PREFIX@_SYS_SELECT_H
 
@@ -120,7 +130,7 @@
 
 /* Re-define FD_ISSET to avoid a WSA call while we are not using
    network sockets.  */
-static inline int
+static int
 rpl_fd_isset (SOCKET fd, fd_set * set)
 {
   u_int i;
new file mode 100644
--- /dev/null
+++ b/lib/sys_socket.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE
+#include "sys/socket.h"
--- a/lib/sys_socket.in.h
+++ b/lib/sys_socket.in.h
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file is supposed to be used on platforms that lack <sys/socket.h>,
    on platforms where <sys/socket.h> cannot be included standalone, and on
@@ -64,6 +63,11 @@
 #ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
 #define _@GUARD_PREFIX@_SYS_SOCKET_H
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_SYS_SOCKET_INLINE
+# define _GL_SYS_SOCKET_INLINE _GL_INLINE
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -143,7 +147,7 @@
    that you can influence which definitions you get by setting the
    WINVER symbol before including these two files.  For example,
    getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that
-   symbol is set indiriectly through WINVER).  You can set this by
+   symbol is set indirectly through WINVER).  You can set this by
    adding AC_DEFINE(WINVER, 0x0501) to configure.ac.  Note that your
    code may not run on older Windows releases then.  My Windows 2000
    box was not able to run the code, for example.  The situation is
@@ -202,7 +206,7 @@
 
 /* Re-define FD_ISSET to avoid a WSA call while we are not using
    network sockets.  */
-static inline int
+_GL_SYS_SOCKET_INLINE int
 rpl_fd_isset (SOCKET fd, fd_set * set)
 {
   u_int i;
@@ -678,6 +682,8 @@
 # endif
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
 #endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
 #endif
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
 
@@ -36,7 +35,8 @@
 
 #ifndef _@GUARD_PREFIX@_SYS_STAT_H
 
-/* Get nlink_t.  */
+/* Get nlink_t.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 
 /* Get struct timespec.  */
@@ -62,6 +62,16 @@
 # include <direct.h> /* mingw64, MSVC 9 */
 #endif
 
+/* Native Windows platforms declare umask() in <io.h>.  */
+#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
+/* Large File Support on native Windows.  */
+#if @WINDOWS_64_BIT_ST_SIZE@
+# define stat _stati64
+#endif
+
 #ifndef S_IFIFO
 # ifdef _S_IFIFO
 #  define S_IFIFO _S_IFIFO
@@ -331,6 +341,9 @@
 _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
 # endif
 _GL_CXXALIASWARN (fstat);
+#elif @WINDOWS_64_BIT_ST_SIZE@
+/* Above, we define stat to _stati64.  */
+# define fstat _fstati64
 #elif defined GNULIB_POSIXCHECK
 # undef fstat
 # if HAVE_RAW_DECL_FSTAT
@@ -484,7 +497,7 @@
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
 #  if !GNULIB_defined_rpl_mkdir
-static inline int
+static int
 rpl_mkdir (char const *name, mode_t mode)
 {
   return _mkdir (name);
@@ -611,14 +624,55 @@
 /* We can't use the object-like #define stat rpl_stat, because of
    struct stat.  This means that rpl_stat will not be used if the user
    does (stat)(a,b).  Oh well.  */
-#  undef stat
-#  ifdef _LARGE_FILES
+#  if defined _AIX && defined stat && defined _LARGE_FILES
     /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
        so we have to replace stat64() instead of stat(). */
-#   define stat stat64
 #   undef stat64
 #   define stat64(name, st) rpl_stat (name, st)
-#  else /* !_LARGE_FILES */
+#  elif @WINDOWS_64_BIT_ST_SIZE@
+    /* Above, we define stat to _stati64.  */
+#   if defined __MINGW32__ && defined _stati64
+#    ifndef _USE_32BIT_TIME_T
+      /* The system headers define _stati64 to _stat64.  */
+#     undef _stat64
+#     define _stat64(name, st) rpl_stat (name, st)
+#    endif
+#   elif defined _MSC_VER && defined _stati64
+#    ifdef _USE_32BIT_TIME_T
+      /* The system headers define _stati64 to _stat32i64.  */
+#     undef _stat32i64
+#     define _stat32i64(name, st) rpl_stat (name, st)
+#    else
+      /* The system headers define _stati64 to _stat64.  */
+#     undef _stat64
+#     define _stat64(name, st) rpl_stat (name, st)
+#    endif
+#   else
+#    undef _stati64
+#    define _stati64(name, st) rpl_stat (name, st)
+#   endif
+#  elif defined __MINGW32__ && defined stat
+#   ifdef _USE_32BIT_TIME_T
+     /* The system headers define stat to _stat32i64.  */
+#    undef _stat32i64
+#    define _stat32i64(name, st) rpl_stat (name, st)
+#   else
+     /* The system headers define stat to _stat64.  */
+#    undef _stat64
+#    define _stat64(name, st) rpl_stat (name, st)
+#   endif
+#  elif defined _MSC_VER && defined stat
+#   ifdef _USE_32BIT_TIME_T
+     /* The system headers define stat to _stat32.  */
+#    undef _stat32
+#    define _stat32(name, st) rpl_stat (name, st)
+#   else
+     /* The system headers define stat to _stat64i32.  */
+#    undef _stat64i32
+#    define _stat64i32(name, st) rpl_stat (name, st)
+#   endif
+#  else /* !(_AIX ||__MINGW32__ ||  _MSC_VER) */
+#   undef stat
 #   define stat(name, st) rpl_stat (name, st)
 #  endif /* !_LARGE_FILES */
 _GL_EXTERN_C int stat (const char *name, struct stat *buf)
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
@@ -40,9 +39,11 @@
 #  include <time.h>
 # endif
 
-/* On native Windows with MSVC:
-   Get the 'struct timeval' type.  */
-# if defined _MSC_VER && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
+/* On native Windows with MSVC, get the 'struct timeval' type.
+   Also, on native Windows with a 64-bit time_t, where we are overriding the
+   'struct timeval' type, get all declarations of system functions whose
+   signature contains 'struct timeval'.  */
+# if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
 #  define _GL_INCLUDING_WINSOCK2_H
 #  include <winsock2.h>
 #  undef _GL_INCLUDING_WINSOCK2_H
@@ -58,7 +59,11 @@
 extern "C" {
 # endif
 
-# if ! @HAVE_STRUCT_TIMEVAL@
+# if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
+
+#  if @REPLACE_STRUCT_TIMEVAL@
+#   define timeval rpl_timeval
+#  endif
 
 #  if !GNULIB_defined_struct_timeval
 struct timeval
--- a/lib/sys_times.in.h
+++ b/lib/sys_times.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson <simon@josefsson.org>, 2008.  */
 
--- a/lib/sys_types.in.h
+++ b/lib/sys_types.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -29,6 +28,18 @@
 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
 #define _@GUARD_PREFIX@_SYS_TYPES_H
 
+/* Override off_t if Large File Support is requested on native Windows.  */
+#if @WINDOWS_64_BIT_OFF_T@
+/* Same as int64_t in <stdint.h>.  */
+# if defined _MSC_VER
+#  define off_t __int64
+# else
+#  define off_t long long int
+# endif
+/* Indicator, for gnulib internal purposes.  */
+# define _GL_WINDOWS_64_BIT_OFF_T 1
+#endif
+
 /* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
--- a/lib/sys_uio.in.h
+++ b/lib/sys_uio.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 # if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
--- a/lib/sys_utsname.in.h
+++ b/lib/sys_utsname.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_SYS_UTSNAME_H
 
--- a/lib/sys_wait.in.h
+++ b/lib/sys_wait.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 
 #ifndef _@GUARD_PREFIX@_SYS_WAIT_H
new file mode 100644
--- /dev/null
+++ b/lib/system-quote.c
@@ -0,0 +1,311 @@
+/* Quoting for a system command.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2012.
+
+   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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "system-quote.h"
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "sh-quote.h"
+#include "xalloc.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* The native Windows CreateProcess() function interprets characters like
+   ' ', '\t', '\\', '"' (but not '<' and '>') in a special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+   - '*', '?' characters may get expanded through wildcard expansion in the
+     callee: By default, in the callee, the initialization code before main()
+     takes the result of GetCommandLine(), wildcard-expands it, and passes it
+     to main(). The exceptions to this rule are:
+       - programs that inspect GetCommandLine() and ignore argv,
+       - mingw programs that have a global variable 'int _CRT_glob = 0;',
+       - Cygwin programs, when invoked from a Cygwin program.
+ */
+# define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037*?"
+# define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+
+/* Copies the quoted string to p and returns the number of bytes needed.
+   If p is non-NULL, there must be room for system_quote_length (string)
+   bytes at p.  */
+static size_t
+windows_createprocess_quote (char *p, const char *string)
+{
+  size_t len = strlen (string);
+  bool quote_around =
+    (len == 0 || strpbrk (string, SHELL_SPECIAL_CHARS) != NULL);
+  size_t backslashes = 0;
+  size_t i = 0;
+# define STORE(c) \
+  do                 \
+    {                \
+      if (p != NULL) \
+        p[i] = (c);  \
+      i++;           \
+    }                \
+  while (0)
+
+  if (quote_around)
+    STORE ('"');
+  for (; len > 0; string++, len--)
+    {
+      char c = *string;
+
+      if (c == '"')
+        {
+          size_t j;
+
+          for (j = backslashes + 1; j > 0; j--)
+            STORE ('\\');
+        }
+      STORE (c);
+      if (c == '\\')
+        backslashes++;
+      else
+        backslashes = 0;
+    }
+  if (quote_around)
+    {
+      size_t j;
+
+      for (j = backslashes; j > 0; j--)
+        STORE ('\\');
+      STORE ('"');
+    }
+# undef STORE
+  return i;
+}
+
+/* The native Windows cmd.exe command interpreter also interprets:
+   - '\n', '\r' as a command terminator - no way to escape it,
+   - '<', '>' as redirections,
+   - '|' as pipe operator,
+   - '%var%' as a reference to the environment variable VAR (uppercase),
+     even inside quoted strings,
+   - '&' '[' ']' '{' '}' '^' '=' ';' '!' '\'' '+' ',' '`' '~' for other
+     purposes, according to
+     <http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true>
+   We quote a string like '%var%' by putting the '%' characters outside of
+   double-quotes and the rest of the string inside double-quotes: %"var"%.
+   This is guaranteed to not be a reference to an environment variable.
+ */
+# define CMD_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037!%&'*+,;<=>?[]^`{|}~"
+# define CMD_FORBIDDEN_CHARS "\n\r"
+
+/* Copies the quoted string to p and returns the number of bytes needed.
+   If p is non-NULL, there must be room for system_quote_length (string)
+   bytes at p.  */
+static size_t
+windows_cmd_quote (char *p, const char *string)
+{
+  size_t len = strlen (string);
+  bool quote_around =
+    (len == 0 || strpbrk (string, CMD_SPECIAL_CHARS) != NULL);
+  size_t backslashes = 0;
+  size_t i = 0;
+# define STORE(c) \
+  do                 \
+    {                \
+      if (p != NULL) \
+        p[i] = (c);  \
+      i++;           \
+    }                \
+  while (0)
+
+  if (quote_around)
+    STORE ('"');
+  for (; len > 0; string++, len--)
+    {
+      char c = *string;
+
+      if (c == '"')
+        {
+          size_t j;
+
+          for (j = backslashes + 1; j > 0; j--)
+            STORE ('\\');
+        }
+      if (c == '%')
+        {
+          size_t j;
+
+          for (j = backslashes; j > 0; j--)
+            STORE ('\\');
+          STORE ('"');
+        }
+      STORE (c);
+      if (c == '%')
+        STORE ('"');
+      if (c == '\\')
+        backslashes++;
+      else
+        backslashes = 0;
+    }
+  if (quote_around)
+    {
+      size_t j;
+
+      for (j = backslashes; j > 0; j--)
+        STORE ('\\');
+      STORE ('"');
+    }
+  return i;
+}
+
+#endif
+
+size_t
+system_quote_length (enum system_command_interpreter interpreter,
+                     const char *string)
+{
+  switch (interpreter)
+    {
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+    case SCI_SYSTEM:
+#endif
+    case SCI_POSIX_SH:
+      return shell_quote_length (string);
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+    case SCI_WINDOWS_CREATEPROCESS:
+      return windows_createprocess_quote (NULL, string);
+
+    case SCI_SYSTEM:
+    case SCI_WINDOWS_CMD:
+      return windows_cmd_quote (NULL, string);
+#endif
+
+    default:
+      /* Invalid interpreter.  */
+      abort ();
+    }
+}
+
+char *
+system_quote_copy (char *p,
+                   enum system_command_interpreter interpreter,
+                   const char *string)
+{
+  switch (interpreter)
+    {
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+    case SCI_SYSTEM:
+#endif
+    case SCI_POSIX_SH:
+      return shell_quote_copy (p, string);
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+    case SCI_WINDOWS_CREATEPROCESS:
+      p += windows_createprocess_quote (p, string);
+      *p = '\0';
+      return p;
+
+    case SCI_SYSTEM:
+    case SCI_WINDOWS_CMD:
+      p += windows_cmd_quote (p, string);
+      *p = '\0';
+      return p;
+#endif
+
+    default:
+      /* Invalid interpreter.  */
+      abort ();
+    }
+}
+
+char *
+system_quote (enum system_command_interpreter interpreter,
+              const char *string)
+{
+  switch (interpreter)
+    {
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+    case SCI_SYSTEM:
+#endif
+    case SCI_POSIX_SH:
+      return shell_quote (string);
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+    case SCI_WINDOWS_CREATEPROCESS:
+    case SCI_SYSTEM:
+    case SCI_WINDOWS_CMD:
+      {
+        size_t length = system_quote_length (interpreter, string);
+        char *quoted = XNMALLOC (length, char);
+        system_quote_copy (quoted, interpreter, string);
+        return quoted;
+      }
+#endif
+
+    default:
+      /* Invalid interpreter.  */
+      abort ();
+    }
+}
+
+char *
+system_quote_argv (enum system_command_interpreter interpreter,
+                   char * const *argv)
+{
+  if (*argv != NULL)
+    {
+      char * const *argp;
+      size_t length;
+      char *command;
+      char *p;
+
+      length = 0;
+      for (argp = argv; ; )
+        {
+          length += system_quote_length (interpreter, *argp) + 1;
+          argp++;
+          if (*argp == NULL)
+            break;
+        }
+
+      command = XNMALLOC (length, char);
+
+      p = command;
+      for (argp = argv; ; )
+        {
+          p = system_quote_copy (p, interpreter, *argp);
+          argp++;
+          if (*argp == NULL)
+            break;
+          *p++ = ' ';
+        }
+      *p = '\0';
+
+      return command;
+    }
+  else
+    return xstrdup ("");
+}
new file mode 100644
--- /dev/null
+++ b/lib/system-quote.h
@@ -0,0 +1,99 @@
+/* Quoting for a system command.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2012.
+
+   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/>.  */
+
+#ifndef _SYSTEM_QUOTE_H
+#define _SYSTEM_QUOTE_H
+
+/* When passing a command the system's command interpreter, we must quote the
+   program name and arguments, since
+     - Unix shells interpret characters like " ", "'", "<", ">", "$", '*', '?'
+       etc. in a special way,
+     - Windows CreateProcess() interprets characters like ' ', '\t', '\\', '"'
+       etc. (but not '<' and '>') in a special way,
+     - Windows cmd.exe also interprets characters like '<', '>', '&', '%', etc.
+       in a special way.  Note that it is impossible to pass arguments that
+       contain newlines or carriage return characters to programs through
+       cmd.exe.
+     - Windows programs usually perform wildcard expansion when they receive
+       arguments that contain unquoted '*', '?' characters.
+
+  With this module, you can build a command that will invoke a program with
+  specific strings as arguments.
+
+  Note: If you want wildcard expansion to happen, you have to first do wildcard
+  expansion through the 'glob' module, then quote the resulting strings through
+  this module, and then invoke the system's command interpreter.
+
+  Limitations:
+    - When invoking native Windows programs on Windows Vista or newer,
+      wildcard expansion will occur in the invoked program nevertheless.
+    - On native Windows, for SCI_SYSTEM and SCI_WINDOWS_CMD, newlines and
+      carriage return characters are not supported.  Their undesired effect
+      is to truncate the entire command line.
+ */
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Identifier for the kind of interpreter of the command.  */
+enum system_command_interpreter
+{
+  /* The interpreter used by the system() and popen() functions.
+     This is equivalent to SCI_POSIX_SH on Unix platforms and
+     SCI_WINDOWS_CMD on native Windows platforms.  */
+  SCI_SYSTEM                    = 0
+  /* The POSIX /bin/sh.  */
+  , SCI_POSIX_SH                = 1
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* The native Windows CreateProcess() function.  */
+  , SCI_WINDOWS_CREATEPROCESS   = 2
+  /* The native Windows cmd.exe interpreter.  */
+  , SCI_WINDOWS_CMD             = 3
+#endif
+};
+
+/* Returns the number of bytes needed for the quoted string.  */
+extern size_t
+       system_quote_length (enum system_command_interpreter interpreter,
+                            const char *string);
+
+/* Copies the quoted string to p and returns the incremented p.
+   There must be room for system_quote_length (string) + 1 bytes at p.  */
+extern char *
+       system_quote_copy (char *p,
+                          enum system_command_interpreter interpreter,
+                          const char *string);
+
+/* Returns the freshly allocated quoted string.  */
+extern char *
+       system_quote (enum system_command_interpreter interpreter,
+                     const char *string);
+
+/* Returns a freshly allocated string containing all argument strings, quoted,
+   separated through spaces.  */
+extern char *
+       system_quote_argv (enum system_command_interpreter interpreter,
+                          char * const *argv);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYSTEM_QUOTE_H */
--- a/lib/tanl.c
+++ b/lib/tanl.c
@@ -29,6 +29,9 @@
 
 #else
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_tanl.c
+   and           glibc/sysdeps/ieee754/ldbl-128/k_tanl.c.  */
+
 /* tanl(x)
  * Return tangent function of x.
  *
--- a/lib/tcgetsid.c
+++ b/lib/tcgetsid.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -28,7 +27,7 @@
 pid_t
 tcgetsid (int fd)
 {
-#ifdef TIOCGSID /* MacOS X, OpenBSD */
+#ifdef TIOCGSID /* Mac OS X, OpenBSD */
   int sid;
 
   if (ioctl (fd, TIOCGSID, &sid) < 0)
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -207,7 +207,7 @@
   /* A lower bound on the number of temporary files to attempt to
      generate.  The maximum total number of temporary file names that
      can exist for a given template is 62**6.  It should never be
-     necessary to try all these combinations.  Instead if a reasonable
+     necessary to try all of these combinations.  Instead if a reasonable
      number of names is tried (we define reasonable as 62**3) fail to
      give the system administrator the chance to remove the problems.  */
 #define ATTEMPTS_MIN (62 * 62 * 62)
--- a/lib/termios.in.h
+++ b/lib/termios.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_TERMIOS_H
 
@@ -41,10 +40,8 @@
 #ifndef _@GUARD_PREFIX@_TERMIOS_H
 #define _@GUARD_PREFIX@_TERMIOS_H
 
-#if @GNULIB_TCGETSID@
 /* Get pid_t.  */
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
--- a/lib/time_r.c
+++ b/lib/time_r.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
--- a/lib/timegm.c
+++ b/lib/timegm.c
@@ -14,8 +14,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
--- a/lib/times.c
+++ b/lib/times.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson <simon@josefsson.org>, 2008.  */
 
--- a/lib/timespec-sub.c
+++ b/lib/timespec-sub.c
@@ -22,7 +22,6 @@
    999999999.  */
 
 #include <config.h>
-#include <config.h>
 #include "timespec.h"
 
 #include "intprops.h"
new file mode 100644
--- /dev/null
+++ b/lib/timespec.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE
+#include "timespec.h"
--- a/lib/timespec.h
+++ b/lib/timespec.h
@@ -21,6 +21,11 @@
 
 # include <time.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_TIMESPEC_INLINE
+# define _GL_TIMESPEC_INLINE _GL_INLINE
+#endif
+
 /* Return negative, zero, positive if A < B, A == B, A > B, respectively.
 
    For each time stamp T, this code assumes that either:
@@ -49,7 +54,7 @@
 
    The (int) cast avoids a gcc -Wconversion warning.  */
 
-static inline int
+_GL_TIMESPEC_INLINE int
 timespec_cmp (struct timespec a, struct timespec b)
 {
   return (a.tv_sec < b.tv_sec ? -1
@@ -59,18 +64,21 @@
 
 /* Return -1, 0, 1, depending on the sign of A.  A.tv_nsec must be
    nonnegative.  */
-static inline int
+_GL_TIMESPEC_INLINE int
 timespec_sign (struct timespec a)
 {
   return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
 }
 
-struct timespec timespec_add (struct timespec, struct timespec);
-struct timespec timespec_sub (struct timespec, struct timespec);
-struct timespec dtotimespec (double);
+struct timespec timespec_add (struct timespec, struct timespec)
+  _GL_ATTRIBUTE_CONST;
+struct timespec timespec_sub (struct timespec, struct timespec)
+  _GL_ATTRIBUTE_CONST;
+struct timespec dtotimespec (double)
+  _GL_ATTRIBUTE_CONST;
 
 /* Return an approximation to A, of type 'double'.  */
-static inline double
+_GL_TIMESPEC_INLINE double
 timespectod (struct timespec a)
 {
   return a.tv_sec + a.tv_nsec / 1e9;
@@ -79,4 +87,6 @@
 void gettime (struct timespec *);
 int settime (struct timespec const *);
 
+_GL_INLINE_HEADER_END
+
 #endif
--- a/lib/tmpfile.c
+++ b/lib/tmpfile.c
@@ -54,6 +54,11 @@
     {
       OSVERSIONINFO v;
 
+      /* According to
+         <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx>
+         this structure must be initialised as follows:  */
+      v.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
+
       if (GetVersionEx (&v))
         known = (v.dwPlatformId == VER_PLATFORM_WIN32_NT ? 1 : -1);
       else
--- a/lib/trigl.c
+++ b/lib/trigl.c
@@ -24,6 +24,9 @@
 #include <float.h>
 #include <math.h>
 
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_rem_pio2l.c
+   and           glibc/sysdeps/ieee754/dbl-64/k_rem_pio2.c.  */
+
 /* Table of constants for 2/pi, 5628 hexadecimal digits of 2/pi */
 static const int two_over_pi[] = {
   0xa2f983, 0x6e4e44, 0x1529fc, 0x2757d1, 0xf534dd, 0xc0db62,
@@ -456,7 +459,7 @@
 
   jz = jk;
 recompute:
-  /* distill q[] into iq[] reversingly */
+  /* distill q[] into iq[] in reverse order */
   for (i = 0, j = jz, z = q[jz]; j > 0; i++, j--)
     {
       fw = (double) ((int) (twon24 * z));
--- a/lib/trunc.c
+++ b/lib/trunc.c
@@ -54,6 +54,12 @@
 # define MINUS_ZERO L_(-0.0)
 #endif
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 /* 2^(MANT_DIG-1).  */
 static const DOUBLE TWO_MANT_DIG =
   /* Assume MANT_DIG <= 5 * 31.
--- a/lib/ttyname_r.c
+++ b/lib/ttyname_r.c
@@ -45,7 +45,7 @@
     return err;
   if (buflen < sizeof (largerbuf))
     {
-      size_t namelen = strlen (largerbuf);
+      size_t namelen = strlen (largerbuf) + 1;
       if (namelen > buflen)
         return ERANGE;
       memcpy (buf, largerbuf, namelen);
new file mode 100644
--- /dev/null
+++ b/lib/u64.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_U64_INLINE _GL_EXTERN_INLINE
+#include "u64.h"
--- a/lib/u64.h
+++ b/lib/u64.h
@@ -19,6 +19,11 @@
 
 #include <stdint.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_U64_INLINE
+# define _GL_U64_INLINE _GL_INLINE
+#endif
+
 /* Return X rotated left by N bits, where 0 < N < 64.  */
 #define u64rol(x, n) u64or (u64shl (x, n), u64shr (x, 64 - n))
 
@@ -30,6 +35,7 @@
 # define u64hilo(hi, lo) ((u64) (((u64) (hi) << 32) + (lo)))
 # define u64init(hi, lo) u64hilo (hi, lo)
 # define u64lo(x) ((u64) (x))
+# define u64size(x) u64lo (x)
 # define u64lt(x, y) ((x) < (y))
 # define u64and(x, y) ((x) & (y))
 # define u64or(x, y) ((x) | (y))
@@ -53,7 +59,7 @@
 
 /* Given the high and low-order 32-bit quantities HI and LO, return a u64
    value representing (HI << 32) + LO.  */
-static inline u64
+_GL_U64_INLINE u64
 u64hilo (uint32_t hi, uint32_t lo)
 {
   u64 r;
@@ -63,7 +69,7 @@
 }
 
 /* Return a u64 value representing LO.  */
-static inline u64
+_GL_U64_INLINE u64
 u64lo (uint32_t lo)
 {
   u64 r;
@@ -72,15 +78,25 @@
   return r;
 }
 
+/* Return a u64 value representing SIZE.  */
+_GL_U64_INLINE u64
+u64size (size_t size)
+{
+  u64 r;
+  r.hi = size >> 31 >> 1;
+  r.lo = size;
+  return r;
+}
+
 /* Return X < Y.  */
-static inline int
+_GL_U64_INLINE int
 u64lt (u64 x, u64 y)
 {
   return x.hi < y.hi || (x.hi == y.hi && x.lo < y.lo);
 }
 
 /* Return X & Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64and (u64 x, u64 y)
 {
   u64 r;
@@ -90,7 +106,7 @@
 }
 
 /* Return X | Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64or (u64 x, u64 y)
 {
   u64 r;
@@ -100,7 +116,7 @@
 }
 
 /* Return X ^ Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64xor (u64 x, u64 y)
 {
   u64 r;
@@ -110,7 +126,7 @@
 }
 
 /* Return X + Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64plus (u64 x, u64 y)
 {
   u64 r;
@@ -120,7 +136,7 @@
 }
 
 /* Return X << N.  */
-static inline u64
+_GL_U64_INLINE u64
 u64shl (u64 x, int n)
 {
   u64 r;
@@ -138,7 +154,7 @@
 }
 
 /* Return X >> N.  */
-static inline u64
+_GL_U64_INLINE u64
 u64shr (u64 x, int n)
 {
   u64 r;
@@ -156,3 +172,5 @@
 }
 
 #endif
+
+_GL_INLINE_HEADER_END
--- a/lib/unicase.in.h
+++ b/lib/unicase.in.h
@@ -42,15 +42,18 @@
 
 /* Return the uppercase mapping of a Unicode character.  */
 extern ucs4_t
-       uc_toupper (ucs4_t uc);
+       uc_toupper (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the lowercase mapping of a Unicode character.  */
 extern ucs4_t
-       uc_tolower (ucs4_t uc);
+       uc_tolower (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the titlecase mapping of a Unicode character.  */
 extern ucs4_t
-       uc_totitle (ucs4_t uc);
+       uc_totitle (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -63,7 +66,8 @@
 /* Return the ISO 639 language code of the current locale.
    Return "" if it is unknown, or in the "C" locale.  */
 extern const char *
-       uc_locale_language (void);
+       uc_locale_language (void)
+       _UC_ATTRIBUTE_PURE;
 
 /* Conventions:
 
--- a/lib/unicase/caseprop.h
+++ b/lib/unicase/caseprop.h
@@ -22,11 +22,13 @@
    <http://www.unicode.org/versions/Unicode5.0.0/ch03.pdf>, section 3.13,
    definition D120.  */
 extern bool
-       uc_is_cased (ucs4_t uc);
+       uc_is_cased (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Determine whether a character is "case-ignorable"
    according to the Unicode Standard,
    <http://www.unicode.org/versions/Unicode5.0.0/ch03.pdf>, section 3.13,
    definition D121.  */
 extern bool
-       uc_is_case_ignorable (ucs4_t uc);
+       uc_is_case_ignorable (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
--- a/lib/unicase/u16-totitle.c
+++ b/lib/unicase/u16-totitle.c
@@ -24,4 +24,3 @@
 #define UNIT uint16_t
 #define U_CT_TOTITLE u16_ct_totitle
 #include "u-totitle.h"
-
--- a/lib/unictype.in.h
+++ b/lib/unictype.in.h
@@ -205,29 +205,35 @@
 
 /* Return the name of a general category.  */
 extern const char *
-       uc_general_category_name (uc_general_category_t category);
+       uc_general_category_name (uc_general_category_t category)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the long name of a general category.  */
 extern const char *
-       uc_general_category_long_name (uc_general_category_t category);
+       uc_general_category_long_name (uc_general_category_t category)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the general category given by name, e.g. "Lu", or by long name,
    e.g. "Uppercase Letter".  */
 extern uc_general_category_t
-       uc_general_category_byname (const char *category_name);
+       uc_general_category_byname (const char *category_name)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the general category of a Unicode character.  */
 extern uc_general_category_t
-       uc_general_category (ucs4_t uc);
+       uc_general_category (ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 
 /* Test whether a Unicode character belongs to a given category.
    The CATEGORY argument can be the combination of several predefined
    general categories.  */
 extern bool
-       uc_is_general_category (ucs4_t uc, uc_general_category_t category);
+       uc_is_general_category (ucs4_t uc, uc_general_category_t category)
+       _UC_ATTRIBUTE_PURE;
 /* Likewise.  This function uses a big table comprising all categories.  */
 extern bool
-       uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask);
+       uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -262,20 +268,24 @@
 
 /* Return the canonical combining class of a Unicode character.  */
 extern int
-       uc_combining_class (ucs4_t uc);
+       uc_combining_class (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the name of a canonical combining class.  */
 extern const char *
-       uc_combining_class_name (int ccc);
+       uc_combining_class_name (int ccc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the long name of a canonical combining class.  */
 extern const char *
-       uc_combining_class_long_name (int ccc);
+       uc_combining_class_long_name (int ccc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the canonical combining class given by name, e.g. "BL", or by long
    name, e.g. "Below Left".  */
 extern int
-       uc_combining_class_byname (const char *ccc_name);
+       uc_combining_class_byname (const char *ccc_name)
+       _UC_ATTRIBUTE_PURE;
 
 /* ========================================================================= */
 
@@ -307,36 +317,45 @@
 
 /* Return the name of a bidi class.  */
 extern const char *
-       uc_bidi_class_name (int bidi_class);
+       uc_bidi_class_name (int bidi_class)
+       _UC_ATTRIBUTE_CONST;
 /* Same; obsolete function name.  */
 extern const char *
-       uc_bidi_category_name (int category);
+       uc_bidi_category_name (int category)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the long name of a bidi class.  */
 extern const char *
-       uc_bidi_class_long_name (int bidi_class);
+       uc_bidi_class_long_name (int bidi_class)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the bidi class given by name, e.g. "LRE", or by long name, e.g.
    "Left-to-Right Embedding".  */
 extern int
-       uc_bidi_class_byname (const char *bidi_class_name);
+       uc_bidi_class_byname (const char *bidi_class_name)
+       _UC_ATTRIBUTE_PURE;
 /* Same; obsolete function name.  */
 extern int
-       uc_bidi_category_byname (const char *category_name);
+       uc_bidi_category_byname (const char *category_name)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the bidi class of a Unicode character.  */
 extern int
-       uc_bidi_class (ucs4_t uc);
+       uc_bidi_class (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 /* Same; obsolete function name.  */
 extern int
-       uc_bidi_category (ucs4_t uc);
+       uc_bidi_category (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test whether a Unicode character belongs to a given bidi class.  */
 extern bool
-       uc_is_bidi_class (ucs4_t uc, int bidi_class);
+       uc_is_bidi_class (ucs4_t uc, int bidi_class)
+       _UC_ATTRIBUTE_CONST;
 /* Same; obsolete function name.  */
 extern bool
-       uc_is_bidi_category (ucs4_t uc, int category);
+       uc_is_bidi_category (ucs4_t uc, int category)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -349,7 +368,8 @@
 
 /* Return the decimal digit value of a Unicode character.  */
 extern int
-       uc_decimal_value (ucs4_t uc);
+       uc_decimal_value (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -357,7 +377,8 @@
 
 /* Return the digit value of a Unicode character.  */
 extern int
-       uc_digit_value (ucs4_t uc);
+       uc_digit_value (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -371,7 +392,8 @@
 }
 uc_fraction_t;
 extern uc_fraction_t
-       uc_numeric_value (ucs4_t uc);
+       uc_numeric_value (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -413,20 +435,24 @@
 
 /* Return the name of a joining type.  */
 extern const char *
-       uc_joining_type_name (int joining_type);
+       uc_joining_type_name (int joining_type)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the long name of a joining type.  */
 extern const char *
-       uc_joining_type_long_name (int joining_type);
+       uc_joining_type_long_name (int joining_type)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the joining type given by name, e.g. "D", or by long name, e.g.
    "Dual Joining".  */
 extern int
-       uc_joining_type_byname (const char *joining_type_name);
+       uc_joining_type_byname (const char *joining_type_name)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the joining type of a Unicode character.  */
 extern int
-       uc_joining_type (ucs4_t uc);
+       uc_joining_type (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -497,15 +523,18 @@
 
 /* Return the name of a joining group.  */
 extern const char *
-       uc_joining_group_name (int joining_group);
+       uc_joining_group_name (int joining_group)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the joining group given by name, e.g. "Teh_Marbuta".  */
 extern int
-       uc_joining_group_byname (const char *joining_group_name);
+       uc_joining_group_byname (const char *joining_group_name)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the joining group of a Unicode character.  */
 extern int
-       uc_joining_group (ucs4_t uc);
+       uc_joining_group (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -626,92 +655,178 @@
 /* Test whether a Unicode character has a given property.  */
 extern bool
        uc_is_property (ucs4_t uc, uc_property_t property);
-extern bool uc_is_property_white_space (ucs4_t uc);
-extern bool uc_is_property_alphabetic (ucs4_t uc);
-extern bool uc_is_property_other_alphabetic (ucs4_t uc);
-extern bool uc_is_property_not_a_character (ucs4_t uc);
-extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc);
-extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc);
-extern bool uc_is_property_deprecated (ucs4_t uc);
-extern bool uc_is_property_logical_order_exception (ucs4_t uc);
-extern bool uc_is_property_variation_selector (ucs4_t uc);
-extern bool uc_is_property_private_use (ucs4_t uc);
-extern bool uc_is_property_unassigned_code_value (ucs4_t uc);
-extern bool uc_is_property_uppercase (ucs4_t uc);
-extern bool uc_is_property_other_uppercase (ucs4_t uc);
-extern bool uc_is_property_lowercase (ucs4_t uc);
-extern bool uc_is_property_other_lowercase (ucs4_t uc);
-extern bool uc_is_property_titlecase (ucs4_t uc);
-extern bool uc_is_property_cased (ucs4_t uc);
-extern bool uc_is_property_case_ignorable (ucs4_t uc);
-extern bool uc_is_property_changes_when_lowercased (ucs4_t uc);
-extern bool uc_is_property_changes_when_uppercased (ucs4_t uc);
-extern bool uc_is_property_changes_when_titlecased (ucs4_t uc);
-extern bool uc_is_property_changes_when_casefolded (ucs4_t uc);
-extern bool uc_is_property_changes_when_casemapped (ucs4_t uc);
-extern bool uc_is_property_soft_dotted (ucs4_t uc);
-extern bool uc_is_property_id_start (ucs4_t uc);
-extern bool uc_is_property_other_id_start (ucs4_t uc);
-extern bool uc_is_property_id_continue (ucs4_t uc);
-extern bool uc_is_property_other_id_continue (ucs4_t uc);
-extern bool uc_is_property_xid_start (ucs4_t uc);
-extern bool uc_is_property_xid_continue (ucs4_t uc);
-extern bool uc_is_property_pattern_white_space (ucs4_t uc);
-extern bool uc_is_property_pattern_syntax (ucs4_t uc);
-extern bool uc_is_property_join_control (ucs4_t uc);
-extern bool uc_is_property_grapheme_base (ucs4_t uc);
-extern bool uc_is_property_grapheme_extend (ucs4_t uc);
-extern bool uc_is_property_other_grapheme_extend (ucs4_t uc);
-extern bool uc_is_property_grapheme_link (ucs4_t uc);
-extern bool uc_is_property_bidi_control (ucs4_t uc);
-extern bool uc_is_property_bidi_left_to_right (ucs4_t uc);
-extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc);
-extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc);
-extern bool uc_is_property_bidi_european_digit (ucs4_t uc);
-extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc);
-extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc);
-extern bool uc_is_property_bidi_common_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_block_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_segment_separator (ucs4_t uc);
-extern bool uc_is_property_bidi_whitespace (ucs4_t uc);
-extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc);
-extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc);
-extern bool uc_is_property_bidi_pdf (ucs4_t uc);
-extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc);
-extern bool uc_is_property_bidi_other_neutral (ucs4_t uc);
-extern bool uc_is_property_hex_digit (ucs4_t uc);
-extern bool uc_is_property_ascii_hex_digit (ucs4_t uc);
-extern bool uc_is_property_ideographic (ucs4_t uc);
-extern bool uc_is_property_unified_ideograph (ucs4_t uc);
-extern bool uc_is_property_radical (ucs4_t uc);
-extern bool uc_is_property_ids_binary_operator (ucs4_t uc);
-extern bool uc_is_property_ids_trinary_operator (ucs4_t uc);
-extern bool uc_is_property_zero_width (ucs4_t uc);
-extern bool uc_is_property_space (ucs4_t uc);
-extern bool uc_is_property_non_break (ucs4_t uc);
-extern bool uc_is_property_iso_control (ucs4_t uc);
-extern bool uc_is_property_format_control (ucs4_t uc);
-extern bool uc_is_property_dash (ucs4_t uc);
-extern bool uc_is_property_hyphen (ucs4_t uc);
-extern bool uc_is_property_punctuation (ucs4_t uc);
-extern bool uc_is_property_line_separator (ucs4_t uc);
-extern bool uc_is_property_paragraph_separator (ucs4_t uc);
-extern bool uc_is_property_quotation_mark (ucs4_t uc);
-extern bool uc_is_property_sentence_terminal (ucs4_t uc);
-extern bool uc_is_property_terminal_punctuation (ucs4_t uc);
-extern bool uc_is_property_currency_symbol (ucs4_t uc);
-extern bool uc_is_property_math (ucs4_t uc);
-extern bool uc_is_property_other_math (ucs4_t uc);
-extern bool uc_is_property_paired_punctuation (ucs4_t uc);
-extern bool uc_is_property_left_of_pair (ucs4_t uc);
-extern bool uc_is_property_combining (ucs4_t uc);
-extern bool uc_is_property_composite (ucs4_t uc);
-extern bool uc_is_property_decimal_digit (ucs4_t uc);
-extern bool uc_is_property_numeric (ucs4_t uc);
-extern bool uc_is_property_diacritic (ucs4_t uc);
-extern bool uc_is_property_extender (ucs4_t uc);
-extern bool uc_is_property_ignorable_control (ucs4_t uc);
+extern bool uc_is_property_white_space (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_alphabetic (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_alphabetic (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_not_a_character (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_deprecated (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_logical_order_exception (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_variation_selector (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_private_use (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_unassigned_code_value (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_uppercase (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_uppercase (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_lowercase (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_lowercase (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_titlecase (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_cased (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_case_ignorable (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_changes_when_lowercased (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_changes_when_uppercased (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_changes_when_titlecased (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_changes_when_casefolded (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_changes_when_casemapped (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_soft_dotted (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_id_start (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_id_start (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_id_continue (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_id_continue (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_xid_start (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_xid_continue (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_pattern_white_space (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_pattern_syntax (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_join_control (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_grapheme_base (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_grapheme_extend (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_grapheme_extend (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_grapheme_link (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_control (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_left_to_right (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_european_digit (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_common_separator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_block_separator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_segment_separator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_whitespace (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_pdf (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_bidi_other_neutral (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_hex_digit (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_ascii_hex_digit (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_ideographic (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_unified_ideograph (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_radical (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_ids_binary_operator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_ids_trinary_operator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_zero_width (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_space (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_non_break (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_iso_control (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_format_control (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_dash (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_hyphen (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_punctuation (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_line_separator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_paragraph_separator (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_quotation_mark (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_sentence_terminal (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_terminal_punctuation (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_currency_symbol (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_math (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_other_math (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_paired_punctuation (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_left_of_pair (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_combining (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_composite (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_decimal_digit (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_numeric (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_diacritic (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_extender (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_ignorable_control (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -734,15 +849,18 @@
 
 /* Return the script of a Unicode character.  */
 extern const uc_script_t *
-       uc_script (ucs4_t uc);
+       uc_script (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the script given by name, e.g. "HAN".  */
 extern const uc_script_t *
-       uc_script_byname (const char *script_name);
+       uc_script_byname (const char *script_name)
+       _UC_ATTRIBUTE_PURE;
 
 /* Test whether a Unicode character belongs to a given script.  */
 extern bool
-       uc_is_script (ucs4_t uc, const uc_script_t *script);
+       uc_is_script (ucs4_t uc, const uc_script_t *script)
+       _UC_ATTRIBUTE_PURE;
 
 /* Get the list of all scripts.  */
 extern void
@@ -762,11 +880,13 @@
 
 /* Return the block a character belongs to.  */
 extern const uc_block_t *
-       uc_block (ucs4_t uc);
+       uc_block (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test whether a Unicode character belongs to a given block.  */
 extern bool
-       uc_is_block (ucs4_t uc, const uc_block_t *block);
+       uc_is_block (ucs4_t uc, const uc_block_t *block)
+       _UC_ATTRIBUTE_PURE;
 
 /* Get the list of all blocks.  */
 extern void
@@ -778,11 +898,13 @@
 
 /* Test whether a Unicode character is considered whitespace in ISO C 99.  */
 extern bool
-       uc_is_c_whitespace (ucs4_t uc);
+       uc_is_c_whitespace (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test whether a Unicode character is considered whitespace in Java.  */
 extern bool
-       uc_is_java_whitespace (ucs4_t uc);
+       uc_is_java_whitespace (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 enum
 {
@@ -795,12 +917,14 @@
 /* Return the categorization of a Unicode character w.r.t. the ISO C 99
    identifier syntax.  */
 extern int
-       uc_c_ident_category (ucs4_t uc);
+       uc_c_ident_category (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Return the categorization of a Unicode character w.r.t. the Java
    identifier syntax.  */
 extern int
-       uc_java_ident_category (ucs4_t uc);
+       uc_java_ident_category (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -812,65 +936,77 @@
 
 /* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true.  */
 extern bool
-       uc_is_alnum (ucs4_t uc);
+       uc_is_alnum (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true,
    or any character that is one of a locale-specific set of characters for
    which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space'
    is true.  */
 extern bool
-       uc_is_alpha (ucs4_t uc);
+       uc_is_alpha (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any control character.  */
 extern bool
-       uc_is_cntrl (ucs4_t uc);
+       uc_is_cntrl (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any character that corresponds to a decimal-digit character.  */
 extern bool
-       uc_is_digit (ucs4_t uc);
+       uc_is_digit (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any character for which 'uc_is_print' is true and 'uc_is_space'
    is false.  */
 extern bool
-       uc_is_graph (ucs4_t uc);
+       uc_is_graph (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any character that corresponds to a lowercase letter or is one
    of a locale-specific set of characters for which none of 'uc_is_cntrl',
    'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true.  */
 extern bool
-       uc_is_lower (ucs4_t uc);
+       uc_is_lower (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any printing character.  */
 extern bool
-       uc_is_print (ucs4_t uc);
+       uc_is_print (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any printing character that is one of a locale-specific set of
    characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true.  */
 extern bool
-       uc_is_punct (ucs4_t uc);
+       uc_is_punct (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any character that corresponds to a locale-specific set of
    characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct'
    is true.  */
 extern bool
-       uc_is_space (ucs4_t uc);
+       uc_is_space (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any character that corresponds to an uppercase letter or is one
    of a locale-specific set of character for which none of 'uc_is_cntrl',
    'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true.  */
 extern bool
-       uc_is_upper (ucs4_t uc);
+       uc_is_upper (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* Test for any character that corresponds to a hexadecimal-digit
    character.  */
 extern bool
-       uc_is_xdigit (ucs4_t uc);
+       uc_is_xdigit (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* GNU extension. */
 /* Test for any character that corresponds to a standard blank character or
    a locale-specific set of characters for which 'uc_is_alnum' is false.  */
 extern bool
-       uc_is_blank (ucs4_t uc);
+       uc_is_blank (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
--- a/lib/unictype/3level.h
+++ b/lib/unictype/3level.h
@@ -17,9 +17,7 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Construction of sparse 3-level tables.
    See wchar-lookup.h or coll-lookup.h for their structure and the
--- a/lib/unictype/3levelbit.h
+++ b/lib/unictype/3levelbit.h
@@ -18,9 +18,7 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Construction of sparse 3-level tables.
    See wchar-lookup.h for their structure and the meaning of p and q.
--- a/lib/unictype/block_test.c
+++ b/lib/unictype/block_test.c
@@ -28,4 +28,3 @@
   else
     return false;
 }
-
--- a/lib/unigbrk.in.h
+++ b/lib/unigbrk.in.h
@@ -56,7 +56,8 @@
 
 /* Return the Grapheme_Cluster_Break property of a Unicode character. */
 extern int
-       uc_graphemeclusterbreak_property (ucs4_t uc);
+       uc_graphemeclusterbreak_property (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
@@ -76,25 +77,32 @@
    Use A == 0 or B == 0 to indicate start of text or end of text,
    respectively. */
 extern bool
-       uc_is_grapheme_break (ucs4_t a, ucs4_t b);
+       uc_is_grapheme_break (ucs4_t a, ucs4_t b)
+       _UC_ATTRIBUTE_CONST;
 
 /* Returns the start of the next grapheme cluster following S, or NULL if the
    end of the string has been reached. */
 extern const uint8_t *
-       u8_grapheme_next (const uint8_t *s, const uint8_t *end);
+       u8_grapheme_next (const uint8_t *s, const uint8_t *end)
+       _UC_ATTRIBUTE_PURE;
 extern const uint16_t *
-       u16_grapheme_next (const uint16_t *s, const uint16_t *end);
+       u16_grapheme_next (const uint16_t *s, const uint16_t *end)
+       _UC_ATTRIBUTE_PURE;
 extern const uint32_t *
-       u32_grapheme_next (const uint32_t *s, const uint32_t *end);
+       u32_grapheme_next (const uint32_t *s, const uint32_t *end)
+       _UC_ATTRIBUTE_PURE;
 
 /* Returns the start of the previous grapheme cluster before S, or NULL if the
    start of the string has been reached. */
 extern const uint8_t *
-       u8_grapheme_prev (const uint8_t *s, const uint8_t *start);
+       u8_grapheme_prev (const uint8_t *s, const uint8_t *start)
+       _UC_ATTRIBUTE_PURE;
 extern const uint16_t *
-       u16_grapheme_prev (const uint16_t *s, const uint16_t *start);
+       u16_grapheme_prev (const uint16_t *s, const uint16_t *start)
+       _UC_ATTRIBUTE_PURE;
 extern const uint32_t *
-       u32_grapheme_prev (const uint32_t *s, const uint32_t *start);
+       u32_grapheme_prev (const uint32_t *s, const uint32_t *start)
+       _UC_ATTRIBUTE_PURE;
 
 /* Determine the grapheme cluster boundaries in S, and store the result at
    p[0..n-1].  p[i] = 1 means that a new grapheme cluster begins at s[i].  p[i]
--- a/lib/uniname.in.h
+++ b/lib/uniname.in.h
@@ -35,7 +35,8 @@
 /* Looks up the Unicode character with a given name, in upper- or lowercase
    ASCII.  Returns the character if found, or UNINAME_INVALID if not found.  */
 extern ucs4_t
-       unicode_name_character (const char *name);
+       unicode_name_character (const char *name)
+       _UC_ATTRIBUTE_PURE;
 #define UNINAME_INVALID ((ucs4_t) 0xFFFF)
 
 #ifdef __cplusplus
--- a/lib/uninorm.in.h
+++ b/lib/uninorm.in.h
@@ -99,7 +99,8 @@
    Not all decompositions can be recombined using this function.  See the
    Unicode file CompositionExclusions.txt for details.  */
 extern ucs4_t
-       uc_composition (ucs4_t uc1, ucs4_t uc2);
+       uc_composition (ucs4_t uc1, ucs4_t uc2)
+       _UC_ATTRIBUTE_CONST;
 
 
 /* An object of type uninorm_t denotes a Unicode normalization form.  */
@@ -134,7 +135,9 @@
 
 /* Return the decomposing variant of a normalization form.
    This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD.  */
-extern uninorm_t uninorm_decomposing_form (uninorm_t nf);
+extern uninorm_t
+       uninorm_decomposing_form (uninorm_t nf)
+       _UC_ATTRIBUTE_PURE;
 
 
 /* Return the specified normalization form of a string.  */
--- a/lib/uninorm/canonical-decomposition.c
+++ b/lib/uninorm/canonical-decomposition.c
@@ -105,4 +105,3 @@
     }
   return -1;
 }
-
--- a/lib/uninorm/u-normalize-internal.h
+++ b/lib/uninorm/u-normalize-internal.h
@@ -310,6 +310,11 @@
                   abort ();
                 new_sortbuf =
                   (struct ucs4_with_ccc *) malloc (2 * sortbuf_allocated * sizeof (struct ucs4_with_ccc));
+                if (new_sortbuf == NULL)
+                  {
+                    errno = ENOMEM;
+                    goto fail;
+                  }
                 memcpy (new_sortbuf, sortbuf,
                         sortbuf_count * sizeof (struct ucs4_with_ccc));
                 if (sortbuf != sortbuf_preallocated)
--- a/lib/uninorm/uninorm-filter.c
+++ b/lib/uninorm/uninorm-filter.c
@@ -241,6 +241,12 @@
             new_sortbuf =
               (struct ucs4_with_ccc *)
               malloc (2 * filter->sortbuf_allocated * sizeof (struct ucs4_with_ccc));
+            if (new_sortbuf == NULL)
+              {
+                /* errno is ENOMEM. */
+                filter->sortbuf_count = sortbuf_count;
+                return -1;
+              }
             memcpy (new_sortbuf, filter->sortbuf,
                     sortbuf_count * sizeof (struct ucs4_with_ccc));
             if (filter->sortbuf != filter->sortbuf_preallocated)
new file mode 100644
--- /dev/null
+++ b/lib/unistd.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
+#include "unistd.h"
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -84,12 +83,19 @@
 #endif
 
 /* Native Windows platforms declare chdir, getcwd, rmdir in
-   <io.h> and/or <direct.h>, not in <unistd.h>.  */
+   <io.h> and/or <direct.h>, not in <unistd.h>.
+   They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
+   lseek(), read(), unlink(), write() in <io.h>.  */
 #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
       || defined GNULIB_POSIXCHECK) \
      && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
 # include <io.h>     /* mingw32, mingw64 */
 # include <direct.h> /* mingw64, MSVC 9 */
+#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \
+       || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \
+       || defined GNULIB_POSIXCHECK) \
+      && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
 #endif
 
 /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
@@ -101,8 +107,9 @@
 # include <netdb.h>
 #endif
 
-/* MSVC defines off_t in <sys/types.h>.  */
-#if !@HAVE_UNISTD_H@
+/* MSVC defines off_t in <sys/types.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
+#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
 /* Get off_t.  */
 # include <sys/types.h>
 #endif
@@ -120,6 +127,11 @@
 # include <getopt.h>
 #endif
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UNISTD_INLINE
+# define _GL_UNISTD_INLINE _GL_INLINE
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -397,7 +409,7 @@
 # endif
 #elif defined GNULIB_POSIXCHECK
 # if HAVE_RAW_DECL_ENVIRON
-static inline char ***
+_GL_UNISTD_INLINE char ***
 rpl_environ (void)
 {
   return &environ;
@@ -556,10 +568,19 @@
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
    <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>.  */
-# if !@HAVE_FTRUNCATE@
+# if @REPLACE_FTRUNCATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ftruncate
+#   define ftruncate rpl_ftruncate
+#  endif
+_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
+_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
+# else
+#  if !@HAVE_FTRUNCATE@
 _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
+#  endif
+_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
 # endif
-_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
 _GL_CXXALIASWARN (ftruncate);
 #elif defined GNULIB_POSIXCHECK
 # undef ftruncate
@@ -846,7 +867,7 @@
 #     define getpagesize() _gl_getpagesize ()
 #    else
 #     if !GNULIB_defined_getpagesize_function
-static inline int
+_GL_UNISTD_INLINE int
 getpagesize ()
 {
   return _gl_getpagesize ();
@@ -1302,7 +1323,7 @@
 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
                                     _GL_ARG_NONNULL ((1)));
 # endif
-/* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5
+/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
    and FreeBSD 6.4 the second parameter is int.  On Solaris 11
    2011-10, the first parameter is not const.  */
 _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
@@ -1514,6 +1535,7 @@
 _GL_CXXALIASWARN (write);
 #endif
 
+_GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_UNISTD_H */
 #endif /* _@GUARD_PREFIX@_UNISTD_H */
--- a/lib/unistr.in.h
+++ b/lib/unistr.in.h
@@ -66,17 +66,20 @@
 /* Check whether an UTF-8 string is well-formed.
    Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
 extern const uint8_t *
-       u8_check (const uint8_t *s, size_t n);
+       u8_check (const uint8_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 
 /* Check whether an UTF-16 string is well-formed.
    Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
 extern const uint16_t *
-       u16_check (const uint16_t *s, size_t n);
+       u16_check (const uint16_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 
 /* Check whether an UCS-4 string is well-formed.
    Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
 extern const uint32_t *
-       u32_check (const uint32_t *s, size_t n);
+       u32_check (const uint32_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 
 
 /* Elementary string conversions.  */
@@ -119,11 +122,14 @@
    failure.  */
 /* Similar to mblen(), except that s must not be NULL.  */
 extern int
-       u8_mblen (const uint8_t *s, size_t n);
+       u8_mblen (const uint8_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u16_mblen (const uint16_t *s, size_t n);
+       u16_mblen (const uint16_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_mblen (const uint32_t *s, size_t n);
+       u32_mblen (const uint32_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the length (number of units) of the first character in S, putting
    its 'ucs4_t' representation in *PUC.  Upon failure, *PUC is set to 0xfffd,
@@ -400,38 +406,50 @@
 /* Compare S1 and S2, each of length N.  */
 /* Similar to memcmp().  */
 extern int
-       u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n);
+       u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n);
+       u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n);
+       u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n)
+       _UC_ATTRIBUTE_PURE;
 
 /* Compare S1 and S2.  */
 /* Similar to the gnulib function memcmp2().  */
 extern int
-       u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2);
+       u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2);
+       u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2);
+       u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2)
+       _UC_ATTRIBUTE_PURE;
 
 /* Search the string at S for UC.  */
 /* Similar to memchr().  */
 extern uint8_t *
-       u8_chr (const uint8_t *s, size_t n, ucs4_t uc);
+       u8_chr (const uint8_t *s, size_t n, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 extern uint16_t *
-       u16_chr (const uint16_t *s, size_t n, ucs4_t uc);
+       u16_chr (const uint16_t *s, size_t n, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 extern uint32_t *
-       u32_chr (const uint32_t *s, size_t n, ucs4_t uc);
+       u32_chr (const uint32_t *s, size_t n, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 
 /* Count the number of Unicode characters in the N units from S.  */
 /* Similar to mbsnlen().  */
 extern size_t
-       u8_mbsnlen (const uint8_t *s, size_t n);
+       u8_mbsnlen (const uint8_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u16_mbsnlen (const uint16_t *s, size_t n);
+       u16_mbsnlen (const uint16_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u32_mbsnlen (const uint32_t *s, size_t n);
+       u32_mbsnlen (const uint32_t *s, size_t n)
+       _UC_ATTRIBUTE_PURE;
 
 /* Elementary string functions with memory allocation.  */
 
@@ -448,11 +466,14 @@
 /* Return the length (number of units) of the first character in S.
    Return 0 if it is the NUL character.  Return -1 upon failure.  */
 extern int
-       u8_strmblen (const uint8_t *s);
+       u8_strmblen (const uint8_t *s)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u16_strmblen (const uint16_t *s);
+       u16_strmblen (const uint16_t *s)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_strmblen (const uint32_t *s);
+       u32_strmblen (const uint32_t *s)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the length (number of units) of the first character in S, putting
    its 'ucs4_t' representation in *PUC.  Return 0 if it is the NUL
@@ -487,20 +508,26 @@
 /* Return the number of units in S.  */
 /* Similar to strlen(), wcslen().  */
 extern size_t
-       u8_strlen (const uint8_t *s);
+       u8_strlen (const uint8_t *s)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u16_strlen (const uint16_t *s);
+       u16_strlen (const uint16_t *s)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u32_strlen (const uint32_t *s);
+       u32_strlen (const uint32_t *s)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the number of units in S, but at most MAXLEN.  */
 /* Similar to strnlen(), wcsnlen().  */
 extern size_t
-       u8_strnlen (const uint8_t *s, size_t maxlen);
+       u8_strnlen (const uint8_t *s, size_t maxlen)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u16_strnlen (const uint16_t *s, size_t maxlen);
+       u16_strnlen (const uint16_t *s, size_t maxlen)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u32_strnlen (const uint32_t *s, size_t maxlen);
+       u32_strnlen (const uint32_t *s, size_t maxlen)
+       _UC_ATTRIBUTE_PURE;
 
 /* Copy SRC to DEST.  */
 /* Similar to strcpy(), wcscpy().  */
@@ -562,16 +589,20 @@
 #ifdef __sun
 /* Avoid a collision with the u8_strcmp() function in Solaris 11 libc.  */
 extern int
-       u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2);
+       u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2)
+       _UC_ATTRIBUTE_PURE;
 # define u8_strcmp u8_strcmp_gnu
 #else
 extern int
-       u8_strcmp (const uint8_t *s1, const uint8_t *s2);
+       u8_strcmp (const uint8_t *s1, const uint8_t *s2)
+       _UC_ATTRIBUTE_PURE;
 #endif
 extern int
-       u16_strcmp (const uint16_t *s1, const uint16_t *s2);
+       u16_strcmp (const uint16_t *s1, const uint16_t *s2)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_strcmp (const uint32_t *s1, const uint32_t *s2);
+       u32_strcmp (const uint32_t *s1, const uint32_t *s2)
+       _UC_ATTRIBUTE_PURE;
 
 /* Compare S1 and S2 using the collation rules of the current locale.
    Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2.
@@ -587,11 +618,14 @@
 /* Compare no more than N units of S1 and S2.  */
 /* Similar to strncmp(), wcsncmp().  */
 extern int
-       u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n);
+       u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n);
+       u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n);
+       u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n)
+       _UC_ATTRIBUTE_PURE;
 
 /* Duplicate S, returning an identical malloc'd string.  */
 /* Similar to strdup(), wcsdup().  */
@@ -605,74 +639,98 @@
 /* Find the first occurrence of UC in STR.  */
 /* Similar to strchr(), wcschr().  */
 extern uint8_t *
-       u8_strchr (const uint8_t *str, ucs4_t uc);
+       u8_strchr (const uint8_t *str, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 extern uint16_t *
-       u16_strchr (const uint16_t *str, ucs4_t uc);
+       u16_strchr (const uint16_t *str, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 extern uint32_t *
-       u32_strchr (const uint32_t *str, ucs4_t uc);
+       u32_strchr (const uint32_t *str, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 
 /* Find the last occurrence of UC in STR.  */
 /* Similar to strrchr(), wcsrchr().  */
 extern uint8_t *
-       u8_strrchr (const uint8_t *str, ucs4_t uc);
+       u8_strrchr (const uint8_t *str, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 extern uint16_t *
-       u16_strrchr (const uint16_t *str, ucs4_t uc);
+       u16_strrchr (const uint16_t *str, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 extern uint32_t *
-       u32_strrchr (const uint32_t *str, ucs4_t uc);
+       u32_strrchr (const uint32_t *str, ucs4_t uc)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the length of the initial segment of STR which consists entirely
    of Unicode characters not in REJECT.  */
 /* Similar to strcspn(), wcscspn().  */
 extern size_t
-       u8_strcspn (const uint8_t *str, const uint8_t *reject);
+       u8_strcspn (const uint8_t *str, const uint8_t *reject)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u16_strcspn (const uint16_t *str, const uint16_t *reject);
+       u16_strcspn (const uint16_t *str, const uint16_t *reject)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u32_strcspn (const uint32_t *str, const uint32_t *reject);
+       u32_strcspn (const uint32_t *str, const uint32_t *reject)
+       _UC_ATTRIBUTE_PURE;
 
 /* Return the length of the initial segment of STR which consists entirely
    of Unicode characters in ACCEPT.  */
 /* Similar to strspn(), wcsspn().  */
 extern size_t
-       u8_strspn (const uint8_t *str, const uint8_t *accept);
+       u8_strspn (const uint8_t *str, const uint8_t *accept)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u16_strspn (const uint16_t *str, const uint16_t *accept);
+       u16_strspn (const uint16_t *str, const uint16_t *accept)
+       _UC_ATTRIBUTE_PURE;
 extern size_t
-       u32_strspn (const uint32_t *str, const uint32_t *accept);
+       u32_strspn (const uint32_t *str, const uint32_t *accept)
+       _UC_ATTRIBUTE_PURE;
 
 /* Find the first occurrence in STR of any character in ACCEPT.  */
 /* Similar to strpbrk(), wcspbrk().  */
 extern uint8_t *
-       u8_strpbrk (const uint8_t *str, const uint8_t *accept);
+       u8_strpbrk (const uint8_t *str, const uint8_t *accept)
+       _UC_ATTRIBUTE_PURE;
 extern uint16_t *
-       u16_strpbrk (const uint16_t *str, const uint16_t *accept);
+       u16_strpbrk (const uint16_t *str, const uint16_t *accept)
+       _UC_ATTRIBUTE_PURE;
 extern uint32_t *
-       u32_strpbrk (const uint32_t *str, const uint32_t *accept);
+       u32_strpbrk (const uint32_t *str, const uint32_t *accept)
+       _UC_ATTRIBUTE_PURE;
 
 /* Find the first occurrence of NEEDLE in HAYSTACK.  */
 /* Similar to strstr(), wcsstr().  */
 extern uint8_t *
-       u8_strstr (const uint8_t *haystack, const uint8_t *needle);
+       u8_strstr (const uint8_t *haystack, const uint8_t *needle)
+       _UC_ATTRIBUTE_PURE;
 extern uint16_t *
-       u16_strstr (const uint16_t *haystack, const uint16_t *needle);
+       u16_strstr (const uint16_t *haystack, const uint16_t *needle)
+       _UC_ATTRIBUTE_PURE;
 extern uint32_t *
-       u32_strstr (const uint32_t *haystack, const uint32_t *needle);
+       u32_strstr (const uint32_t *haystack, const uint32_t *needle)
+       _UC_ATTRIBUTE_PURE;
 
 /* Test whether STR starts with PREFIX.  */
 extern bool
-       u8_startswith (const uint8_t *str, const uint8_t *prefix);
+       u8_startswith (const uint8_t *str, const uint8_t *prefix)
+       _UC_ATTRIBUTE_PURE;
 extern bool
-       u16_startswith (const uint16_t *str, const uint16_t *prefix);
+       u16_startswith (const uint16_t *str, const uint16_t *prefix)
+       _UC_ATTRIBUTE_PURE;
 extern bool
-       u32_startswith (const uint32_t *str, const uint32_t *prefix);
+       u32_startswith (const uint32_t *str, const uint32_t *prefix)
+       _UC_ATTRIBUTE_PURE;
 
 /* Test whether STR ends with SUFFIX.  */
 extern bool
-       u8_endswith (const uint8_t *str, const uint8_t *suffix);
+       u8_endswith (const uint8_t *str, const uint8_t *suffix)
+       _UC_ATTRIBUTE_PURE;
 extern bool
-       u16_endswith (const uint16_t *str, const uint16_t *suffix);
+       u16_endswith (const uint16_t *str, const uint16_t *suffix)
+       _UC_ATTRIBUTE_PURE;
 extern bool
-       u32_endswith (const uint32_t *str, const uint32_t *suffix);
+       u32_endswith (const uint32_t *str, const uint32_t *suffix)
+       _UC_ATTRIBUTE_PURE;
 
 /* Divide STR into tokens separated by characters in DELIM.
    This interface is actually more similar to wcstok than to strtok.  */
--- a/lib/unitypes.in.h
+++ b/lib/unitypes.in.h
@@ -1,4 +1,4 @@
-/* Elementary types for the GNU UniString library.
+/* Elementary types and macros for the GNU UniString library.
    Copyright (C) 2002, 2005-2006, 2009-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
@@ -23,4 +23,24 @@
 /* Type representing a Unicode character.  */
 typedef uint32_t ucs4_t;
 
+/* Attribute of a function whose result depends only on the arguments
+   (not pointers!) and which has no side effects.  */
+#ifndef _UC_ATTRIBUTE_CONST
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+#  define _UC_ATTRIBUTE_CONST __attribute__ ((__const__))
+# else
+#  define _UC_ATTRIBUTE_CONST
+# endif
+#endif
+
+/* Attribute of a function whose result depends only on the arguments
+   (possibly pointers) and global memory, and which has no side effects.  */
+#ifndef _UC_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _UC_ATTRIBUTE_PURE
+# endif
+#endif
+
 #endif /* _UNITYPES_H */
--- a/lib/uniwbrk.in.h
+++ b/lib/uniwbrk.in.h
@@ -54,7 +54,8 @@
 
 /* Return the Word_Break property of a Unicode character.  */
 extern int
-       uc_wordbreak_property (ucs4_t uc);
+       uc_wordbreak_property (ucs4_t uc)
+       _UC_ATTRIBUTE_CONST;
 
 /* ========================================================================= */
 
--- a/lib/uniwidth.in.h
+++ b/lib/uniwidth.in.h
@@ -39,27 +39,30 @@
 /* Determine number of column positions required for UC.  */
 extern int
        uc_width (ucs4_t uc, const char *encoding)
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-       __attribute__ ((__pure__))
-#endif
-       ;
+       _UC_ATTRIBUTE_PURE;
 
 /* Determine number of column positions required for first N units
    (or fewer if S ends before this) in S.  */
 extern int
-       u8_width (const uint8_t *s, size_t n, const char *encoding);
+       u8_width (const uint8_t *s, size_t n, const char *encoding)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u16_width (const uint16_t *s, size_t n, const char *encoding);
+       u16_width (const uint16_t *s, size_t n, const char *encoding)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_width (const uint32_t *s, size_t n, const char *encoding);
+       u32_width (const uint32_t *s, size_t n, const char *encoding)
+       _UC_ATTRIBUTE_PURE;
 
 /* Determine number of column positions required for S.  */
 extern int
-       u8_strwidth (const uint8_t *s, const char *encoding);
+       u8_strwidth (const uint8_t *s, const char *encoding)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u16_strwidth (const uint16_t *s, const char *encoding);
+       u16_strwidth (const uint16_t *s, const char *encoding)
+       _UC_ATTRIBUTE_PURE;
 extern int
-       u32_strwidth (const uint32_t *s, const char *encoding);
+       u32_strwidth (const uint32_t *s, const char *encoding)
+       _UC_ATTRIBUTE_PURE;
 
 
 #ifdef __cplusplus
--- a/lib/uniwidth/cjk.h
+++ b/lib/uniwidth/cjk.h
@@ -22,16 +22,16 @@
 {
   if (0
       /* Legacy Japanese encodings */
-      || STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)
+      || STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)
       /* Legacy Chinese encodings */
-      || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
-      || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0)
-      || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)
-      || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)
+      || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+      || STREQ_OPT (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0)
+      || STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)
+      || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)
       /* Legacy Korean encodings */
-      || STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
-      || STREQ (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0)
-      || STREQ (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0))
+      || STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+      || STREQ_OPT (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0)
+      || STREQ_OPT (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0))
     return 1;
   return 0;
 }
--- a/lib/unlinkdir.c
+++ b/lib/unlinkdir.c
@@ -21,6 +21,7 @@
 
 #include "unlinkdir.h"
 #include "priv-set.h"
+#include "root-uid.h"
 #include <unistd.h>
 
 #if ! UNLINK_CANNOT_UNLINK_DIR
@@ -43,7 +44,7 @@
       cannot = (priv_set_ismember (PRIV_SYS_LINKDIR) == 0);
 # else
       /* In traditional Unix, only root can unlink directories.  */
-      cannot = (geteuid () != 0);
+      cannot = (geteuid () != ROOT_UID);
 # endif
       initialized = true;
     }
--- a/lib/unlockpt.c
+++ b/lib/unlockpt.c
@@ -28,7 +28,7 @@
   /* Platforms which have the TIOCSPTLCK ioctl (Linux) already have the
      unlockpt function.  */
 #if HAVE_REVOKE
-  /* MacOS X 10.3, OpenBSD 3.8 do not have the unlockpt function, but they
+  /* Mac OS X 10.3, OpenBSD 3.8 do not have the unlockpt function, but they
      have revoke().  */
   char *name = ptsname (fd);
   if (name == NULL)
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -21,6 +21,7 @@
 
 #include <config.h>
 
+#define _GL_UTIMENS_INLINE _GL_EXTERN_INLINE
 #include "utimens.h"
 
 #include <assert.h>
--- a/lib/utimens.h
+++ b/lib/utimens.h
@@ -1,3 +1,22 @@
+/* Set file access and modification times.
+
+   Copyright 2012 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 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.  */
+
 #include <time.h>
 int fdutimens (int, char const *, struct timespec const [2]);
 int utimens (char const *, struct timespec const [2]);
@@ -7,13 +26,21 @@
 # include <fcntl.h>
 # include <sys/stat.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UTIMENS_INLINE
+# define _GL_UTIMENS_INLINE _GL_INLINE
+#endif
+
 int fdutimensat (int fd, int dir, char const *name, struct timespec const [2],
                  int atflag);
 
 /* Using this function makes application code slightly more readable.  */
-static inline int
+_GL_UTIMENS_INLINE int
 lutimensat (int dir, char const *file, struct timespec const times[2])
 {
   return utimensat (dir, file, times, AT_SYMLINK_NOFOLLOW);
 }
+
+_GL_INLINE_HEADER_END
+
 #endif
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* This file can be parametrized with the following macros:
      VASNPRINTF         The name of the function being defined.
@@ -276,7 +275,7 @@
 {
   const char *point;
   /* Determine it in a multithread-safe way.  We know nl_langinfo is
-     multithread-safe on glibc systems and MacOS X systems, but is not required
+     multithread-safe on glibc systems and Mac OS X systems, but is not required
      to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
      localeconv() is rarely multithread-safe.  */
 #  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
@@ -1531,7 +1530,7 @@
 
 /* Returns the number of TCHAR_T units needed as temporary space for the result
    of sprintf or SNPRINTF of a single conversion directive.  */
-static inline size_t
+static size_t
 MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
                  arg_type type, int flags, size_t width, int has_precision,
                  size_t precision, int pad_ourselves)
@@ -2814,7 +2813,7 @@
                   if (has_width)
                     {
 #  if ENABLE_UNISTDIO
-                      /* Outside POSIX, it's preferrable to compare the width
+                      /* Outside POSIX, it's preferable to compare the width
                          against the number of _characters_ of the converted
                          value.  */
                       w = DCHAR_MBSNLEN (result + length, characters);
@@ -5417,7 +5416,7 @@
                       {
                         size_t w;
 # if ENABLE_UNISTDIO
-                        /* Outside POSIX, it's preferrable to compare the width
+                        /* Outside POSIX, it's preferable to compare the width
                            against the number of _characters_ of the converted
                            value.  */
                         w = DCHAR_MBSNLEN (result + length, count);
--- a/lib/vasnprintf.h
+++ b/lib/vasnprintf.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _VASNPRINTF_H
 #define _VASNPRINTF_H
--- a/lib/vasprintf.c
+++ b/lib/vasprintf.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -125,7 +125,7 @@
        extern int (*dummy (void)) [sizeof (struct {...})];
 
    * GCC warns about duplicate declarations of the dummy function if
-     -Wredundant_decls is used.  GCC 4.3 and later have a builtin
+     -Wredundant-decls is used.  GCC 4.3 and later have a builtin
      __COUNTER__ macro that can let us generate unique identifiers for
      each dummy function, to suppress this warning.
 
@@ -133,6 +133,10 @@
      which do not support _Static_assert, also do not warn about the
      last declaration mentioned above.
 
+   * GCC warns if -Wnested-externs is enabled and verify() is used
+     within a function body; but inside a function, you can always
+     arrange to use verify_expr() instead.
+
    * In C++, any struct definition inside sizeof is invalid.
      Use a template type to work around the problem.  */
 
--- a/lib/version-etc.h
+++ b/lib/version-etc.h
@@ -37,7 +37,7 @@
    standard way: command and package names, package version, followed
    by a short GPLv3+ notice and a list of up to 10 author names.
 
-   If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
+   If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
    the program.  The formats are therefore:
 
    PACKAGE VERSION
--- a/lib/vma-iter.c
+++ b/lib/vma-iter.c
@@ -32,7 +32,7 @@
 # include <sys/procfs.h> /* PIOC*, prmap_t */
 #endif
 
-#if defined __APPLE__ && defined __MACH__ /* MacOS X */
+#if defined __APPLE__ && defined __MACH__ /* Mac OS X */
 # include <mach/mach.h>
 #endif
 
@@ -359,7 +359,7 @@
   close (fd);
   return;
 
-#elif defined __APPLE__ && defined __MACH__ /* MacOS X */
+#elif defined __APPLE__ && defined __MACH__ /* Mac OS X */
 
   task_t task = mach_task_self ();
   vm_address_t address;
@@ -370,10 +370,10 @@
       int more;
       mach_port_t object_name;
       unsigned int flags;
-      /* In MacOS X 10.5, the types vm_address_t, vm_offset_t, vm_size_t have
+      /* In Mac OS X 10.5, the types vm_address_t, vm_offset_t, vm_size_t have
          32 bits in 32-bit processes and 64 bits in 64-bit processes. Whereas
          mach_vm_address_t and mach_vm_size_t are always 64 bits large.
-         MacOS X 10.5 has three vm_region like methods:
+         Mac OS X 10.5 has three vm_region like methods:
            - vm_region. It has arguments that depend on whether the current
              process is 32-bit or 64-bit. When linking dynamically, this
              function exists only in 32-bit processes. Therefore we use it only
--- a/lib/vsnprintf.c
+++ b/lib/vsnprintf.c
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
--- a/lib/w32sock.h
+++ b/lib/w32sock.h
@@ -1,4 +1,4 @@
-/* w32sock.h --- internal auxilliary functions for Windows socket functions
+/* w32sock.h --- internal auxiliary functions for Windows socket functions
 
    Copyright (C) 2008-2012 Free Software Foundation, Inc.
 
@@ -29,7 +29,7 @@
 #include "msvc-nothrow.h"
 
 #define FD_TO_SOCKET(fd)   ((SOCKET) _get_osfhandle ((fd)))
-#define SOCKET_TO_FD(fh)   (_open_osfhandle ((long) (fh), O_RDWR | O_BINARY))
+#define SOCKET_TO_FD(fh)   (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY))
 
 static inline void
 set_winsock_errno (void)
--- a/lib/w32spawn.h
+++ b/lib/w32spawn.h
@@ -115,8 +115,15 @@
        \" -> "
        \\\" -> \"
        \\\\\" -> \\"
+   - '*', '?' characters may get expanded through wildcard expansion in the
+     callee: By default, in the callee, the initialization code before main()
+     takes the result of GetCommandLine(), wildcard-expands it, and passes it
+     to main(). The exceptions to this rule are:
+       - programs that inspect GetCommandLine() and ignore argv,
+       - mingw programs that have a global variable 'int _CRT_glob = 0;',
+       - Cygwin programs, when invoked from a Cygwin program.
  */
-#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037*?"
 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
 static char **
 prepare_spawn (char **argv)
--- a/lib/wait-process.c
+++ b/lib/wait-process.c
@@ -171,7 +171,7 @@
 }
 
 /* Unregister a child from the list of slave subprocesses.  */
-static inline void
+static void
 unregister_slave_subprocess (pid_t child)
 {
   /* The easiest way to remove an entry from a list that can be used by
--- a/lib/waitpid.c
+++ b/lib/waitpid.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
@@ -84,6 +83,14 @@
 #ifndef _@GUARD_PREFIX@_WCHAR_H
 #define _@GUARD_PREFIX@_WCHAR_H
 
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The attribute __pure__ was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -136,11 +143,11 @@
 #   undef btowc
 #   define btowc rpl_btowc
 #  endif
-_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
+_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
 _GL_CXXALIAS_RPL (btowc, wint_t, (int c));
 # else
 #  if !@HAVE_BTOWC@
-_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
+_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (btowc, wint_t, (int c));
 # endif
@@ -161,12 +168,12 @@
 #   undef wctob
 #   define wctob rpl_wctob
 #  endif
-_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
+_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
 _GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
 # else
 #  if !defined wctob && !@HAVE_DECL_WCTOB@
 /* wctob is provided by gnulib, or wctob exists but is not declared.  */
-_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
+_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
 # endif
@@ -427,12 +434,12 @@
 #   undef wcwidth
 #   define wcwidth rpl_wcwidth
 #  endif
-_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
+_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
 _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
 # else
 #  if !@HAVE_DECL_WCWIDTH@
 /* wcwidth exists but is not declared.  */
-_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
+_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
 # endif
@@ -449,7 +456,8 @@
 /* Search N wide characters of S for C.  */
 #if @GNULIB_WMEMCHR@
 # if !@HAVE_WMEMCHR@
-_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n));
+_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)
+                                      _GL_ATTRIBUTE_PURE);
 # endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C++" {
@@ -480,7 +488,8 @@
 #if @GNULIB_WMEMCMP@
 # if !@HAVE_WMEMCMP@
 _GL_FUNCDECL_SYS (wmemcmp, int,
-                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wmemcmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n));
@@ -550,7 +559,7 @@
 /* Return the number of wide characters in S.  */
 #if @GNULIB_WCSLEN@
 # if !@HAVE_WCSLEN@
-_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s));
+_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
 _GL_CXXALIASWARN (wcslen);
@@ -566,7 +575,8 @@
 /* Return the number of wide characters in S, but at most MAXLEN.  */
 #if @GNULIB_WCSNLEN@
 # if !@HAVE_WCSNLEN@
-_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
+_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
+                                   _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
 _GL_CXXALIASWARN (wcsnlen);
@@ -685,7 +695,8 @@
 /* Compare S1 and S2.  */
 #if @GNULIB_WCSCMP@
 # if !@HAVE_WCSCMP@
-_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
+                               _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
 _GL_CXXALIASWARN (wcscmp);
@@ -702,7 +713,8 @@
 #if @GNULIB_WCSNCMP@
 # if !@HAVE_WCSNCMP@
 _GL_FUNCDECL_SYS (wcsncmp, int,
-                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcsncmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n));
@@ -719,7 +731,8 @@
 /* Compare S1 and S2, ignoring case.  */
 #if @GNULIB_WCSCASECMP@
 # if !@HAVE_WCSCASECMP@
-_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
+                                   _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
 _GL_CXXALIASWARN (wcscasecmp);
@@ -736,7 +749,8 @@
 #if @GNULIB_WCSNCASECMP@
 # if !@HAVE_WCSNCASECMP@
 _GL_FUNCDECL_SYS (wcsncasecmp, int,
-                  (const wchar_t *s1, const wchar_t *s2, size_t n));
+                  (const wchar_t *s1, const wchar_t *s2, size_t n)
+                  _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcsncasecmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n));
@@ -804,7 +818,8 @@
 /* Find the first occurrence of WC in WCS.  */
 #if @GNULIB_WCSCHR@
 # if !@HAVE_WCSCHR@
-_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
+                                     _GL_ATTRIBUTE_PURE);
 # endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C++" {
@@ -833,7 +848,8 @@
 /* Find the last occurrence of WC in WCS.  */
 #if @GNULIB_WCSRCHR@
 # if !@HAVE_WCSRCHR@
-_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
+                                      _GL_ATTRIBUTE_PURE);
 # endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C++" {
@@ -863,7 +879,8 @@
    of wide characters not in REJECT.  */
 #if @GNULIB_WCSCSPN@
 # if !@HAVE_WCSCSPN@
-_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
+_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
+                                   _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
 _GL_CXXALIASWARN (wcscspn);
@@ -880,7 +897,8 @@
    of wide characters in ACCEPT.  */
 #if @GNULIB_WCSSPN@
 # if !@HAVE_WCSSPN@
-_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
+_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
+                                  _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
 _GL_CXXALIASWARN (wcsspn);
@@ -897,7 +915,8 @@
 #if @GNULIB_WCSPBRK@
 # if !@HAVE_WCSPBRK@
 _GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
-                  (const wchar_t *wcs, const wchar_t *accept));
+                  (const wchar_t *wcs, const wchar_t *accept)
+                  _GL_ATTRIBUTE_PURE);
 # endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C++" {
@@ -929,7 +948,8 @@
 #if @GNULIB_WCSSTR@
 # if !@HAVE_WCSSTR@
 _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
-                  (const wchar_t *haystack, const wchar_t *needle));
+                  (const wchar_t *haystack, const wchar_t *needle)
+                  _GL_ATTRIBUTE_PURE);
 # endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C++" {
@@ -983,11 +1003,13 @@
 #   undef wcswidth
 #   define wcswidth rpl_wcswidth
 #  endif
-_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n));
+_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)
+                                 _GL_ATTRIBUTE_PURE);
 _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
 # else
 #  if !@HAVE_WCSWIDTH@
-_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n));
+_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
+                                 _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
 # endif
--- a/lib/wcsrtombs-state.c
+++ b/lib/wcsrtombs-state.c
@@ -22,7 +22,7 @@
 /* Internal state used by the functions wcsrtombs() and wcsnrtombs().  */
 mbstate_t _gl_wcsrtombs_state
 /* The state must initially be in the "initial state"; so, zero-initialize it.
-   On most systems, putting it into BSS is sufficient.  Not so on MacOS X 10.3,
+   On most systems, putting it into BSS is sufficient.  Not so on Mac OS X 10.3,
    see <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>.
    When it needs an initializer, use 0 or {0} as initializer? 0 only works
    when mbstate_t is a scalar type (such as when gnulib defines it, or on
new file mode 100644
--- /dev/null
+++ b/lib/wctype-h.c
@@ -0,0 +1,4 @@
+/* Normally this would be wctype.c, but that name's already taken.  */
+#include <config.h>
+#define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE
+#include "wctype.h"
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible and Paul Eggert.  */
 
@@ -55,6 +54,11 @@
 #ifndef _@GUARD_PREFIX@_WCTYPE_H
 #define _@GUARD_PREFIX@_WCTYPE_H
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_WCTYPE_INLINE
+# define _GL_WCTYPE_INLINE _GL_INLINE
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
@@ -149,7 +153,7 @@
 #   endif
 #  endif
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswalnum
 #  else
@@ -161,7 +165,7 @@
           || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswalpha
 #  else
@@ -172,7 +176,7 @@
   return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswblank
 #  else
@@ -183,7 +187,7 @@
   return wc == ' ' || wc == '\t';
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswcntrl
 #  else
@@ -194,7 +198,7 @@
   return (wc & ~0x1f) == 0 || wc == 0x7f;
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswdigit
 #  else
@@ -205,7 +209,7 @@
   return wc >= '0' && wc <= '9';
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswgraph
 #  else
@@ -216,7 +220,7 @@
   return wc >= '!' && wc <= '~';
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswlower
 #  else
@@ -227,7 +231,7 @@
   return wc >= 'a' && wc <= 'z';
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswprint
 #  else
@@ -238,7 +242,7 @@
   return wc >= ' ' && wc <= '~';
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswpunct
 #  else
@@ -251,7 +255,7 @@
                || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswspace
 #  else
@@ -263,7 +267,7 @@
           || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswupper
 #  else
@@ -274,7 +278,7 @@
   return wc >= 'A' && wc <= 'Z';
 }
 
-static inline int
+_GL_WCTYPE_INLINE int
 #  if @REPLACE_ISWCNTRL@
 rpl_iswxdigit
 #  else
@@ -286,7 +290,7 @@
           || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
 }
 
-static inline wint_t
+_GL_WCTYPE_INLINE wint_t
 #  if @REPLACE_TOWLOWER@
 rpl_towlower
 #  else
@@ -297,7 +301,7 @@
   return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
 }
 
-static inline wint_t
+_GL_WCTYPE_INLINE wint_t
 #  if @REPLACE_TOWLOWER@
 rpl_towupper
 #  else
@@ -337,7 +341,7 @@
       result register.  We need to fix this by adding a zero-extend from
       wchar_t to wint_t after the call.  */
 
-static inline wint_t
+_GL_WCTYPE_INLINE wint_t
 rpl_towlower (wint_t wc)
 {
   return (wint_t) (wchar_t) towlower (wc);
@@ -346,7 +350,7 @@
 #   define towlower rpl_towlower
 #  endif
 
-static inline wint_t
+_GL_WCTYPE_INLINE wint_t
 rpl_towupper (wint_t wc)
 {
   return (wint_t) (wchar_t) towupper (wc);
@@ -494,6 +498,7 @@
 # endif
 #endif
 
+_GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_WCTYPE_H */
 #endif /* _@GUARD_PREFIX@_WCTYPE_H */
--- a/lib/wcwidth.c
+++ b/lib/wcwidth.c
@@ -32,7 +32,7 @@
 {
   /* In UTF-8 locales, use a Unicode aware width function.  */
   const char *encoding = locale_charset ();
-  if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0))
+  if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0))
     {
       /* We assume that in a UTF-8 locale, a wide character is the same as a
          Unicode character.  */
--- a/lib/write-any-file.c
+++ b/lib/write-any-file.c
@@ -21,6 +21,7 @@
 
 #include "write-any-file.h"
 #include "priv-set.h"
+#include "root-uid.h"
 
 #include <unistd.h>
 
@@ -40,7 +41,7 @@
       can = (priv_set_ismember (PRIV_FILE_DAC_WRITE) == 1);
 #else
       /* In traditional Unix, only root can unlink directories.  */
-      can = (geteuid () == 0);
+      can = (geteuid () == ROOT_UID);
 #endif
       can_write = can;
       initialized = true;
--- a/lib/write.c
+++ b/lib/write.c
@@ -40,7 +40,7 @@
 # undef write
 
 # if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline ssize_t
+static ssize_t
 write_nothrow (int fd, const void *buf, size_t count)
 {
   ssize_t result;
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -22,7 +22,7 @@
 
 /* Return 1 if an array of N objects, each of size S, cannot exist due
    to size arithmetic overflow.  S must be positive and N must be
-   nonnegative.  This is a macro, not an inline function, so that it
+   nonnegative.  This is a macro, not a function, so that it
    works correctly even when SIZE_MAX < N.
 
    By gnulib convention, SIZE_MAX represents overflow in size
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -16,28 +16,33 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef XALLOC_H_
-# define XALLOC_H_
+#define XALLOC_H_
 
-# include <stddef.h>
+#include <stddef.h>
+
+#include "xalloc-oversized.h"
 
-# include "xalloc-oversized.h"
+_GL_INLINE_HEADER_BEGIN
+#ifndef XALLOC_INLINE
+# define XALLOC_INLINE _GL_INLINE
+#endif
 
-# ifdef __cplusplus
+#ifdef __cplusplus
 extern "C" {
-# endif
+#endif
 
 
-# if __GNUC__ >= 3
-#  define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-# else
-#  define _GL_ATTRIBUTE_MALLOC
-# endif
+#if __GNUC__ >= 3
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _GL_ATTRIBUTE_MALLOC
+#endif
 
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#  define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-# else
-#  define _GL_ATTRIBUTE_ALLOC_SIZE(args)
-# endif
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+#else
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+#endif
 
 /* This function is always triggered when memory is exhausted.
    It must be defined by the application, either explicitly
@@ -67,45 +72,31 @@
 
 /* Allocate an object of type T dynamically, with error checking.  */
 /* extern t *XMALLOC (typename t); */
-# define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
+#define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
 
 /* Allocate memory for N elements of type T, with error checking.  */
 /* extern t *XNMALLOC (size_t n, typename t); */
-# define XNMALLOC(n, t) \
-    ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
+#define XNMALLOC(n, t) \
+   ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
 
 /* Allocate an object of type T dynamically, with error checking,
    and zero it.  */
 /* extern t *XZALLOC (typename t); */
-# define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
+#define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
 
 /* Allocate memory for N elements of type T, with error checking,
    and zero it.  */
 /* extern t *XCALLOC (size_t n, typename t); */
-# define XCALLOC(n, t) \
-    ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
-
+#define XCALLOC(n, t) \
+   ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
 
-# if HAVE_INLINE
-#  define static_inline static inline
-# else
-void *xnmalloc (size_t n, size_t s)
-      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
-void *xnrealloc (void *p, size_t n, size_t s)
-      _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
-void *x2nrealloc (void *p, size_t *pn, size_t s);
-char *xcharalloc (size_t n)
-      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
-# endif
-
-# ifdef static_inline
 
 /* Allocate an array of N objects, each with S bytes of memory,
    dynamically, with error checking.  S must be nonzero.  */
 
-static_inline void *xnmalloc (size_t n, size_t s)
+XALLOC_INLINE void *xnmalloc (size_t n, size_t s)
                     _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
-static_inline void *
+XALLOC_INLINE void *
 xnmalloc (size_t n, size_t s)
 {
   if (xalloc_oversized (n, s))
@@ -116,9 +107,9 @@
 /* Change the size of an allocated block of memory P to an array of N
    objects each of S bytes, with error checking.  S must be nonzero.  */
 
-static_inline void *xnrealloc (void *p, size_t n, size_t s)
+XALLOC_INLINE void *xnrealloc (void *p, size_t n, size_t s)
                     _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
-static_inline void *
+XALLOC_INLINE void *
 xnrealloc (void *p, size_t n, size_t s)
 {
   if (xalloc_oversized (n, s))
@@ -181,7 +172,7 @@
 
    */
 
-static_inline void *
+XALLOC_INLINE void *
 x2nrealloc (void *p, size_t *pn, size_t s)
 {
   size_t n = *pn;
@@ -218,17 +209,15 @@
 /* Return a pointer to a new buffer of N bytes.  This is like xmalloc,
    except it returns char *.  */
 
-static_inline char *xcharalloc (size_t n)
+XALLOC_INLINE char *xcharalloc (size_t n)
                     _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
-static_inline char *
+XALLOC_INLINE char *
 xcharalloc (size_t n)
 {
   return XNMALLOC (n, char);
 }
 
-# endif
-
-# ifdef __cplusplus
+#ifdef __cplusplus
 }
 
 /* C++ does not allow conversions from void * to other pointer types
@@ -265,7 +254,7 @@
   return (T *) xmemdup ((void const *) p, s);
 }
 
-# endif
+#endif
 
 
 #endif /* !XALLOC_H_ */
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -17,11 +17,9 @@
 
 #include <config.h>
 
-#if ! HAVE_INLINE
-# define static_inline
-#endif
+#define XALLOC_INLINE _GL_EXTERN_INLINE
+
 #include "xalloc.h"
-#undef static_inline
 
 #include <stdlib.h>
 #include <string.h>
new file mode 100644
--- /dev/null
+++ b/lib/xsize.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define XSIZE_INLINE _GL_EXTERN_INLINE
+#include "xsize.h"
--- a/lib/xsize.h
+++ b/lib/xsize.h
@@ -13,8 +13,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _XSIZE_H
 #define _XSIZE_H
@@ -28,6 +27,11 @@
 # include <stdint.h>
 #endif
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef XSIZE_INLINE
+# define XSIZE_INLINE _GL_INLINE
+#endif
+
 /* The size of memory objects is often computed through expressions of
    type size_t. Example:
       void* p = malloc (header_size + n * element_size).
@@ -49,7 +53,7 @@
   ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
 
 /* Sum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -60,7 +64,7 @@
 }
 
 /* Sum of three sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -70,7 +74,7 @@
 }
 
 /* Sum of four sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -80,7 +84,7 @@
 }
 
 /* Maximum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -93,7 +97,7 @@
 
 /* Multiplication of a count with an element size, with overflow check.
    The count must be >= 0 and the element size must be > 0.
-   This is a macro, not an inline function, so that it works correctly even
+   This is a macro, not a function, so that it works correctly even
    when N is of a wider type and N > SIZE_MAX.  */
 #define xtimes(N, ELSIZE) \
   ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
@@ -105,4 +109,6 @@
 #define size_in_bounds_p(SIZE) \
   ((SIZE) != SIZE_MAX)
 
+_GL_INLINE_HEADER_END
+
 #endif /* _XSIZE_H */
--- a/lib/xstrtol.h
+++ b/lib/xstrtol.h
@@ -66,7 +66,7 @@
 
    After reporting an error, exit with a failure status.  */
 
-void _Noreturn xstrtol_fatal (enum strtol_error,
+_Noreturn void xstrtol_fatal (enum strtol_error,
                               int, char, struct option const *,
                               char const *);
 
new file mode 100644
--- /dev/null
+++ b/lib/xtime.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define XTIME_INLINE _GL_EXTERN_INLINE
+#include "xtime.h"
--- a/lib/xtime.h
+++ b/lib/xtime.h
@@ -18,28 +18,37 @@
 /* Written by Paul Eggert.  */
 
 #ifndef XTIME_H_
-# define XTIME_H_ 1
+#define XTIME_H_ 1
+
+_GL_INLINE_HEADER_BEGIN
+#ifndef XTIME_INLINE
+# define XTIME_INLINE _GL_INLINE
+#endif
 
 /* xtime_t is a signed type used for time stamps.  It is an integer
    type that is a count of nanoseconds -- except for obsolescent hosts
    without sufficiently-wide integers, where it is a count of
    seconds.  */
-# if HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
 typedef long long int xtime_t;
-#  define XTIME_PRECISION 1000000000
-# else
-#  include <limits.h>
+# define XTIME_PRECISION 1000000000
+#else
+# include <limits.h>
 typedef long int xtime_t;
-#  if LONG_MAX >> 31 >> 31 == 0
-#   define XTIME_PRECISION 1
-#  else
-#   define XTIME_PRECISION 1000000000
-#  endif
+# if LONG_MAX >> 31 >> 31 == 0
+#  define XTIME_PRECISION 1
+# else
+#  define XTIME_PRECISION 1000000000
 # endif
+#endif
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
 
 /* Return an extended time value that contains S seconds and NS
    nanoseconds, without any overflow checking.  */
-static inline xtime_t
+XTIME_INLINE xtime_t
 xtime_make (xtime_t s, long int ns)
 {
   if (XTIME_PRECISION == 1)
@@ -49,14 +58,14 @@
 }
 
 /* Return the number of seconds in T, which must be nonnegative.  */
-static inline xtime_t
+XTIME_INLINE xtime_t
 xtime_nonnegative_sec (xtime_t t)
 {
   return t / XTIME_PRECISION;
 }
 
 /* Return the number of seconds in T.  */
-static inline xtime_t
+XTIME_INLINE xtime_t
 xtime_sec (xtime_t t)
 {
   return (XTIME_PRECISION == 1
@@ -67,14 +76,14 @@
 }
 
 /* Return the number of nanoseconds in T, which must be nonnegative.  */
-static inline long int
+XTIME_INLINE long int
 xtime_nonnegative_nsec (xtime_t t)
 {
   return t % XTIME_PRECISION;
 }
 
 /* Return the number of nanoseconds in T.  */
-static inline long int
+XTIME_INLINE long int
 xtime_nsec (xtime_t t)
 {
   long int ns = t % XTIME_PRECISION;
@@ -83,4 +92,8 @@
   return ns;
 }
 
+#ifdef  __cplusplus
+}
 #endif
+
+#endif
--- a/lib/xvasprintf.c
+++ b/lib/xvasprintf.c
@@ -29,7 +29,7 @@
 /* Checked size_t computations.  */
 #include "xsize.h"
 
-static inline char *
+static char *
 xstrcat (size_t argcount, va_list args)
 {
   char *result;
--- a/m4/README
+++ b/m4/README
@@ -123,4 +123,3 @@
   into
 
     # setenv.m4 serial 3
-
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
 # acl.m4 - check for access control list (ACL) primitives
-# serial 13
+# serial 15
 
 # Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -16,14 +16,13 @@
 
   LIB_ACL=
   use_acl=0
-  AC_REQUIRE([AC_C_INLINE])
   if test "x$enable_acl" != "xno"; then
     dnl On all platforms, the ACL related API is declared in <sys/acl.h>.
     AC_CHECK_HEADERS([sys/acl.h])
     if test $ac_cv_header_sys_acl_h = yes; then
       ac_save_LIBS=$LIBS
 
-      dnl Test for POSIX-draft-like API (Linux, FreeBSD, MacOS X, IRIX, Tru64).
+      dnl Test for POSIX-draft-like API (Linux, FreeBSD, Mac OS X, IRIX, Tru64).
       dnl -lacl is needed on Linux, -lpacl is needed on OSF/1.
       if test $use_acl = 0; then
         AC_SEARCH_LIBS([acl_get_file], [acl pacl],
@@ -55,7 +54,7 @@
                AC_DEFINE([HAVE_ACL_FIRST_ENTRY], [1],
                  [Define to 1 if the constant ACL_FIRST_ENTRY exists.])
              fi
-             dnl On MacOS X, other types of ACLs are supported.
+             dnl On Mac OS X, other types of ACLs are supported.
              AC_CACHE_CHECK([for ACL_TYPE_EXTENDED],
                [gl_cv_acl_ACL_TYPE_EXTENDED],
                [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
--- a/m4/acosf.m4
+++ b/m4/acosf.m4
@@ -1,4 +1,4 @@
-# acosf.m4 serial 1
+# acosf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_ACOS])
 
+  dnl Persuade glibc <math.h> to declare acosf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether acosf() exists. Assume that acosf(), if it exists, is
   dnl defined in the same library as acos().
   save_LIBS="$LIBS"
--- a/m4/acosl.m4
+++ b/m4/acosl.m4
@@ -1,4 +1,4 @@
-# acosl.m4 serial 6
+# acosl.m4 serial 8
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = acosl;
              long double x;]],
-           [[return acosl (x) > 1;]])],
+           [[return funcptr (x) > 1
+                    || acosl (x) > 1;]])],
         [gl_cv_func_acosl_no_libm=yes],
         [gl_cv_func_acosl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = acosl;
                long double x;]],
-             [[return acosl (x) > 1;]])],
+             [[return funcptr (x) > 1
+                      || acosl (x) > 1;]])],
           [gl_cv_func_acosl_in_libm=yes],
           [gl_cv_func_acosl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,7 +56,7 @@
   if test $gl_cv_func_acosl_no_libm = yes \
      || test $gl_cv_func_acosl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has acosl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has acosl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([acosl], , [HAVE_DECL_ACOSL=0], [[#include <math.h>]])
   else
     HAVE_DECL_ACOSL=0
--- a/m4/arctwo.m4
+++ b/m4/arctwo.m4
@@ -1,12 +1,8 @@
-# arctwo.m4 serial 4
+# arctwo.m4 serial 5
 dnl Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 # Prerequisites of lib/arctwo.c.
-AC_DEFUN([gl_ARCTWO],
-[
-  AC_REQUIRE([AC_C_INLINE])
-  :
-])
+AC_DEFUN([gl_ARCTWO], [:])
--- a/m4/argp.m4
+++ b/m4/argp.m4
@@ -1,4 +1,4 @@
-# argp.m4 serial 13
+# argp.m4 serial 14
 dnl Copyright (C) 2003-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,18 +10,14 @@
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
-  AC_CHECK_DECL([program_invocation_name],
-                [AC_DEFINE([HAVE_DECL_PROGRAM_INVOCATION_NAME], [1],
-                           [Define if program_invocation_name is declared])],
-                [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_NAME], [1],
-                           [Define to 1 to add extern declaration of program_invocation_name to argp.h])],
-                [[#include <errno.h>]])
-  AC_CHECK_DECL([program_invocation_short_name],
-                [AC_DEFINE([HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME], [1],
-                           [Define if program_invocation_short_name is declared])],
-                [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_SHORT_NAME], [1],
-                           [Define to 1 to add extern declaration of program_invocation_short_name to argp.h])],
-                [[#include <errno.h>]])
+  AC_CHECK_DECLS([program_invocation_name], [],
+                 [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_NAME], [1],
+                            [Define to 1 to add extern declaration of program_invocation_name to argp.h])],
+                 [[#include <errno.h>]])
+  AC_CHECK_DECLS([program_invocation_short_name], [],
+                 [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_SHORT_NAME], [1],
+                            [Define to 1 to add extern declaration of program_invocation_short_name to argp.h])],
+                 [[#include <errno.h>]])
 
   # Check if program_invocation_name and program_invocation_short_name
   # are defined elsewhere. It is improbable that only one of them will
--- a/m4/asinf.m4
+++ b/m4/asinf.m4
@@ -1,4 +1,4 @@
-# asinf.m4 serial 1
+# asinf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_ASIN])
 
+  dnl Persuade glibc <math.h> to declare asinf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether asinf() exists. Assume that asinf(), if it exists, is
   dnl defined in the same library as asin().
   save_LIBS="$LIBS"
--- a/m4/asinl.m4
+++ b/m4/asinl.m4
@@ -1,4 +1,4 @@
-# asinl.m4 serial 6
+# asinl.m4 serial 8
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = asinl;
              long double x;]],
-           [[return asinl (x) > 1;]])],
+           [[return funcptr (x) > 1
+                    || asinl (x) > 1;]])],
         [gl_cv_func_asinl_no_libm=yes],
         [gl_cv_func_asinl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = asinl;
                long double x;]],
-             [[return asinl (x) > 1;]])],
+             [[return funcptr (x) > 1
+                      || asinl (x) > 1;]])],
           [gl_cv_func_asinl_in_libm=yes],
           [gl_cv_func_asinl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,7 +56,7 @@
   if test $gl_cv_func_asinl_no_libm = yes \
      || test $gl_cv_func_asinl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has asinl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has asinl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([asinl], , [HAVE_DECL_ASINL=0], [[#include <math.h>]])
   else
     HAVE_DECL_ASINL=0
--- a/m4/atan2f.m4
+++ b/m4/atan2f.m4
@@ -1,4 +1,4 @@
-# atan2f.m4 serial 1
+# atan2f.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_ATAN2])
 
+  dnl Persuade glibc <math.h> to declare atan2f().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether atan2f() exists. Assume that atan2f(), if it exists, is
   dnl defined in the same library as atan2().
   save_LIBS="$LIBS"
--- a/m4/atanf.m4
+++ b/m4/atanf.m4
@@ -1,4 +1,4 @@
-# atanf.m4 serial 1
+# atanf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_ATAN])
 
+  dnl Persuade glibc <math.h> to declare atanf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether atanf() exists. Assume that atanf(), if it exists, is
   dnl defined in the same library as atan().
   save_LIBS="$LIBS"
--- a/m4/atanl.m4
+++ b/m4/atanl.m4
@@ -1,4 +1,4 @@
-# atanl.m4 serial 6
+# atanl.m4 serial 8
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = atanl;
              long double x;]],
-           [[return atanl (x) > 1;]])],
+           [[return funcptr (x) > 1
+                    || atanl (x) > 1;]])],
         [gl_cv_func_atanl_no_libm=yes],
         [gl_cv_func_atanl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = atanl;
                long double x;]],
-             [[return atanl (x) > 1;]])],
+             [[return funcptr (x) > 1
+                      || atanl (x) > 1;]])],
           [gl_cv_func_atanl_in_libm=yes],
           [gl_cv_func_atanl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,7 +56,7 @@
   if test $gl_cv_func_atanl_no_libm = yes \
      || test $gl_cv_func_atanl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has atanl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has atanl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([atanl], , [HAVE_DECL_ATANL=0], [[#include <math.h>]])
   else
     HAVE_DECL_ATANL=0
--- a/m4/base32.m4
+++ b/m4/base32.m4
@@ -1,4 +1,4 @@
-# base32.m4 serial 3
+# base32.m4 serial 4
 dnl Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,5 @@
 
 # Prerequisites of lib/base32.c.
 AC_DEFUN([gl_PREREQ_BASE32], [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_C_RESTRICT])
 ])
--- a/m4/base64.m4
+++ b/m4/base64.m4
@@ -1,4 +1,4 @@
-# base64.m4 serial 3
+# base64.m4 serial 4
 dnl Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,5 @@
 
 # Prerequisites of lib/base64.c.
 AC_DEFUN([gl_PREREQ_BASE64], [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_C_RESTRICT])
 ])
--- a/m4/c-stack.m4
+++ b/m4/c-stack.m4
@@ -7,7 +7,7 @@
 
 # Written by Paul Eggert.
 
-# serial 14
+# serial 15
 
 AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
   [
@@ -23,7 +23,7 @@
        FAULT_YIELDS_SIGBUS=1 ;;
      hpux*) # HP-UX
        FAULT_YIELDS_SIGBUS=1 ;;
-     macos* | darwin*) # MacOS X
+     macos* | darwin*) # Mac OS X
        FAULT_YIELDS_SIGBUS=1 ;;
      gnu*) # Hurd
        FAULT_YIELDS_SIGBUS=1 ;;
--- a/m4/c-strtod.m4
+++ b/m4/c-strtod.m4
@@ -1,4 +1,4 @@
-# c-strtod.m4 serial 14
+# c-strtod.m4 serial 15
 
 # Copyright (C) 2004-2006, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -38,9 +38,6 @@
 [
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_FUNCS([strtod_l])
-
-  AC_REQUIRE([AC_C_INLINE])
-  :
 ])
 
 dnl Prerequisites of lib/c-strtold.c.
@@ -49,7 +46,4 @@
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_REQUIRE([gl_C99_STRTOLD])
   AC_CHECK_FUNCS([strtold_l])
-
-  AC_REQUIRE([AC_C_INLINE])
-  :
 ])
--- a/m4/calloc.m4
+++ b/m4/calloc.m4
@@ -1,4 +1,4 @@
-# calloc.m4 serial 14
+# calloc.m4 serial 15
 
 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -18,6 +18,7 @@
 AC_DEFUN([_AC_FUNC_CALLOC_IF],
 [
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([for GNU libc compatible calloc],
     [ac_cv_func_calloc_0_nonnull],
     [AC_RUN_IFELSE(
@@ -32,8 +33,21 @@
           ]])],
        [ac_cv_func_calloc_0_nonnull=yes],
        [ac_cv_func_calloc_0_nonnull=no],
-       [ac_cv_func_calloc_0_nonnull=no])])
-  AS_IF([test $ac_cv_func_calloc_0_nonnull = yes], [$1], [$2])
+       [case "$host_os" in
+                  # Guess yes on glibc systems.
+          *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                  # If we don't know, assume the worst.
+          *)      ac_cv_func_calloc_0_nonnull="guessing no" ;;
+        esac
+       ])])
+  case "$ac_cv_func_calloc_0_nonnull" in
+    *yes)
+      $1
+      ;;
+    *)
+      $2
+      ;;
+  esac
 ])# AC_FUNC_CALLOC
 
 
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,4 +1,4 @@
-# canonicalize.m4 serial 23
+# canonicalize.m4 serial 26
 
 dnl Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
@@ -16,8 +16,11 @@
   AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
   if test $ac_cv_func_canonicalize_file_name = no; then
     HAVE_CANONICALIZE_FILE_NAME=0
-  elif test "$gl_cv_func_realpath_works" != yes; then
-    REPLACE_CANONICALIZE_FILE_NAME=1
+  else
+    case "$gl_cv_func_realpath_works" in
+      *yes) ;;
+      *)    REPLACE_CANONICALIZE_FILE_NAME=1 ;;
+    esac
   fi
 ])
 
@@ -30,12 +33,21 @@
     HAVE_CANONICALIZE_FILE_NAME=0
     if test $ac_cv_func_realpath = no; then
       HAVE_REALPATH=0
-    elif test "$gl_cv_func_realpath_works" != yes; then
-      REPLACE_REALPATH=1
+    else
+      case "$gl_cv_func_realpath_works" in
+	*yes) ;;
+	*)    REPLACE_REALPATH=1 ;;
+      esac
     fi
-  elif test "$gl_cv_func_realpath_works" != yes; then
-    REPLACE_CANONICALIZE_FILE_NAME=1
-    REPLACE_REALPATH=1
+  else
+    case "$gl_cv_func_realpath_works" in
+      *yes)
+        ;;
+      *)
+        REPLACE_CANONICALIZE_FILE_NAME=1
+        REPLACE_REALPATH=1
+        ;;
+    esac
   fi
 ])
 
@@ -56,6 +68,7 @@
 AC_DEFUN([gl_FUNC_REALPATH_WORKS],
 [
   AC_CHECK_FUNCS_ONCE([realpath])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
     touch conftest.a
     mkdir conftest.d
@@ -89,13 +102,23 @@
         }
         return result;
       ]])
-    ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no],
-       [gl_cv_func_realpath_works="guessing no"])
+     ],
+     [gl_cv_func_realpath_works=yes],
+     [gl_cv_func_realpath_works=no],
+     [case "$host_os" in
+                       # Guess yes on glibc systems.
+        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+                       # If we don't know, assume the worst.
+        *)             gl_cv_func_realpath_works="guessing no" ;;
+      esac
+     ])
     rm -rf conftest.a conftest.d
   ])
-  if test "$gl_cv_func_realpath_works" = yes; then
-    AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
-      can malloc memory, always gives an absolute path, and handles
-      trailing slash correctly.])
-  fi
+  case "$gl_cv_func_realpath_works" in
+    *yes)
+      AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
+        can malloc memory, always gives an absolute path, and handles
+        trailing slash correctly.])
+      ;;
+  esac
 ])
new file mode 100644
--- /dev/null
+++ b/m4/cbrt.m4
@@ -0,0 +1,45 @@
+# cbrt.m4 serial 2
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_CBRT],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare cbrt().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine CBRT_LIBM.
+  gl_COMMON_DOUBLE_MATHFUNC([cbrt])
+
+  dnl Test whether cbrt() exists.
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $CBRT_LIBM"
+  AC_CHECK_FUNCS([cbrt])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_cbrt = no; then
+    HAVE_CBRT=0
+    dnl Find libraries needed to link lib/cbrt.c.
+    AC_REQUIRE([gl_FUNC_FABS])
+    AC_REQUIRE([gl_FUNC_FREXP])
+    AC_REQUIRE([gl_FUNC_LDEXP])
+    CBRT_LIBM=
+    dnl Append $FABS_LIBM to CBRT_LIBM, avoiding gratuitous duplicates.
+    case " $CBRT_LIBM " in
+      *" $FABS_LIBM "*) ;;
+      *) CBRT_LIBM="$CBRT_LIBM $FABS_LIBM" ;;
+    esac
+    dnl Append $FREXP_LIBM to CBRT_LIBM, avoiding gratuitous duplicates.
+    case " $CBRT_LIBM " in
+      *" $FREXP_LIBM "*) ;;
+      *) CBRT_LIBM="$CBRT_LIBM $FREXP_LIBM" ;;
+    esac
+    dnl Append $LDEXP_LIBM to CBRT_LIBM, avoiding gratuitous duplicates.
+    case " $CBRT_LIBM " in
+      *" $LDEXP_LIBM "*) ;;
+      *) CBRT_LIBM="$CBRT_LIBM $LDEXP_LIBM" ;;
+    esac
+  fi
+])
new file mode 100644
--- /dev/null
+++ b/m4/cbrtf.m4
@@ -0,0 +1,99 @@
+# cbrtf.m4 serial 3
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_CBRTF],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_CBRT])
+
+  dnl Persuade glibc <math.h> to declare cbrtf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether cbrtf() exists. Assume that cbrtf(), if it exists, is
+  dnl defined in the same library as cbrt().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $CBRT_LIBM"
+  AC_CHECK_FUNCS([cbrtf])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_cbrtf = yes; then
+    CBRTF_LIBM="$CBRT_LIBM"
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has cbrtf() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([cbrtf], , [HAVE_DECL_CBRTF=0], [[#include <math.h>]])
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $CBRTF_LIBM"
+    gl_FUNC_CBRTF_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_cbrtf_works" in
+      *yes) ;;
+      *) REPLACE_CBRTF=1 ;;
+    esac
+  else
+    HAVE_CBRTF=0
+    HAVE_DECL_CBRTF=0
+  fi
+  if test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1; then
+    dnl Find libraries needed to link lib/cbrtf.c.
+    AC_REQUIRE([gl_FUNC_FABSF])
+    AC_REQUIRE([gl_FUNC_FREXPF])
+    AC_REQUIRE([gl_FUNC_LDEXPF])
+    CBRTF_LIBM=
+    dnl Append $FABSF_LIBM to CBRTF_LIBM, avoiding gratuitous duplicates.
+    case " $CBRTF_LIBM " in
+      *" $FABSF_LIBM "*) ;;
+      *) CBRTF_LIBM="$CBRTF_LIBM $FABSF_LIBM" ;;
+    esac
+    dnl Append $FREXPF_LIBM to CBRTF_LIBM, avoiding gratuitous duplicates.
+    case " $CBRTF_LIBM " in
+      *" $FREXPF_LIBM "*) ;;
+      *) CBRTF_LIBM="$CBRTF_LIBM $FREXPF_LIBM" ;;
+    esac
+    dnl Append $LDEXPF_LIBM to CBRTF_LIBM, avoiding gratuitous duplicates.
+    case " $CBRTF_LIBM " in
+      *" $LDEXPF_LIBM "*) ;;
+      *) CBRTF_LIBM="$CBRTF_LIBM $LDEXPF_LIBM" ;;
+    esac
+  fi
+  AC_SUBST([CBRTF_LIBM])
+])
+
+dnl Test whether cbrtf() works.
+dnl It returns wrong values on IRIX 6.5.
+AC_DEFUN([gl_FUNC_CBRTF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether cbrtf works], [gl_cv_func_cbrtf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile float x;
+volatile float y;
+int main ()
+{
+  extern
+  #ifdef __cplusplus
+  "C"
+  #endif
+  float cbrtf (float);
+  /* This test fails on IRIX 6.5.  */
+  x = - 0.0f;
+  y = cbrtf (x);
+  if (!(y == 0.0f))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_cbrtf_works=yes],
+        [gl_cv_func_cbrtf_works=no],
+        [case "$host_os" in
+           irix*) gl_cv_func_cbrtf_works="guessing no";;
+           *)     gl_cv_func_cbrtf_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/cbrtl-ieee.m4
@@ -0,0 +1,15 @@
+# cbrtl-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in cbrtl.m4 and not inlined in the
+dnl module description), so that gl_FUNC_CBRTL can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_CBRTL_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_cbrtl_required=ieee])
+  AC_REQUIRE([gl_FUNC_CBRTL])
+])
new file mode 100644
--- /dev/null
+++ b/m4/cbrtl.m4
@@ -0,0 +1,151 @@
+# cbrtl.m4 serial 5
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_CBRTL],
+[
+  m4_divert_text([DEFAULTS], [gl_cbrtl_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_CBRT])
+
+  dnl Persuade glibc <math.h> to declare cbrtl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether cbrtl() exists. Assume that cbrtl(), if it exists, is
+  dnl defined in the same library as cbrt().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $CBRT_LIBM"
+  AC_CHECK_FUNCS([cbrtl])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_cbrtl = yes; then
+    CBRTL_LIBM="$CBRT_LIBM"
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has cbrtl() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([cbrtl], , [HAVE_DECL_CBRTL=0], [[#include <math.h>]])
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $CBRTL_LIBM"
+    gl_FUNC_CBRTL_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_cbrtl_works" in
+      *yes) ;;
+      *) REPLACE_CBRTL=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_CBRTL_IEEE], [
+      if test $gl_cbrtl_required = ieee && test $REPLACE_CBRTL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether cbrtl works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_cbrtl_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $CBRTL_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_LONG_DOUBLE_MINUS_ZERO_CODE[
+]gl_LONG_DOUBLE_SIGNBIT_CODE[
+static long double dummy (long double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  extern
+  #ifdef __cplusplus
+  "C"
+  #endif
+  long double cbrtl (long double);
+  long double (*my_cbrtl) (long double) = argc ? cbrtl : dummy;
+  long double f;
+  /* Test cbrtl(-0.0).
+     This test fails on IRIX 6.5.  */
+  f = my_cbrtl (minus_zerol);
+  if (!(f == 0.0L) || (signbitl (minus_zerol) && !signbitl (f)))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_cbrtl_ieee=yes],
+              [gl_cv_func_cbrtl_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_cbrtl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_cbrtl_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_cbrtl_ieee" in
+          *yes) ;;
+          *) REPLACE_CBRTL=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_CBRTL=0
+    HAVE_DECL_CBRTL=0
+  fi
+  if test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; then
+    dnl Find libraries needed to link lib/cbrtl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      CBRTL_LIBM="$CBRT_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_FREXPL])
+      AC_REQUIRE([gl_FUNC_LDEXPL])
+      CBRTL_LIBM=
+      dnl Append $FREXPL_LIBM to CBRTL_LIBM, avoiding gratuitous duplicates.
+      case " $CBRTL_LIBM " in
+        *" $FREXPL_LIBM "*) ;;
+        *) CBRTL_LIBM="$CBRTL_LIBM $FREXPL_LIBM" ;;
+      esac
+      dnl Append $LDEXPL_LIBM to CBRTL_LIBM, avoiding gratuitous duplicates.
+      case " $CBRTL_LIBM " in
+        *" $LDEXPL_LIBM "*) ;;
+        *) CBRTL_LIBM="$CBRTL_LIBM $LDEXPL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([CBRTL_LIBM])
+])
+
+dnl Test whether cbrtl() works.
+dnl On OpenBSD 5.1/SPARC, cbrtl(16.0L) is = 1.2599...
+AC_DEFUN([gl_FUNC_CBRTL_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether cbrtl works], [gl_cv_func_cbrtl_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double cbrtl (long double);
+volatile long double x;
+long double y;
+int main ()
+{
+  x = 16.0L;
+  y = cbrtl (x);
+  if (y < 2.0L)
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_cbrtl_works=yes],
+        [gl_cv_func_cbrtl_works=no],
+        [case "$host_os" in
+           openbsd*) gl_cv_func_cbrtl_works="guessing no";;
+           *)        gl_cv_func_cbrtl_works="guessing yes";;
+         esac
+        ])
+    ])
+])
--- a/m4/ceil.m4
+++ b/m4/ceil.m4
@@ -1,4 +1,4 @@
-# ceil.m4 serial 8
+# ceil.m4 serial 9
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,7 @@
   fi
   m4_ifdef([gl_FUNC_CEIL_IEEE], [
     if test $gl_ceil_required = ieee && test $REPLACE_CEIL = 0; then
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
       AC_CACHE_CHECK([whether ceil works according to ISO C 99 with IEC 60559],
         [gl_cv_func_ceil_ieee],
         [
@@ -44,7 +45,13 @@
             ]])],
             [gl_cv_func_ceil_ieee=yes],
             [gl_cv_func_ceil_ieee=no],
-            [gl_cv_func_ceil_ieee="guessing no"])
+            [case "$host_os" in
+                       # Guess yes on glibc systems.
+               *-gnu*) gl_cv_func_ceil_ieee="guessing yes" ;;
+                       # If we don't know, assume the worst.
+               *)      gl_cv_func_ceil_ieee="guessing no" ;;
+             esac
+            ])
           LIBS="$save_LIBS"
         ])
       case "$gl_cv_func_ceil_ieee" in
--- a/m4/ceilf.m4
+++ b/m4/ceilf.m4
@@ -1,4 +1,4 @@
-# ceilf.m4 serial 12
+# ceilf.m4 serial 14
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,7 @@
     fi
     m4_ifdef([gl_FUNC_CEILF_IEEE], [
       if test $gl_ceilf_required = ieee && test $REPLACE_CEILF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether ceilf works according to ISO C 99 with IEC 60559],
           [gl_cv_func_ceilf_ieee],
           [
@@ -51,7 +52,13 @@
               ]])],
               [gl_cv_func_ceilf_ieee=yes],
               [gl_cv_func_ceilf_ieee=no],
-              [gl_cv_func_ceilf_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_ceilf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_ceilf_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_ceilf_ieee" in
@@ -82,8 +89,9 @@
            # define __NO_MATH_INLINES 1 /* for glibc */
            #endif
            #include <math.h>
+           float (*funcptr) (float) = ceilf;
            float x;]],
-         [[x = ceilf(x);]])],
+         [[x = funcptr(x) + ceilf(x);]])],
       [gl_cv_func_ceilf_libm=])
     if test "$gl_cv_func_ceilf_libm" = "?"; then
       save_LIBS="$LIBS"
@@ -94,8 +102,9 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             float (*funcptr) (float) = ceilf;
              float x;]],
-           [[x = ceilf(x);]])],
+           [[x = funcptr(x) + ceilf(x);]])],
         [gl_cv_func_ceilf_libm="-lm"])
       LIBS="$save_LIBS"
     fi
--- a/m4/ceill.m4
+++ b/m4/ceill.m4
@@ -1,4 +1,4 @@
-# ceill.m4 serial 12
+# ceill.m4 serial 14
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -25,6 +25,7 @@
     fi
     m4_ifdef([gl_FUNC_CEILL_IEEE], [
       if test $gl_ceill_required = ieee && test $REPLACE_CEILL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether ceill works according to ISO C 99 with IEC 60559],
           [gl_cv_func_ceill_ieee],
           [
@@ -50,7 +51,13 @@
               ]])],
               [gl_cv_func_ceill_ieee=yes],
               [gl_cv_func_ceill_ieee=no],
-              [gl_cv_func_ceill_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_ceill_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_ceill_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_ceill_ieee" in
@@ -86,8 +93,9 @@
            # define __NO_MATH_INLINES 1 /* for glibc */
            #endif
            #include <math.h>
+           long double (*funcptr) (long double) = ceill;
            long double x;]],
-         [[x = ceill(x);]])],
+         [[x = funcptr(x) + ceill(x);]])],
       [gl_cv_func_ceill_libm=])
     if test "$gl_cv_func_ceill_libm" = "?"; then
       save_LIBS="$LIBS"
@@ -98,8 +106,9 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = ceill;
              long double x;]],
-           [[x = ceill(x);]])],
+           [[x = funcptr(x) + ceill(x);]])],
         [gl_cv_func_ceill_libm="-lm"])
       LIBS="$save_LIBS"
     fi
--- a/m4/chdir-long.m4
+++ b/m4/chdir-long.m4
@@ -1,4 +1,4 @@
-#serial 14
+#serial 15
 
 # Use Gnulib's robust chdir function.
 # It can handle arbitrarily long directory names, which means
@@ -27,8 +27,4 @@
     gl_cv_have_arbitrary_file_name_length_limit=no)])
 ])
 
-AC_DEFUN([gl_PREREQ_CHDIR_LONG],
-[
-  AC_REQUIRE([AC_C_INLINE])
-  :
-])
+AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:])
--- a/m4/check-math-lib.m4
+++ b/m4/check-math-lib.m4
@@ -1,10 +1,10 @@
-# check-math-lib.m4 serial 3
+# check-math-lib.m4 serial 4
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 dnl
-dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION)
+dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION [, EXTRA-CODE])
 dnl
 dnl Sets the shell VARIABLE according to the libraries needed by EXPRESSION
 dnl to compile and link: to the empty string if no extra libraries are needed,
@@ -22,6 +22,7 @@
          # define __NO_MATH_INLINES 1 /* for glibc */
          #endif
          #include <math.h>
+         $3
          double x;]],
       [$2])],
       [$1=$libm
--- a/m4/chown.m4
+++ b/m4/chown.m4
@@ -1,4 +1,4 @@
-# serial 25
+# serial 27
 # Determine whether we need the chown wrapper.
 
 dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2012 Free Software
@@ -14,12 +14,63 @@
 
 # From Jim Meyering.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([AC_FUNC_CHOWN],
+[
+  AC_REQUIRE([AC_TYPE_UID_T])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([unistd.h])
+  AC_CACHE_CHECK([for working chown],
+    [ac_cv_func_chown_works],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [AC_INCLUDES_DEFAULT
+           [#include <fcntl.h>
+          ]],
+          [[
+            char *f = "conftest.chown";
+            struct stat before, after;
+
+            if (creat (f, 0600) < 0)
+              return 1;
+            if (stat (f, &before) < 0)
+              return 1;
+            if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
+              return 1;
+            if (stat (f, &after) < 0)
+              return 1;
+            return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
+          ]])
+       ],
+       [ac_cv_func_chown_works=yes],
+       [ac_cv_func_chown_works=no],
+       [case "$host_os" in # ((
+                  # Guess yes on glibc systems.
+          *-gnu*) ac_cv_func_chown_works=yes ;;
+                  # If we don't know, assume the worst.
+          *)      ac_cv_func_chown_works=no ;;
+        esac
+       ])
+     rm -f conftest.chown
+    ])
+  if test $ac_cv_func_chown_works = yes; then
+    AC_DEFINE([HAVE_CHOWN], [1],
+      [Define to 1 if your system has a working `chown' function.])
+  fi
+])# AC_FUNC_CHOWN
+
+])
+
 AC_DEFUN_ONCE([gl_FUNC_CHOWN],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([AC_TYPE_UID_T])
   AC_REQUIRE([AC_FUNC_CHOWN])
   AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([chown fchown])
 
   dnl mingw lacks chown altogether.
@@ -53,13 +104,22 @@
         ]])],
         [gl_cv_func_chown_slash_works=yes],
         [gl_cv_func_chown_slash_works=no],
-        [gl_cv_func_chown_slash_works="guessing no"])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_chown_slash_works="guessing no" ;;
+         esac
+        ])
       rm -f conftest.link conftest.file])
-    if test "$gl_cv_func_chown_slash_works" != yes; then
-      AC_DEFINE([CHOWN_TRAILING_SLASH_BUG], [1],
-        [Define to 1 if chown mishandles trailing slash.])
-      REPLACE_CHOWN=1
-    fi
+    case "$gl_cv_func_chown_slash_works" in
+      *yes) ;;
+      *)
+        AC_DEFINE([CHOWN_TRAILING_SLASH_BUG], [1],
+          [Define to 1 if chown mishandles trailing slash.])
+        REPLACE_CHOWN=1
+        ;;
+    esac
 
     dnl OpenBSD fails to update ctime if ownership does not change.
     AC_CACHE_CHECK([whether chown always updates ctime],
@@ -80,13 +140,22 @@
         ]])],
         [gl_cv_func_chown_ctime_works=yes],
         [gl_cv_func_chown_ctime_works=no],
-        [gl_cv_func_chown_ctime_works="guessing no"])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_chown_ctime_works="guessing no" ;;
+         esac
+        ])
       rm -f conftest.file])
-    if test "$gl_cv_func_chown_ctime_works" != yes; then
-      AC_DEFINE([CHOWN_CHANGE_TIME_BUG], [1], [Define to 1 if chown fails
-        to change ctime when at least one argument was not -1.])
-      REPLACE_CHOWN=1
-    fi
+    case "$gl_cv_func_chown_ctime_works" in
+      *yes) ;;
+      *)
+        AC_DEFINE([CHOWN_CHANGE_TIME_BUG], [1], [Define to 1 if chown fails
+          to change ctime when at least one argument was not -1.])
+        REPLACE_CHOWN=1
+        ;;
+    esac
   fi
 ])
 
--- a/m4/cond.m4
+++ b/m4/cond.m4
@@ -1,4 +1,4 @@
-# cond.m4 serial 1
+# cond.m4 serial 2
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,5 +7,4 @@
 AC_DEFUN([gl_COND],
 [
   AC_REQUIRE([gl_THREADLIB])
-  AC_REQUIRE([AC_C_INLINE])
 ])
--- a/m4/copysignf.m4
+++ b/m4/copysignf.m4
@@ -1,4 +1,4 @@
-# copysignf.m4 serial 1
+# copysignf.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,11 +8,26 @@
 [
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
 
+  dnl Persuade glibc <math.h> to declare copysignf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Determine COPYSIGNF_LIBM.
-  gl_MATHFUNC([copysignf], [float], [(float, float)])
-  if test $gl_cv_func_copysignf_no_libm = no \
-     && test $gl_cv_func_copysignf_in_libm = no; then
+  gl_MATHFUNC([copysignf], [float], [(float, float)],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     float copysignf (float, float);
+    ])
+  if test $gl_cv_func_copysignf_no_libm = yes \
+     || test $gl_cv_func_copysignf_in_libm = yes; then
+    HAVE_COPYSIGNF=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has copysignf() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([copysignf], , [HAVE_DECL_COPYSIGNF=0], [[#include <math.h>]])
+  else
     HAVE_COPYSIGNF=0
+    HAVE_DECL_COPYSIGNF=0
     COPYSIGNF_LIBM=
   fi
   AC_SUBST([COPYSIGNF_LIBM])
--- a/m4/copysignl.m4
+++ b/m4/copysignl.m4
@@ -1,4 +1,4 @@
-# copysignl.m4 serial 2
+# copysignl.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
+  dnl Persuade glibc <math.h> to declare copysignl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Determine COPYSIGNL_LIBM.
   gl_MATHFUNC([copysignl], [long double], [(long double, long double)])
   if test $gl_cv_func_copysignl_no_libm = no \
--- a/m4/cosf.m4
+++ b/m4/cosf.m4
@@ -1,4 +1,4 @@
-# cosf.m4 serial 1
+# cosf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_COS])
 
+  dnl Persuade glibc <math.h> to declare cosf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether cosf() exists. Assume that cosf(), if it exists, is
   dnl defined in the same library as cos().
   save_LIBS="$LIBS"
--- a/m4/coshf.m4
+++ b/m4/coshf.m4
@@ -1,4 +1,4 @@
-# coshf.m4 serial 1
+# coshf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_COSH])
 
+  dnl Persuade glibc <math.h> to declare coshf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether coshf() exists. Assume that coshf(), if it exists, is
   dnl defined in the same library as cosh().
   save_LIBS="$LIBS"
--- a/m4/cosl.m4
+++ b/m4/cosl.m4
@@ -1,4 +1,4 @@
-# cosl.m4 serial 6
+# cosl.m4 serial 8
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = cosl;
              long double x;]],
-           [[return cosl (x) > 0.4;]])],
+           [[return funcptr (x) > 0.4
+                    || cosl (x) > 0.4;]])],
         [gl_cv_func_cosl_no_libm=yes],
         [gl_cv_func_cosl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = cosl;
                long double x;]],
-             [[return cosl (x) > 0.4;]])],
+             [[return funcptr (x) > 0.4
+                      || cosl (x) > 0.4;]])],
           [gl_cv_func_cosl_in_libm=yes],
           [gl_cv_func_cosl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,7 +56,7 @@
   if test $gl_cv_func_cosl_no_libm = yes \
      || test $gl_cv_func_cosl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has cosl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has cosl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([cosl], , [HAVE_DECL_COSL=0], [[#include <math.h>]])
   else
     HAVE_DECL_COSL=0
new file mode 100644
--- /dev/null
+++ b/m4/count-leading-zeros.m4
@@ -0,0 +1,12 @@
+# count-leading-zeros.m4 serial 2
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_COUNT_LEADING_ZEROS],
+[
+  dnl We don't need (and can't compile) count_leading_zeros_ll
+  dnl unless the type 'unsigned long long int' exists.
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+])
--- a/m4/count-one-bits.m4
+++ b/m4/count-one-bits.m4
@@ -1,4 +1,4 @@
-# count-one-bits.m4 serial 2
+# count-one-bits.m4 serial 3
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,4 @@
   dnl We don't need (and can't compile) count_one_bits_ll
   dnl unless the type 'unsigned long long int' exists.
   AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-
-  dnl Prerequisites of lib/count-one-bits.h.
-  AC_REQUIRE([AC_C_INLINE])
 ])
--- a/m4/cycle-check.m4
+++ b/m4/cycle-check.m4
@@ -1,10 +1,7 @@
-#serial 6
+#serial 7
 dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_CYCLE_CHECK],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_CYCLE_CHECK], [:])
--- a/m4/d-ino.m4
+++ b/m4/d-ino.m4
@@ -1,4 +1,4 @@
-# serial 12
+# serial 13
 
 dnl From Jim Meyering.
 dnl
@@ -13,7 +13,8 @@
 # with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
-  [AC_CACHE_CHECK([for d_ino member in directory struct],
+  [AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+   AC_CACHE_CHECK([for d_ino member in directory struct],
                   gl_cv_struct_dirent_d_ino,
      [AC_RUN_IFELSE(
         [AC_LANG_PROGRAM(
@@ -37,10 +38,18 @@
            ]])],
            [gl_cv_struct_dirent_d_ino=yes],
            [gl_cv_struct_dirent_d_ino=no],
-           [gl_cv_struct_dirent_d_ino=no])])
-   if test $gl_cv_struct_dirent_d_ino = yes; then
-     AC_DEFINE([D_INO_IN_DIRENT], [1],
-       [Define if struct dirent has a member d_ino that actually works.])
-   fi
+           [case "$host_os" in
+                           # Guess yes on glibc systems with Linux kernel.
+              linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                           # If we don't know, assume the worst.
+              *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
+            esac
+           ])])
+   case "$gl_cv_struct_dirent_d_ino" in
+     *yes)
+       AC_DEFINE([D_INO_IN_DIRENT], [1],
+         [Define if struct dirent has a member d_ino that actually works.])
+       ;;
+   esac
   ]
 )
--- a/m4/dup.m4
+++ b/m4/dup.m4
@@ -1,4 +1,4 @@
-# dup.m4 serial 2
+# dup.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,4 @@
 ])
 
 # Prerequisites of lib/dup.c.
-AC_DEFUN([gl_PREREQ_DUP], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_DUP], [:])
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,4 +1,4 @@
-#serial 17
+#serial 18
 dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -45,22 +45,25 @@
         [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
         [case "$host_os" in
            mingw*) # on this platform, dup2 always returns 0 for success
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
-             gl_cv_func_dup2_works=no;;
-           *) gl_cv_func_dup2_works=yes;;
+             gl_cv_func_dup2_works="guessing no" ;;
+           *) gl_cv_func_dup2_works="guessing yes" ;;
          esac])
       ])
-    if test "$gl_cv_func_dup2_works" = no; then
-      REPLACE_DUP2=1
-    fi
+    case "$gl_cv_func_dup2_works" in
+      *yes) ;;
+      *)
+        REPLACE_DUP2=1
+        ;;
+    esac
   fi
   dnl Replace dup2() for supporting the gnulib-defined fchdir() function,
   dnl to keep fchdir's bookkeeping up-to-date.
--- a/m4/eealloc.m4
+++ b/m4/eealloc.m4
@@ -1,4 +1,4 @@
-# eealloc.m4 serial 2
+# eealloc.m4 serial 3
 dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,6 @@
 [
   AC_REQUIRE([gl_EEMALLOC])
   AC_REQUIRE([gl_EEREALLOC])
-  AC_REQUIRE([AC_C_INLINE])
 ])
 
 AC_DEFUN([gl_EEMALLOC],
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -1,4 +1,4 @@
-# errno_h.m4 serial 10
+# errno_h.m4 serial 12
 dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,9 @@
   AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
     AC_EGREP_CPP([booboo],[
 #include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
 #if !defined ENOMSG
 booboo
 #endif
@@ -49,6 +52,15 @@
 #if !defined ECANCELED
 booboo
 #endif
+#if !defined EOWNERDEAD
+booboo
+#endif
+#if !defined ENOTRECOVERABLE
+booboo
+#endif
+#if !defined EILSEQ
+booboo
+#endif
       ],
       [gl_cv_header_errno_h_complete=no],
       [gl_cv_header_errno_h_complete=yes])
--- a/m4/error.m4
+++ b/m4/error.m4
@@ -23,6 +23,5 @@
 AC_DEFUN([gl_PREREQ_ERROR],
 [
   AC_REQUIRE([AC_FUNC_STRERROR_R])
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])
--- a/m4/euidaccess.m4
+++ b/m4/euidaccess.m4
@@ -1,4 +1,4 @@
-# euidaccess.m4 serial 14
+# euidaccess.m4 serial 15
 dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS],
 [
   AC_REQUIRE([gl_FUNC_EUIDACCESS])
+  AC_CHECK_DECLS([setregid])
   AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], [1],
     [Define this if you prefer euidaccess to return the correct result
      even if this would make it nonreentrant.  Define this only if your
@@ -33,9 +34,8 @@
   dnl Prefer POSIX faccessat over non-standard euidaccess.
   AC_CHECK_FUNCS_ONCE([faccessat])
   dnl Try various other non-standard fallbacks.
-  AC_CHECK_HEADERS_ONCE([libgen.h])
-  AC_CHECK_DECLS_ONCE([setregid])
-  AC_REQUIRE([AC_FUNC_GETGROUPS])
+  AC_CHECK_HEADERS([libgen.h])
+  AC_FUNC_GETGROUPS
 
   # Solaris 9 and 10 need -lgen to get the eaccess function.
   # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
new file mode 100644
--- /dev/null
+++ b/m4/execinfo.m4
@@ -0,0 +1,31 @@
+# Check for GNU-style execinfo.h.
+
+dnl Copyright 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXECINFO_H],
+[
+  AC_CHECK_HEADERS_ONCE([execinfo.h])
+
+  LIB_EXECINFO=''
+  EXECINFO_H='execinfo.h'
+
+  if test $ac_cv_header_execinfo_h = yes; then
+    gl_saved_libs=$LIBS
+      AC_SEARCH_LIBS([backtrace_symbols_fd], [execinfo],
+        [test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
+         LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd])
+    LIBS=$gl_saved_libs
+    test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
+  fi
+
+  if test -n "$EXECINFO_H"; then
+    AC_LIBOBJ([execinfo])
+  fi
+
+  AC_SUBST([EXECINFO_H])
+  AC_SUBST([LIB_EXECINFO])
+  AM_CONDITIONAL([GL_GENERATE_EXECINFO_H], [test -n "$EXECINFO_H"])
+])
--- a/m4/execute.m4
+++ b/m4/execute.m4
@@ -1,4 +1,4 @@
-# execute.m4 serial 4
+# execute.m4 serial 5
 dnl Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,5 @@
 AC_DEFUN([gl_EXECUTE],
 [
   dnl Prerequisites of lib/execute.c.
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_TYPE_MODE_T])
 ])
new file mode 100644
--- /dev/null
+++ b/m4/exp2.m4
@@ -0,0 +1,144 @@
+# exp2.m4 serial 1
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_EXP2],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare exp2().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  EXP2_LIBM=
+  AC_CACHE_CHECK([whether exp2() can be used without linking with libm],
+    [gl_cv_func_exp2_no_libm],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             double exp2 (double);
+             double (*funcptr) (double) = exp2;
+             double x;]],
+           [[return funcptr (x) > 1.5
+                    || exp2 (x) > 1.5;]])],
+        [gl_cv_func_exp2_no_libm=yes],
+        [gl_cv_func_exp2_no_libm=no])
+    ])
+  if test $gl_cv_func_exp2_no_libm = no; then
+    AC_CACHE_CHECK([whether exp2() can be used with libm],
+      [gl_cv_func_exp2_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               double exp2 (double);
+               double (*funcptr) (double) = exp2;
+               double x;]],
+             [[return funcptr (x) > 1.5
+                      || exp2 (x) > 1.5;]])],
+          [gl_cv_func_exp2_in_libm=yes],
+          [gl_cv_func_exp2_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_exp2_in_libm = yes; then
+      EXP2_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_exp2_no_libm = yes \
+     || test $gl_cv_func_exp2_in_libm = yes; then
+    HAVE_EXP2=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has exp2() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([exp2], , [HAVE_DECL_EXP2=0], [[#include <math.h>]])
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $EXP2_LIBM"
+    gl_FUNC_EXP2_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_exp2_works" in
+      *yes) ;;
+      *) REPLACE_EXP2=1 ;;
+    esac
+  else
+    HAVE_EXP2=0
+    HAVE_DECL_EXP2=0
+  fi
+  if test $HAVE_EXP2 = 0 || test $REPLACE_EXP2 = 1; then
+    dnl Find libraries needed to link lib/exp2.c.
+    AC_REQUIRE([gl_FUNC_ISNAND])
+    AC_REQUIRE([gl_FUNC_ROUND])
+    AC_REQUIRE([gl_FUNC_LDEXP])
+    EXP2_LIBM=
+    dnl Append $ISNAND_LIBM to EXP2_LIBM, avoiding gratuitous duplicates.
+    case " $EXP2_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) EXP2_LIBM="$EXP2_LIBM $ISNAND_LIBM" ;;
+    esac
+    dnl Append $ROUND_LIBM to EXP2_LIBM, avoiding gratuitous duplicates.
+    case " $EXP2_LIBM " in
+      *" $ROUND_LIBM "*) ;;
+      *) EXP2_LIBM="$EXP2_LIBM $ROUND_LIBM" ;;
+    esac
+    dnl Append $LDEXP_LIBM to EXP2_LIBM, avoiding gratuitous duplicates.
+    case " $EXP2_LIBM " in
+      *" $LDEXP_LIBM "*) ;;
+      *) EXP2_LIBM="$EXP2_LIBM $LDEXP_LIBM" ;;
+    esac
+  fi
+  AC_SUBST([EXP2_LIBM])
+])
+
+dnl Test whether exp2() works.
+dnl On OpenBSD 4.9, for the argument 0.6, it returns 1.517358639986284397,
+dnl which has a relative error of 0.1%.
+AC_DEFUN([gl_FUNC_EXP2_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether exp2 works], [gl_cv_func_exp2_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+double exp2 (double);
+volatile double x;
+double y;
+int main ()
+{
+  x = 0.6;
+  y = exp2 (x);
+  if (y > 1.516)
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_exp2_works=yes],
+        [gl_cv_func_exp2_works=no],
+        [case "$host_os" in
+           openbsd*) gl_cv_func_exp2_works="guessing no";;
+           *)        gl_cv_func_exp2_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/exp2f.m4
@@ -0,0 +1,34 @@
+# exp2f.m4 serial 1
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_EXP2F],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_EXP2])
+
+  dnl Persuade glibc <math.h> to declare exp2f().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether exp2f() exists. Assume that exp2f(), if it exists, is
+  dnl defined in the same library as exp2().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $EXP2_LIBM"
+  AC_CHECK_FUNCS([exp2f])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_exp2f = yes; then
+    HAVE_EXP2F=1
+    EXP2F_LIBM="$EXP2_LIBM"
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has exp2f() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([exp2f], , [HAVE_DECL_EXP2F=0], [[#include <math.h>]])
+  else
+    HAVE_EXP2F=0
+    HAVE_DECL_EXP2F=0
+    dnl Find libraries needed to link lib/exp2f.c.
+    EXP2F_LIBM="$EXP2_LIBM"
+  fi
+  AC_SUBST([EXP2F_LIBM])
+])
new file mode 100644
--- /dev/null
+++ b/m4/exp2l-ieee.m4
@@ -0,0 +1,15 @@
+# exp2l-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in exp2l.m4 and not inlined in the
+dnl module description), so that gl_FUNC_EXP2L can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_EXP2L_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_exp2l_required=ieee])
+  AC_REQUIRE([gl_FUNC_EXP2L])
+])
new file mode 100644
--- /dev/null
+++ b/m4/exp2l.m4
@@ -0,0 +1,112 @@
+# exp2l.m4 serial 3
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_EXP2L],
+[
+  m4_divert_text([DEFAULTS], [gl_exp2l_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_EXP2])
+
+  dnl Persuade glibc <math.h> to declare exp2l().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether exp2l() exists. Assume that exp2l(), if it exists, is
+  dnl defined in the same library as exp2().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $EXP2_LIBM"
+  AC_CHECK_FUNCS([exp2l])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_exp2l = yes; then
+    HAVE_EXP2L=1
+    EXP2L_LIBM="$EXP2_LIBM"
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has exp2l() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([exp2l], , [HAVE_DECL_EXP2L=0], [[#include <math.h>]])
+    m4_ifdef([gl_FUNC_EXP2L_IEEE], [
+      if test $gl_exp2l_required = ieee && test $REPLACE_EXP2L = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether exp2l works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_exp2l_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $EXP2L_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+#undef exp2l
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double exp2l (long double);
+static long double dummy (long double x) { return 0; }
+static long double zero;
+int main (int argc, char *argv[])
+{
+  long double (*my_exp2l) (long double) = argc ? exp2l : dummy;
+  int result = 0;
+  /* This test fails on OpenBSD 4.9, where exp2l(NaN) = 0.0.  */
+  if (exp2l (zero / zero) == 0.0L)
+    result |= 1;
+  /* This test fails on IRIX 6.5, where exp2l(-Inf) = 1.0.  */
+  if (!(exp2l (-1.0L / zero) == 0.0L))
+    result |= 2;
+  return result;
+}
+              ]])],
+              [gl_cv_func_exp2l_ieee=yes],
+              [gl_cv_func_exp2l_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_exp2l_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_exp2l_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_exp2l_ieee" in
+          *yes) ;;
+          *) REPLACE_EXP2L=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_EXP2L=0
+    HAVE_DECL_EXP2L=0
+  fi
+  if test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; then
+    dnl Find libraries needed to link lib/exp2l.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      EXP2L_LIBM="$EXP2_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      AC_REQUIRE([gl_FUNC_ROUNDL])
+      AC_REQUIRE([gl_FUNC_LDEXPL])
+      EXP2L_LIBM=
+      dnl Append $ISNANL_LIBM to EXP2L_LIBM, avoiding gratuitous duplicates.
+      case " $EXP2L_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) EXP2L_LIBM="$EXP2L_LIBM $ISNANL_LIBM" ;;
+      esac
+      dnl Append $ROUNDL_LIBM to EXP2L_LIBM, avoiding gratuitous duplicates.
+      case " $EXP2L_LIBM " in
+        *" $ROUNDL_LIBM "*) ;;
+        *) EXP2L_LIBM="$EXP2L_LIBM $ROUNDL_LIBM" ;;
+      esac
+      dnl Append $LDEXPL_LIBM to EXP2L_LIBM, avoiding gratuitous duplicates.
+      case " $EXP2L_LIBM " in
+        *" $LDEXPL_LIBM "*) ;;
+        *) EXP2L_LIBM="$EXP2L_LIBM $LDEXPL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([EXP2L_LIBM])
+])
--- a/m4/expf.m4
+++ b/m4/expf.m4
@@ -1,4 +1,4 @@
-# expf.m4 serial 1
+# expf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_EXP])
 
+  dnl Persuade glibc <math.h> to declare expf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether expf() exists. Assume that expf(), if it exists, is
   dnl defined in the same library as exp().
   save_LIBS="$LIBS"
--- a/m4/expl.m4
+++ b/m4/expl.m4
@@ -1,4 +1,4 @@
-# expl.m4 serial 5
+# expl.m4 serial 8
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = expl;
              long double x;]],
-           [[return expl (x) > 1.5;]])],
+           [[return funcptr (x) > 1.5
+                    || expl (x) > 1.5;]])],
         [gl_cv_func_expl_no_libm=yes],
         [gl_cv_func_expl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = expl;
                long double x;]],
-             [[return expl (x) > 1.5;]])],
+             [[return funcptr (x) > 1.5
+                      || expl (x) > 1.5;]])],
           [gl_cv_func_expl_in_libm=yes],
           [gl_cv_func_expl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,7 +56,7 @@
   if test $gl_cv_func_expl_no_libm = yes \
      || test $gl_cv_func_expl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has expl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has expl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([expl], , [HAVE_DECL_EXPL=0], [[#include <math.h>]])
   else
     HAVE_DECL_EXPL=0
@@ -62,8 +66,25 @@
       AC_REQUIRE([gl_FUNC_EXP])
       EXPL_LIBM="$EXP_LIBM"
     else
-      AC_REQUIRE([gl_FUNC_FLOORL])
-      EXPL_LIBM="$FLOORL_LIBM"
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      AC_REQUIRE([gl_FUNC_ROUNDL])
+      AC_REQUIRE([gl_FUNC_LDEXPL])
+      EXPL_LIBM=
+      dnl Append $ISNANL_LIBM to EXPL_LIBM, avoiding gratuitous duplicates.
+      case " $EXPL_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) EXPL_LIBM="$EXPL_LIBM $ISNANL_LIBM" ;;
+      esac
+      dnl Append $ROUNDL_LIBM to EXPL_LIBM, avoiding gratuitous duplicates.
+      case " $EXPL_LIBM " in
+        *" $ROUNDL_LIBM "*) ;;
+        *) EXPL_LIBM="$EXPL_LIBM $ROUNDL_LIBM" ;;
+      esac
+      dnl Append $LDEXPL_LIBM to EXPL_LIBM, avoiding gratuitous duplicates.
+      case " $EXPL_LIBM " in
+        *" $LDEXPL_LIBM "*) ;;
+        *) EXPL_LIBM="$EXPL_LIBM $LDEXPL_LIBM" ;;
+      esac
     fi
   fi
   AC_SUBST([EXPL_LIBM])
new file mode 100644
--- /dev/null
+++ b/m4/expm1-ieee.m4
@@ -0,0 +1,15 @@
+# expm1-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in expm1.m4 and not inlined in the
+dnl module description), so that gl_FUNC_EXPM1 can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_EXPM1_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_expm1_required=ieee])
+  AC_REQUIRE([gl_FUNC_EXPM1])
+])
new file mode 100644
--- /dev/null
+++ b/m4/expm1.m4
@@ -0,0 +1,134 @@
+# expm1.m4 serial 3
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_EXPM1],
+[
+  m4_divert_text([DEFAULTS], [gl_expm1_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare expm1().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  EXPM1_LIBM=
+  AC_CACHE_CHECK([whether expm1() can be used without linking with libm],
+    [gl_cv_func_expm1_no_libm],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             double (*funcptr) (double) = expm1;
+             double x;]],
+           [[return funcptr (x) > 0.5
+                    || expm1 (x) > 0.5;]])],
+        [gl_cv_func_expm1_no_libm=yes],
+        [gl_cv_func_expm1_no_libm=no])
+    ])
+  if test $gl_cv_func_expm1_no_libm = no; then
+    AC_CACHE_CHECK([whether expm1() can be used with libm],
+      [gl_cv_func_expm1_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               double (*funcptr) (double) = expm1;
+               double x;]],
+             [[return funcptr (x) > 0.5
+                      || expm1 (x) > 0.5;]])],
+          [gl_cv_func_expm1_in_libm=yes],
+          [gl_cv_func_expm1_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_expm1_in_libm = yes; then
+      EXPM1_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_expm1_no_libm = yes \
+     || test $gl_cv_func_expm1_in_libm = yes; then
+    :
+    m4_ifdef([gl_FUNC_EXPM1_IEEE], [
+      if test $gl_expm1_required = ieee && test $REPLACE_EXPM1 = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether expm1 works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_expm1_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $EXPM1_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_DOUBLE_MINUS_ZERO_CODE[
+]gl_DOUBLE_SIGNBIT_CODE[
+static double dummy (double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  double (*my_expm1) (double) = argc ? expm1 : dummy;
+  double y = my_expm1 (minus_zerod);
+  if (!(y == 0.0) || (signbitd (minus_zerod) && !signbitd (y)))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_expm1_ieee=yes],
+              [gl_cv_func_expm1_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_expm1_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_expm1_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_expm1_ieee" in
+          *yes) ;;
+          *) REPLACE_EXPM1=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_EXPM1=0
+  fi
+  if test $HAVE_EXPM1 = 0 || test $REPLACE_EXPM1 = 1; then
+    dnl Find libraries needed to link lib/expm1.c.
+    AC_REQUIRE([gl_FUNC_ISNAND])
+    AC_REQUIRE([gl_FUNC_EXP])
+    AC_REQUIRE([gl_FUNC_ROUND])
+    AC_REQUIRE([gl_FUNC_LDEXP])
+    EXPM1_LIBM=
+    dnl Append $ISNAND_LIBM to EXPM1_LIBM, avoiding gratuitous duplicates.
+    case " $EXPM1_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) EXPM1_LIBM="$EXPM1_LIBM $ISNAND_LIBM" ;;
+    esac
+    dnl Append $EXP_LIBM to EXPM1_LIBM, avoiding gratuitous duplicates.
+    case " $EXPM1_LIBM " in
+      *" $EXP_LIBM "*) ;;
+      *) EXPM1_LIBM="$EXPM1_LIBM $EXP_LIBM" ;;
+    esac
+    dnl Append $ROUND_LIBM to EXPM1_LIBM, avoiding gratuitous duplicates.
+    case " $EXPM1_LIBM " in
+      *" $ROUND_LIBM "*) ;;
+      *) EXPM1_LIBM="$EXPM1_LIBM $ROUND_LIBM" ;;
+    esac
+    dnl Append $LDEXP_LIBM to EXPM1_LIBM, avoiding gratuitous duplicates.
+    case " $EXPM1_LIBM " in
+      *" $LDEXP_LIBM "*) ;;
+      *) EXPM1_LIBM="$EXPM1_LIBM $LDEXP_LIBM" ;;
+    esac
+  fi
+  AC_SUBST([EXPM1_LIBM])
+])
new file mode 100644
--- /dev/null
+++ b/m4/expm1f.m4
@@ -0,0 +1,71 @@
+# expm1f.m4 serial 2
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_EXPM1F],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_EXPM1])
+
+  dnl Persuade glibc <math.h> to declare expm1f().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether expm1f() exists. Assume that expm1f(), if it exists, is
+  dnl defined in the same library as expm1().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $EXPM1_LIBM"
+  AC_CHECK_FUNCS([expm1f])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_expm1f = yes; then
+    EXPM1F_LIBM="$EXPM1_LIBM"
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $EXPM1F_LIBM"
+    gl_FUNC_EXPM1F_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_expm1f_works" in
+      *yes) ;;
+      *) REPLACE_EXPM1F=1 ;;
+    esac
+  else
+    HAVE_EXPM1F=0
+  fi
+  if test $HAVE_EXPM1F = 0 || test $REPLACE_EXPM1F = 1; then
+    dnl Find libraries needed to link lib/expm1f.c.
+    EXPM1F_LIBM="$EXPM1_LIBM"
+  fi
+  AC_SUBST([EXPM1F_LIBM])
+])
+
+dnl Test whether expm1f() works.
+dnl On IRIX 6.5, for arguments <= -17.32868, it returns -5.6295e14.
+AC_DEFUN([gl_FUNC_EXPM1F_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether expm1f works], [gl_cv_func_expm1f_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile float x;
+float y;
+int main ()
+{
+  x = -100.0f;
+  y = expm1f (x);
+  if (y < -1.0f)
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_expm1f_works=yes],
+        [gl_cv_func_expm1f_works=no],
+        [case "$host_os" in
+           irix*) gl_cv_func_expm1f_works="guessing no";;
+           *)     gl_cv_func_expm1f_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/expm1l.m4
@@ -0,0 +1,108 @@
+# expm1l.m4 serial 2
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_EXPM1L],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
+  dnl Persuade glibc <math.h> to declare expm1l().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  EXPM1L_LIBM=
+  AC_CACHE_CHECK([whether expm1l() can be used without linking with libm],
+    [gl_cv_func_expm1l_no_libm],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             long double expm1l (long double);
+             long double (*funcptr) (long double) = expm1l;
+             long double x;]],
+           [[return funcptr (x) > 0.5
+                    || expm1l (x) > 0.5;]])],
+        [gl_cv_func_expm1l_no_libm=yes],
+        [gl_cv_func_expm1l_no_libm=no])
+    ])
+  if test $gl_cv_func_expm1l_no_libm = no; then
+    AC_CACHE_CHECK([whether expm1l() can be used with libm],
+      [gl_cv_func_expm1l_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               extern
+               #ifdef __cplusplus
+               "C"
+               #endif
+               long double expm1l (long double);
+               long double (*funcptr) (long double) = expm1l;
+               long double x;]],
+             [[return funcptr (x) > 0.5
+                      || expm1l (x) > 0.5;]])],
+          [gl_cv_func_expm1l_in_libm=yes],
+          [gl_cv_func_expm1l_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_expm1l_in_libm = yes; then
+      EXPM1L_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_expm1l_no_libm = yes \
+     || test $gl_cv_func_expm1l_in_libm = yes; then
+    HAVE_EXPM1L=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has expm1l() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([expm1l], , [HAVE_DECL_EXPM1L=0], [[#include <math.h>]])
+  else
+    HAVE_EXPM1L=0
+    HAVE_DECL_EXPM1L=0
+    dnl Find libraries needed to link lib/expm1l.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      AC_REQUIRE([gl_FUNC_EXPM1])
+      EXPM1L_LIBM="$EXPM1_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      AC_REQUIRE([gl_FUNC_EXPL])
+      AC_REQUIRE([gl_FUNC_ROUNDL])
+      AC_REQUIRE([gl_FUNC_LDEXPL])
+      EXPM1L_LIBM=
+      dnl Append $ISNANL_LIBM to EXPM1L_LIBM, avoiding gratuitous duplicates.
+      case " $EXPM1L_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) EXPM1L_LIBM="$EXPM1L_LIBM $ISNANL_LIBM" ;;
+      esac
+      dnl Append $EXPL_LIBM to EXPM1L_LIBM, avoiding gratuitous duplicates.
+      case " $EXPM1L_LIBM " in
+        *" $EXPL_LIBM "*) ;;
+        *) EXPM1L_LIBM="$EXPM1L_LIBM $EXPL_LIBM" ;;
+      esac
+      dnl Append $ROUNDL_LIBM to EXPM1L_LIBM, avoiding gratuitous duplicates.
+      case " $EXPM1L_LIBM " in
+        *" $ROUNDL_LIBM "*) ;;
+        *) EXPM1L_LIBM="$EXPM1L_LIBM $ROUNDL_LIBM" ;;
+      esac
+      dnl Append $LDEXPL_LIBM to EXPM1L_LIBM, avoiding gratuitous duplicates.
+      case " $EXPM1L_LIBM " in
+        *" $LDEXPL_LIBM "*) ;;
+        *) EXPM1L_LIBM="$EXPM1L_LIBM $LDEXPL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([EXPM1L_LIBM])
+])
--- a/m4/exponentd.m4
+++ b/m4/exponentd.m4
@@ -1,4 +1,4 @@
-# exponentd.m4 serial 2
+# exponentd.m4 serial 3
 dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -80,7 +80,8 @@
           dnl different sets of instructions: The older FPA instructions assume
           dnl that they are stored in big-endian word order, while the words
           dnl (like integer types) are stored in little-endian byte order.
-          dnl The newer VFP instructions assume little-endian order consistenly.
+          dnl The newer VFP instructions assume little-endian order
+          dnl consistently.
           AC_EGREP_CPP([mixed_endianness], [
 #if defined arm || defined __arm || defined __arm__
   mixed_endianness
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 11  -*- Autoconf -*-
+# serial 12  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
@@ -67,7 +67,7 @@
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
-/* Enable general extensions on MacOS X.  */
+/* Enable general extensions on Mac OS X.  */
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
new file mode 100644
--- /dev/null
+++ b/m4/extern-inline.m4
@@ -0,0 +1,56 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+  AH_VERBATIM([extern_inline],
+[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
+   _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
+   _GL_INLINE_HEADER_BEGIN contains useful stuff to put
+     in an include file, before uses of _GL_INLINE.
+     It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
+     when FOO is an inline function in the header; see
+     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
+   _GL_INLINE_HEADER_END contains useful stuff to put
+     in the same include file, after uses of _GL_INLINE.  */
+#if (__GNUC__ \
+     ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+     : 199901L <= __STDC_VERSION__)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# if __GNUC_GNU_INLINE__
+   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+#  define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+#else
+# define _GL_INLINE static
+# define _GL_EXTERN_INLINE static
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+#  define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+    _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
--- a/m4/fabsf.m4
+++ b/m4/fabsf.m4
@@ -1,4 +1,4 @@
-# fabsf.m4 serial 2
+# fabsf.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_FABS])
 
+  dnl Persuade glibc <math.h> to declare fabsf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether fabsf() exists. We cannot assume that fabsf(), if it
   dnl exists, is defined in the same library as fabs(). This is not the case
   dnl on FreeBSD, NetBSD, OpenBSD.
new file mode 100644
--- /dev/null
+++ b/m4/fabsl.m4
@@ -0,0 +1,74 @@
+# fabsl.m4 serial 2
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FABSL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
+  dnl Persuade glibc <math.h> to declare fabsl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine FABSL_LIBM.
+  gl_MATHFUNC([fabsl], [long double], [(long double)])
+  if test $gl_cv_func_fabsl_no_libm = yes \
+     || test $gl_cv_func_fabsl_in_libm = yes; then
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $FABSL_LIBM"
+    gl_FUNC_FABSL_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_fabsl_works" in
+      *yes) ;;
+      *) REPLACE_FABSL=1 ;;
+    esac
+  else
+    HAVE_FABSL=0
+  fi
+  if test $HAVE_FABSL = 0 || test $REPLACE_FABSL = 1; then
+    dnl Find libraries needed to link lib/fabsl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      AC_REQUIRE([gl_FUNC_FABS])
+      FABSL_LIBM="$FABS_LIBM"
+    else
+      FABSL_LIBM=
+    fi
+  fi
+  AC_SUBST([FABSL_LIBM])
+])
+
+dnl Test whether fabsl() works on a minus zero.
+dnl On IRIX 6.5, with gcc 4.2.4 and without -fno-builtin-fabsl, the value is a
+dnl minus zero rather than a positive zero.
+AC_DEFUN([gl_FUNC_FABSL_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether fabsl works], [gl_cv_func_fabsl_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <float.h>
+#include <math.h>
+#include <string.h>
+volatile long double x;
+long double y;
+long double zero = 0.0L;
+int main ()
+{
+  x = - (LDBL_MIN * LDBL_MIN * LDBL_MIN);
+  y = fabsl (x);
+  return (memcmp (&y, &zero, sizeof y) != 0);
+}
+]])],
+        [gl_cv_func_fabsl_works=yes],
+        [gl_cv_func_fabsl_works=no],
+        [case "$host_os" in
+           irix*) gl_cv_func_fabsl_works="guessing no";;
+           *)     gl_cv_func_fabsl_works="guessing yes";;
+         esac
+        ])
+    ])
+])
--- a/m4/faccessat.m4
+++ b/m4/faccessat.m4
@@ -1,4 +1,4 @@
-# serial 5
+# serial 6
 # See if we need to provide faccessat replacement.
 
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -24,5 +24,5 @@
 # Prerequisites of lib/faccessat.m4.
 AC_DEFUN([gl_PREREQ_FACCESSAT],
 [
-  AC_CHECK_FUNCS_ONCE([access])
+  AC_CHECK_FUNCS([access])
 ])
--- a/m4/fatal-signal.m4
+++ b/m4/fatal-signal.m4
@@ -1,4 +1,4 @@
-# fatal-signal.m4 serial 8
+# fatal-signal.m4 serial 9
 dnl Copyright (C) 2003-2004, 2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,6 @@
 
 AC_DEFUN([gl_FATAL_SIGNAL],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
   AC_CHECK_HEADERS_ONCE([unistd.h])
   gl_PREREQ_SIG_HANDLER_H
--- a/m4/fbufmode.m4
+++ b/m4/fbufmode.m4
@@ -1,4 +1,4 @@
-# fbufmode.m4 serial 1
+# fbufmode.m4 serial 2
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,5 +7,5 @@
 AC_DEFUN([gl_FUNC_FBUFMODE],
 [
   dnl Prerequisites of lib/fbufmode.c.
-  AC_CHECK_FUNCS_ONCE([__flbf])
+  AC_CHECK_FUNCS_ONCE([__flbf __fbufsize])
 ])
--- a/m4/fchdir.m4
+++ b/m4/fchdir.m4
@@ -1,4 +1,4 @@
-# fchdir.m4 serial 20
+# fchdir.m4 serial 21
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   AC_CHECK_DECLS_ONCE([fchdir])
   if test $ac_cv_have_decl_fchdir = no; then
@@ -29,11 +30,20 @@
 ]], [return open(".", O_RDONLY) < 0;])],
         [gl_cv_func_open_directory_works=yes],
         [gl_cv_func_open_directory_works=no],
-        [gl_cv_func_open_directory_works="guessing no"])])
-    if test "$gl_cv_func_open_directory_works" != yes; then
-      AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_open_directory_works="guessing no" ;;
+         esac
+        ])])
+    case "$gl_cv_func_open_directory_works" in
+      *yes) ;;
+      *)
+        AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should
 work around the inability to open a directory.])
-    fi
+        ;;
+    esac
   fi
 ])
 
--- a/m4/fcntl-o.m4
+++ b/m4/fcntl-o.m4
@@ -50,7 +50,18 @@
             #if HAVE_SYMLINK
             {
               static char const sym[] = "conftest.sym";
-              if (symlink (".", sym) != 0)
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
                 result |= 2;
               else
                 {
--- a/m4/fdatasync.m4
+++ b/m4/fdatasync.m4
@@ -1,4 +1,4 @@
-# fdatasync.m4 serial 3
+# fdatasync.m4 serial 4
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@
 
   if test $ac_cv_have_decl_fdatasync = no; then
     HAVE_DECL_FDATASYNC=0
-    dnl MacOS X 10.7 has fdatasync but does not declare it.
+    dnl Mac OS X 10.7 has fdatasync but does not declare it.
     AC_CHECK_FUNCS([fdatasync])
     if test $ac_cv_func_fdatasync = no; then
       HAVE_FDATASYNC=0
--- a/m4/fdopen.m4
+++ b/m4/fdopen.m4
@@ -1,4 +1,4 @@
-# fdopen.m4 serial 2
+# fdopen.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -25,10 +25,8 @@
   FILE *fp;
   errno = 0;
   fp = fdopen (-1, "r");
-  if (fp != NULL)
+  if (fp == NULL && errno == 0)
     return 1;
-  if (errno == 0)
-    return 2;
   return 0;
 }]])],
           [gl_cv_func_fdopen_works=yes],
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -1,4 +1,4 @@
-# serial 9
+# serial 10
 # See if we need to provide fdopendir.
 
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@
 AC_DEFUN([gl_FUNC_FDOPENDIR],
 [
   AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
@@ -43,9 +44,18 @@
      return result;])],
          [gl_cv_func_fdopendir_works=yes],
          [gl_cv_func_fdopendir_works=no],
-         [gl_cv_func_fdopendir_works="guessing no"])])
-    if test "$gl_cv_func_fdopendir_works" != yes; then
-      REPLACE_FDOPENDIR=1
-    fi
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_fdopendir_works="guessing no" ;;
+          esac
+         ])])
+    case "$gl_cv_func_fdopendir_works" in
+      *yes) ;;
+      *)
+        REPLACE_FDOPENDIR=1
+        ;;
+    esac
   fi
 ])
--- a/m4/fflush.m4
+++ b/m4/fflush.m4
@@ -1,4 +1,4 @@
-# fflush.m4 serial 13
+# fflush.m4 serial 14
 
 # Copyright (C) 2007-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -79,8 +79,4 @@
 ])
 
 # Prerequisites of lib/fflush.c.
-AC_DEFUN([gl_PREREQ_FFLUSH],
-[
-  AC_REQUIRE([AC_C_INLINE])
-  :
-])
+AC_DEFUN([gl_PREREQ_FFLUSH], [:])
--- a/m4/floor.m4
+++ b/m4/floor.m4
@@ -1,4 +1,4 @@
-# floor.m4 serial 7
+# floor.m4 serial 8
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,7 @@
   fi
   m4_ifdef([gl_FUNC_FLOOR_IEEE], [
     if test $gl_floor_required = ieee && test $REPLACE_FLOOR = 0; then
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
       AC_CACHE_CHECK([whether floor works according to ISO C 99 with IEC 60559],
         [gl_cv_func_floor_ieee],
         [
@@ -40,7 +41,13 @@
             ]])],
             [gl_cv_func_floor_ieee=yes],
             [gl_cv_func_floor_ieee=no],
-            [gl_cv_func_floor_ieee="guessing no"])
+            [case "$host_os" in
+                       # Guess yes on glibc systems.
+               *-gnu*) gl_cv_func_floor_ieee="guessing yes" ;;
+                       # If we don't know, assume the worst.
+               *)      gl_cv_func_floor_ieee="guessing no" ;;
+             esac
+            ])
           LIBS="$save_LIBS"
         ])
       case "$gl_cv_func_floor_ieee" in
--- a/m4/floorf.m4
+++ b/m4/floorf.m4
@@ -1,4 +1,4 @@
-# floorf.m4 serial 11
+# floorf.m4 serial 13
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,7 @@
     fi
     m4_ifdef([gl_FUNC_FLOORF_IEEE], [
       if test $gl_floorf_required = ieee && test $REPLACE_FLOORF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559],
           [gl_cv_func_floorf_ieee],
           [
@@ -47,7 +48,13 @@
               ]])],
               [gl_cv_func_floorf_ieee=yes],
               [gl_cv_func_floorf_ieee=no],
-              [gl_cv_func_floorf_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_floorf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_floorf_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_floorf_ieee" in
@@ -78,8 +85,9 @@
            # define __NO_MATH_INLINES 1 /* for glibc */
            #endif
            #include <math.h>
+           float (*funcptr) (float) = floorf;
            float x;]],
-         [[x = floorf(x);]])],
+         [[x = funcptr(x) + floorf(x);]])],
       [gl_cv_func_floorf_libm=])
     if test "$gl_cv_func_floorf_libm" = "?"; then
       save_LIBS="$LIBS"
@@ -90,8 +98,9 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             float (*funcptr) (float) = floorf;
              float x;]],
-           [[x = floorf(x);]])],
+           [[x = funcptr(x) + floorf(x);]])],
         [gl_cv_func_floorf_libm="-lm"])
       LIBS="$save_LIBS"
     fi
--- a/m4/floorl.m4
+++ b/m4/floorl.m4
@@ -1,4 +1,4 @@
-# floorl.m4 serial 10
+# floorl.m4 serial 11
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -49,8 +49,9 @@
            # define __NO_MATH_INLINES 1 /* for glibc */
            #endif
            #include <math.h>
+           long double (*funcptr) (long double) = floorl;
            long double x;]],
-         [[x = floorl(x);]])],
+         [[x = funcptr (x) + floorl(x);]])],
       [gl_cv_func_floorl_libm=])
     if test "$gl_cv_func_floorl_libm" = "?"; then
       save_LIBS="$LIBS"
@@ -61,8 +62,9 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = floorl;
              long double x;]],
-           [[x = floorl(x);]])],
+           [[x = funcptr (x) + floorl(x);]])],
         [gl_cv_func_floorl_libm="-lm"])
       LIBS="$save_LIBS"
     fi
--- a/m4/fma.m4
+++ b/m4/fma.m4
@@ -1,4 +1,4 @@
-# fma.m4 serial 1
+# fma.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,13 +9,25 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
 
   dnl Determine FMA_LIBM.
-  gl_MATHFUNC([fma], [double], [(double, double, double)])
+  gl_MATHFUNC([fma], [double], [(double, double, double)],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     double fma (double, double, double);
+    ])
   if test $gl_cv_func_fma_no_libm = yes \
      || test $gl_cv_func_fma_in_libm = yes; then
-    gl_FUNC_FMA_WORKS
-    case "$gl_cv_func_fma_works" in
-      *no) REPLACE_FMA=1 ;;
-    esac
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has fma() in libm but doesn't declare it in <math.h>,
+    dnl and the function is buggy.
+    AC_CHECK_DECL([fma], , [REPLACE_FMA=1], [[#include <math.h>]])
+    if test $REPLACE_FMA = 0; then
+      gl_FUNC_FMA_WORKS
+      case "$gl_cv_func_fma_works" in
+        *no) REPLACE_FMA=1 ;;
+      esac
+    fi
   else
     HAVE_FMA=0
   fi
--- a/m4/fmaf.m4
+++ b/m4/fmaf.m4
@@ -1,4 +1,4 @@
-# fmaf.m4 serial 1
+# fmaf.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,14 +8,29 @@
 [
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
 
+  dnl Persuade glibc <math.h> to declare fmaf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Determine FMAF_LIBM.
-  gl_MATHFUNC([fmaf], [float], [(float, float, float)])
+  gl_MATHFUNC([fmaf], [float], [(float, float, float)],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     float fmaf (float, float, float);
+    ])
   if test $gl_cv_func_fmaf_no_libm = yes \
      || test $gl_cv_func_fmaf_in_libm = yes; then
-    gl_FUNC_FMAF_WORKS
-    case "$gl_cv_func_fmaf_works" in
-      *no) REPLACE_FMAF=1 ;;
-    esac
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has fmaf() in libm but doesn't declare it in <math.h>,
+    dnl and the function is likely buggy.
+    AC_CHECK_DECL([fmaf], , [REPLACE_FMAF=1], [[#include <math.h>]])
+    if test $REPLACE_FMAF = 0; then
+      gl_FUNC_FMAF_WORKS
+      case "$gl_cv_func_fmaf_works" in
+        *no) REPLACE_FMAF=1 ;;
+      esac
+    fi
   else
     HAVE_FMAF=0
   fi
--- a/m4/fmal.m4
+++ b/m4/fmal.m4
@@ -1,4 +1,4 @@
-# fmal.m4 serial 1
+# fmal.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,14 +9,29 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
+  dnl Persuade glibc <math.h> to declare fmal().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Determine FMAL_LIBM.
-  gl_MATHFUNC([fmal], [long double], [(long double, long double, long double)])
+  gl_MATHFUNC([fmal], [long double], [(long double, long double, long double)],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     long double fmal (long double, long double, long double);
+    ])
   if test $gl_cv_func_fmal_no_libm = yes \
      || test $gl_cv_func_fmal_in_libm = yes; then
-    gl_FUNC_FMAL_WORKS
-    case "$gl_cv_func_fmal_works" in
-      *no) REPLACE_FMAL=1 ;;
-    esac
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has fmal() in libm but doesn't declare it in <math.h>,
+    dnl and the function is buggy.
+    AC_CHECK_DECL([fmal], , [REPLACE_FMAL=1], [[#include <math.h>]])
+    if test $REPLACE_FMAL = 0; then
+      gl_FUNC_FMAL_WORKS
+      case "$gl_cv_func_fmal_works" in
+        *no) REPLACE_FMAL=1 ;;
+      esac
+    fi
   else
     HAVE_FMAL=0
   fi
@@ -339,7 +354,7 @@
       failed_tests |= 16;
   }
   /* This test fails on glibc 2.11 x86,x86_64,powerpc glibc 2.7 hppa,sparc,
-     MacOS X 10.5, FreeBSD 6.4 x86, OSF/1 5.1, mingw.  */
+     Mac OS X 10.5, FreeBSD 6.4 x86, OSF/1 5.1, mingw.  */
   {
     volatile long double x = ldexpl (1.0L, LDBL_MAX_EXP - 1);
     volatile long double y = 2.0L;
new file mode 100644
--- /dev/null
+++ b/m4/fmod-ieee.m4
@@ -0,0 +1,15 @@
+# fmod-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in fmod.m4 and not inlined in the
+dnl module description), so that gl_FUNC_FMOD can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_FMOD_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_fmod_required=ieee])
+  AC_REQUIRE([gl_FUNC_FMOD])
+])
--- a/m4/fmod.m4
+++ b/m4/fmod.m4
@@ -1,4 +1,4 @@
-# fmod.m4 serial 1
+# fmod.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,104 @@
 
 AC_DEFUN([gl_FUNC_FMOD],
 [
+  m4_divert_text([DEFAULTS], [gl_fmod_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
   dnl Determine FMOD_LIBM.
   gl_COMMON_DOUBLE_MATHFUNC([fmod])
+
+  m4_ifdef([gl_FUNC_FMOD_IEEE], [
+    if test $gl_fmod_required = ieee && test $REPLACE_FMOD = 0; then
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+      AC_CACHE_CHECK([whether fmod works according to ISO C 99 with IEC 60559],
+        [gl_cv_func_fmod_ieee],
+        [
+          save_LIBS="$LIBS"
+          LIBS="$LIBS $FMOD_LIBM"
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_DOUBLE_MINUS_ZERO_CODE[
+]gl_DOUBLE_SIGNBIT_CODE[
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+static double dummy (double x, double y) { return 0; }
+int main (int argc, char *argv[])
+{
+  double (*my_fmod) (double, double) = argc ? fmod : dummy;
+  int result = 0;
+  double f;
+  /* Test fmod(...,0.0).
+     This test fails on OSF/1 5.1.  */
+  f = my_fmod (2.0, 0.0);
+  if (numeric_equal (f, f))
+    result |= 1;
+  /* Test fmod(-0.0,...).
+     This test fails on native Windows.  */
+  f = my_fmod (minus_zerod, 2.0);
+  if (!(f == 0.0) || (signbitd (minus_zerod) && !signbitd (f)))
+    result |= 2;
+  return result;
+}
+            ]])],
+            [gl_cv_func_fmod_ieee=yes],
+            [gl_cv_func_fmod_ieee=no],
+            [case "$host_os" in
+                       # Guess yes on glibc systems.
+               *-gnu*) gl_cv_func_fmod_ieee="guessing yes" ;;
+                       # If we don't know, assume the worst.
+               *)      gl_cv_func_fmod_ieee="guessing no" ;;
+             esac
+            ])
+          LIBS="$save_LIBS"
+        ])
+      case "$gl_cv_func_fmod_ieee" in
+        *yes) ;;
+        *) REPLACE_FMOD=1 ;;
+      esac
+    fi
+  ])
+  if test $REPLACE_FMOD = 1; then
+    dnl Find libraries needed to link lib/fmod.c.
+    AC_REQUIRE([gl_FUNC_FABS])
+    AC_REQUIRE([gl_FUNC_FREXP])
+    AC_REQUIRE([gl_FUNC_TRUNC])
+    AC_REQUIRE([gl_FUNC_LDEXP])
+    AC_REQUIRE([gl_FUNC_ISNAND])
+    FMOD_LIBM=
+    dnl Append $FABS_LIBM to FMOD_LIBM, avoiding gratuitous duplicates.
+    case " $FMOD_LIBM " in
+      *" $FABS_LIBM "*) ;;
+      *) FMOD_LIBM="$FMOD_LIBM $FABS_LIBM" ;;
+    esac
+    dnl Append $FREXP_LIBM to FMOD_LIBM, avoiding gratuitous duplicates.
+    case " $FMOD_LIBM " in
+      *" $FREXP_LIBM "*) ;;
+      *) FMOD_LIBM="$FMOD_LIBM $FREXP_LIBM" ;;
+    esac
+    dnl Append $TRUNC_LIBM to FMOD_LIBM, avoiding gratuitous duplicates.
+    case " $FMOD_LIBM " in
+      *" $TRUNC_LIBM "*) ;;
+      *) FMOD_LIBM="$FMOD_LIBM $TRUNC_LIBM" ;;
+    esac
+    dnl Append $LDEXP_LIBM to FMOD_LIBM, avoiding gratuitous duplicates.
+    case " $FMOD_LIBM " in
+      *" $LDEXP_LIBM "*) ;;
+      *) FMOD_LIBM="$FMOD_LIBM $LDEXP_LIBM" ;;
+    esac
+    dnl Append $ISNAND_LIBM to FMOD_LIBM, avoiding gratuitous duplicates.
+    case " $FMOD_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) FMOD_LIBM="$FMOD_LIBM $ISNAND_LIBM" ;;
+    esac
+  fi
 ])
new file mode 100644
--- /dev/null
+++ b/m4/fmodf-ieee.m4
@@ -0,0 +1,15 @@
+# fmodf-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in fmodf.m4 and not inlined in the
+dnl module description), so that gl_FUNC_FMODF can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_FMODF_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_fmodf_required=ieee])
+  AC_REQUIRE([gl_FUNC_FMODF])
+])
--- a/m4/fmodf.m4
+++ b/m4/fmodf.m4
@@ -1,4 +1,4 @@
-# fmodf.m4 serial 1
+# fmodf.m4 serial 5
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,9 +6,13 @@
 
 AC_DEFUN([gl_FUNC_FMODF],
 [
+  m4_divert_text([DEFAULTS], [gl_fmodf_required=plain])
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_FMOD])
 
+  dnl Persuade glibc <math.h> to declare fmodf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether fmodf() exists. Assume that fmodf(), if it exists, is
   dnl defined in the same library as fmod().
   save_LIBS="$LIBS"
@@ -17,8 +21,63 @@
   LIBS="$save_LIBS"
   if test $ac_cv_func_fmodf = yes; then
     FMODF_LIBM="$FMOD_LIBM"
+    m4_ifdef([gl_FUNC_FMODF_IEEE], [
+      if test $gl_fmodf_required = ieee && test $REPLACE_FMODF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether fmodf works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_fmodf_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $FMODF_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (float x, float y)
+{
+  return x == y;
+}
+static float dummy (float x, float y) { return 0; }
+int main (int argc, char *argv[])
+{
+  float (*my_fmodf) (float, float) = argc ? fmodf : dummy;
+  float f;
+  /* Test fmodf(...,0.0f).
+     This test fails on OSF/1 5.1.  */
+  f = my_fmodf (2.0f, 0.0f);
+  if (numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_fmodf_ieee=yes],
+              [gl_cv_func_fmodf_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_fmodf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_fmodf_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_fmodf_ieee" in
+          *yes) ;;
+          *) REPLACE_FMODF=1 ;;
+        esac
+      fi
+    ])
   else
     HAVE_FMODF=0
+  fi
+  if test $HAVE_FMODF = 0 || test $REPLACE_FMODF = 1; then
+    dnl Find libraries needed to link lib/fmodf.c.
     FMODF_LIBM="$FMOD_LIBM"
   fi
   AC_SUBST([FMODF_LIBM])
new file mode 100644
--- /dev/null
+++ b/m4/fmodl-ieee.m4
@@ -0,0 +1,15 @@
+# fmodl-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in fmodl.m4 and not inlined in the
+dnl module description), so that gl_FUNC_FMODL can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_FMODL_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_fmodl_required=ieee])
+  AC_REQUIRE([gl_FUNC_FMODL])
+])
new file mode 100644
--- /dev/null
+++ b/m4/fmodl.m4
@@ -0,0 +1,129 @@
+# fmodl.m4 serial 5
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FMODL],
+[
+  m4_divert_text([DEFAULTS], [gl_fmodl_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_FMOD])
+
+  dnl Persuade glibc <math.h> to declare fmodl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether fmodl() is declared.
+  dnl AIX 5.1 has fmodl() in libc but doesn't declare it in <math.h>, and the
+  dnl function produces NaN results for finite values.
+  AC_CHECK_DECL([fmodl],
+    [ac_cv_have_decl_fmodl=yes], [ac_cv_have_decl_fmodl=no],
+    [[#include <math.h>]])
+
+  dnl Test whether fmodl() exists. Assume that fmodl(), if it exists, is
+  dnl defined in the same library as fmod().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $FMOD_LIBM"
+  AC_CHECK_FUNCS([fmodl])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_fmodl = yes; then
+    FMODL_LIBM="$FMOD_LIBM"
+    if test $ac_cv_have_decl_fmodl = no; then
+      REPLACE_FMODL=1
+    fi
+    m4_ifdef([gl_FUNC_FMODL_IEEE], [
+      if test $gl_fmodl_required = ieee && test $REPLACE_FMODL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether fmodl works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_fmodl_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $FMODL_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (long double x, long double y)
+{
+  return x == y;
+}
+static long double dummy (long double x, long double y) { return 0; }
+int main (int argc, char *argv[])
+{
+  long double (*my_fmodl) (long double, long double) = argc ? fmodl : dummy;
+  long double f;
+  /* Test fmodl(...,0.0L).
+     This test fails on OSF/1 5.1.  */
+  f = my_fmodl (2.0L, 0.0L);
+  if (numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_fmodl_ieee=yes],
+              [gl_cv_func_fmodl_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_fmodl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_fmodl_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_fmodl_ieee" in
+          *yes) ;;
+          *) REPLACE_FMODL=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_FMODL=0
+  fi
+  if test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; then
+    dnl Find libraries needed to link lib/fmodl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      FMODL_LIBM="$FMOD_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_FABSL])
+      AC_REQUIRE([gl_FUNC_FREXPL])
+      AC_REQUIRE([gl_FUNC_TRUNCL])
+      AC_REQUIRE([gl_FUNC_LDEXPL])
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      FMODL_LIBM=
+      dnl Append $FABSL_LIBM to FMODL_LIBM, avoiding gratuitous duplicates.
+      case " $FMODL_LIBM " in
+        *" $FABSL_LIBM "*) ;;
+        *) FMODL_LIBM="$FMODL_LIBM $FABSL_LIBM" ;;
+      esac
+      dnl Append $FREXPL_LIBM to FMODL_LIBM, avoiding gratuitous duplicates.
+      case " $FMODL_LIBM " in
+        *" $FREXPL_LIBM "*) ;;
+        *) FMODL_LIBM="$FMODL_LIBM $FREXPL_LIBM" ;;
+      esac
+      dnl Append $TRUNCL_LIBM to FMODL_LIBM, avoiding gratuitous duplicates.
+      case " $FMODL_LIBM " in
+        *" $TRUNCL_LIBM "*) ;;
+        *) FMODL_LIBM="$FMODL_LIBM $TRUNCL_LIBM" ;;
+      esac
+      dnl Append $LDEXPL_LIBM to FMODL_LIBM, avoiding gratuitous duplicates.
+      case " $FMODL_LIBM " in
+        *" $LDEXPL_LIBM "*) ;;
+        *) FMODL_LIBM="$FMODL_LIBM $LDEXPL_LIBM" ;;
+      esac
+      dnl Append $ISNANL_LIBM to FMODL_LIBM, avoiding gratuitous duplicates.
+      case " $FMODL_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) FMODL_LIBM="$FMODL_LIBM $ISNANL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([FMODL_LIBM])
+])
--- a/m4/fnmatch.m4
+++ b/m4/fnmatch.m4
@@ -1,4 +1,4 @@
-# Check for fnmatch - serial 8.
+# Check for fnmatch - serial 9.
 
 # Copyright (C) 2000-2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -21,7 +21,7 @@
 
   FNMATCH_H=
   gl_fnmatch_required_lowercase=`
-    echo $gl_fnmatch_required | tr '[[A-Z]]' '[[a-z]]'
+    echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]'
   `
   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
   AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch],
--- a/m4/fopen.m4
+++ b/m4/fopen.m4
@@ -1,4 +1,4 @@
-# fopen.m4 serial 8
+# fopen.m4 serial 9
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -55,7 +55,4 @@
 ])
 
 # Prerequisites of lib/fopen.c.
-AC_DEFUN([gl_PREREQ_FOPEN],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FOPEN], [:])
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -1,4 +1,4 @@
-# serial 18
+# serial 19
 
 # Copyright (C) 2000-2001, 2004-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -61,6 +61,9 @@
           '# Minix'                                                     \
           'fp->_ptr - fp->_buf'                                         \
                                                                         \
+          '# Plan9'                                                     \
+          'fp->wp - fp->buf'                                            \
+                                                                        \
           '# VMS'                                                       \
           '(*fp)->_ptr - (*fp)->_base'                                  \
                                                                         \
--- a/m4/fpieee.m4
+++ b/m4/fpieee.m4
@@ -1,4 +1,4 @@
-# fpieee.m4 serial 1
+# fpieee.m4 serial 2
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,9 +36,11 @@
       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
       if test -n "$GCC"; then
         # GCC has the option -mieee.
+        # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
         CPPFLAGS="$CPPFLAGS -mieee"
       else
-        # Compaq (ex-DEC) C has the option -ieee.
+        # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
+        # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
         CPPFLAGS="$CPPFLAGS -ieee"
       fi
       ;;
new file mode 100644
--- /dev/null
+++ b/m4/freadahead.m4
@@ -0,0 +1,10 @@
+# freadahead.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FREADAHEAD],
+[
+  AC_CHECK_FUNCS_ONCE([__freadahead])
+])
new file mode 100644
--- /dev/null
+++ b/m4/freadptr.m4
@@ -0,0 +1,10 @@
+# freadptr.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FREADPTR],
+[
+  AC_CHECK_FUNCS_ONCE([__freadptr])
+])
new file mode 100644
--- /dev/null
+++ b/m4/freadseek.m4
@@ -0,0 +1,10 @@
+# freadseek.m4 serial 2
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FREADSEEK],
+[
+  AC_CHECK_FUNCS_ONCE([__freadptrinc])
+])
--- a/m4/freopen.m4
+++ b/m4/freopen.m4
@@ -1,4 +1,4 @@
-# freopen.m4 serial 3
+# freopen.m4 serial 4
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,4 @@
 ])
 
 # Prerequisites of lib/freopen.c.
-AC_DEFUN([gl_PREREQ_FREOPEN],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FREOPEN], [:])
--- a/m4/frexp.m4
+++ b/m4/frexp.m4
@@ -1,4 +1,4 @@
-# frexp.m4 serial 13
+# frexp.m4 serial 14
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,7 @@
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static double
 compute_minus_zero (void)
--- a/m4/frexpf.m4
+++ b/m4/frexpf.m4
@@ -1,4 +1,4 @@
-# frexpf.m4 serial 3
+# frexpf.m4 serial 5
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_FREXP])
 
+  dnl Persuade glibc <math.h> to declare frexpf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether frexpf() exists. We cannot assume that frexpf(), if it
   dnl exists, is defined in the same library as frexp(). This is not the case
   dnl on NetBSD, OpenBSD.
@@ -48,7 +51,7 @@
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -FLT_MIN * FLT_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static float
 compute_minus_zero (void)
--- a/m4/frexpl.m4
+++ b/m4/frexpl.m4
@@ -1,4 +1,4 @@
-# frexpl.m4 serial 18
+# frexpl.m4 serial 20
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,9 +8,14 @@
 [
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
+  dnl Persuade glibc <math.h> to declare frexpl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Check whether it's declared.
-  dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+  dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
   AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
+
   FREXPL_LIBM=
   if test $HAVE_DECL_FREXPL = 1; then
     gl_CHECK_FREXPL_NO_LIBM
@@ -68,7 +73,7 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
   dnl Check whether it's declared.
-  dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+  dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
   AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
   if test $HAVE_DECL_FREXPL = 1; then
     gl_CHECK_FREXPL_NO_LIBM
@@ -108,8 +113,8 @@
 ])
 
 dnl Test whether frexpl() works on finite numbers (this fails on
-dnl MacOS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
-dnl (this fails on MacOS X 10.5/i386), and also on infinite numbers (this
+dnl Mac OS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
+dnl (this fails on Mac OS X 10.5/i386), and also on infinite numbers (this
 dnl fails e.g. on IRIX 6.5 and mingw).
 AC_DEFUN([gl_FUNC_FREXPL_WORKS],
 [
@@ -157,7 +162,7 @@
     if (exp != 5)
       result |= 1;
   }
-  /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+  /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
      function returns an invalid (incorrectly normalized) value: it returns
                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
      but the correct result is
@@ -196,7 +201,7 @@
         int exp;
         long double y = frexpl (x, &exp);
         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
-           exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
+           exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
         if (exp != LDBL_MIN_EXP - 1)
           result |= 8;
       }
--- a/m4/fseeko.m4
+++ b/m4/fseeko.m4
@@ -1,4 +1,4 @@
-# fseeko.m4 serial 15
+# fseeko.m4 serial 16
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+  AC_REQUIRE([gl_SYS_TYPES_H])
   AC_REQUIRE([AC_PROG_CC])
 
   dnl Persuade glibc <stdio.h> to declare fseeko().
@@ -28,6 +29,9 @@
   if test $gl_cv_func_fseeko = no; then
     HAVE_FSEEKO=0
   else
+    if test $WINDOWS_64_BIT_OFF_T = 1; then
+      REPLACE_FSEEKO=1
+    fi
     if test $gl_cv_var_stdin_large_offset = no; then
       REPLACE_FSEEKO=1
     fi
@@ -59,3 +63,11 @@
         [gl_cv_var_stdin_large_offset=yes],
         [gl_cv_var_stdin_large_offset=no])])
 ])
+
+# Prerequisites of lib/fseeko.c.
+AC_DEFUN([gl_PREREQ_FSEEKO],
+[
+  dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64
+  dnl makes it usable again.
+  AC_CHECK_FUNCS([_fseeki64])
+])
new file mode 100644
--- /dev/null
+++ b/m4/fseterr.m4
@@ -0,0 +1,10 @@
+# fseterr.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FSETERR],
+[
+  AC_CHECK_FUNCS_ONCE([__fseterr])
+])
--- a/m4/fstat.m4
+++ b/m4/fstat.m4
@@ -1,4 +1,4 @@
-# fstat.m4 serial 1
+# fstat.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,22 +7,30 @@
 AC_DEFUN([gl_FUNC_FSTAT],
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
   AC_REQUIRE([gl_MSVC_INVAL])
   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
     REPLACE_FSTAT=1
   fi
+
+  AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+    REPLACE_FSTAT=1
+  fi
+
   dnl Replace fstat() for supporting the gnulib-defined open() on directories.
   m4_ifdef([gl_FUNC_FCHDIR], [
     gl_TEST_FCHDIR
-    if test $HAVE_FCHDIR = 0 \
-       && test "$gl_cv_func_open_directory_works" != yes; then
-      REPLACE_FSTAT=1
+    if test $HAVE_FCHDIR = 0; then
+      case "$gl_cv_func_open_directory_works" in
+        *yes) ;;
+        *)
+          REPLACE_FSTAT=1
+          ;;
+      esac
     fi
   ])
 ])
 
 # Prerequisites of lib/fstat.c.
-AC_DEFUN([gl_PREREQ_FSTAT],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FSTAT], [:])
--- a/m4/fstatat.m4
+++ b/m4/fstatat.m4
@@ -1,4 +1,4 @@
-# fstatat.m4 serial 2
+# fstatat.m4 serial 3
 dnl Copyright (C) 2004-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -45,7 +45,7 @@
       ])
 
     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
-    *yes+yes) ;;
+    *yes+*yes) ;;
     *) REPLACE_FSTATAT=1
        case $gl_cv_func_fstatat_zero_flag in
        *yes)
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -1,4 +1,4 @@
-# serial 29
+# serial 30
 # Obtaining file system usage information.
 
 # Copyright (C) 1997-1998, 2000-2001, 2003-2012 Free Software Foundation, Inc.
@@ -33,7 +33,7 @@
 dnl of field f_blocks in 'struct statvfs' from 32 bit to 64 bit on
 dnl glibc/Hurd, HP-UX 11, Solaris (32-bit mode). It also changes the size
 dnl of field f_blocks in 'struct statfs' from 32 bit to 64 bit on
-dnl MacOS X >= 10.5 (32-bit mode).
+dnl Mac OS X >= 10.5 (32-bit mode).
 AC_REQUIRE([AC_SYS_LARGEFILE])
 
 AC_MSG_NOTICE([checking how to get file system space usage])
@@ -50,14 +50,6 @@
   # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS.
   AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs],
                  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#if (defined __GLIBC__ || defined __UCLIBC__) && defined __linux__
-Do not use statvfs on systems with GNU libc on Linux, because that function
-stats all preceding entries in /proc/mounts, and that makes df hang if even
-one of the corresponding file systems is hard-mounted, but not available.
-statvfs in GNU libc on Hurd, BeOS, Haiku operates differently: it only makes
-a system call.
-#endif
-
 #ifdef __osf__
 "Do not use Tru64's statvfs implementation"
 #endif
@@ -68,7 +60,7 @@
 
 #if defined __APPLE__ && defined __MACH__
 #include <limits.h>
-/* On MacOS X >= 10.5, f_blocks in 'struct statvfs' is a 32-bit quantity;
+/* On Mac OS X >= 10.5, f_blocks in 'struct statvfs' is a 32-bit quantity;
    that commonly limits file systems to 4 TiB.  Whereas f_blocks in
    'struct statfs' is a 64-bit type, thanks to the large-file support
    that was enabled above.  In this case, don't use statvfs(); use statfs()
@@ -110,6 +102,38 @@
   fi
 fi
 
+# Check for this unconditionally so we have a
+# good fallback on glibc/Linux > 2.6 < 2.6.36
+AC_MSG_CHECKING([for two-argument statfs with statfs.f_frsize member])
+AC_CACHE_VAL([fu_cv_sys_stat_statfs2_frsize],
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+  int
+  main ()
+  {
+  struct statfs fsd;
+  fsd.f_frsize = 0;
+  return statfs (".", &fsd) != 0;
+  }]])],
+  [fu_cv_sys_stat_statfs2_frsize=yes],
+  [fu_cv_sys_stat_statfs2_frsize=no],
+  [fu_cv_sys_stat_statfs2_frsize=no])])
+AC_MSG_RESULT([$fu_cv_sys_stat_statfs2_frsize])
+if test $fu_cv_sys_stat_statfs2_frsize = yes; then
+    ac_fsusage_space=yes
+    AC_DEFINE([STAT_STATFS2_FRSIZE], [1],
+[  Define if statfs takes 2 args and struct statfs has a field named f_frsize.
+   (glibc/Linux > 2.6)])
+fi
+
 if test $ac_fsusage_space = no; then
   # DEC Alpha running OSF/1
   AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
@@ -137,7 +161,7 @@
 fi
 
 if test $ac_fsusage_space = no; then
-  # glibc/Linux, MacOS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4.
+  # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4.
   # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0,
   # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.)
   # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and
--- a/m4/ftello.m4
+++ b/m4/ftello.m4
@@ -1,4 +1,4 @@
-# ftello.m4 serial 10
+# ftello.m4 serial 11
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+  AC_REQUIRE([gl_SYS_TYPES_H])
 
   dnl Persuade glibc <stdio.h> to declare ftello().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -30,9 +31,13 @@
   if test $gl_cv_func_ftello = no; then
     HAVE_FTELLO=0
   else
+    if test $WINDOWS_64_BIT_OFF_T = 1; then
+      REPLACE_FTELLO=1
+    fi
     if test $gl_cv_var_stdin_large_offset = no; then
       REPLACE_FTELLO=1
-    else
+    fi
+    if test $REPLACE_FTELLO = 0; then
       dnl Detect bug on Solaris.
       dnl ftell and ftello produce incorrect results after putc that followed a
       dnl getc call that reached EOF on Solaris. This is because the _IOREAD
@@ -125,3 +130,11 @@
     fi
   fi
 ])
+
+# Prerequisites of lib/ftello.c.
+AC_DEFUN([gl_PREREQ_FTELLO],
+[
+  dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64
+  dnl makes it usable again.
+  AC_CHECK_FUNCS([_ftelli64])
+])
--- a/m4/ftruncate.m4
+++ b/m4/ftruncate.m4
@@ -1,4 +1,4 @@
-# serial 18
+# serial 20
 
 # See if we need to emulate a missing ftruncate function using chsize.
 
@@ -11,7 +11,24 @@
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_CHECK_FUNCS_ONCE([ftruncate])
-  if test $ac_cv_func_ftruncate = no; then
+  if test $ac_cv_func_ftruncate = yes; then
+    m4_ifdef([gl_LARGEFILE], [
+      AC_REQUIRE([AC_CANONICAL_HOST])
+      case "$host_os" in
+        mingw*)
+          dnl Native Windows, and Large File Support is requested.
+          dnl The MSVCRT _chsize() function only accepts a 32-bit file size,
+          dnl and the mingw64 ftruncate64() function is unreliable (it may
+          dnl delete the file, see
+          dnl <http://mingw-w64.sourcearchive.com/documentation/2.0-1/ftruncate64_8c_source.html>).
+          dnl Use gnulib's ftruncate() implementation instead.
+          REPLACE_FTRUNCATE=1
+          ;;
+      esac
+    ], [
+      :
+    ])
+  else
     HAVE_FTRUNCATE=0
   fi
 ])
@@ -19,6 +36,5 @@
 # Prerequisites of lib/ftruncate.c.
 AC_DEFUN([gl_PREREQ_FTRUNCATE],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_FUNCS([chsize])
 ])
--- a/m4/fts.m4
+++ b/m4/fts.m4
@@ -1,4 +1,4 @@
-#serial 19
+#serial 20
 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,6 @@
 AC_DEFUN([gl_FUNC_FTS_CORE],
 [
   dnl Prerequisites of lib/fts.c.
-  AC_REQUIRE([AC_C_INLINE])
   gl_FUNC_OPENAT
 
   AC_CHECK_FUNCS_ONCE([fstatfs])
--- a/m4/gc.m4
+++ b/m4/gc.m4
@@ -1,5 +1,5 @@
-# gc.m4 serial 8
-dnl Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
+# gc.m4 serial 9
+dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,14 @@
     AS_HELP_STRING([--with-libgcrypt], [use libgcrypt for low-level crypto]),
     libgcrypt=$withval, libgcrypt=no)
   if test "$libgcrypt" != no; then
-    AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [#include <gcrypt.h>])
+    AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [
+#include <gcrypt.h>
+/* GCRY_MODULE_ID_USER was added in 1.4.4 and gc-libgcrypt.c
+   will fail on startup if we don't have 1.4.4 or later, so
+   test for it early. */
+#if !defined GCRY_MODULE_ID_USER
+error too old libgcrypt
+#endif
+])
   fi
 ])
--- a/m4/getaddrinfo.m4
+++ b/m4/getaddrinfo.m4
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 29
+# getaddrinfo.m4 serial 30
 dnl Copyright (C) 2004-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -134,7 +134,6 @@
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_SOCKET_FAMILIES])
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   dnl Including sys/socket.h is wrong for Windows, but Windows does not
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -6,7 +6,7 @@
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert.
-# serial 11
+# serial 12
 
 AC_DEFUN([gl_FUNC_GETCWD_NULL],
   [
@@ -45,15 +45,14 @@
          ]])],
         [gl_cv_func_getcwd_null=yes],
         [gl_cv_func_getcwd_null=no],
-        [[
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
-                               # Guess yes on Cygwin.
-         cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_getcwd_null="guessing no";;
-       esac
+        [[case "$host_os" in
+                     # Guess yes on glibc systems.
+            *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
+                     # Guess yes on Cygwin.
+            cygwin*) gl_cv_func_getcwd_null="guessing yes";;
+                     # If we don't know, assume the worst.
+            *)       gl_cv_func_getcwd_null="guessing no";;
+          esac
         ]])])
 ])
 
--- a/m4/getdelim.m4
+++ b/m4/getdelim.m4
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 9
+# getdelim.m4 serial 10
 
 dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl
@@ -63,12 +63,14 @@
  #endif
 #endif
          ],
-         [gl_cv_func_working_getdelim=yes],
-         [gl_cv_func_working_getdelim=no])]
+         [gl_cv_func_working_getdelim="guessing yes"],
+         [gl_cv_func_working_getdelim="guessing no"])]
     )])
-    if test $gl_cv_func_working_getdelim = no; then
-      REPLACE_GETDELIM=1
-    fi
+    case "$gl_cv_func_working_getdelim" in
+      *no)
+        REPLACE_GETDELIM=1
+        ;;
+    esac
   else
     HAVE_GETDELIM=0
   fi
--- a/m4/getdomainname.m4
+++ b/m4/getdomainname.m4
@@ -1,4 +1,4 @@
-# getdomainname.m4 serial 9
+# getdomainname.m4 serial 10
 dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -42,7 +42,7 @@
 
   dnl What about the declaration?
   dnl - It's  int getdomainname(char *, size_t)  on glibc, NetBSD, OpenBSD.
-  dnl - It's  int getdomainname(char *, int)  on MacOS X, FreeBSD, AIX, IRIX,
+  dnl - It's  int getdomainname(char *, int)  on Mac OS X, FreeBSD, AIX, IRIX,
   dnl   OSF/1.
   AC_CHECK_DECLS([getdomainname], , ,
     [[#include <sys/types.h>
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,4 +1,4 @@
-# getdtablesize.m4 serial 3
+# getdtablesize.m4 serial 4
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,4 @@
 ])
 
 # Prerequisites of lib/getdtablesize.c.
-AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [:])
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -1,4 +1,4 @@
-# serial 16
+# serial 18
 
 dnl From Jim Meyering.
 dnl A wrapper around AC_FUNC_GETGROUPS.
@@ -9,31 +9,98 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([AC_FUNC_GETGROUPS],
+[
+  AC_REQUIRE([AC_TYPE_GETGROUPS])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_FUNC([getgroups])
+
+  # If we don't yet have getgroups, see if it's in -lbsd.
+  # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
+  ac_save_LIBS=$LIBS
+  if test $ac_cv_func_getgroups = no; then
+    AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd])
+  fi
+
+  # Run the program to test the functionality of the system-supplied
+  # getgroups function only if there is such a function.
+  if test $ac_cv_func_getgroups = yes; then
+    AC_CACHE_CHECK([for working getgroups], [ac_cv_func_getgroups_works],
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+            [AC_INCLUDES_DEFAULT],
+            [[/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
+              return getgroups (0, 0) == -1;]])
+         ],
+         [ac_cv_func_getgroups_works=yes],
+         [ac_cv_func_getgroups_works=no],
+         [case "$host_os" in # ((
+                    # Guess yes on glibc systems.
+            *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      ac_cv_func_getgroups_works="guessing no" ;;
+          esac
+         ])
+      ])
+  else
+    ac_cv_func_getgroups_works=no
+  fi
+  case "$ac_cv_func_getgroups_works" in
+    *yes)
+      AC_DEFINE([HAVE_GETGROUPS], [1],
+        [Define to 1 if your system has a working `getgroups' function.])
+      ;;
+  esac
+  LIBS=$ac_save_LIBS
+])# AC_FUNC_GETGROUPS
+
+])
+
 AC_DEFUN([gl_FUNC_GETGROUPS],
 [
-  AC_REQUIRE([AC_FUNC_GETGROUPS])
   AC_REQUIRE([AC_TYPE_GETGROUPS])
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-  if test "$ac_cv_func_getgroups" != yes; then
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  AC_FUNC_GETGROUPS
+  if test $ac_cv_func_getgroups != yes; then
     HAVE_GETGROUPS=0
-  elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t
-  then
-    REPLACE_GETGROUPS=1
-    AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if
-      getgroups(0,NULL) does not return the number of groups.])
   else
-    dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail.
-    AC_CACHE_CHECK([whether getgroups handles negative values],
-      [gl_cv_func_getgroups_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
-        [[int size = getgroups (0, 0);
-          gid_t *list = malloc (size * sizeof *list);
-          return getgroups (-1, list) != -1;]])],
-        [gl_cv_func_getgroups_works=yes],
-        [gl_cv_func_getgroups_works=no],
-        [gl_cv_func_getgroups_works="guessing no"])])
-    if test "$gl_cv_func_getgroups_works" != yes; then
+    if test "$ac_cv_type_getgroups" != gid_t \
+       || { case "$ac_cv_func_getgroups_works" in
+              *yes) false;;
+              *) true;;
+            esac
+          }; then
       REPLACE_GETGROUPS=1
+      AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if
+        getgroups(0,NULL) does not return the number of groups.])
+    else
+      dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail.
+      AC_CACHE_CHECK([whether getgroups handles negative values],
+        [gl_cv_func_getgroups_works],
+        [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+          [[int size = getgroups (0, 0);
+            gid_t *list = malloc (size * sizeof *list);
+            return getgroups (-1, list) != -1;]])],
+          [gl_cv_func_getgroups_works=yes],
+          [gl_cv_func_getgroups_works=no],
+          [case "$host_os" in
+                     # Guess yes on glibc systems.
+             *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
+                     # If we don't know, assume the worst.
+             *)      gl_cv_func_getgroups_works="guessing no" ;;
+           esac
+          ])])
+      case "$gl_cv_func_getgroups_works" in
+        *yes) ;;
+        *) REPLACE_GETGROUPS=1 ;;
+      esac
     fi
   fi
   test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
--- a/m4/gethrxtime.m4
+++ b/m4/gethrxtime.m4
@@ -1,4 +1,4 @@
-# gethrxtime.m4 serial 11
+# gethrxtime.m4 serial 12
 dnl Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,8 +18,10 @@
     dnl Find libraries needed to link lib/gethrxtime.c.
     AC_REQUIRE([gl_CLOCK_TIME])
     AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-    AC_CHECK_FUNCS_ONCE([nanouptime])
-    if test $ac_cv_func_nanouptime != yes; then
+    AC_CHECK_FUNCS_ONCE([microuptime nanouptime])
+    if test $ac_cv_func_nanouptime != yes \
+       && { test $ac_cv_have_decl_gethrtime = no \
+            || test $gl_cv_arithmetic_hrtime_t = no; }; then
       AC_CACHE_CHECK([whether CLOCK_MONOTONIC or CLOCK_REALTIME is defined],
         [gl_cv_have_clock_gettime_macro],
         [AC_EGREP_CPP([have_clock_gettime_macro],
@@ -60,14 +62,6 @@
 # Prerequisites of lib/xtime.h.
 AC_DEFUN([gl_XTIME],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   :
 ])
-
-# Prerequisites of lib/gethrxtime.c.
-AC_DEFUN([gl_PREREQ_GETHRXTIME],
-[
-  AC_CHECK_FUNCS_ONCE([microuptime])
-  :
-])
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -1,4 +1,4 @@
-# getline.m4 serial 25
+# getline.m4 serial 26
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
@@ -70,8 +70,8 @@
  #endif
 #endif
          ],
-         [am_cv_func_working_getline=yes],
-         [am_cv_func_working_getline=no])]
+         [am_cv_func_working_getline="guessing yes"],
+         [am_cv_func_working_getline="guessing no"])]
     )])
   fi
 
@@ -79,12 +79,14 @@
     HAVE_DECL_GETLINE=0
   fi
 
-  if test $am_cv_func_working_getline = no; then
-    dnl Set REPLACE_GETLINE always: Even if we have not found the broken
-    dnl getline function among $LIBS, it may exist in libinet and the
-    dnl executable may be linked with -linet.
-    REPLACE_GETLINE=1
-  fi
+  case "$am_cv_func_working_getline" in
+    *no)
+      dnl Set REPLACE_GETLINE always: Even if we have not found the broken
+      dnl getline function among $LIBS, it may exist in libinet and the
+      dnl executable may be linked with -linet.
+      REPLACE_GETLINE=1
+      ;;
+  esac
 ])
 
 # Prerequisites of lib/getline.c.
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -7,7 +7,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 5
+#serial 6
 
 # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
 # New applications should use gl_GETLOADAVG instead.
@@ -22,7 +22,7 @@
 
 gl_save_LIBS=$LIBS
 
-# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
+# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
 HAVE_GETLOADAVG=1
 AC_CHECK_FUNC([getloadavg], [],
@@ -105,6 +105,8 @@
 [
 # Figure out what our getloadavg.c needs.
 
+AC_CHECK_HEADERS_ONCE([sys/param.h])
+
 # On HPUX9, an unprivileged user can get load averages this way.
 if test $gl_func_getloadavg_done = no; then
   AC_CHECK_FUNCS([pstat_getdynamic], [gl_func_getloadavg_done=yes])
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,4 +1,4 @@
-# getopt.m4 serial 39
+# getopt.m4 serial 44
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,18 +9,17 @@
 [
   m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
   dnl Other modules can request the gnulib implementation of the getopt
   dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
   dnl argp.m4 does this.
   m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
-    gl_GETOPT_IFELSE([], [])
     REPLACE_GETOPT=1
   ], [
     REPLACE_GETOPT=0
-    gl_GETOPT_IFELSE([
+    if test -n "$gl_replace_getopt"; then
       REPLACE_GETOPT=1
-    ],
-    [])
+    fi
   ])
   if test $REPLACE_GETOPT = 1; then
     dnl Arrange for getopt.h to be created.
@@ -38,13 +37,6 @@
   AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
 ])
 
-# emacs' configure.in uses this.
-AC_DEFUN([gl_GETOPT_IFELSE],
-[
-  AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
-  AS_IF([test -n "$gl_replace_getopt"], [$1], [$2])
-])
-
 # Determine whether to replace the entire getopt facility.
 AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
 [
@@ -74,11 +66,6 @@
     AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
   fi
 
-  dnl mingw's getopt (in libmingwex.a) does weird things when the options
-  dnl strings starts with '+' and it's not the first call.  Some internal state
-  dnl is left over from earlier calls, and neither setting optind = 0 nor
-  dnl setting optreset = 1 get rid of this internal state.
-  dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
   dnl POSIX 2008 does not specify leading '+' behavior, but see
   dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
   dnl the next version of POSIX.  For now, we only guarantee leading '+'
@@ -87,30 +74,48 @@
     AC_CACHE_CHECK([whether getopt is POSIX compatible],
       [gl_cv_func_getopt_posix],
       [
-        dnl BSD getopt_long uses an incompatible method to reset option
-        dnl processing.  Existence of the optreset variable, in and of
-        dnl itself, is not a reason to replace getopt, but knowledge
-        dnl of the variable is needed to determine how to reset and
-        dnl whether a reset reparses the environment.  Solaris
-        dnl supports neither optreset nor optind=0, but keeps no state
-        dnl that needs a reset beyond setting optind=1; detect Solaris
-        dnl by getopt_clip.
-        AC_LINK_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[#include <unistd.h>]],
-             [[int *p = &optreset; return optreset;]])],
-          [gl_optind_min=1],
-          [AC_COMPILE_IFELSE(
-             [AC_LANG_PROGRAM(
-                [[#include <getopt.h>]],
-                [[return !getopt_clip;]])],
-             [gl_optind_min=1],
-             [gl_optind_min=0])])
+        dnl Merging these three different test programs into a single one
+        dnl would require a reset mechanism. On BSD systems, it can be done
+        dnl through 'optreset'; on some others (glibc), it can be done by
+        dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1,
+        dnl Solaris 9, musl libc), there is no such mechanism.
+        if test $cross_compiling = no; then
+          dnl Sanity check. Succeeds everywhere (except on MSVC,
+          dnl which lacks <unistd.h> and getopt() entirely).
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
 
-        dnl This test fails on mingw and succeeds on many other platforms.
-        gl_save_CPPFLAGS=$CPPFLAGS
-        CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
-        AC_RUN_IFELSE([AC_LANG_SOURCE([[
+int
+main ()
+{
+  static char program[] = "program";
+  static char a[] = "-a";
+  static char foo[] = "foo";
+  static char bar[] = "bar";
+  char *argv[] = { program, a, foo, bar, NULL };
+  int c;
+
+  c = getopt (4, argv, "ab");
+  if (!(c == 'a'))
+    return 1;
+  c = getopt (4, argv, "ab");
+  if (!(c == -1))
+    return 2;
+  if (!(optind == 2))
+    return 3;
+  return 0;
+}
+]])],
+            [gl_cv_func_getopt_posix=maybe],
+            [gl_cv_func_getopt_posix=no])
+          if test $gl_cv_func_getopt_posix = maybe; then
+            dnl Sanity check with '+'. Succeeds everywhere (except on MSVC,
+            dnl which lacks <unistd.h> and getopt() entirely).
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
@@ -118,89 +123,75 @@
 int
 main ()
 {
-  {
-    static char program[] = "program";
-    static char a[] = "-a";
-    static char foo[] = "foo";
-    static char bar[] = "bar";
-    char *argv[] = { program, a, foo, bar, NULL };
-    int c;
-
-    optind = OPTIND_MIN;
-    opterr = 0;
-
-    c = getopt (4, argv, "ab");
-    if (!(c == 'a'))
-      return 1;
-    c = getopt (4, argv, "ab");
-    if (!(c == -1))
-      return 2;
-    if (!(optind == 2))
-      return 3;
-  }
-  /* Some internal state exists at this point.  */
-  {
-    static char program[] = "program";
-    static char donald[] = "donald";
-    static char p[] = "-p";
-    static char billy[] = "billy";
-    static char duck[] = "duck";
-    static char a[] = "-a";
-    static char bar[] = "bar";
-    char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
-    int c;
-
-    optind = OPTIND_MIN;
-    opterr = 0;
+  static char program[] = "program";
+  static char donald[] = "donald";
+  static char p[] = "-p";
+  static char billy[] = "billy";
+  static char duck[] = "duck";
+  static char a[] = "-a";
+  static char bar[] = "bar";
+  char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
+  int c;
 
-    c = getopt (7, argv, "+abp:q:");
-    if (!(c == -1))
-      return 4;
-    if (!(strcmp (argv[0], "program") == 0))
-      return 5;
-    if (!(strcmp (argv[1], "donald") == 0))
-      return 6;
-    if (!(strcmp (argv[2], "-p") == 0))
-      return 7;
-    if (!(strcmp (argv[3], "billy") == 0))
-      return 8;
-    if (!(strcmp (argv[4], "duck") == 0))
-      return 9;
-    if (!(strcmp (argv[5], "-a") == 0))
-      return 10;
-    if (!(strcmp (argv[6], "bar") == 0))
-      return 11;
-    if (!(optind == 1))
-      return 12;
-  }
-  /* Detect MacOS 10.5, AIX 7.1 bug.  */
-  {
-    static char program[] = "program";
-    static char ab[] = "-ab";
-    char *argv[3] = { program, ab, NULL };
-    optind = OPTIND_MIN;
-    opterr = 0;
-    if (getopt (2, argv, "ab:") != 'a')
-      return 13;
-    if (getopt (2, argv, "ab:") != '?')
-      return 14;
-    if (optopt != 'b')
-      return 15;
-    if (optind != 2)
-      return 16;
-  }
-
+  c = getopt (7, argv, "+abp:q:");
+  if (!(c == -1))
+    return 4;
+  if (!(strcmp (argv[0], "program") == 0))
+    return 5;
+  if (!(strcmp (argv[1], "donald") == 0))
+    return 6;
+  if (!(strcmp (argv[2], "-p") == 0))
+    return 7;
+  if (!(strcmp (argv[3], "billy") == 0))
+    return 8;
+  if (!(strcmp (argv[4], "duck") == 0))
+    return 9;
+  if (!(strcmp (argv[5], "-a") == 0))
+    return 10;
+  if (!(strcmp (argv[6], "bar") == 0))
+    return 11;
+  if (!(optind == 1))
+    return 12;
   return 0;
 }
 ]])],
-          [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
-          [case "$host_os" in
-             mingw*)         gl_cv_func_getopt_posix="guessing no";;
-             darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
-             *)              gl_cv_func_getopt_posix="guessing yes";;
-           esac
-          ])
-        CPPFLAGS=$gl_save_CPPFLAGS
+              [gl_cv_func_getopt_posix=maybe],
+              [gl_cv_func_getopt_posix=no])
+          fi
+          if test $gl_cv_func_getopt_posix = maybe; then
+            dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug.
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main ()
+{
+  static char program[] = "program";
+  static char ab[] = "-ab";
+  char *argv[3] = { program, ab, NULL };
+  if (getopt (2, argv, "ab:") != 'a')
+    return 13;
+  if (getopt (2, argv, "ab:") != '?')
+    return 14;
+  if (optopt != 'b')
+    return 15;
+  if (optind != 2)
+    return 16;
+  return 0;
+}
+]])],
+              [gl_cv_func_getopt_posix=yes],
+              [gl_cv_func_getopt_posix=no])
+          fi
+        else
+          case "$host_os" in
+            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
+            *)                       gl_cv_func_getopt_posix="guessing yes";;
+          esac
+        fi
       ])
     case "$gl_cv_func_getopt_posix" in
       *no) gl_replace_getopt=yes ;;
@@ -236,7 +227,7 @@
              nocrash_init();
 
              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
-                and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
                 OSF/1 5.1, Solaris 10.  */
              {
                static char conftest[] = "conftest";
@@ -247,7 +238,7 @@
                  result |= 1;
              }
              /* This code succeeds on glibc 2.8, mingw,
-                and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
              {
                static char program[] = "program";
@@ -276,7 +267,7 @@
                if (getopt (3, argv, "-p") != 1)
                  result |= 16;
                else if (getopt (3, argv, "-p") != 'p')
-                 result |= 32;
+                 result |= 16;
              }
              /* This code fails on glibc 2.11.  */
              {
@@ -286,9 +277,9 @@
                char *argv[] = { program, b, a, NULL };
                optind = opterr = 0;
                if (getopt (3, argv, "+:a:b") != 'b')
-                 result |= 64;
+                 result |= 32;
                else if (getopt (3, argv, "+:a:b") != ':')
-                 result |= 64;
+                 result |= 32;
              }
              /* This code dumps core on glibc 2.14.  */
              {
@@ -298,18 +289,14 @@
                char *argv[] = { program, w, dummy, NULL };
                optind = opterr = 1;
                if (getopt (3, argv, "W;") != 'W')
-                 result |= 128;
+                 result |= 64;
              }
              return result;
            ]])],
         [gl_cv_func_getopt_gnu=yes],
         [gl_cv_func_getopt_gnu=no],
-        [dnl Cross compiling. Guess based on host and declarations.
-         case $host_os:$ac_cv_have_decl_optreset in
-           *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
-           *:yes)               gl_cv_func_getopt_gnu=no;;
-           *)                   gl_cv_func_getopt_gnu=yes;;
-         esac
+        [dnl Cross compiling. Assume the worst, even on glibc platforms.
+         gl_cv_func_getopt_gnu="guessing no"
         ])
        case $gl_had_POSIXLY_CORRECT in
          exported) ;;
@@ -317,13 +304,54 @@
          *) AS_UNSET([POSIXLY_CORRECT]) ;;
        esac
       ])
-    if test "$gl_cv_func_getopt_gnu" = "no"; then
+    if test "$gl_cv_func_getopt_gnu" != yes; then
       gl_replace_getopt=yes
+    else
+      AC_CACHE_CHECK([for working GNU getopt_long function],
+        [gl_cv_func_getopt_long_gnu],
+        [AC_RUN_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <getopt.h>
+                #include <stddef.h>
+                #include <string.h>
+              ]],
+              [[static const struct option long_options[] =
+                  {
+                    { "xtremely-",no_argument,       NULL, 1003 },
+                    { "xtra",     no_argument,       NULL, 1001 },
+                    { "xtreme",   no_argument,       NULL, 1002 },
+                    { "xtremely", no_argument,       NULL, 1003 },
+                    { NULL,       0,                 NULL, 0 }
+                  };
+                /* This code fails on OpenBSD 5.0.  */
+                {
+                  static char program[] = "program";
+                  static char xtremel[] = "--xtremel";
+                  char *argv[] = { program, xtremel, NULL };
+                  int option_index;
+                  optind = 1; opterr = 0;
+                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
+                    return 1;
+                }
+                return 0;
+              ]])],
+           [gl_cv_func_getopt_long_gnu=yes],
+           [gl_cv_func_getopt_long_gnu=no],
+           [dnl Cross compiling. Guess no on OpenBSD, yes otherwise.
+            case "$host_os" in
+              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
+              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
+            esac
+           ])
+        ])
+      case "$gl_cv_func_getopt_long_gnu" in
+        *yes) ;;
+        *) gl_replace_getopt=yes ;;
+      esac
     fi
   fi
 ])
 
-# emacs' configure.in uses this.
 AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
 [
   GETOPT_H=getopt.h
@@ -334,7 +362,6 @@
 ])
 
 # Prerequisites of lib/getopt*.
-# emacs' configure.in uses this.
 AC_DEFUN([gl_PREREQ_GETOPT],
 [
   AC_CHECK_DECLS_ONCE([getenv])
new file mode 100644
--- /dev/null
+++ b/m4/getrusage.m4
@@ -0,0 +1,14 @@
+# getrusage.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETRUSAGE],
+[
+  AC_REQUIRE([gl_SYS_RESOURCE_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([getrusage])
+  if test $ac_cv_func_getrusage = no; then
+    HAVE_GETRUSAGE=0
+  fi
+])
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -1,4 +1,4 @@
-# gettext.m4 serial 64 (gettext-0.18.2)
+# gettext.m4 serial 66 (gettext-0.18.2)
 dnl Copyright (C) 1995-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -97,7 +97,7 @@
     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
   ])
 
-  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
   gt_INTL_MACOSX
 
   dnl Set USE_NLS.
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
-# serial 17
+# serial 20
 
 # Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -50,16 +50,22 @@
     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
       REPLACE_GETTIMEOFDAY=1
     fi
+    dnl If we override 'struct timeval', we also have to override gettimeofday.
+    if test $REPLACE_STRUCT_TIMEVAL = 1; then
+      REPLACE_GETTIMEOFDAY=1
+    fi
     m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
       gl_FUNC_TZSET_CLOBBER
-      if test $gl_cv_func_tzset_clobber = yes; then
-        REPLACE_GETTIMEOFDAY=1
-        gl_GETTIMEOFDAY_REPLACE_LOCALTIME
-        AC_DEFINE([tzset], [rpl_tzset],
-          [Define to rpl_tzset if the wrapper function should be used.])
-        AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
-          [Define if tzset clobbers localtime's static buffer.])
-      fi
+      case "$gl_cv_func_tzset_clobber" in
+        *yes)
+          REPLACE_GETTIMEOFDAY=1
+          gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+          AC_DEFINE([tzset], [rpl_tzset],
+            [Define to rpl_tzset if the wrapper function should be used.])
+          AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
+            [Define if tzset clobbers localtime's static buffer.])
+          ;;
+      esac
     ])
   fi
   AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
@@ -78,6 +84,7 @@
 AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
 [
  AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
  AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
   [gl_cv_func_gettimeofday_clobber],
@@ -100,15 +107,23 @@
         ]])],
      [gl_cv_func_gettimeofday_clobber=no],
      [gl_cv_func_gettimeofday_clobber=yes],
-     dnl When crosscompiling, assume it is broken.
-     [gl_cv_func_gettimeofday_clobber=yes])])
+     [# When cross-compiling:
+      case "$host_os" in
+                # Guess all is fine on glibc systems.
+        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+                # If we don't know, assume the worst.
+        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
+      esac
+     ])])
 
- if test $gl_cv_func_gettimeofday_clobber = yes; then
-   REPLACE_GETTIMEOFDAY=1
-   gl_GETTIMEOFDAY_REPLACE_LOCALTIME
-   AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
-     [Define if gettimeofday clobbers the localtime buffer.])
- fi
+ case "$gl_cv_func_gettimeofday_clobber" in
+   *yes)
+     REPLACE_GETTIMEOFDAY=1
+     gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+     AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
+       [Define if gettimeofday clobbers the localtime buffer.])
+     ;;
+ esac
 ])
 
 AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
deleted file mode 100644
--- a/m4/gl_list.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# gl_list.m4 serial 2
-dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_LIST],
-[
-  AC_REQUIRE([gl_INLINE])
-])
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 32
+# gnulib-common.m4 serial 33
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,8 @@
 AC_DEFUN([gl_COMMON_BODY], [
   AH_VERBATIM([_Noreturn],
 [/* The _Noreturn keyword of C11.  */
-#ifndef _Noreturn
+#if ! (defined _Noreturn \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
@@ -29,7 +30,7 @@
 [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE__ && __MACH__ test for Mac OS X.
    __APPLE_CC__ tests for the Apple compiler and its version.
    __STDC_VERSION__ tests for the C99 mode.  */
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
--- a/m4/host-os.m4
+++ b/m4/host-os.m4
@@ -1,4 +1,4 @@
-# serial 8
+# serial 9
 
 # Copyright (C) 2001, 2003-2004, 2006, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -66,7 +66,7 @@
        # from $host_os, but capitalizes its first letter.
        [A-Za-z]*)
          os=`
-           expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
+           expr "X$host_os" : 'X\([A-Za-z]\)' | LC_ALL=C tr '[a-z]' '[A-Z]'
          ``
            expr "X$host_os" : 'X.\([A-Za-z]*\)'
          `
new file mode 100644
--- /dev/null
+++ b/m4/hypot-ieee.m4
@@ -0,0 +1,15 @@
+# hypot-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in hypot.m4 and not inlined in the
+dnl module description), so that gl_FUNC_HYPOT can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_HYPOT_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_hypot_required=ieee])
+  AC_REQUIRE([gl_FUNC_HYPOT])
+])
new file mode 100644
--- /dev/null
+++ b/m4/hypot.m4
@@ -0,0 +1,100 @@
+# hypot.m4 serial 4
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_HYPOT],
+[
+  m4_divert_text([DEFAULTS], [gl_hypot_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare hypot().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine HYPOT_LIBM.
+  gl_COMMON_DOUBLE_MATHFUNC([hypot])
+
+  m4_ifdef([gl_FUNC_HYPOT_IEEE], [
+    if test $gl_hypot_required = ieee && test $REPLACE_HYPOT = 0; then
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+      AC_CACHE_CHECK([whether hypot works according to ISO C 99 with IEC 60559],
+        [gl_cv_func_hypot_ieee],
+        [
+          save_LIBS="$LIBS"
+          LIBS="$LIBS $HYPOT_LIBM"
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+static double dummy (double x, double y) { return 0; }
+double zero;
+double one = 1.0;
+int main (int argc, char *argv[])
+{
+  double (*my_hypot) (double, double) = argc ? hypot : dummy;
+  double f;
+  /* Test hypot(NaN,Infinity).
+     This test fails on OSF/1 5.1 and native Windows.  */
+  f = my_hypot (zero / zero, one / zero);
+  if (!numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+            ]])],
+            [gl_cv_func_hypot_ieee=yes],
+            [gl_cv_func_hypot_ieee=no],
+            [case "$host_os" in
+                       # Guess yes on glibc systems.
+               *-gnu*) gl_cv_func_hypot_ieee="guessing yes" ;;
+                       # If we don't know, assume the worst.
+               *)      gl_cv_func_hypot_ieee="guessing no" ;;
+             esac
+            ])
+          LIBS="$save_LIBS"
+        ])
+      case "$gl_cv_func_hypot_ieee" in
+        *yes) ;;
+        *) REPLACE_HYPOT=1 ;;
+      esac
+    fi
+  ])
+  if test $REPLACE_HYPOT = 1; then
+    dnl Find libraries needed to link lib/hypot.c.
+    AC_REQUIRE([gl_FUNC_FABS])
+    AC_REQUIRE([gl_FUNC_FREXP])
+    AC_REQUIRE([gl_FUNC_LDEXP])
+    AC_REQUIRE([gl_FUNC_SQRT])
+    HYPOT_LIBM=
+    dnl Append $FABS_LIBM to HYPOT_LIBM, avoiding gratuitous duplicates.
+    case " $HYPOT_LIBM " in
+      *" $FABS_LIBM "*) ;;
+      *) HYPOT_LIBM="$HYPOT_LIBM $FABS_LIBM" ;;
+    esac
+    dnl Append $FREXP_LIBM to HYPOT_LIBM, avoiding gratuitous duplicates.
+    case " $HYPOT_LIBM " in
+      *" $FREXP_LIBM "*) ;;
+      *) HYPOT_LIBM="$HYPOT_LIBM $FREXP_LIBM" ;;
+    esac
+    dnl Append $LDEXP_LIBM to HYPOT_LIBM, avoiding gratuitous duplicates.
+    case " $HYPOT_LIBM " in
+      *" $LDEXP_LIBM "*) ;;
+      *) HYPOT_LIBM="$HYPOT_LIBM $LDEXP_LIBM" ;;
+    esac
+    dnl Append $SQRT_LIBM to HYPOT_LIBM, avoiding gratuitous duplicates.
+    case " $HYPOT_LIBM " in
+      *" $SQRT_LIBM "*) ;;
+      *) HYPOT_LIBM="$HYPOT_LIBM $SQRT_LIBM" ;;
+    esac
+  fi
+])
new file mode 100644
--- /dev/null
+++ b/m4/hypotf-ieee.m4
@@ -0,0 +1,15 @@
+# hypotf-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in hypotf.m4 and not inlined in the
+dnl module description), so that gl_FUNC_HYPOTF can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_HYPOTF_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_hypotf_required=ieee])
+  AC_REQUIRE([gl_FUNC_HYPOTF])
+])
new file mode 100644
--- /dev/null
+++ b/m4/hypotf.m4
@@ -0,0 +1,141 @@
+# hypotf.m4 serial 4
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_HYPOTF],
+[
+  m4_divert_text([DEFAULTS], [gl_hypotf_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_HYPOT])
+
+  dnl Persuade glibc <math.h> to declare hypotf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether hypotf() exists. Assume that hypotf(), if it exists, is
+  dnl defined in the same library as hypot().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $HYPOT_LIBM"
+  AC_CHECK_FUNCS([hypotf])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_hypotf = yes; then
+    HYPOTF_LIBM="$HYPOT_LIBM"
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $HYPOTF_LIBM"
+    gl_FUNC_HYPOTF_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_hypotf_works" in
+      *yes) ;;
+      *) REPLACE_HYPOTF=1 ;;
+    esac
+    m4_ifdef([gl_FUNC_HYPOTF_IEEE], [
+      if test $gl_hypotf_required = ieee && test $REPLACE_HYPOTF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether hypotf works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_hypotf_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $HYPOTF_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (float x, float y)
+{
+  return x == y;
+}
+static float dummy (float x, float y) { return 0; }
+float zero;
+float one = 1.0f;
+int main (int argc, char *argv[])
+{
+  float (*my_hypotf) (float, float) = argc ? hypotf : dummy;
+  float f;
+  /* Test hypotf(NaN,Infinity).
+     This test fails on OSF/1 5.1 and native Windows.  */
+  f = my_hypotf (zero / zero, one / zero);
+  if (!numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_hypotf_ieee=yes],
+              [gl_cv_func_hypotf_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_hypotf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_hypotf_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_hypotf_ieee" in
+          *yes) ;;
+          *) REPLACE_HYPOTF=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_HYPOTF=0
+  fi
+  if test $HAVE_HYPOTF = 0 || test $REPLACE_HYPOTF = 1; then
+    dnl Find libraries needed to link lib/hypotf.c.
+    HYPOTF_LIBM="$HYPOT_LIBM"
+  fi
+  AC_SUBST([HYPOTF_LIBM])
+])
+
+dnl Test whether hypotf() works.
+dnl It returns wrong values on NetBSD 5.1/x86_64 and OpenBSD 4.9/x86.
+AC_DEFUN([gl_FUNC_HYPOTF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether hypotf works], [gl_cv_func_hypotf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <float.h>
+#include <math.h>
+volatile float x;
+volatile float y;
+volatile float z;
+int main ()
+{
+  int result = 0;
+  /* This test fails on NetBSD 5.1.  */
+  {
+    x = FLT_MIN * 2.0f;
+    y = FLT_MIN * 3.0f;
+    z = hypotf (x, y);
+    if (!(z >= FLT_MIN * 2.0f && z <= FLT_MIN * 4.0f))
+      result |= 1;
+  }
+  /* This test fails on OpenBSD 4.9.  */
+  {
+    x = FLT_MAX;
+    y = FLT_MAX * 0.5f;
+    z = hypotf (x, y);
+    if (!(z > 0 && z == z + z))
+      result |= 2;
+  }
+  return result;
+}
+]])],
+        [gl_cv_func_hypotf_works=yes],
+        [gl_cv_func_hypotf_works=no],
+        [case "$host_os" in
+           netbsd* | openbsd*) gl_cv_func_hypotf_works="guessing no";;
+           *)                  gl_cv_func_hypotf_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/hypotl-ieee.m4
@@ -0,0 +1,15 @@
+# hypotl-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in hypotl.m4 and not inlined in the
+dnl module description), so that gl_FUNC_HYPOTL can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_HYPOTL_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_hypotl_required=ieee])
+  AC_REQUIRE([gl_FUNC_HYPOTL])
+])
new file mode 100644
--- /dev/null
+++ b/m4/hypotl.m4
@@ -0,0 +1,176 @@
+# hypotl.m4 serial 5
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_HYPOTL],
+[
+  m4_divert_text([DEFAULTS], [gl_hypotl_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_HYPOT])
+
+  dnl Persuade glibc <math.h> to declare hypotl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether hypotl() exists. Assume that hypotl(), if it exists, is
+  dnl defined in the same library as hypot().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $HYPOT_LIBM"
+  AC_CHECK_FUNCS([hypotl])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_hypotl = yes; then
+    HYPOTL_LIBM="$HYPOT_LIBM"
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $HYPOTL_LIBM"
+    gl_FUNC_HYPOTL_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_hypotl_works" in
+      *yes) ;;
+      *) REPLACE_HYPOTL=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_HYPOTL_IEEE], [
+      if test $gl_hypotl_required = ieee && test $REPLACE_HYPOTL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether hypotl works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_hypotl_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $HYPOTL_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (long double x, long double y)
+{
+  return x == y;
+}
+static long double dummy (long double x, long double y) { return 0; }
+long double zero;
+long double one = 1.0L;
+int main (int argc, char *argv[])
+{
+  long double (*my_hypotl) (long double, long double) = argc ? hypotl : dummy;
+  long double f;
+  /* Test hypotl(NaN,Infinity).
+     This test fails on OSF/1 5.1 and native Windows.  */
+  f = my_hypotl (zero / zero, one / zero);
+  if (!numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_hypotl_ieee=yes],
+              [gl_cv_func_hypotl_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_hypotl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_hypotl_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_hypotl_ieee" in
+          *yes) ;;
+          *) REPLACE_HYPOTL=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_HYPOTL=0
+  fi
+  if test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; then
+    dnl Find libraries needed to link lib/hypotl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      HYPOTL_LIBM="$HYPOT_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_FABSL])
+      AC_REQUIRE([gl_FUNC_FREXPL])
+      AC_REQUIRE([gl_FUNC_LDEXPL])
+      AC_REQUIRE([gl_FUNC_SQRTL])
+      HYPOTL_LIBM=
+      dnl Append $FABSL_LIBM to HYPOTL_LIBM, avoiding gratuitous duplicates.
+      case " $HYPOTL_LIBM " in
+        *" $FABSL_LIBM "*) ;;
+        *) HYPOTL_LIBM="$HYPOTL_LIBM $FABSL_LIBM" ;;
+      esac
+      dnl Append $FREXPL_LIBM to HYPOTL_LIBM, avoiding gratuitous duplicates.
+      case " $HYPOTL_LIBM " in
+        *" $FREXPL_LIBM "*) ;;
+        *) HYPOTL_LIBM="$HYPOTL_LIBM $FREXPL_LIBM" ;;
+      esac
+      dnl Append $LDEXPL_LIBM to HYPOTL_LIBM, avoiding gratuitous duplicates.
+      case " $HYPOTL_LIBM " in
+        *" $LDEXPL_LIBM "*) ;;
+        *) HYPOTL_LIBM="$HYPOTL_LIBM $LDEXPL_LIBM" ;;
+      esac
+      dnl Append $SQRTL_LIBM to HYPOTL_LIBM, avoiding gratuitous duplicates.
+      case " $HYPOTL_LIBM " in
+        *" $SQRTL_LIBM "*) ;;
+        *) HYPOTL_LIBM="$HYPOTL_LIBM $SQRTL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([HYPOTL_LIBM])
+])
+
+dnl Test whether hypotl() works.
+dnl On OpenBSD 5.1/SPARC,
+dnl hypotl (2.5541394760659556563446062497337725156L, 7.7893454113437840832487794525518765265L)
+dnl has rounding errors that eat up the last 8 to 9 decimal digits.
+AC_DEFUN([gl_FUNC_HYPOTL_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether hypotl works], [gl_cv_func_hypotl_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <float.h>
+#include <math.h>
+static long double
+my_ldexpl (long double x, int d)
+{
+  for (; d > 0; d--)
+    x *= 2.0L;
+  for (; d < 0; d++)
+    x *= 0.5L;
+  return x;
+}
+volatile long double x;
+volatile long double y;
+volatile long double z;
+int main ()
+{
+  long double err;
+
+  x = 2.5541394760659556563446062497337725156L;
+  y = 7.7893454113437840832487794525518765265L;
+  z = hypotl (x, y);
+  err = z * z - (x * x + y * y);
+  err = my_ldexpl (err, LDBL_MANT_DIG);
+  if (err < 0)
+    err = - err;
+  if (err > 1000.0L)
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_hypotl_works=yes],
+        [gl_cv_func_hypotl_works=no],
+        [case "$host_os" in
+           openbsd*) gl_cv_func_hypotl_works="guessing no";;
+           *)        gl_cv_func_hypotl_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/ilogb.m4
@@ -0,0 +1,112 @@
+# ilogb.m4 serial 1
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ILOGB],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Determine ILOGB_LIBM.
+  gl_MATHFUNC([ilogb], [int], [(double)])
+  if test $gl_cv_func_ilogb_no_libm = yes \
+     || test $gl_cv_func_ilogb_in_libm = yes; then
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $ILOGB_LIBM"
+    gl_FUNC_ILOGB_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_ilogb_works" in
+      *yes) ;;
+      *) REPLACE_ILOGB=1 ;;
+    esac
+  else
+    HAVE_ILOGB=0
+  fi
+  if test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1; then
+    dnl Find libraries needed to link lib/ilogb.c.
+    AC_REQUIRE([gl_FUNC_FREXP])
+    AC_REQUIRE([gl_FUNC_ISNAND])
+    ILOGB_LIBM=
+    dnl Append $FREXP_LIBM to ILOGB_LIBM, avoiding gratuitous duplicates.
+    case " $ILOGB_LIBM " in
+      *" $FREXP_LIBM "*) ;;
+      *) ILOGB_LIBM="$ILOGB_LIBM $FREXP_LIBM" ;;
+    esac
+    dnl Append $ISNAND_LIBM to ILOGB_LIBM, avoiding gratuitous duplicates.
+    case " $ILOGB_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) ILOGB_LIBM="$ILOGB_LIBM $ISNAND_LIBM" ;;
+    esac
+  fi
+  AC_SUBST([ILOGB_LIBM])
+])
+
+dnl Test whether ilogb() works.
+dnl On OpenBSD 4.9, AIX 5.1, ilogb(0.0) is wrong.
+dnl On NetBSD 5.1, OpenBSD 4.9, ilogb(Infinity) is wrong.
+dnl On OpenBSD 4.9, ilogb(NaN) is wrong.
+AC_DEFUN([gl_FUNC_ILOGB_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether ilogb works], [gl_cv_func_ilogb_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <limits.h>
+#include <math.h>
+/* Provide FP_ILOGB0, FP_ILOGBNAN, like in math.in.h.  */
+#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
+# if defined __NetBSD__ || defined __sgi
+  /* NetBSD, IRIX 6.5: match what ilogb() does */
+#  define FP_ILOGB0   INT_MIN
+#  define FP_ILOGBNAN INT_MIN
+# elif defined _AIX
+  /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
+#  define FP_ILOGB0   INT_MIN
+#  define FP_ILOGBNAN INT_MAX
+# elif defined __sun
+  /* Solaris 9: match what ilogb() does */
+#  define FP_ILOGB0   (- INT_MAX)
+#  define FP_ILOGBNAN INT_MAX
+# endif
+#endif
+volatile double x;
+static double zero;
+static int dummy (double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  int (*my_ilogb) (double) = argc ? ilogb : dummy;
+  int result = 0;
+  /* This test fails on OpenBSD 4.9, AIX 5.1.  */
+  {
+    x = 0.0;
+    if (my_ilogb (x) != FP_ILOGB0)
+      result |= 1;
+  }
+  /* This test fails on NetBSD 5.1, OpenBSD 4.9.  */
+  {
+    x = 1.0 / zero;
+    if (my_ilogb (x) != INT_MAX)
+      result |= 2;
+  }
+  /* This test fails on OpenBSD 4.9.  */
+  {
+    x = zero / zero;
+    if (my_ilogb (x) != FP_ILOGBNAN)
+      result |= 4;
+  }
+  return result;
+}
+]])],
+        [gl_cv_func_ilogb_works=yes],
+        [gl_cv_func_ilogb_works=no],
+        [case "$host_os" in
+           aix* | openbsd* | netbsd* | solaris*)
+              gl_cv_func_ilogb_works="guessing no";;
+           *) gl_cv_func_ilogb_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/ilogbf.m4
@@ -0,0 +1,107 @@
+# ilogbf.m4 serial 1
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ILOGBF],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare ilogbf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine ILOGBF_LIBM.
+  gl_MATHFUNC([ilogbf], [int], [(float)])
+  if test $gl_cv_func_ilogbf_no_libm = yes \
+     || test $gl_cv_func_ilogbf_in_libm = yes; then
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $ILOGBF_LIBM"
+    gl_FUNC_ILOGBF_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_ilogbf_works" in
+      *yes) ;;
+      *) REPLACE_ILOGBF=1 ;;
+    esac
+  else
+    HAVE_ILOGBF=0
+  fi
+  if test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1; then
+    dnl Find libraries needed to link lib/ilogbf.c.
+    AC_REQUIRE([gl_FUNC_FREXPF])
+    AC_REQUIRE([gl_FUNC_ISNANF])
+    ILOGBF_LIBM=
+    dnl Append $FREXPF_LIBM to ILOGBF_LIBM, avoiding gratuitous duplicates.
+    case " $ILOGBF_LIBM " in
+      *" $FREXPF_LIBM "*) ;;
+      *) ILOGBF_LIBM="$ILOGBF_LIBM $FREXPF_LIBM" ;;
+    esac
+    dnl Append $ISNANF_LIBM to ILOGBF_LIBM, avoiding gratuitous duplicates.
+    case " $ILOGBF_LIBM " in
+      *" $ISNANF_LIBM "*) ;;
+      *) ILOGBF_LIBM="$ILOGBF_LIBM $ISNANF_LIBM" ;;
+    esac
+  fi
+  AC_SUBST([ILOGBF_LIBM])
+])
+
+dnl Test whether ilogbf() works.
+dnl On OpenBSD 4.9, ilogbf(0.0) is wrong.
+dnl On NetBSD 5.1, OpenBSD 4.9, ilogbf(Infinity) is wrong.
+AC_DEFUN([gl_FUNC_ILOGBF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether ilogbf works], [gl_cv_func_ilogbf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <limits.h>
+#include <math.h>
+/* Provide FP_ILOGB0, FP_ILOGBNAN, like in math.in.h.  */
+#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
+# if defined __NetBSD__ || defined __sgi
+  /* NetBSD, IRIX 6.5: match what ilogbf() does */
+#  define FP_ILOGB0   INT_MIN
+#  define FP_ILOGBNAN INT_MIN
+# elif defined _AIX
+  /* AIX 5.1: match what ilogbf() does in AIX >= 5.2 */
+#  define FP_ILOGB0   INT_MIN
+#  define FP_ILOGBNAN INT_MAX
+# elif defined __sun
+  /* Solaris 9: match what ilogbf() does */
+#  define FP_ILOGB0   (- INT_MAX)
+#  define FP_ILOGBNAN INT_MAX
+# endif
+#endif
+volatile float x;
+static float zero;
+static int dummy (float x) { return 0; }
+int main (int argc, char *argv[])
+{
+  int (*my_ilogbf) (float) = argc ? ilogbf : dummy;
+  int result = 0;
+  /* This test fails on OpenBSD 4.9.  */
+  {
+    x = 0.0f;
+    if (my_ilogbf (x) != FP_ILOGB0)
+      result |= 1;
+  }
+  /* This test fails on NetBSD 5.1, OpenBSD 4.9.  */
+  {
+    x = 1.0f / zero;
+    if (my_ilogbf (x) != INT_MAX)
+      result |= 2;
+  }
+  return result;
+}
+]])],
+        [gl_cv_func_ilogbf_works=yes],
+        [gl_cv_func_ilogbf_works=no],
+        [case "$host_os" in
+           openbsd* | netbsd*) gl_cv_func_ilogbf_works="guessing no";;
+           *)                  gl_cv_func_ilogbf_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/ilogbl.m4
@@ -0,0 +1,61 @@
+# ilogbl.m4 serial 1
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ILOGBL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_ILOGB])
+
+  dnl Persuade glibc <math.h> to declare ilogbl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether ilogbl() exists. Assume that ilogbl(), if it exists, is
+  dnl defined in the same library as ilogb().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $ILOGB_LIBM"
+  AC_CACHE_CHECK([for ilogbl],
+    [gl_cv_func_ilogbl],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             int (*funcptr) (long double) = ilogbl;
+             long double x;]],
+           [[return (funcptr (x) % 2) == 0
+                    || (ilogbl (x) % 2) == 0;]])],
+        [gl_cv_func_ilogbl=yes],
+        [gl_cv_func_ilogbl=no])
+    ])
+  LIBS="$save_LIBS"
+  if test $gl_cv_func_ilogbl = yes; then
+    ILOGBL_LIBM="$ILOGB_LIBM"
+  else
+    HAVE_ILOGBL=0
+    dnl Find libraries needed to link lib/ilogbl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      ILOGBL_LIBM="$ILOGB_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_FREXPL])
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      ILOGBL_LIBM=
+      dnl Append $FREXPL_LIBM to ILOGBL_LIBM, avoiding gratuitous duplicates.
+      case " $ILOGBL_LIBM " in
+        *" $FREXPL_LIBM "*) ;;
+        *) ILOGBL_LIBM="$ILOGBL_LIBM $FREXPL_LIBM" ;;
+      esac
+      dnl Append $ISNANL_LIBM to ILOGBL_LIBM, avoiding gratuitous duplicates.
+      case " $ILOGBL_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) ILOGBL_LIBM="$ILOGBL_LIBM $ISNANL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([ILOGBL_LIBM])
+])
--- a/m4/intdiv0.m4
+++ b/m4/intdiv0.m4
@@ -1,4 +1,4 @@
-# intdiv0.m4 serial 5 (gettext-0.18.2)
+# intdiv0.m4 serial 6 (gettext-0.18.2)
 dnl Copyright (C) 2002, 2007-2008, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,7 @@
 changequote(,)dnl
       case "$host_os" in
         macos* | darwin[6-9]* | darwin[1-9][0-9]*)
-          # On MacOS X 10.2 or newer, just assume the same as when cross-
+          # On Mac OS X 10.2 or newer, just assume the same as when cross-
           # compiling. If we were to perform the real test, 1 Crash Report
           # dialog window would pop up.
           case "$host_cpu" in
--- a/m4/intlmacosx.m4
+++ b/m4/intlmacosx.m4
@@ -1,4 +1,4 @@
-# intlmacosx.m4 serial 4 (gettext-0.18.2)
+# intlmacosx.m4 serial 5 (gettext-0.18.2)
 dnl Copyright (C) 2004-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,11 +13,11 @@
 dnl gettext package package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
-dnl Checks for special options needed on MacOS X.
+dnl Checks for special options needed on Mac OS X.
 dnl Defines INTL_MACOSX_LIBS.
 AC_DEFUN([gt_INTL_MACOSX],
 [
-  dnl Check for API introduced in MacOS X 10.2.
+  dnl Check for API introduced in Mac OS X 10.2.
   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
     [gt_cv_func_CFPreferencesCopyAppValue],
     [gt_save_LIBS="$LIBS"
@@ -31,9 +31,9 @@
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
-      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
   fi
-  dnl Check for API introduced in MacOS X 10.3.
+  dnl Check for API introduced in Mac OS X 10.3.
   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
     [gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
@@ -46,7 +46,7 @@
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
-      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
   fi
   INTL_MACOSX_LIBS=
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
--- a/m4/isatty.m4
+++ b/m4/isatty.m4
@@ -1,4 +1,4 @@
-# isatty.m4 serial 2
+# isatty.m4 serial 3
 dnl Copyright (C) 2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -16,6 +16,4 @@
 ])
 
 # Prerequisites of lib/isatty.c.
-AC_DEFUN([gl_PREREQ_ISATTY], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_ISATTY], [:])
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -102,3 +102,48 @@
 ])# AC_SYS_LARGEFILE
 
 ])# m4_version_prereq 2.69
+
+# Enable large files on systems where this is implemented by Gnulib, not by the
+# system headers.
+# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib
+# overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively.
+AC_DEFUN([gl_LARGEFILE],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      dnl Native Windows.
+      dnl mingw64 defines off_t to a 64-bit type already, if
+      dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.
+      AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <sys/types.h>
+                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
+              ]],
+              [[]])],
+           [gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no])
+        ])
+      if test $gl_cv_type_off_t_64 = no; then
+        WINDOWS_64_BIT_OFF_T=1
+      else
+        WINDOWS_64_BIT_OFF_T=0
+      fi
+      dnl But all native Windows platforms (including mingw64) have a 32-bit
+      dnl st_size member in 'struct stat'.
+      WINDOWS_64_BIT_ST_SIZE=1
+      ;;
+    *)
+      dnl Nothing to do on gnulib's side.
+      dnl A 64-bit off_t is
+      dnl   - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
+      dnl     OSF/1, Cygwin,
+      dnl   - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
+      dnl     glibc, HP-UX, Solaris,
+      dnl   - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX,
+      dnl   - impossible to achieve on Minix 3.1.8.
+      WINDOWS_64_BIT_OFF_T=0
+      WINDOWS_64_BIT_ST_SIZE=0
+      ;;
+  esac
+])
--- a/m4/lchown.m4
+++ b/m4/lchown.m4
@@ -1,4 +1,4 @@
-# serial 16
+# serial 17
 # Determine whether we need the lchown wrapper.
 
 dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2012 Free Software Foundation,
@@ -20,9 +20,19 @@
   AC_CHECK_FUNCS([lchown])
   if test $ac_cv_func_lchown = no; then
     HAVE_LCHOWN=0
-  elif test "$gl_cv_func_chown_slash_works" != yes \
-      || test "$gl_cv_func_chown_ctime_works" != yes; then
+  else
     dnl Trailing slash and ctime bugs in chown also occur in lchown.
-    REPLACE_LCHOWN=1
+    case "$gl_cv_func_chown_slash_works" in
+      *yes) ;;
+      *)
+        REPLACE_LCHOWN=1
+        ;;
+    esac
+    case "$gl_cv_func_chown_ctime_works" in
+      *yes) ;;
+      *)
+        REPLACE_LCHOWN=1
+        ;;
+    esac
   fi
 ])
--- a/m4/ldexpf.m4
+++ b/m4/ldexpf.m4
@@ -1,4 +1,4 @@
-# ldexpf.m4 serial 1
+# ldexpf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_LDEXP])
 
+  dnl Persuade glibc <math.h> to declare ldexpf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether ldexpf() exists. We cannot assume that ldexpf(), if it
   dnl exists, is defined in the same library as ldexp(). This is not the case
   dnl on FreeBSD, NetBSD, OpenBSD.
--- a/m4/ldexpl.m4
+++ b/m4/ldexpl.m4
@@ -1,4 +1,4 @@
-# ldexpl.m4 serial 14
+# ldexpl.m4 serial 16
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,9 +9,14 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
   AC_REQUIRE([gl_FUNC_ISNANL]) dnl for ISNANL_LIBM
+
+  dnl Persuade glibc <math.h> to declare ldexpl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Check whether it's declared.
-  dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+  dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
   AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
+
   LDEXPL_LIBM=
   if test $HAVE_DECL_LDEXPL = 1; then
     gl_CHECK_LDEXPL_NO_LIBM
@@ -82,7 +87,7 @@
 ])
 
 dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1
-dnl and MacOS X 10.4/PowerPC).
+dnl and Mac OS X 10.4/PowerPC).
 AC_DEFUN([gl_FUNC_LDEXPL_WORKS],
 [
   AC_REQUIRE([AC_PROG_CC])
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,33 +1,39 @@
-# lib-ld.m4 serial 5 (gettext-0.18.2)
+# lib-ld.m4 serial 6
 dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
 
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
+  acl_cv_prog_gnu_ld=yes
+  ;;
 *)
-  acl_cv_prog_gnu_ld=no ;;
+  acl_cv_prog_gnu_ld=no
+  ;;
 esac])
 with_gnu_ld=$acl_cv_prog_gnu_ld
 ])
 
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
 AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+        [assume the C compiler uses GNU ld [default=no]])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
@@ -40,10 +46,11 @@
            || PATH_SEPARATOR=';'
        }
 fi
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
+  AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -53,11 +60,11 @@
   esac
   case $ac_prog in
     # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
       test -z "$LD" && LD="$ac_prog"
@@ -78,23 +85,26 @@
 fi
 AC_CACHE_VAL([acl_cv_path_LD],
 [if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       acl_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-        test "$with_gnu_ld" != no && break ;;
+        test "$with_gnu_ld" != no && break
+        ;;
       *)
-        test "$with_gnu_ld" != yes && break ;;
+        test "$with_gnu_ld" != yes && break
+        ;;
       esac
     fi
   done
-  IFS="$ac_save_ifs"
+  IFS="$acl_save_ifs"
 else
   acl_cv_path_LD="$LD" # Let the user override the test with a path.
 fi])
--- a/m4/link-follow.m4
+++ b/m4/link-follow.m4
@@ -1,4 +1,4 @@
-# serial 17
+# serial 19
 dnl Run a program to determine whether link(2) follows symlinks.
 dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
 
@@ -16,6 +16,7 @@
 dnl runtime test.  If it is -2, use a generic runtime test.
 AC_DEFUN([gl_FUNC_LINK_FOLLOWS_SYMLINK],
 [dnl
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([readlink])
   dnl Mingw lacks link, although gnulib provides a good replacement.
   dnl However, it also lacks symlink, so there's nothing to test in
@@ -81,13 +82,21 @@
            ]])],
            [gl_cv_func_link_follows_symlink=no], dnl GNU behavior
            [gl_cv_func_link_follows_symlink=yes], dnl Followed link/compile failed
-           [gl_cv_func_link_follows_symlink=unknown] dnl We're cross compiling.
-         )
+           [dnl We're cross compiling.
+            dnl The past results are "yes" on Mac OS X, FreeBSD, NetBSD,
+            dnl OpenBSD, Minix, AIX, HP-UX, OSF/1, and "no" on Linux, Cygwin.
+            case "$host_os" in
+                           # On glibc/Linux we know the result.
+              linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
+                           # Otherwise, we don't know.
+              *)           gl_cv_func_link_follows_symlink=unknown ;;
+            esac
+           ])
          rm -f conftest.file conftest.sym conftest.hard
         ])
-      case $gl_cv_func_link_follows_symlink in
-        yes) gl_link_follows_symlinks=1 ;;
-        no) ;; # already defaulted to 0
+      case "$gl_cv_func_link_follows_symlink" in
+        *yes) gl_link_follows_symlinks=1 ;;
+        *no) ;; # already defaulted to 0
         *) gl_link_follows_symlinks=-2 ;;
       esac
     fi
--- a/m4/link.m4
+++ b/m4/link.m4
@@ -1,4 +1,4 @@
-# link.m4 serial 7
+# link.m4 serial 8
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_FUNC_LINK],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([link])
   if test $ac_cv_func_link = no; then
     HAVE_LINK=0
@@ -36,10 +37,19 @@
              return result;
            ]])],
          [gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
-         [gl_cv_func_link_works="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_link_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_link_works="guessing no" ;;
+          esac
+         ])
        rm -f conftest.a conftest.b conftest.lnk])
-    if test "$gl_cv_func_link_works" != yes; then
-      REPLACE_LINK=1
-    fi
+    case "$gl_cv_func_link_works" in
+      *yes) ;;
+      *)
+        REPLACE_LINK=1
+        ;;
+    esac
   fi
 ])
--- a/m4/locale-ar.m4
+++ b/m4/locale-ar.m4
@@ -1,4 +1,4 @@
-# locale-ar.m4 serial 4
+# locale-ar.m4 serial 6
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -28,7 +28,7 @@
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
   /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -72,7 +72,7 @@
           ;;
         *)
           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
           # configure script would override the LC_ALL setting. Likewise for
           # LC_CTYPE, which is also set at the beginning of the configure script.
           # Values tested:
--- a/m4/locale-fr.m4
+++ b/m4/locale-fr.m4
@@ -1,4 +1,4 @@
-# locale-fr.m4 serial 14
+# locale-fr.m4 serial 17
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -28,7 +28,7 @@
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
   /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -37,7 +37,7 @@
   if (setlocale (LC_ALL, "") == NULL) return 1;
 #endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -63,10 +63,12 @@
      one byte long. This excludes the UTF-8 encoding.  */
   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
   /* Check whether the decimal separator is a comma.
      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
      are nl_langinfo(RADIXCHAR) are both ".".  */
   if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
   return 0;
 }
 changequote([,])dnl
@@ -90,7 +92,7 @@
           ;;
         *)
           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
           # configure script would override the LC_ALL setting. Likewise for
           # LC_CTYPE, which is also set at the beginning of the configure script.
           # Test for the usual locale name.
@@ -154,7 +156,7 @@
 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
   /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -163,7 +165,7 @@
   if (setlocale (LC_ALL, "") == NULL) return 1;
 # endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -189,10 +191,12 @@
       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
     return 1;
 #endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
   /* Check whether the decimal separator is a comma.
      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
      are nl_langinfo(RADIXCHAR) are both ".".  */
   if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
   return 0;
 }
 changequote([,])dnl
@@ -216,7 +220,7 @@
           ;;
         *)
           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
           # configure script would override the LC_ALL setting. Likewise for
           # LC_CTYPE, which is also set at the beginning of the configure script.
           # Test for the usual locale name.
--- a/m4/locale-ja.m4
+++ b/m4/locale-ja.m4
@@ -1,4 +1,4 @@
-# locale-ja.m4 serial 10
+# locale-ja.m4 serial 12
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,7 +30,7 @@
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
   /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -39,7 +39,7 @@
   if (setlocale (LC_ALL, "") == NULL) return 1;
 #endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -91,7 +91,7 @@
           ;;
         *)
           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
           # configure script would override the LC_ALL setting. Likewise for
           # LC_CTYPE, which is also set at the beginning of the configure script.
           # Test for the AIX locale name.
--- a/m4/locale-tr.m4
+++ b/m4/locale-tr.m4
@@ -1,4 +1,4 @@
-# locale-tr.m4 serial 8
+# locale-tr.m4 serial 10
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,7 @@
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
   /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -42,7 +42,7 @@
   if (setlocale (LC_ALL, "") == NULL) return 1;
 #endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -95,7 +95,7 @@
           ;;
         *)
           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
           # configure script would override the LC_ALL setting. Likewise for
           # LC_CTYPE, which is also set at the beginning of the configure script.
           # Test for the usual locale name.
--- a/m4/locale-zh.m4
+++ b/m4/locale-zh.m4
@@ -1,4 +1,4 @@
-# locale-zh.m4 serial 10
+# locale-zh.m4 serial 12
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,7 @@
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
   /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -40,7 +40,7 @@
   if (setlocale (LC_ALL, "") == NULL) return 1;
 #endif
   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -101,7 +101,7 @@
           ;;
         *)
           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
           # configure script would override the LC_ALL setting. Likewise for
           # LC_CTYPE, which is also set at the beginning of the configure script.
           # Test for the locale name without encoding suffix.
--- a/m4/locale_h.m4
+++ b/m4/locale_h.m4
@@ -1,4 +1,4 @@
-# locale_h.m4 serial 14
+# locale_h.m4 serial 19
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,18 +10,29 @@
   dnl once only, before all statements that occur in other macros.
   AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
 
-  dnl Persuade glibc <locale.h> to define locale_t.
+  dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
+  dnl members of 'struct lconv'.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
   dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
   AC_REQUIRE([gl_STDDEF_H])
 
+  dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv'
+  dnl only if _LCONV_C99 is defined.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    solaris*)
+      AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.])
+      ;;
+  esac
+
   AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
     [gl_cv_header_locale_h_posix2001],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
           [[#include <locale.h>
-            int x = LC_MESSAGES;]],
+            int x = LC_MESSAGES;
+            int y = sizeof (((struct lconv *) 0)->decimal_point);]],
           [[]])],
        [gl_cv_header_locale_h_posix2001=yes],
        [gl_cv_header_locale_h_posix2001=no])])
@@ -31,7 +42,7 @@
   if test $ac_cv_header_xlocale_h = yes; then
     HAVE_XLOCALE_H=1
     dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
-    dnl e.g. on MacOS X 10.5. If <locale.h> does not define locale_t by
+    dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
     dnl itself, we assume that <xlocale.h> will do so.
     AC_CACHE_CHECK([whether locale.h defines locale_t],
       [gl_cv_header_locale_has_locale_t],
@@ -54,6 +65,26 @@
   fi
   AC_SUBST([HAVE_XLOCALE_H])
 
+  dnl Check whether 'struct lconv' is complete.
+  dnl Bionic libc's 'struct lconv' is just a dummy.
+  dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
+  dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members.
+  AC_CACHE_CHECK([whether struct lconv is properly defined],
+    [gl_cv_sys_struct_lconv_ok],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>
+            struct lconv l;
+            int x = sizeof (l.decimal_point);
+            int y = sizeof (l.int_p_cs_precedes);]],
+          [[]])],
+       [gl_cv_sys_struct_lconv_ok=yes],
+       [gl_cv_sys_struct_lconv_ok=no])
+    ])
+  if test $gl_cv_sys_struct_lconv_ok = no; then
+    REPLACE_STRUCT_LCONV=1
+  fi
+
   dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
   gl_NEXT_HEADERS([locale.h])
 
@@ -79,10 +110,13 @@
 
 AC_DEFUN([gl_LOCALE_H_DEFAULTS],
 [
+  GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
   GNULIB_SETLOCALE=0;  AC_SUBST([GNULIB_SETLOCALE])
   GNULIB_DUPLOCALE=0;  AC_SUBST([GNULIB_DUPLOCALE])
   dnl Assume proper GNU behavior unless another module says otherwise.
-  HAVE_DUPLOCALE=1;    AC_SUBST([HAVE_DUPLOCALE])
-  REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
-  REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
+  HAVE_DUPLOCALE=1;       AC_SUBST([HAVE_DUPLOCALE])
+  REPLACE_LOCALECONV=0;   AC_SUBST([REPLACE_LOCALECONV])
+  REPLACE_SETLOCALE=0;    AC_SUBST([REPLACE_SETLOCALE])
+  REPLACE_DUPLOCALE=0;    AC_SUBST([REPLACE_DUPLOCALE])
+  REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
 ])
new file mode 100644
--- /dev/null
+++ b/m4/localeconv.m4
@@ -0,0 +1,22 @@
+# localeconv.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOCALECONV],
+[
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+  AC_REQUIRE([gl_LOCALE_H])
+
+  if test $REPLACE_STRUCT_LCONV = 1; then
+    REPLACE_LOCALECONV=1
+  fi
+])
+
+# Prerequisites of lib/localeconv.c.
+AC_DEFUN([gl_PREREQ_LOCALECONV],
+[
+  AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [],
+    [[#include <locale.h>]])
+])
--- a/m4/lock.m4
+++ b/m4/lock.m4
@@ -1,4 +1,4 @@
-# lock.m4 serial 11 (gettext-0.18.2)
+# lock.m4 serial 13 (gettext-0.18.2)
 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,7 @@
 [
   AC_REQUIRE([gl_THREADLIB])
   if test "$gl_threads_api" = posix; then
-    # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
     # pthread_rwlock_* functions.
     AC_CHECK_TYPE([pthread_rwlock_t],
       [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
@@ -35,7 +35,5 @@
   gl_PREREQ_LOCK
 ])
 
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
new file mode 100644
--- /dev/null
+++ b/m4/log-ieee.m4
@@ -0,0 +1,15 @@
+# log-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG])
+])
--- a/m4/log.m4
+++ b/m4/log.m4
@@ -1,4 +1,4 @@
-# log.m4 serial 1
+# log.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,102 @@
 
 AC_DEFUN([gl_FUNC_LOG],
 [
+  m4_divert_text([DEFAULTS], [gl_log_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
   dnl Determine LOG_LIBM.
   gl_COMMON_DOUBLE_MATHFUNC([log])
+
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG_LIBM"
+  gl_FUNC_LOG_WORKS
+  LIBS="$save_LIBS"
+  case "$gl_cv_func_log_works" in
+    *yes) ;;
+    *) REPLACE_LOG=1 ;;
+  esac
+
+  m4_ifdef([gl_FUNC_LOG_IEEE], [
+    if test $gl_log_required = ieee && test $REPLACE_LOG = 0; then
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+      AC_CACHE_CHECK([whether log works according to ISO C 99 with IEC 60559],
+        [gl_cv_func_log_ieee],
+        [
+          save_LIBS="$LIBS"
+          LIBS="$LIBS $LOG_LIBM"
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+static double dummy (double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  double (*my_log) (double) = argc ? log : dummy;
+  /* Test log(negative).
+     This test fails on NetBSD 5.1, Solaris 11 2011-11.  */
+  double y = my_log (-1.0);
+  if (numeric_equal (y, y))
+    return 1;
+  return 0;
+}
+            ]])],
+            [gl_cv_func_log_ieee=yes],
+            [gl_cv_func_log_ieee=no],
+            [case "$host_os" in
+                       # Guess yes on glibc systems.
+               *-gnu*) gl_cv_func_log_ieee="guessing yes" ;;
+                       # If we don't know, assume the worst.
+               *)      gl_cv_func_log_ieee="guessing no" ;;
+             esac
+            ])
+          LIBS="$save_LIBS"
+        ])
+      case "$gl_cv_func_log_ieee" in
+        *yes) ;;
+        *) REPLACE_LOG=1 ;;
+      esac
+    fi
+  ])
 ])
+
+dnl Test whether log() works.
+dnl On OSF/1 5.1, log(-0.0) is NaN.
+AC_DEFUN([gl_FUNC_LOG_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log works], [gl_cv_func_log_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile double x;
+double y;
+int main ()
+{
+  x = -0.0;
+  y = log (x);
+  if (!(y + y == y))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_log_works=yes],
+        [gl_cv_func_log_works=no],
+        [case "$host_os" in
+           osf*) gl_cv_func_log_works="guessing no";;
+           *)    gl_cv_func_log_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log10-ieee.m4
@@ -0,0 +1,15 @@
+# log10-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG10 can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG10_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log10_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG10])
+])
--- a/m4/log10.m4
+++ b/m4/log10.m4
@@ -1,4 +1,4 @@
-# log10.m4 serial 1
+# log10.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,102 @@
 
 AC_DEFUN([gl_FUNC_LOG10],
 [
+  m4_divert_text([DEFAULTS], [gl_log10_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
   dnl Determine LOG10_LIBM.
   gl_COMMON_DOUBLE_MATHFUNC([log10])
+
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG10_LIBM"
+  gl_FUNC_LOG10_WORKS
+  LIBS="$save_LIBS"
+  case "$gl_cv_func_log10_works" in
+    *yes) ;;
+    *) REPLACE_LOG10=1 ;;
+  esac
+
+  m4_ifdef([gl_FUNC_LOG10_IEEE], [
+    if test $gl_log10_required = ieee && test $REPLACE_LOG10 = 0; then
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+      AC_CACHE_CHECK([whether log10 works according to ISO C 99 with IEC 60559],
+        [gl_cv_func_log10_ieee],
+        [
+          save_LIBS="$LIBS"
+          LIBS="$LIBS $LOG10_LIBM"
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+static double dummy (double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  double (*my_log10) (double) = argc ? log10 : dummy;
+  /* Test log10(negative).
+     This test fails on NetBSD 5.1, Solaris 11 2011-11.  */
+  double y = my_log10 (-1.0);
+  if (numeric_equal (y, y))
+    return 1;
+  return 0;
+}
+            ]])],
+            [gl_cv_func_log10_ieee=yes],
+            [gl_cv_func_log10_ieee=no],
+            [case "$host_os" in
+                       # Guess yes on glibc systems.
+               *-gnu*) gl_cv_func_log10_ieee="guessing yes" ;;
+                       # If we don't know, assume the worst.
+               *)      gl_cv_func_log10_ieee="guessing no" ;;
+             esac
+            ])
+          LIBS="$save_LIBS"
+        ])
+      case "$gl_cv_func_log10_ieee" in
+        *yes) ;;
+        *) REPLACE_LOG10=1 ;;
+      esac
+    fi
+  ])
 ])
+
+dnl Test whether log10() works.
+dnl On OSF/1 5.1, log10(-0.0) is NaN.
+AC_DEFUN([gl_FUNC_LOG10_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log10 works], [gl_cv_func_log10_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile double x;
+double y;
+int main ()
+{
+  x = -0.0;
+  y = log10 (x);
+  if (!(y + y == y))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_log10_works=yes],
+        [gl_cv_func_log10_works=no],
+        [case "$host_os" in
+           osf*) gl_cv_func_log10_works="guessing no";;
+           *)    gl_cv_func_log10_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log10f-ieee.m4
@@ -0,0 +1,15 @@
+# log10f-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG10F can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG10F_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log10f_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG10F])
+])
--- a/m4/log10f.m4
+++ b/m4/log10f.m4
@@ -1,4 +1,4 @@
-# log10f.m4 serial 1
+# log10f.m4 serial 6
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,9 +6,13 @@
 
 AC_DEFUN([gl_FUNC_LOG10F],
 [
+  m4_divert_text([DEFAULTS], [gl_log10f_required=plain])
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_LOG10])
 
+  dnl Persuade glibc <math.h> to declare log10f().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether log10f() exists. Assume that log10f(), if it exists, is
   dnl defined in the same library as log10().
   save_LIBS="$LIBS"
@@ -17,9 +21,107 @@
   LIBS="$save_LIBS"
   if test $ac_cv_func_log10f = yes; then
     LOG10F_LIBM="$LOG10_LIBM"
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOG10F_LIBM"
+    gl_FUNC_LOG10F_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_log10f_works" in
+      *yes) ;;
+      *) REPLACE_LOG10F=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_LOG10F_IEEE], [
+      if test $gl_log10f_required = ieee && test $REPLACE_LOG10F = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether log10f works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_log10f_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $LOG10F_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (float x, float y)
+{
+  return x == y;
+}
+static float dummy (float x) { return 0; }
+int main (int argc, char *argv[])
+{
+  float (*my_log10f) (float) = argc ? log10f : dummy;
+  /* Test log10f(negative).
+     This test fails on NetBSD 5.1.  */
+  float y = my_log10f (-1.0f);
+  if (numeric_equal (y, y))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_log10f_ieee=yes],
+              [gl_cv_func_log10f_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_log10f_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_log10f_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_log10f_ieee" in
+          *yes) ;;
+          *) REPLACE_LOG10F=1 ;;
+        esac
+      fi
+    ])
   else
     HAVE_LOG10F=0
-    LOG10F_LIBM="$LOG10_LIBM"
+  fi
+  if test $HAVE_LOG10F = 0 || test $REPLACE_LOG10F = 1; then
+    dnl Find libraries needed to link lib/log10f.c.
+    if test $HAVE_LOG10F = 0; then
+      LOG10F_LIBM="$LOG10_LIBM"
+    fi
   fi
   AC_SUBST([LOG10F_LIBM])
 ])
+
+dnl Test whether log10f() works.
+dnl On OSF/1 5.1, log10f(-0.0f) is NaN.
+AC_DEFUN([gl_FUNC_LOG10F_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log10f works], [gl_cv_func_log10f_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile float x;
+float y;
+int main ()
+{
+  x = -0.0f;
+  y = log10f (x);
+  if (!(y + y == y))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_log10f_works=yes],
+        [gl_cv_func_log10f_works=no],
+        [case "$host_os" in
+           osf*) gl_cv_func_log10f_works="guessing no";;
+           *)    gl_cv_func_log10f_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log10l.m4
@@ -0,0 +1,98 @@
+# log10l.m4 serial 3
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOG10L],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_LOG10])
+
+  dnl Persuade glibc <math.h> to declare log10l().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether log10l() is declared. On AIX 5.1 it is not declared.
+  AC_CHECK_DECL([log10l], , [HAVE_DECL_LOG10L=0], [[#include <math.h>]])
+
+  dnl Test whether log10l() exists. Assume that log10l(), if it exists, is
+  dnl defined in the same library as log10().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG10_LIBM"
+  AC_CHECK_FUNCS([log10l])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_log10l = yes; then
+    LOG10L_LIBM="$LOG10_LIBM"
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOG10L_LIBM"
+    gl_FUNC_LOG10L_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_log10l_works" in
+      *yes) ;;
+      *) REPLACE_LOG10L=1 ;;
+    esac
+  else
+    HAVE_LOG10L=0
+  fi
+  if test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; then
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      LOG10L_LIBM="$LOG10_LIBM"
+    else
+      if test $HAVE_LOG10L = 0; then
+        AC_REQUIRE([gl_FUNC_LOGL])
+        LOG10L_LIBM="$LOGL_LIBM"
+      fi
+    fi
+  fi
+  AC_SUBST([LOG10L_LIBM])
+])
+
+dnl Test whether log10l() works.
+dnl On OSF/1 5.1, log10l(-0.0L) is NaN.
+dnl On IRIX 6.5, log10l(-0.0L) is an unnormalized negative infinity
+dnl 0xFFF00000000000007FF0000000000000, should be
+dnl 0xFFF00000000000000000000000000000.
+dnl On AIX 5.1, log10l(-0.0L) is finite if it's not the first log10l call
+dnl in the program.
+AC_DEFUN([gl_FUNC_LOG10L_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log10l works], [gl_cv_func_log10l_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+#ifndef log10l /* for AIX */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double log10l (long double);
+#endif
+volatile long double x;
+long double y;
+int main ()
+{
+  /* Dummy call, to trigger the AIX 5.1 bug.  */
+  x = 0.6L;
+  y = log10l (x);
+  /* This test fails on AIX 5.1, IRIX 6.5, OSF/1 5.1.  */
+  x = -0.0L;
+  y = log10l (x);
+  if (!(y + y == y))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_log10l_works=yes],
+        [gl_cv_func_log10l_works=no],
+        [case "$host_os" in
+           aix* | irix* | osf*) gl_cv_func_log10l_works="guessing no";;
+           *)                   gl_cv_func_log10l_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log1p-ieee.m4
@@ -0,0 +1,15 @@
+# log1p-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG1P can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG1P_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log1p_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG1P])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log1p.m4
@@ -0,0 +1,94 @@
+# log1p.m4 serial 3
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOG1P],
+[
+  m4_divert_text([DEFAULTS], [gl_log1p_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare log1p().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine LOG1P_LIBM.
+  gl_COMMON_DOUBLE_MATHFUNC([log1p])
+
+  dnl Test whether log1p() exists.
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG1P_LIBM"
+  AC_CHECK_FUNCS([log1p])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_log1p = yes; then
+    :
+    m4_ifdef([gl_FUNC_LOG1P_IEEE], [
+      if test $gl_log1p_required = ieee && test $REPLACE_LOG1P = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether log1p works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_log1p_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $LOG1P_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_DOUBLE_MINUS_ZERO_CODE[
+]gl_DOUBLE_SIGNBIT_CODE[
+static double dummy (double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  double (*my_log1p) (double) = argc ? log1p : dummy;
+  /* This test fails on AIX, HP-UX 11.  */
+  double y = my_log1p (minus_zerod);
+  if (!(y == 0.0) || (signbitd (minus_zerod) && !signbitd (y)))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_log1p_ieee=yes],
+              [gl_cv_func_log1p_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_log1p_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_log1p_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_log1p_ieee" in
+          *yes) ;;
+          *) REPLACE_LOG1P=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_LOG1P=0
+  fi
+  if test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1; then
+    dnl Find libraries needed to link lib/log1p.c.
+    AC_REQUIRE([gl_FUNC_ISNAND])
+    AC_REQUIRE([gl_FUNC_LOG])
+    AC_REQUIRE([gl_FUNC_ROUND])
+    LOG1P_LIBM=
+    dnl Append $ISNAND_LIBM to LOG1P_LIBM, avoiding gratuitous duplicates.
+    case " $LOG1P_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) LOG1P_LIBM="$LOG1P_LIBM $ISNAND_LIBM" ;;
+    esac
+    dnl Append $LOG_LIBM to LOG1P_LIBM, avoiding gratuitous duplicates.
+    case " $LOG1P_LIBM " in
+      *" $LOG_LIBM "*) ;;
+      *) LOG1P_LIBM="$LOG1P_LIBM $LOG_LIBM" ;;
+    esac
+    dnl Append $ROUND_LIBM to LOG1P_LIBM, avoiding gratuitous duplicates.
+    case " $LOG1P_LIBM " in
+      *" $ROUND_LIBM "*) ;;
+      *) LOG1P_LIBM="$LOG1P_LIBM $ROUND_LIBM" ;;
+    esac
+  fi
+])
new file mode 100644
--- /dev/null
+++ b/m4/log1pf-ieee.m4
@@ -0,0 +1,15 @@
+# log1pf-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG1PF can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG1PF_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log1pf_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG1PF])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log1pf.m4
@@ -0,0 +1,118 @@
+# log1pf.m4 serial 3
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOG1PF],
+[
+  m4_divert_text([DEFAULTS], [gl_log1pf_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_LOG1P])
+
+  dnl Persuade glibc <math.h> to declare log1pf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether log1pf() exists. Assume that log1pf(), if it exists, is
+  dnl defined in the same library as log1p().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG1P_LIBM"
+  AC_CHECK_FUNCS([log1pf])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_log1pf = yes; then
+    LOG1PF_LIBM="$LOG1P_LIBM"
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOG1PF_LIBM"
+    gl_FUNC_LOG1PF_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_log1pf_works" in
+      *yes) ;;
+      *) REPLACE_LOG1PF=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_LOG1PF_IEEE], [
+      if test $gl_log1pf_required = ieee && test $REPLACE_LOG1PF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether log1pf works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_log1pf_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $LOG1PF_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_FLOAT_MINUS_ZERO_CODE[
+]gl_FLOAT_SIGNBIT_CODE[
+static float dummy (float x) { return 0; }
+int main (int argc, char *argv[])
+{
+  float (*my_log1pf) (float) = argc ? log1pf : dummy;
+  /* This test fails on OpenBSD 4.9, AIX 7.1.  */
+  float y = my_log1pf (minus_zerof);
+  if (!(y == 0.0f) || (signbitf (minus_zerof) && !signbitf (y)))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_log1pf_ieee=yes],
+              [gl_cv_func_log1pf_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_log1pf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_log1pf_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_log1pf_ieee" in
+          *yes) ;;
+          *) REPLACE_LOG1PF=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_LOG1PF=0
+  fi
+  if test $HAVE_LOG1PF = 0 || test $REPLACE_LOG1PF = 1; then
+    dnl Find libraries needed to link lib/log1pf.c.
+    LOG1PF_LIBM="$LOG1P_LIBM"
+  fi
+  AC_SUBST([LOG1PF_LIBM])
+])
+
+dnl Test whether log1pf() works.
+dnl On IRIX 6.5, log1pf(-1.0f) returns +Infinity instead of -Infinity.
+AC_DEFUN([gl_FUNC_LOG1PF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log1pf works], [gl_cv_func_log1pf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile float x;
+float y;
+int main ()
+{
+  x = -1.0f;
+  y = log1pf (x);
+  if (!(y + y == y && y < 0.0f))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_log1pf_works=yes],
+        [gl_cv_func_log1pf_works=no],
+        [case "$host_os" in
+           irix*) gl_cv_func_log1pf_works="guessing no";;
+           *)     gl_cv_func_log1pf_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log1pl-ieee.m4
@@ -0,0 +1,15 @@
+# log1pl-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG1PL can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG1PL_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log1pl_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG1PL])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log1pl.m4
@@ -0,0 +1,97 @@
+# log1pl.m4 serial 3
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOG1PL],
+[
+  m4_divert_text([DEFAULTS], [gl_log1pl_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_LOG1P])
+
+  dnl Persuade glibc <math.h> to declare log1pl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether log1pl() exists. Assume that log1pl(), if it exists, is
+  dnl defined in the same library as log1p().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG1P_LIBM"
+  AC_CHECK_FUNCS([log1pl])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_log1pl = yes; then
+    LOG1PL_LIBM="$LOG1P_LIBM"
+    m4_ifdef([gl_FUNC_LOG1PL_IEEE], [
+      if test $gl_log1pl_required = ieee && test $REPLACE_LOG1PL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether log1pl works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_log1pl_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $LOG1PL_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_LONG_DOUBLE_MINUS_ZERO_CODE[
+]gl_LONG_DOUBLE_SIGNBIT_CODE[
+static long double dummy (long double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  long double (*my_log1pl) (long double) = argc ? log1pl : dummy;
+  /* This test fails on AIX 7.1, IRIX 6.5.  */
+  long double y = my_log1pl (minus_zerol);
+  if (!(y == 0.0L) || (signbitl (minus_zerol) && !signbitl (y)))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_log1pl_ieee=yes],
+              [gl_cv_func_log1pl_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_log1pl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_log1pl_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_log1pl_ieee" in
+          *yes) ;;
+          *) REPLACE_LOG1PL=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_LOG1PL=0
+    dnl Find libraries needed to link lib/log1pl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      LOG1PL_LIBM="$LOG1P_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      AC_REQUIRE([gl_FUNC_LOGL])
+      AC_REQUIRE([gl_FUNC_ROUNDL])
+      LOG1PL_LIBM=
+      dnl Append $ISNANL_LIBM to LOG1PL_LIBM, avoiding gratuitous duplicates.
+      case " $LOG1PL_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) LOG1PL_LIBM="$LOG1PL_LIBM $ISNANL_LIBM" ;;
+      esac
+      dnl Append $LOGL_LIBM to LOG1PL_LIBM, avoiding gratuitous duplicates.
+      case " $LOG1PL_LIBM " in
+        *" $LOGL_LIBM "*) ;;
+        *) LOG1PL_LIBM="$LOG1PL_LIBM $LOGL_LIBM" ;;
+      esac
+      dnl Append $ROUNDL_LIBM to LOG1PL_LIBM, avoiding gratuitous duplicates.
+      case " $LOG1PL_LIBM " in
+        *" $ROUNDL_LIBM "*) ;;
+        *) LOG1PL_LIBM="$LOG1PL_LIBM $ROUNDL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([LOG1PL_LIBM])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log2-ieee.m4
@@ -0,0 +1,15 @@
+# log2-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG2 can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG2_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log2_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG2])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log2.m4
@@ -0,0 +1,169 @@
+# log2.m4 serial 3
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOG2],
+[
+  m4_divert_text([DEFAULTS], [gl_log2_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare log2().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine LOG2_LIBM.
+  gl_COMMON_DOUBLE_MATHFUNC([log2])
+
+  dnl Test whether log2() exists.
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG2_LIBM"
+  AC_CHECK_FUNCS([log2])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_log2 = yes; then
+    HAVE_LOG2=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has log2() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([log2], , [HAVE_DECL_LOG2=0], [[#include <math.h>]])
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOG2_LIBM"
+    gl_FUNC_LOG2_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_log2_works" in
+      *yes) ;;
+      *) REPLACE_LOG2=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_LOG2_IEEE], [
+      if test $gl_log2_required = ieee && test $REPLACE_LOG2 = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether log2 works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_log2_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $LOG2_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+#ifndef log2 /* for Cygwin 1.7.x */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+double log2 (double);
+#endif
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+static double dummy (double x) { return 0; }
+int main (int argc, char *argv[])
+{
+  double (*my_log2) (double) = argc ? log2 : dummy;
+  /* Test log2(negative).
+     This test fails on NetBSD 5.1 and Solaris 11 2011-11.  */
+  double y = my_log2 (-1.0);
+  if (numeric_equal (y, y))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_log2_ieee=yes],
+              [gl_cv_func_log2_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_log2_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_log2_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_log2_ieee" in
+          *yes) ;;
+          *) REPLACE_LOG2=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_LOG2=0
+    HAVE_DECL_LOG2=0
+  fi
+  if test $HAVE_LOG2 = 0 || test $REPLACE_LOG2 = 1; then
+    dnl Find libraries needed to link lib/log2.c.
+    AC_REQUIRE([gl_FUNC_ISNAND])
+    AC_REQUIRE([gl_FUNC_FREXP])
+    AC_REQUIRE([gl_FUNC_LOG])
+    LOG2_LIBM=
+    dnl Append $ISNAND_LIBM to LOG2_LIBM, avoiding gratuitous duplicates.
+    case " $LOG2_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) LOG2_LIBM="$LOG2_LIBM $ISNAND_LIBM" ;;
+    esac
+    dnl Append $FREXP_LIBM to LOG2_LIBM, avoiding gratuitous duplicates.
+    case " $LOG2_LIBM " in
+      *" $FREXP_LIBM "*) ;;
+      *) LOG2_LIBM="$LOG2_LIBM $FREXP_LIBM" ;;
+    esac
+    dnl Append $LOG_LIBM to LOG2_LIBM, avoiding gratuitous duplicates.
+    case " $LOG2_LIBM " in
+      *" $LOG_LIBM "*) ;;
+      *) LOG2_LIBM="$LOG2_LIBM $LOG_LIBM" ;;
+    esac
+  fi
+])
+
+dnl Test whether log2() works.
+dnl On OSF/1 5.1, log2(-0.0) is NaN.
+dnl On Cygwin 1.7.9, log2(2^29) is not exactly 29.
+AC_DEFUN([gl_FUNC_LOG2_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log2 works], [gl_cv_func_log2_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+#ifndef log2 /* for Cygwin 1.7.x */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+double log2 (double);
+#endif
+volatile double x;
+volatile double y;
+int main ()
+{
+  int result = 0;
+  /* This test fails on OSF/1 5.1.  */
+  x = -0.0;
+  y = log2 (x);
+  if (!(y + y == y))
+    result |= 1;
+  /* This test fails on Cygwin 1.7.9.  */
+  x = 536870912.0;
+  y = log2 (x);
+  if (!(y == 29.0))
+    result |= 2;
+  return result;
+}
+]])],
+        [gl_cv_func_log2_works=yes],
+        [gl_cv_func_log2_works=no],
+        [case "$host_os" in
+           cygwin* | osf*) gl_cv_func_log2_works="guessing no";;
+           *)              gl_cv_func_log2_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log2f-ieee.m4
@@ -0,0 +1,15 @@
+# log2f-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG2F can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG2F_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_log2f_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOG2F])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log2f.m4
@@ -0,0 +1,176 @@
+# log2f.m4 serial 3
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOG2F],
+[
+  m4_divert_text([DEFAULTS], [gl_log2f_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_LOG2])
+
+  dnl Persuade glibc <math.h> to declare log2f().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine LOG2F_LIBM.
+  gl_COMMON_DOUBLE_MATHFUNC([log2f])
+
+  dnl Test whether log2f() exists.
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG2F_LIBM"
+  AC_CHECK_FUNCS([log2f])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_log2f = yes; then
+    HAVE_LOG2F=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has log2f() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([log2f], , [HAVE_DECL_LOG2F=0], [[#include <math.h>]])
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOG2F_LIBM"
+    gl_FUNC_LOG2F_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_log2f_works" in
+      *yes) ;;
+      *) REPLACE_LOG2F=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_LOG2F_IEEE], [
+      if test $gl_log2f_required = ieee && test $REPLACE_LOG2F = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether log2f works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_log2f_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $LOG2F_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+#ifndef log2f /* for Cygwin 1.7.x */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+float log2f (float);
+#endif
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (float x, float y)
+{
+  return x == y;
+}
+static float dummy (float x) { return 0; }
+int main (int argc, char *argv[])
+{
+  float (*my_log2f) (float) = argc ? log2f : dummy;
+  /* Test log2f(negative).
+     This test fails on NetBSD 5.1 and Solaris 11 2011-11.  */
+  float y = my_log2f (-1.0f);
+  if (numeric_equal (y, y))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_log2f_ieee=yes],
+              [gl_cv_func_log2f_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_log2f_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_log2f_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_log2f_ieee" in
+          *yes) ;;
+          *) REPLACE_LOG2F=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_LOG2F=0
+    HAVE_DECL_LOG2F=0
+  fi
+  if test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1; then
+    dnl Find libraries needed to link lib/log2f.c.
+    if test $ac_cv_func_log2 = yes; then
+      AC_DEFINE([HAVE_LOG2], [1],
+        [Define to 1 if the log2() function is available in libc or libm.])
+      LOG2F_LIBM="$LOG2_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_ISNANF])
+      AC_REQUIRE([gl_FUNC_FREXPF])
+      AC_REQUIRE([gl_FUNC_LOGF])
+      LOG2F_LIBM=
+      dnl Append $ISNANF_LIBM to LOG2F_LIBM, avoiding gratuitous duplicates.
+      case " $LOG2F_LIBM " in
+        *" $ISNANF_LIBM "*) ;;
+        *) LOG2F_LIBM="$LOG2F_LIBM $ISNANF_LIBM" ;;
+      esac
+      dnl Append $FREXPF_LIBM to LOG2F_LIBM, avoiding gratuitous duplicates.
+      case " $LOG2F_LIBM " in
+        *" $FREXPF_LIBM "*) ;;
+        *) LOG2F_LIBM="$LOG2F_LIBM $FREXPF_LIBM" ;;
+      esac
+      dnl Append $LOGF_LIBM to LOG2F_LIBM, avoiding gratuitous duplicates.
+      case " $LOG2F_LIBM " in
+        *" $LOGF_LIBM "*) ;;
+        *) LOG2F_LIBM="$LOG2F_LIBM $LOGF_LIBM" ;;
+      esac
+    fi
+  fi
+])
+
+dnl Test whether log2() works.
+dnl On OSF/1 5.1, log2f(-0.0f) is NaN.
+dnl On Cygwin 1.7.9, log2f(2^13) is not exactly 13.
+AC_DEFUN([gl_FUNC_LOG2F_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log2f works], [gl_cv_func_log2f_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+#ifndef log2f /* for Cygwin 1.7.x */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+float log2f (float);
+#endif
+volatile float x;
+volatile float y;
+int main ()
+{
+  int result = 0;
+  /* This test fails on OSF/1 5.1.  */
+  x = -0.0f;
+  y = log2f (x);
+  if (!(y + y == y))
+    result |= 1;
+  /* This test fails on Cygwin 1.7.9.  */
+  x = 8192.0f;
+  y = log2f (x);
+  if (!(y == 13.0f))
+    result |= 2;
+  return result;
+}
+]])],
+        [gl_cv_func_log2f_works=yes],
+        [gl_cv_func_log2f_works=no],
+        [case "$host_os" in
+           cygwin* | osf*) gl_cv_func_log2f_works="guessing no";;
+           *)              gl_cv_func_log2f_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/log2l.m4
@@ -0,0 +1,108 @@
+# log2l.m4 serial 1
+dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOG2L],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_LOG2])
+
+  dnl Persuade glibc <math.h> to declare log2l().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether log2l() exists. Assume that log2l(), if it exists, is
+  dnl defined in the same library as log2().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $LOG2_LIBM"
+  AC_CHECK_FUNCS([log2l])
+  LIBS="$save_LIBS"
+  if test $ac_cv_func_log2l = yes; then
+    LOG2L_LIBM="$LOG2_LIBM"
+    HAVE_LOG2L=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has log2l() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([log2l], , [HAVE_DECL_LOG2L=0], [[#include <math.h>]])
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOG2L_LIBM"
+    gl_FUNC_LOG2L_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_log2l_works" in
+      *yes) ;;
+      *) REPLACE_LOG2L=1 ;;
+    esac
+  else
+    HAVE_LOG2L=0
+    HAVE_DECL_LOG2L=0
+  fi
+  if test $HAVE_LOG2L = 0 || test $REPLACE_LOG2L = 1; then
+    dnl Find libraries needed to link lib/log2l.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      LOG2L_LIBM="$LOG2_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      AC_REQUIRE([gl_FUNC_FREXPL])
+      AC_REQUIRE([gl_FUNC_LOGL])
+      LOG2L_LIBM=
+      dnl Append $ISNANL_LIBM to LOG2L_LIBM, avoiding gratuitous duplicates.
+      case " $LOG2L_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) LOG2L_LIBM="$LOG2L_LIBM $ISNANL_LIBM" ;;
+      esac
+      dnl Append $FREXPL_LIBM to LOG2L_LIBM, avoiding gratuitous duplicates.
+      case " $LOG2L_LIBM " in
+        *" $FREXPL_LIBM "*) ;;
+        *) LOG2L_LIBM="$LOG2L_LIBM $FREXPL_LIBM" ;;
+      esac
+      dnl Append $LOGL_LIBM to LOG2L_LIBM, avoiding gratuitous duplicates.
+      case " $LOG2L_LIBM " in
+        *" $LOGL_LIBM "*) ;;
+        *) LOG2L_LIBM="$LOG2L_LIBM $LOGL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([LOG2L_LIBM])
+])
+
+dnl Test whether log2l() works.
+dnl On OSF/1 5.1, log2l(-0.0) is NaN.
+AC_DEFUN([gl_FUNC_LOG2L_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether log2l works], [gl_cv_func_log2l_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+#ifndef log2l /* for AIX */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double log2l (long double);
+#endif
+volatile long double x;
+volatile long double y;
+int main ()
+{
+  /* This test fails on OSF/1 5.1.  */
+  x = -0.0L;
+  y = log2l (x);
+  if (!(y + y == y))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_log2l_works=yes],
+        [gl_cv_func_log2l_works=no],
+        [case "$host_os" in
+           osf*) gl_cv_func_log2l_works="guessing no";;
+           *)    gl_cv_func_log2l_works="guessing yes";;
+         esac
+        ])
+    ])
+])
--- a/m4/logb.m4
+++ b/m4/logb.m4
@@ -1,4 +1,4 @@
-# logb.m4 serial 4
+# logb.m4 serial 6
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,10 @@
 AC_DEFUN([gl_FUNC_LOGB],
 [
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare logb().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether logb() is declared.
   AC_CHECK_DECLS([logb], , , [[#include <math.h>]])
   if test "$ac_cv_have_decl_logb" != yes; then
@@ -47,8 +51,75 @@
       [LOGB_LIBM="-lm"])
     LIBS="$save_LIBS"
   fi
-  if test "$LOGB_LIBM" = "?"; then
+  if test "$LOGB_LIBM" != "?"; then
+    HAVE_LOGB=1
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOGB_LIBM"
+    gl_FUNC_LOGB_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_logb_works" in
+      *yes) ;;
+      *) REPLACE_LOGB=1 ;;
+    esac
+  else
+    HAVE_LOGB=0
+  fi
+  if test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1; then
+    dnl Find libraries needed to link lib/logb.c.
+    AC_REQUIRE([gl_FUNC_FREXP])
+    AC_REQUIRE([gl_FUNC_ISNAND])
     LOGB_LIBM=
+    dnl Append $FREXP_LIBM to LOGB_LIBM, avoiding gratuitous duplicates.
+    case " $LOGB_LIBM " in
+      *" $FREXP_LIBM "*) ;;
+      *) LOGB_LIBM="$LOGB_LIBM $FREXP_LIBM" ;;
+    esac
+    dnl Append $ISNAND_LIBM to LOGB_LIBM, avoiding gratuitous duplicates.
+    case " $LOGB_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) LOGB_LIBM="$LOGB_LIBM $ISNAND_LIBM" ;;
+    esac
   fi
   AC_SUBST([LOGB_LIBM])
 ])
+
+dnl Test whether logb() works.
+dnl On glibc 2.11/ppc, glibc 2.7/sparc, glibc 2.7/hppa, Solaris 10/SPARC,
+dnl Cygwin 1.5.x, the return value for subnormal (denormalized) arguments is
+dnl too large.
+AC_DEFUN([gl_FUNC_LOGB_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether logb works], [gl_cv_func_logb_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <float.h>
+#include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+double logb (double);
+volatile double x;
+int main ()
+{
+  int i;
+  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+    ;
+  /* Here i = DBL_MIN_EXP - 1. Either x = 2^(i-1) is subnormal or x = 0.0.  */
+  if (x > 0.0 && !(logb (x) == (double)(i - 1)))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_logb_works=yes],
+        [gl_cv_func_logb_works=no],
+        [case "$host_os" in
+           *gnu* | solaris* | cygwin*) gl_cv_func_logb_works="guessing no";;
+           *)                          gl_cv_func_logb_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/logbf.m4
@@ -0,0 +1,81 @@
+# logbf.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOGBF],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Persuade glibc <math.h> to declare logbf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Determine LOGBF_LIBM.
+  gl_MATHFUNC([logbf], [float], [(float)])
+  if test $gl_cv_func_logbf_no_libm = yes \
+     || test $gl_cv_func_logbf_in_libm = yes; then
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOGBF_LIBM"
+    gl_FUNC_LOGBF_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_logbf_works" in
+      *yes) ;;
+      *) REPLACE_LOGBF=1 ;;
+    esac
+  else
+    HAVE_LOGBF=0
+  fi
+  if test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1; then
+    dnl Find libraries needed to link lib/logbf.c.
+    AC_REQUIRE([gl_FUNC_FREXPF])
+    AC_REQUIRE([gl_FUNC_ISNANF])
+    LOGBF_LIBM=
+    dnl Append $FREXPF_LIBM to LOGBF_LIBM, avoiding gratuitous duplicates.
+    case " $LOGBF_LIBM " in
+      *" $FREXPF_LIBM "*) ;;
+      *) LOGBF_LIBM="$LOGBF_LIBM $FREXPF_LIBM" ;;
+    esac
+    dnl Append $ISNANF_LIBM to LOGBF_LIBM, avoiding gratuitous duplicates.
+    case " $LOGBF_LIBM " in
+      *" $ISNANF_LIBM "*) ;;
+      *) LOGBF_LIBM="$LOGBF_LIBM $ISNANF_LIBM" ;;
+    esac
+  fi
+  AC_SUBST([LOGBF_LIBM])
+])
+
+dnl Test whether logbf() works.
+dnl On glibc 2.11/ppc, glibc 2.7/sparc, glibc 2.7/hppa, Solaris 10/SPARC,
+dnl the return value for subnormal (denormalized) arguments is too large.
+AC_DEFUN([gl_FUNC_LOGBF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether logbf works], [gl_cv_func_logbf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <float.h>
+#include <math.h>
+volatile float x;
+int main ()
+{
+  int i;
+  for (i = 1, x = 1.0f; i >= FLT_MIN_EXP; i--, x *= 0.5f)
+    ;
+  /* Here i = FLT_MIN_EXP - 1. Either x = 2^(i-1) is subnormal or x = 0.0.  */
+  if (x > 0.0f && !(logbf (x) == (float)(i - 1)))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_logbf_works=yes],
+        [gl_cv_func_logbf_works=no],
+        [case "$host_os" in
+           *gnu* | solaris*) gl_cv_func_logbf_works="guessing no";;
+           *)                gl_cv_func_logbf_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/logbl.m4
@@ -0,0 +1,108 @@
+# logbl.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOGBL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_LOGB])
+
+  dnl Persuade glibc <math.h> to declare logbl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether logbl() exists and determine LOGBL_LIBM. We cannot assume
+  dnl that logbl(), if it exists, is defined in the same library as logb().
+  dnl This is not the case on AIX >= 5.2, Solaris >= 10.
+  gl_MATHFUNC([logbl], [long double], [(long double)])
+  if test $gl_cv_func_logbl_no_libm = yes \
+     || test $gl_cv_func_logbl_in_libm = yes; then
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOGBL_LIBM"
+    gl_FUNC_LOGBL_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_logbl_works" in
+      *yes) ;;
+      *) REPLACE_LOGBL=1 ;;
+    esac
+  else
+    HAVE_LOGBL=0
+  fi
+  if test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; then
+    dnl Find libraries needed to link lib/logbl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      LOGBL_LIBM="$LOGB_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_FREXPL])
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      LOGBL_LIBM=
+      dnl Append $FREXPL_LIBM to LOGBL_LIBM, avoiding gratuitous duplicates.
+      case " $LOGBL_LIBM " in
+        *" $FREXPL_LIBM "*) ;;
+        *) LOGBL_LIBM="$LOGBL_LIBM $FREXPL_LIBM" ;;
+      esac
+      dnl Append $ISNANL_LIBM to LOGBL_LIBM, avoiding gratuitous duplicates.
+      case " $LOGBL_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) LOGBL_LIBM="$LOGBL_LIBM $ISNANL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([LOGBL_LIBM])
+])
+
+dnl Test whether logbl() works.
+dnl On glibc 2.11/ppc, glibc 2.7/sparc, glibc 2.7/hppa, Solaris 10/SPARC, the
+dnl return value for subnormal (denormalized) arguments is too large.
+AC_DEFUN([gl_FUNC_LOGBL_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether logbl works], [gl_cv_func_logbl_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h.  */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP    (-16381)
+#endif
+#if defined __i386__ && defined __FreeBSD__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP    (-16381)
+#endif
+#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+#endif
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# if defined __GNUC__
+#  undef LDBL_MIN_EXP
+#  define LDBL_MIN_EXP DBL_MIN_EXP
+# endif
+#endif
+volatile long double x;
+int main ()
+{
+  int i;
+  for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP - 54; i--, x *= 0.5L)
+    /* Either x = 2^(i-1) or x = 0.0.  */
+    if ((i == LDBL_MIN_EXP - 1 || i == LDBL_MIN_EXP - 54)
+        && (x > 0.0L && !(logbl (x) == (long double)(i - 1))))
+      return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_logbl_works=yes],
+        [gl_cv_func_logbl_works=no],
+        [case "$host_os" in
+           *gnu* | solaris*) gl_cv_func_logbl_works="guessing no";;
+           *)                gl_cv_func_logbl_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/logf-ieee.m4
@@ -0,0 +1,15 @@
+# logf-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOGF can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOGF_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_logf_required=ieee])
+  AC_REQUIRE([gl_FUNC_LOGF])
+])
--- a/m4/logf.m4
+++ b/m4/logf.m4
@@ -1,4 +1,4 @@
-# logf.m4 serial 1
+# logf.m4 serial 6
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,9 +6,13 @@
 
 AC_DEFUN([gl_FUNC_LOGF],
 [
+  m4_divert_text([DEFAULTS], [gl_logf_required=plain])
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_LOG])
 
+  dnl Persuade glibc <math.h> to declare logf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether logf() exists. Assume that logf(), if it exists, is
   dnl defined in the same library as log().
   save_LIBS="$LIBS"
@@ -17,9 +21,107 @@
   LIBS="$save_LIBS"
   if test $ac_cv_func_logf = yes; then
     LOGF_LIBM="$LOG_LIBM"
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOGF_LIBM"
+    gl_FUNC_LOGF_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_logf_works" in
+      *yes) ;;
+      *) REPLACE_LOGF=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_LOGF_IEEE], [
+      if test $gl_logf_required = ieee && test $REPLACE_LOGF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether logf works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_logf_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $LOGF_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (float x, float y)
+{
+  return x == y;
+}
+static float dummy (float x) { return 0; }
+int main (int argc, char *argv[])
+{
+  float (*my_logf) (float) = argc ? logf : dummy;
+  /* Test logf(negative).
+     This test fails on NetBSD 5.1.  */
+  float y = my_logf (-1.0f);
+  if (numeric_equal (y, y))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_logf_ieee=yes],
+              [gl_cv_func_logf_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_logf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_logf_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_logf_ieee" in
+          *yes) ;;
+          *) REPLACE_LOGF=1 ;;
+        esac
+      fi
+    ])
   else
     HAVE_LOGF=0
-    LOGF_LIBM="$LOG_LIBM"
+  fi
+  if test $HAVE_LOGF = 0 || test $REPLACE_LOGF = 1; then
+    dnl Find libraries needed to link lib/logf.c.
+    if test $HAVE_LOGF = 0; then
+      LOGF_LIBM="$LOG_LIBM"
+    fi
   fi
   AC_SUBST([LOGF_LIBM])
 ])
+
+dnl Test whether logf() works.
+dnl On OSF/1 5.1, logf(-0.0f) is NaN.
+AC_DEFUN([gl_FUNC_LOGF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether logf works], [gl_cv_func_logf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile float x;
+float y;
+int main ()
+{
+  x = -0.0f;
+  y = logf (x);
+  if (!(y + y == y))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_logf_works=yes],
+        [gl_cv_func_logf_works=no],
+        [case "$host_os" in
+           osf*) gl_cv_func_logf_works="guessing no";;
+           *)    gl_cv_func_logf_works="guessing yes";;
+         esac
+        ])
+    ])
+])
--- a/m4/logl.m4
+++ b/m4/logl.m4
@@ -1,4 +1,4 @@
-# logl.m4 serial 6
+# logl.m4 serial 9
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = logl;
              long double x;]],
-           [[return logl (x) > 1;]])],
+           [[return funcptr (x) > 1
+                    || logl (x) > 1;]])],
         [gl_cv_func_logl_no_libm=yes],
         [gl_cv_func_logl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = logl;
                long double x;]],
-             [[return logl (x) > 1;]])],
+             [[return funcptr (x) > 1
+                      || logl (x) > 1;]])],
           [gl_cv_func_logl_in_libm=yes],
           [gl_cv_func_logl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,35 +56,79 @@
   if test $gl_cv_func_logl_no_libm = yes \
      || test $gl_cv_func_logl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has logl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has logl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([logl], , [HAVE_DECL_LOGL=0], [[#include <math.h>]])
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $LOGL_LIBM"
+    gl_FUNC_LOGL_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_logl_works" in
+      *yes) ;;
+      *) REPLACE_LOGL=1 ;;
+    esac
   else
+    HAVE_LOGL=0
     HAVE_DECL_LOGL=0
-    HAVE_LOGL=0
+  fi
+  if test $HAVE_LOGL = 0 || test $REPLACE_LOGL = 1; then
     dnl Find libraries needed to link lib/logl.c.
     if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
       AC_REQUIRE([gl_FUNC_LOG])
       LOGL_LIBM="$LOG_LIBM"
     else
-      AC_REQUIRE([gl_FUNC_FREXPL])
-      AC_REQUIRE([gl_FUNC_ISNANL])
-      AC_REQUIRE([gl_FUNC_FLOORL])
-      dnl Append $FREXPL_LIBM to LOGL_LIBM, avoiding gratuitous duplicates.
-      case " $LOGL_LIBM " in
-        *" $FREXPL_LIBM "*) ;;
-        *) LOGL_LIBM="$LOGL_LIBM $FREXPL_LIBM" ;;
-      esac
-      dnl Append $ISNANL_LIBM to LOGL_LIBM, avoiding gratuitous duplicates.
-      case " $LOGL_LIBM " in
-        *" $ISNANL_LIBM "*) ;;
-        *) LOGL_LIBM="$LOGL_LIBM $ISNANL_LIBM" ;;
-      esac
-      dnl Append $FLOORL_LIBM to LOGL_LIBM, avoiding gratuitous duplicates.
-      case " $LOGL_LIBM " in
-        *" $FLOORL_LIBM "*) ;;
-        *) LOGL_LIBM="$LOGL_LIBM $FLOORL_LIBM" ;;
-      esac
+      if test $HAVE_LOGL = 0; then
+        AC_REQUIRE([gl_FUNC_FREXPL])
+        AC_REQUIRE([gl_FUNC_ISNANL])
+        AC_REQUIRE([gl_FUNC_FLOORL])
+        dnl Append $FREXPL_LIBM to LOGL_LIBM, avoiding gratuitous duplicates.
+        case " $LOGL_LIBM " in
+          *" $FREXPL_LIBM "*) ;;
+          *) LOGL_LIBM="$LOGL_LIBM $FREXPL_LIBM" ;;
+        esac
+        dnl Append $ISNANL_LIBM to LOGL_LIBM, avoiding gratuitous duplicates.
+        case " $LOGL_LIBM " in
+          *" $ISNANL_LIBM "*) ;;
+          *) LOGL_LIBM="$LOGL_LIBM $ISNANL_LIBM" ;;
+        esac
+        dnl Append $FLOORL_LIBM to LOGL_LIBM, avoiding gratuitous duplicates.
+        case " $LOGL_LIBM " in
+          *" $FLOORL_LIBM "*) ;;
+          *) LOGL_LIBM="$LOGL_LIBM $FLOORL_LIBM" ;;
+        esac
+      fi
     fi
   fi
   AC_SUBST([LOGL_LIBM])
 ])
+
+dnl Test whether logl() works.
+dnl On OSF/1 5.1, logl(-0.0L) is NaN.
+AC_DEFUN([gl_FUNC_LOGL_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether logl works], [gl_cv_func_logl_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+volatile long double x;
+long double y;
+int main ()
+{
+  x = -0.0L;
+  y = logl (x);
+  if (!(y + y == y))
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_logl_works=yes],
+        [gl_cv_func_logl_works=no],
+        [case "$host_os" in
+           osf*) gl_cv_func_logl_works="guessing no";;
+           *)    gl_cv_func_logl_works="guessing yes";;
+         esac
+        ])
+    ])
+])
--- a/m4/ls-mntd-fs.m4
+++ b/m4/ls-mntd-fs.m4
@@ -339,7 +339,7 @@
       ac_list_mounted_fs=found
       AC_DEFINE([MOUNTED_INTERIX_STATVFS], [1],
                 [Define if we are on interix, and ought to use statvfs plus
-                 some special knowledge on where mounted filesystems can be
+                 some special knowledge on where mounted file systems can be
                  found. (Interix)])
     fi
     ;;
--- a/m4/lseek.m4
+++ b/m4/lseek.m4
@@ -1,4 +1,4 @@
-# lseek.m4 serial 8
+# lseek.m4 serial 10
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,11 +7,24 @@
 AC_DEFUN([gl_FUNC_LSEEK],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AC_PROG_CC])
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
-    [if test $cross_compiling = no; then
-       AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+    [case "$host_os" in
+       mingw*)
+         dnl Native Windows.
+         dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or
+         dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT)
+         dnl for a pipe depends on the environment: In a Cygwin 1.5
+         dnl environment it succeeds (wrong); in a Cygwin 1.7 environment
+         dnl it fails with a wrong errno value.
+         gl_cv_func_lseek_pipe=no
+         ;;
+       *)
+         if test $cross_compiling = no; then
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h> /* for off_t */
 #include <stdio.h> /* for SEEK_CUR */
 #if HAVE_UNISTD_H
@@ -23,26 +36,36 @@
   /* Exit with success only if stdin is seekable.  */
   return lseek (0, (off_t)0, SEEK_CUR) < 0;
 ]])],
-         [if test -s conftest$ac_exeext \
-             && ./conftest$ac_exeext < conftest.$ac_ext \
-             && test 1 = "`echo hi \
-               | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
-            gl_cv_func_lseek_pipe=yes
-          else
-            gl_cv_func_lseek_pipe=no
-          fi],
-         [gl_cv_func_lseek_pipe=no])
-     else
-       AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
-/* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
+             [if test -s conftest$ac_exeext \
+                 && ./conftest$ac_exeext < conftest.$ac_ext \
+                 && test 1 = "`echo hi \
+                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+                gl_cv_func_lseek_pipe=yes
+              else
+                gl_cv_func_lseek_pipe=no
+              fi
+             ],
+             [gl_cv_func_lseek_pipe=no])
+         else
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE([[
+#if defined __BEOS__
+/* BeOS mistakenly return 0 when trying to seek on pipes.  */
   Choke me.
 #endif]])],
-         [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
-     fi])
+             [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+         fi
+         ;;
+     esac
+    ])
   if test $gl_cv_func_lseek_pipe = no; then
     REPLACE_LSEEK=1
     AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
       [Define to 1 if lseek does not detect pipes.])
   fi
+
+  AC_REQUIRE([gl_SYS_TYPES_H])
+  if test $WINDOWS_64_BIT_OFF_T = 1; then
+    REPLACE_LSEEK=1
+  fi
 ])
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 24
+# serial 26
 
 # Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
 #
@@ -16,20 +16,18 @@
   AC_CHECK_FUNCS_ONCE([lstat])
   if test $ac_cv_func_lstat = yes; then
     AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
-    if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
-      REPLACE_LSTAT=1
-    fi
+    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+      *no)
+        REPLACE_LSTAT=1
+        ;;
+    esac
   else
     HAVE_LSTAT=0
   fi
 ])
 
 # Prerequisites of lib/lstat.c.
-AC_DEFUN([gl_PREREQ_LSTAT],
-[
-  AC_REQUIRE([AC_C_INLINE])
-  :
-])
+AC_DEFUN([gl_PREREQ_LSTAT], [:])
 
 AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
 [
@@ -51,20 +49,25 @@
             ]])],
          [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
          [gl_cv_func_lstat_dereferences_slashed_symlink=no],
-         [# When cross-compiling, be pessimistic so we will end up using the
-          # replacement version of lstat that checks for trailing slashes and
-          # calls lstat a second time when necessary.
-          gl_cv_func_lstat_dereferences_slashed_symlink=no
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+          esac
          ])
      else
        # If the 'ln -s' command failed, then we probably don't even
        # have an lstat function.
-       gl_cv_func_lstat_dereferences_slashed_symlink=no
+       gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
      fi
      rm -f conftest.sym conftest.file
     ])
-  test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
-    AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
-      [Define to 1 if 'lstat' dereferences a symlink specified
-       with a trailing slash.])
+  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+    *yes)
+      AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
+        [Define to 1 if 'lstat' dereferences a symlink specified
+         with a trailing slash.])
+      ;;
+  esac
 ])
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,9 +1,47 @@
-# malloc.m4 serial 13
+# malloc.m4 serial 14
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([_AC_FUNC_MALLOC_IF],
+[
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([stdlib.h])
+  AC_CACHE_CHECK([for GNU libc compatible malloc],
+    [ac_cv_func_malloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *malloc ();
+            #endif
+          ]],
+          [[return ! malloc (0);]])
+       ],
+       [ac_cv_func_malloc_0_nonnull=yes],
+       [ac_cv_func_malloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_malloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_malloc_0_nonnull=no ;;
+        esac
+       ])
+    ])
+  AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
+])# _AC_FUNC_MALLOC_IF
+
+])
+
 # gl_FUNC_MALLOC_GNU
 # ------------------
 # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 3
+# manywarnings.m4 serial 5
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -35,14 +35,12 @@
 # make sure your gcc understands it.
 AC_DEFUN([gl_MANYWARN_ALL_GCC],
 [
-  dnl First, check if -Wno-missing-field-initializers is needed.
-  dnl -Wmissing-field-initializers is implied by -W, but that issues
-  dnl warnings with GCC version before 4.7, for the common idiom
-  dnl of initializing types on the stack to zero, using { 0, }
+  dnl First, check for some issues that only occur when combining multiple
+  dnl gcc warning categories.
   AC_REQUIRE([AC_PROG_CC])
   if test -n "$GCC"; then
 
-    dnl First, check -W -Werror -Wno-missing-field-initializers is supported
+    dnl Check if -W -Werror -Wno-missing-field-initializers is supported
     dnl with the current $CC $CFLAGS $CPPFLAGS.
     AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
     AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
@@ -77,108 +75,150 @@
       ])
       AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
     fi
+
+    dnl Next, check if -Werror -Wuninitialized is useful with the
+    dnl user's choice of $CFLAGS; some versions of gcc warn that it
+    dnl has no effect if -O is not also used
+    AC_MSG_CHECKING([whether -Wuninitialized is supported])
+    AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -Werror -Wuninitialized"
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[]], [[]])],
+        [gl_cv_cc_uninitialized_supported=yes],
+        [gl_cv_cc_uninitialized_supported=no])
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported])
+
   fi
 
+  # List all gcc warning categories.
   gl_manywarn_set=
   for gl_manywarn_item in \
+    -W \
+    -Wabi \
+    -Waddress \
     -Wall \
-    -W \
-    -Wformat-y2k \
-    -Wformat-nonliteral \
-    -Wformat-security \
-    -Winit-self \
-    -Wmissing-include-dirs \
-    -Wswitch-default \
-    -Wswitch-enum \
-    -Wunused \
-    -Wunknown-pragmas \
-    -Wstrict-aliasing \
-    -Wstrict-overflow \
-    -Wsystem-headers \
-    -Wfloat-equal \
-    -Wtraditional \
-    -Wtraditional-conversion \
-    -Wdeclaration-after-statement \
-    -Wundef \
-    -Wshadow \
-    -Wunsafe-loop-optimizations \
-    -Wpointer-arith \
+    -Warray-bounds \
+    -Wattributes \
     -Wbad-function-cast \
-    -Wc++-compat \
-    -Wcast-qual \
+    -Wbuiltin-macro-redefined \
     -Wcast-align \
-    -Wwrite-strings \
-    -Wconversion \
-    -Wsign-conversion \
-    -Wlogical-op \
-    -Waggregate-return \
-    -Wstrict-prototypes \
-    -Wold-style-definition \
-    -Wmissing-prototypes \
-    -Wmissing-declarations \
-    -Wmissing-noreturn \
-    -Wmissing-format-attribute \
-    -Wpacked \
-    -Wpadded \
-    -Wredundant-decls \
-    -Wnested-externs \
-    -Wunreachable-code \
-    -Winline \
-    -Winvalid-pch \
-    -Wlong-long \
-    -Wvla \
-    -Wvolatile-register-var \
-    -Wdisabled-optimization \
-    -Wstack-protector \
-    -Woverlength-strings \
-    -Wbuiltin-macro-redefined \
-    -Wmudflap \
-    -Wpacked-bitfield-compat \
-    -Wsync-nand \
-    ; do
-    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
-  done
-  # The following are not documented in the manual but are included in
-  # output from gcc --help=warnings.
-  for gl_manywarn_item in \
-    -Wattributes \
+    -Wchar-subscripts \
+    -Wclobbered \
+    -Wcomment \
+    -Wcomments \
     -Wcoverage-mismatch \
-    -Wmultichar \
-    -Wunused-macros \
-    ; do
-    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
-  done
-  # More warnings from gcc 4.6.2 --help=warnings.
-  for gl_manywarn_item in \
-    -Wabi \
     -Wcpp \
     -Wdeprecated \
     -Wdeprecated-declarations \
+    -Wdisabled-optimization \
     -Wdiv-by-zero \
     -Wdouble-promotion \
+    -Wempty-body \
     -Wendif-labels \
+    -Wenum-compare \
     -Wextra \
     -Wformat-contains-nul \
     -Wformat-extra-args \
+    -Wformat-nonliteral \
+    -Wformat-security \
+    -Wformat-y2k \
     -Wformat-zero-length \
     -Wformat=2 \
+    -Wfree-nonheap-object \
+    -Wignored-qualifiers \
+    -Wimplicit \
+    -Wimplicit-function-declaration \
+    -Wimplicit-int \
+    -Winit-self \
+    -Winline \
+    -Wint-to-pointer-cast \
+    -Winvalid-memory-model \
+    -Winvalid-pch \
+    -Wjump-misses-init \
+    -Wlogical-op \
+    -Wmain \
+    -Wmaybe-uninitialized \
+    -Wmissing-braces \
+    -Wmissing-declarations \
+    -Wmissing-field-initializers \
+    -Wmissing-format-attribute \
+    -Wmissing-include-dirs \
+    -Wmissing-noreturn \
+    -Wmissing-parameter-type \
+    -Wmissing-prototypes \
+    -Wmudflap \
     -Wmultichar \
+    -Wnarrowing \
+    -Wnested-externs \
+    -Wnonnull \
     -Wnormalized=nfc \
+    -Wold-style-declaration \
+    -Wold-style-definition \
     -Woverflow \
+    -Woverlength-strings \
+    -Woverride-init \
+    -Wpacked \
+    -Wpacked-bitfield-compat \
+    -Wparentheses \
+    -Wpointer-arith \
+    -Wpointer-sign \
     -Wpointer-to-int-cast \
     -Wpragmas \
+    -Wreturn-type \
+    -Wsequence-point \
+    -Wshadow \
+    -Wsizeof-pointer-memaccess \
+    -Wstack-protector \
+    -Wstrict-aliasing \
+    -Wstrict-overflow \
+    -Wstrict-prototypes \
     -Wsuggest-attribute=const \
+    -Wsuggest-attribute=format \
     -Wsuggest-attribute=noreturn \
     -Wsuggest-attribute=pure \
+    -Wswitch \
+    -Wswitch-default \
+    -Wsync-nand \
+    -Wsystem-headers \
     -Wtrampolines \
+    -Wtrigraphs \
+    -Wtype-limits \
+    -Wuninitialized \
+    -Wunknown-pragmas \
+    -Wunreachable-code \
+    -Wunsafe-loop-optimizations \
+    -Wunused \
+    -Wunused-but-set-parameter \
+    -Wunused-but-set-variable \
+    -Wunused-function \
+    -Wunused-label \
+    -Wunused-local-typedefs \
+    -Wunused-macros \
+    -Wunused-parameter \
+    -Wunused-result \
+    -Wunused-value \
+    -Wunused-variable \
+    -Wvarargs \
+    -Wvariadic-macros \
+    -Wvector-operation-performance \
+    -Wvla \
+    -Wvolatile-register-var \
+    -Wwrite-strings \
+    \
     ; do
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
   done
 
-  # Disable the missing-field-initializers warning if needed
+  # Disable specific options as needed.
   if test "$gl_cv_cc_nomfi_needed" = yes; then
     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
   fi
 
+  if test "$gl_cv_cc_uninitialized_supported" = no; then
+    gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+  fi
+
   $1=$gl_manywarn_set
 ])
--- a/m4/math_h.m4
+++ b/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 56
+# math_h.m4 serial 114
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,7 +8,6 @@
 [
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   gl_CHECK_NEXT_HEADERS([math.h])
-  AC_REQUIRE([AC_C_INLINE])
 
   AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
     [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
@@ -40,9 +39,16 @@
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <math.h>]],
     [acosf acosl asinf asinl atanf atanl
-     ceilf ceill copysign copysignf copysignl cosf cosl coshf
-     expf expl fabsf floorf floorl fma fmaf fmal fmodf frexpf frexpl
-     ldexpf ldexpl logb logf logl log10f modff powf
+     cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf
+     expf expl exp2 exp2f exp2l expm1 expm1f expm1l
+     fabsf fabsl floorf floorl fma fmaf fmal
+     fmod fmodf fmodl frexpf frexpl hypotf hypotl
+     ilogb ilogbf ilogbl
+     ldexpf ldexpl
+     log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
+     logb logbf logbl
+     modf modff modfl powf
+     remainder remainderf remainderl
      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
      tanf tanl tanhf trunc truncf truncl])
 ])
@@ -58,67 +64,101 @@
 
 AC_DEFUN([gl_MATH_H_DEFAULTS],
 [
-  GNULIB_ACOSF=0;     AC_SUBST([GNULIB_ACOSF])
-  GNULIB_ACOSL=0;     AC_SUBST([GNULIB_ACOSL])
-  GNULIB_ASINF=0;     AC_SUBST([GNULIB_ASINF])
-  GNULIB_ASINL=0;     AC_SUBST([GNULIB_ASINL])
-  GNULIB_ATANF=0;     AC_SUBST([GNULIB_ATANF])
-  GNULIB_ATANL=0;     AC_SUBST([GNULIB_ATANL])
-  GNULIB_ATAN2F=0;    AC_SUBST([GNULIB_ATAN2F])
-  GNULIB_CEIL=0;      AC_SUBST([GNULIB_CEIL])
-  GNULIB_CEILF=0;     AC_SUBST([GNULIB_CEILF])
-  GNULIB_CEILL=0;     AC_SUBST([GNULIB_CEILL])
-  GNULIB_COPYSIGN=0;  AC_SUBST([GNULIB_COPYSIGN])
-  GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF])
-  GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL])
-  GNULIB_COSF=0;      AC_SUBST([GNULIB_COSF])
-  GNULIB_COSL=0;      AC_SUBST([GNULIB_COSL])
-  GNULIB_COSHF=0;     AC_SUBST([GNULIB_COSHF])
-  GNULIB_EXPF=0;      AC_SUBST([GNULIB_EXPF])
-  GNULIB_EXPL=0;      AC_SUBST([GNULIB_EXPL])
-  GNULIB_FABSF=0;     AC_SUBST([GNULIB_FABSF])
-  GNULIB_FLOOR=0;     AC_SUBST([GNULIB_FLOOR])
-  GNULIB_FLOORF=0;    AC_SUBST([GNULIB_FLOORF])
-  GNULIB_FLOORL=0;    AC_SUBST([GNULIB_FLOORL])
-  GNULIB_FMA=0;       AC_SUBST([GNULIB_FMA])
-  GNULIB_FMAF=0;      AC_SUBST([GNULIB_FMAF])
-  GNULIB_FMAL=0;      AC_SUBST([GNULIB_FMAL])
-  GNULIB_FMODF=0;     AC_SUBST([GNULIB_FMODF])
-  GNULIB_FREXPF=0;    AC_SUBST([GNULIB_FREXPF])
-  GNULIB_FREXP=0;     AC_SUBST([GNULIB_FREXP])
-  GNULIB_FREXPL=0;    AC_SUBST([GNULIB_FREXPL])
-  GNULIB_ISFINITE=0;  AC_SUBST([GNULIB_ISFINITE])
-  GNULIB_ISINF=0;     AC_SUBST([GNULIB_ISINF])
-  GNULIB_ISNAN=0;     AC_SUBST([GNULIB_ISNAN])
-  GNULIB_ISNANF=0;    AC_SUBST([GNULIB_ISNANF])
-  GNULIB_ISNAND=0;    AC_SUBST([GNULIB_ISNAND])
-  GNULIB_ISNANL=0;    AC_SUBST([GNULIB_ISNANL])
-  GNULIB_LDEXPF=0;    AC_SUBST([GNULIB_LDEXPF])
-  GNULIB_LDEXPL=0;    AC_SUBST([GNULIB_LDEXPL])
-  GNULIB_LOGB=0;      AC_SUBST([GNULIB_LOGB])
-  GNULIB_LOGF=0;      AC_SUBST([GNULIB_LOGF])
-  GNULIB_LOGL=0;      AC_SUBST([GNULIB_LOGL])
-  GNULIB_LOG10F=0;    AC_SUBST([GNULIB_LOG10F])
-  GNULIB_MODFF=0;     AC_SUBST([GNULIB_MODFF])
-  GNULIB_POWF=0;      AC_SUBST([GNULIB_POWF])
-  GNULIB_RINT=0;      AC_SUBST([GNULIB_RINT])
-  GNULIB_RINTF=0;     AC_SUBST([GNULIB_RINTF])
-  GNULIB_RINTL=0;     AC_SUBST([GNULIB_RINTL])
-  GNULIB_ROUND=0;     AC_SUBST([GNULIB_ROUND])
-  GNULIB_ROUNDF=0;    AC_SUBST([GNULIB_ROUNDF])
-  GNULIB_ROUNDL=0;    AC_SUBST([GNULIB_ROUNDL])
-  GNULIB_SIGNBIT=0;   AC_SUBST([GNULIB_SIGNBIT])
-  GNULIB_SINF=0;      AC_SUBST([GNULIB_SINF])
-  GNULIB_SINL=0;      AC_SUBST([GNULIB_SINL])
-  GNULIB_SINHF=0;     AC_SUBST([GNULIB_SINHF])
-  GNULIB_SQRTF=0;     AC_SUBST([GNULIB_SQRTF])
-  GNULIB_SQRTL=0;     AC_SUBST([GNULIB_SQRTL])
-  GNULIB_TANF=0;      AC_SUBST([GNULIB_TANF])
-  GNULIB_TANL=0;      AC_SUBST([GNULIB_TANL])
-  GNULIB_TANHF=0;     AC_SUBST([GNULIB_TANHF])
-  GNULIB_TRUNC=0;     AC_SUBST([GNULIB_TRUNC])
-  GNULIB_TRUNCF=0;    AC_SUBST([GNULIB_TRUNCF])
-  GNULIB_TRUNCL=0;    AC_SUBST([GNULIB_TRUNCL])
+  GNULIB_ACOSF=0;      AC_SUBST([GNULIB_ACOSF])
+  GNULIB_ACOSL=0;      AC_SUBST([GNULIB_ACOSL])
+  GNULIB_ASINF=0;      AC_SUBST([GNULIB_ASINF])
+  GNULIB_ASINL=0;      AC_SUBST([GNULIB_ASINL])
+  GNULIB_ATANF=0;      AC_SUBST([GNULIB_ATANF])
+  GNULIB_ATANL=0;      AC_SUBST([GNULIB_ATANL])
+  GNULIB_ATAN2F=0;     AC_SUBST([GNULIB_ATAN2F])
+  GNULIB_CBRT=0;       AC_SUBST([GNULIB_CBRT])
+  GNULIB_CBRTF=0;      AC_SUBST([GNULIB_CBRTF])
+  GNULIB_CBRTL=0;      AC_SUBST([GNULIB_CBRTL])
+  GNULIB_CEIL=0;       AC_SUBST([GNULIB_CEIL])
+  GNULIB_CEILF=0;      AC_SUBST([GNULIB_CEILF])
+  GNULIB_CEILL=0;      AC_SUBST([GNULIB_CEILL])
+  GNULIB_COPYSIGN=0;   AC_SUBST([GNULIB_COPYSIGN])
+  GNULIB_COPYSIGNF=0;  AC_SUBST([GNULIB_COPYSIGNF])
+  GNULIB_COPYSIGNL=0;  AC_SUBST([GNULIB_COPYSIGNL])
+  GNULIB_COSF=0;       AC_SUBST([GNULIB_COSF])
+  GNULIB_COSL=0;       AC_SUBST([GNULIB_COSL])
+  GNULIB_COSHF=0;      AC_SUBST([GNULIB_COSHF])
+  GNULIB_EXPF=0;       AC_SUBST([GNULIB_EXPF])
+  GNULIB_EXPL=0;       AC_SUBST([GNULIB_EXPL])
+  GNULIB_EXP2=0;       AC_SUBST([GNULIB_EXP2])
+  GNULIB_EXP2F=0;      AC_SUBST([GNULIB_EXP2F])
+  GNULIB_EXP2L=0;      AC_SUBST([GNULIB_EXP2L])
+  GNULIB_EXPM1=0;      AC_SUBST([GNULIB_EXPM1])
+  GNULIB_EXPM1F=0;     AC_SUBST([GNULIB_EXPM1F])
+  GNULIB_EXPM1L=0;     AC_SUBST([GNULIB_EXPM1L])
+  GNULIB_FABSF=0;      AC_SUBST([GNULIB_FABSF])
+  GNULIB_FABSL=0;      AC_SUBST([GNULIB_FABSL])
+  GNULIB_FLOOR=0;      AC_SUBST([GNULIB_FLOOR])
+  GNULIB_FLOORF=0;     AC_SUBST([GNULIB_FLOORF])
+  GNULIB_FLOORL=0;     AC_SUBST([GNULIB_FLOORL])
+  GNULIB_FMA=0;        AC_SUBST([GNULIB_FMA])
+  GNULIB_FMAF=0;       AC_SUBST([GNULIB_FMAF])
+  GNULIB_FMAL=0;       AC_SUBST([GNULIB_FMAL])
+  GNULIB_FMOD=0;       AC_SUBST([GNULIB_FMOD])
+  GNULIB_FMODF=0;      AC_SUBST([GNULIB_FMODF])
+  GNULIB_FMODL=0;      AC_SUBST([GNULIB_FMODL])
+  GNULIB_FREXPF=0;     AC_SUBST([GNULIB_FREXPF])
+  GNULIB_FREXP=0;      AC_SUBST([GNULIB_FREXP])
+  GNULIB_FREXPL=0;     AC_SUBST([GNULIB_FREXPL])
+  GNULIB_HYPOT=0;      AC_SUBST([GNULIB_HYPOT])
+  GNULIB_HYPOTF=0;     AC_SUBST([GNULIB_HYPOTF])
+  GNULIB_HYPOTL=0;     AC_SUBST([GNULIB_HYPOTL])
+  GNULIB_ILOGB=0;      AC_SUBST([GNULIB_ILOGB])
+  GNULIB_ILOGBF=0;     AC_SUBST([GNULIB_ILOGBF])
+  GNULIB_ILOGBL=0;     AC_SUBST([GNULIB_ILOGBL])
+  GNULIB_ISFINITE=0;   AC_SUBST([GNULIB_ISFINITE])
+  GNULIB_ISINF=0;      AC_SUBST([GNULIB_ISINF])
+  GNULIB_ISNAN=0;      AC_SUBST([GNULIB_ISNAN])
+  GNULIB_ISNANF=0;     AC_SUBST([GNULIB_ISNANF])
+  GNULIB_ISNAND=0;     AC_SUBST([GNULIB_ISNAND])
+  GNULIB_ISNANL=0;     AC_SUBST([GNULIB_ISNANL])
+  GNULIB_LDEXPF=0;     AC_SUBST([GNULIB_LDEXPF])
+  GNULIB_LDEXPL=0;     AC_SUBST([GNULIB_LDEXPL])
+  GNULIB_LOG=0;        AC_SUBST([GNULIB_LOG])
+  GNULIB_LOGF=0;       AC_SUBST([GNULIB_LOGF])
+  GNULIB_LOGL=0;       AC_SUBST([GNULIB_LOGL])
+  GNULIB_LOG10=0;      AC_SUBST([GNULIB_LOG10])
+  GNULIB_LOG10F=0;     AC_SUBST([GNULIB_LOG10F])
+  GNULIB_LOG10L=0;     AC_SUBST([GNULIB_LOG10L])
+  GNULIB_LOG1P=0;      AC_SUBST([GNULIB_LOG1P])
+  GNULIB_LOG1PF=0;     AC_SUBST([GNULIB_LOG1PF])
+  GNULIB_LOG1PL=0;     AC_SUBST([GNULIB_LOG1PL])
+  GNULIB_LOG2=0;       AC_SUBST([GNULIB_LOG2])
+  GNULIB_LOG2F=0;      AC_SUBST([GNULIB_LOG2F])
+  GNULIB_LOG2L=0;      AC_SUBST([GNULIB_LOG2L])
+  GNULIB_LOGB=0;       AC_SUBST([GNULIB_LOGB])
+  GNULIB_LOGBF=0;      AC_SUBST([GNULIB_LOGBF])
+  GNULIB_LOGBL=0;      AC_SUBST([GNULIB_LOGBL])
+  GNULIB_MODF=0;       AC_SUBST([GNULIB_MODF])
+  GNULIB_MODFF=0;      AC_SUBST([GNULIB_MODFF])
+  GNULIB_MODFL=0;      AC_SUBST([GNULIB_MODFL])
+  GNULIB_POWF=0;       AC_SUBST([GNULIB_POWF])
+  GNULIB_REMAINDER=0;  AC_SUBST([GNULIB_REMAINDER])
+  GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF])
+  GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL])
+  GNULIB_RINT=0;       AC_SUBST([GNULIB_RINT])
+  GNULIB_RINTF=0;      AC_SUBST([GNULIB_RINTF])
+  GNULIB_RINTL=0;      AC_SUBST([GNULIB_RINTL])
+  GNULIB_ROUND=0;      AC_SUBST([GNULIB_ROUND])
+  GNULIB_ROUNDF=0;     AC_SUBST([GNULIB_ROUNDF])
+  GNULIB_ROUNDL=0;     AC_SUBST([GNULIB_ROUNDL])
+  GNULIB_SIGNBIT=0;    AC_SUBST([GNULIB_SIGNBIT])
+  GNULIB_SINF=0;       AC_SUBST([GNULIB_SINF])
+  GNULIB_SINL=0;       AC_SUBST([GNULIB_SINL])
+  GNULIB_SINHF=0;      AC_SUBST([GNULIB_SINHF])
+  GNULIB_SQRTF=0;      AC_SUBST([GNULIB_SQRTF])
+  GNULIB_SQRTL=0;      AC_SUBST([GNULIB_SQRTL])
+  GNULIB_TANF=0;       AC_SUBST([GNULIB_TANF])
+  GNULIB_TANL=0;       AC_SUBST([GNULIB_TANL])
+  GNULIB_TANHF=0;      AC_SUBST([GNULIB_TANHF])
+  GNULIB_TRUNC=0;      AC_SUBST([GNULIB_TRUNC])
+  GNULIB_TRUNCF=0;     AC_SUBST([GNULIB_TRUNCF])
+  GNULIB_TRUNCL=0;     AC_SUBST([GNULIB_TRUNCL])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_ACOSF=1;                AC_SUBST([HAVE_ACOSF])
   HAVE_ACOSL=1;                AC_SUBST([HAVE_ACOSL])
@@ -127,20 +167,31 @@
   HAVE_ATANF=1;                AC_SUBST([HAVE_ATANF])
   HAVE_ATANL=1;                AC_SUBST([HAVE_ATANL])
   HAVE_ATAN2F=1;               AC_SUBST([HAVE_ATAN2F])
+  HAVE_CBRT=1;                 AC_SUBST([HAVE_CBRT])
+  HAVE_CBRTF=1;                AC_SUBST([HAVE_CBRTF])
+  HAVE_CBRTL=1;                AC_SUBST([HAVE_CBRTL])
   HAVE_COPYSIGN=1;             AC_SUBST([HAVE_COPYSIGN])
-  HAVE_COPYSIGNF=1;            AC_SUBST([HAVE_COPYSIGNF])
   HAVE_COPYSIGNL=1;            AC_SUBST([HAVE_COPYSIGNL])
   HAVE_COSF=1;                 AC_SUBST([HAVE_COSF])
   HAVE_COSL=1;                 AC_SUBST([HAVE_COSL])
   HAVE_COSHF=1;                AC_SUBST([HAVE_COSHF])
   HAVE_EXPF=1;                 AC_SUBST([HAVE_EXPF])
   HAVE_EXPL=1;                 AC_SUBST([HAVE_EXPL])
+  HAVE_EXPM1=1;                AC_SUBST([HAVE_EXPM1])
+  HAVE_EXPM1F=1;               AC_SUBST([HAVE_EXPM1F])
   HAVE_FABSF=1;                AC_SUBST([HAVE_FABSF])
+  HAVE_FABSL=1;                AC_SUBST([HAVE_FABSL])
   HAVE_FMA=1;                  AC_SUBST([HAVE_FMA])
   HAVE_FMAF=1;                 AC_SUBST([HAVE_FMAF])
   HAVE_FMAL=1;                 AC_SUBST([HAVE_FMAL])
   HAVE_FMODF=1;                AC_SUBST([HAVE_FMODF])
+  HAVE_FMODL=1;                AC_SUBST([HAVE_FMODL])
   HAVE_FREXPF=1;               AC_SUBST([HAVE_FREXPF])
+  HAVE_HYPOTF=1;               AC_SUBST([HAVE_HYPOTF])
+  HAVE_HYPOTL=1;               AC_SUBST([HAVE_HYPOTL])
+  HAVE_ILOGB=1;                AC_SUBST([HAVE_ILOGB])
+  HAVE_ILOGBF=1;               AC_SUBST([HAVE_ILOGBF])
+  HAVE_ILOGBL=1;               AC_SUBST([HAVE_ILOGBL])
   HAVE_ISNANF=1;               AC_SUBST([HAVE_ISNANF])
   HAVE_ISNAND=1;               AC_SUBST([HAVE_ISNAND])
   HAVE_ISNANL=1;               AC_SUBST([HAVE_ISNANL])
@@ -148,10 +199,18 @@
   HAVE_LOGF=1;                 AC_SUBST([HAVE_LOGF])
   HAVE_LOGL=1;                 AC_SUBST([HAVE_LOGL])
   HAVE_LOG10F=1;               AC_SUBST([HAVE_LOG10F])
+  HAVE_LOG10L=1;               AC_SUBST([HAVE_LOG10L])
+  HAVE_LOG1P=1;                AC_SUBST([HAVE_LOG1P])
+  HAVE_LOG1PF=1;               AC_SUBST([HAVE_LOG1PF])
+  HAVE_LOG1PL=1;               AC_SUBST([HAVE_LOG1PL])
+  HAVE_LOGBF=1;                AC_SUBST([HAVE_LOGBF])
+  HAVE_LOGBL=1;                AC_SUBST([HAVE_LOGBL])
   HAVE_MODFF=1;                AC_SUBST([HAVE_MODFF])
+  HAVE_MODFL=1;                AC_SUBST([HAVE_MODFL])
   HAVE_POWF=1;                 AC_SUBST([HAVE_POWF])
+  HAVE_REMAINDER=1;            AC_SUBST([HAVE_REMAINDER])
+  HAVE_REMAINDERF=1;           AC_SUBST([HAVE_REMAINDERF])
   HAVE_RINT=1;                 AC_SUBST([HAVE_RINT])
-  HAVE_RINTF=1;                AC_SUBST([HAVE_RINTF])
   HAVE_RINTL=1;                AC_SUBST([HAVE_RINTL])
   HAVE_SINF=1;                 AC_SUBST([HAVE_SINF])
   HAVE_SINL=1;                 AC_SUBST([HAVE_SINL])
@@ -164,16 +223,30 @@
   HAVE_DECL_ACOSL=1;           AC_SUBST([HAVE_DECL_ACOSL])
   HAVE_DECL_ASINL=1;           AC_SUBST([HAVE_DECL_ASINL])
   HAVE_DECL_ATANL=1;           AC_SUBST([HAVE_DECL_ATANL])
+  HAVE_DECL_CBRTF=1;           AC_SUBST([HAVE_DECL_CBRTF])
+  HAVE_DECL_CBRTL=1;           AC_SUBST([HAVE_DECL_CBRTL])
   HAVE_DECL_CEILF=1;           AC_SUBST([HAVE_DECL_CEILF])
   HAVE_DECL_CEILL=1;           AC_SUBST([HAVE_DECL_CEILL])
+  HAVE_DECL_COPYSIGNF=1;       AC_SUBST([HAVE_DECL_COPYSIGNF])
   HAVE_DECL_COSL=1;            AC_SUBST([HAVE_DECL_COSL])
   HAVE_DECL_EXPL=1;            AC_SUBST([HAVE_DECL_EXPL])
+  HAVE_DECL_EXP2=1;            AC_SUBST([HAVE_DECL_EXP2])
+  HAVE_DECL_EXP2F=1;           AC_SUBST([HAVE_DECL_EXP2F])
+  HAVE_DECL_EXP2L=1;           AC_SUBST([HAVE_DECL_EXP2L])
+  HAVE_DECL_EXPM1L=1;          AC_SUBST([HAVE_DECL_EXPM1L])
   HAVE_DECL_FLOORF=1;          AC_SUBST([HAVE_DECL_FLOORF])
   HAVE_DECL_FLOORL=1;          AC_SUBST([HAVE_DECL_FLOORL])
   HAVE_DECL_FREXPL=1;          AC_SUBST([HAVE_DECL_FREXPL])
   HAVE_DECL_LDEXPL=1;          AC_SUBST([HAVE_DECL_LDEXPL])
+  HAVE_DECL_LOGL=1;            AC_SUBST([HAVE_DECL_LOGL])
+  HAVE_DECL_LOG10L=1;          AC_SUBST([HAVE_DECL_LOG10L])
+  HAVE_DECL_LOG2=1;            AC_SUBST([HAVE_DECL_LOG2])
+  HAVE_DECL_LOG2F=1;           AC_SUBST([HAVE_DECL_LOG2F])
+  HAVE_DECL_LOG2L=1;           AC_SUBST([HAVE_DECL_LOG2L])
   HAVE_DECL_LOGB=1;            AC_SUBST([HAVE_DECL_LOGB])
-  HAVE_DECL_LOGL=1;            AC_SUBST([HAVE_DECL_LOGL])
+  HAVE_DECL_REMAINDER=1;       AC_SUBST([HAVE_DECL_REMAINDER])
+  HAVE_DECL_REMAINDERL=1;      AC_SUBST([HAVE_DECL_REMAINDERL])
+  HAVE_DECL_RINTF=1;           AC_SUBST([HAVE_DECL_RINTF])
   HAVE_DECL_ROUND=1;           AC_SUBST([HAVE_DECL_ROUND])
   HAVE_DECL_ROUNDF=1;          AC_SUBST([HAVE_DECL_ROUNDF])
   HAVE_DECL_ROUNDL=1;          AC_SUBST([HAVE_DECL_ROUNDL])
@@ -183,29 +256,66 @@
   HAVE_DECL_TRUNC=1;           AC_SUBST([HAVE_DECL_TRUNC])
   HAVE_DECL_TRUNCF=1;          AC_SUBST([HAVE_DECL_TRUNCF])
   HAVE_DECL_TRUNCL=1;          AC_SUBST([HAVE_DECL_TRUNCL])
+  REPLACE_CBRTF=0;             AC_SUBST([REPLACE_CBRTF])
+  REPLACE_CBRTL=0;             AC_SUBST([REPLACE_CBRTL])
   REPLACE_CEIL=0;              AC_SUBST([REPLACE_CEIL])
   REPLACE_CEILF=0;             AC_SUBST([REPLACE_CEILF])
   REPLACE_CEILL=0;             AC_SUBST([REPLACE_CEILL])
+  REPLACE_EXPM1=0;             AC_SUBST([REPLACE_EXPM1])
+  REPLACE_EXPM1F=0;            AC_SUBST([REPLACE_EXPM1F])
+  REPLACE_EXP2=0;              AC_SUBST([REPLACE_EXP2])
+  REPLACE_EXP2L=0;             AC_SUBST([REPLACE_EXP2L])
+  REPLACE_FABSL=0;             AC_SUBST([REPLACE_FABSL])
   REPLACE_FLOOR=0;             AC_SUBST([REPLACE_FLOOR])
   REPLACE_FLOORF=0;            AC_SUBST([REPLACE_FLOORF])
   REPLACE_FLOORL=0;            AC_SUBST([REPLACE_FLOORL])
   REPLACE_FMA=0;               AC_SUBST([REPLACE_FMA])
   REPLACE_FMAF=0;              AC_SUBST([REPLACE_FMAF])
   REPLACE_FMAL=0;              AC_SUBST([REPLACE_FMAL])
+  REPLACE_FMOD=0;              AC_SUBST([REPLACE_FMOD])
+  REPLACE_FMODF=0;             AC_SUBST([REPLACE_FMODF])
+  REPLACE_FMODL=0;             AC_SUBST([REPLACE_FMODL])
   REPLACE_FREXPF=0;            AC_SUBST([REPLACE_FREXPF])
   REPLACE_FREXP=0;             AC_SUBST([REPLACE_FREXP])
   REPLACE_FREXPL=0;            AC_SUBST([REPLACE_FREXPL])
   REPLACE_HUGE_VAL=0;          AC_SUBST([REPLACE_HUGE_VAL])
+  REPLACE_HYPOT=0;             AC_SUBST([REPLACE_HYPOT])
+  REPLACE_HYPOTF=0;            AC_SUBST([REPLACE_HYPOTF])
+  REPLACE_HYPOTL=0;            AC_SUBST([REPLACE_HYPOTL])
+  REPLACE_ILOGB=0;             AC_SUBST([REPLACE_ILOGB])
+  REPLACE_ILOGBF=0;            AC_SUBST([REPLACE_ILOGBF])
   REPLACE_ISFINITE=0;          AC_SUBST([REPLACE_ISFINITE])
   REPLACE_ISINF=0;             AC_SUBST([REPLACE_ISINF])
   REPLACE_ISNAN=0;             AC_SUBST([REPLACE_ISNAN])
   REPLACE_LDEXPL=0;            AC_SUBST([REPLACE_LDEXPL])
+  REPLACE_LOG=0;               AC_SUBST([REPLACE_LOG])
+  REPLACE_LOGF=0;              AC_SUBST([REPLACE_LOGF])
+  REPLACE_LOGL=0;              AC_SUBST([REPLACE_LOGL])
+  REPLACE_LOG10=0;             AC_SUBST([REPLACE_LOG10])
+  REPLACE_LOG10F=0;            AC_SUBST([REPLACE_LOG10F])
+  REPLACE_LOG10L=0;            AC_SUBST([REPLACE_LOG10L])
+  REPLACE_LOG1P=0;             AC_SUBST([REPLACE_LOG1P])
+  REPLACE_LOG1PF=0;            AC_SUBST([REPLACE_LOG1PF])
+  REPLACE_LOG1PL=0;            AC_SUBST([REPLACE_LOG1PL])
+  REPLACE_LOG2=0;              AC_SUBST([REPLACE_LOG2])
+  REPLACE_LOG2F=0;             AC_SUBST([REPLACE_LOG2F])
+  REPLACE_LOG2L=0;             AC_SUBST([REPLACE_LOG2L])
+  REPLACE_LOGB=0;              AC_SUBST([REPLACE_LOGB])
+  REPLACE_LOGBF=0;             AC_SUBST([REPLACE_LOGBF])
+  REPLACE_LOGBL=0;             AC_SUBST([REPLACE_LOGBL])
+  REPLACE_MODF=0;              AC_SUBST([REPLACE_MODF])
+  REPLACE_MODFF=0;             AC_SUBST([REPLACE_MODFF])
+  REPLACE_MODFL=0;             AC_SUBST([REPLACE_MODFL])
   REPLACE_NAN=0;               AC_SUBST([REPLACE_NAN])
+  REPLACE_REMAINDER=0;         AC_SUBST([REPLACE_REMAINDER])
+  REPLACE_REMAINDERF=0;        AC_SUBST([REPLACE_REMAINDERF])
+  REPLACE_REMAINDERL=0;        AC_SUBST([REPLACE_REMAINDERL])
   REPLACE_ROUND=0;             AC_SUBST([REPLACE_ROUND])
   REPLACE_ROUNDF=0;            AC_SUBST([REPLACE_ROUNDF])
   REPLACE_ROUNDL=0;            AC_SUBST([REPLACE_ROUNDL])
   REPLACE_SIGNBIT=0;           AC_SUBST([REPLACE_SIGNBIT])
   REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
+  REPLACE_SQRTL=0;             AC_SUBST([REPLACE_SQRTL])
   REPLACE_TRUNC=0;             AC_SUBST([REPLACE_TRUNC])
   REPLACE_TRUNCF=0;            AC_SUBST([REPLACE_TRUNCF])
   REPLACE_TRUNCL=0;            AC_SUBST([REPLACE_TRUNCL])
--- a/m4/mathfunc.m4
+++ b/m4/mathfunc.m4
@@ -1,4 +1,4 @@
-# mathfunc.m4 serial 10
+# mathfunc.m4 serial 11
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -113,7 +113,7 @@
 # tests whether the function FUNC is available in libc or libm.
 # It sets FUNC_LIBM to empty or "-lm" accordingly.
 # FUNC must be one of the following functions, that are present on all systems
-# and provided by libm on all systems except MacOS X, BeOS, Haiku:
+# and provided by libm on all systems except Mac OS X, BeOS, Haiku:
 #   acos asin atan atan2 cbrt cos cosh erf erfc exp fmod hypot j0 j1 jn lgamma
 #   log log10 log1p pow remainder sin sinh sqrt tan tanh y0 y1 yn
 
--- a/m4/mbchar.m4
+++ b/m4/mbchar.m4
@@ -1,4 +1,4 @@
-# mbchar.m4 serial 8
+# mbchar.m4 serial 9
 dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,4 @@
 AC_DEFUN([gl_MBCHAR],
 [
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-  AC_REQUIRE([AC_C_INLINE])
 ])
--- a/m4/mbfile.m4
+++ b/m4/mbfile.m4
@@ -1,4 +1,4 @@
-# mbfile.m4 serial 6
+# mbfile.m4 serial 7
 dnl Copyright (C) 2005, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@
 
 AC_DEFUN([gl_MBFILE],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   :
 ])
--- a/m4/mbiter.m4
+++ b/m4/mbiter.m4
@@ -1,4 +1,4 @@
-# mbiter.m4 serial 6
+# mbiter.m4 serial 7
 dnl Copyright (C) 2005, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@
 
 AC_DEFUN([gl_MBITER],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   :
 ])
--- a/m4/md4.m4
+++ b/m4/md4.m4
@@ -1,4 +1,4 @@
-# md4.m4 serial 6
+# md4.m4 serial 7
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@
 AC_DEFUN([gl_MD4],
 [
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])
--- a/m4/md5.m4
+++ b/m4/md5.m4
@@ -1,4 +1,4 @@
-# md5.m4 serial 12
+# md5.m4 serial 13
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@
 [
   dnl Prerequisites of lib/md5.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])
--- a/m4/memcoll.m4
+++ b/m4/memcoll.m4
@@ -1,11 +1,8 @@
-# memcoll.m4 serial 9
+# memcoll.m4 serial 10
 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_MEMCOLL],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_MEMCOLL], [:])
--- a/m4/memmem.m4
+++ b/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 23
+# memmem.m4 serial 24
 dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -67,13 +67,16 @@
   Lucky user
 #endif
            ],
-           [gl_cv_func_memmem_works_always=yes],
+           [gl_cv_func_memmem_works_always="guessing yes"],
            [gl_cv_func_memmem_works_always="guessing no"])
         ])
       ])
-    if test "$gl_cv_func_memmem_works_always" != yes; then
-      REPLACE_MEMMEM=1
-    fi
+    case "$gl_cv_func_memmem_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_MEMMEM=1
+        ;;
+    esac
   fi
   gl_PREREQ_MEMMEM
 ]) # gl_FUNC_MEMMEM_SIMPLE
@@ -131,13 +134,16 @@
  #endif
 #endif
            ],
-           [gl_cv_func_memmem_works_fast=yes],
+           [gl_cv_func_memmem_works_fast="guessing yes"],
            [gl_cv_func_memmem_works_fast="guessing no"])
         ])
       ])
-    if test "$gl_cv_func_memmem_works_fast" != yes; then
-      REPLACE_MEMMEM=1
-    fi
+    case "$gl_cv_func_memmem_works_fast" in
+      *yes) ;;
+      *)
+        REPLACE_MEMMEM=1
+        ;;
+    esac
   fi
 ]) # gl_FUNC_MEMMEM
 
--- a/m4/minus-zero.m4
+++ b/m4/minus-zero.m4
@@ -1,4 +1,4 @@
-# minus-zero.m4 serial 1
+# minus-zero.m4 serial 2
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -FLT_MIN * FLT_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static float
 compute_minus_zerof (void)
@@ -36,7 +36,7 @@
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static double
 compute_minus_zerod (void)
@@ -62,7 +62,7 @@
    IRIX cc can't put -0.0L into .data, but can compute at runtime.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -LDBL_MIN * LDBL_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static long double
 compute_minus_zerol (void)
--- a/m4/mkdir.m4
+++ b/m4/mkdir.m4
@@ -1,4 +1,4 @@
-# serial 10
+# serial 11
 
 # Copyright (C) 2001, 2003-2004, 2006, 2008-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -11,6 +11,7 @@
 AC_DEFUN([gl_FUNC_MKDIR],
 [dnl
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CACHE_CHECK([whether mkdir handles trailing slash],
     [gl_cv_func_mkdir_trailing_slash_works],
@@ -21,13 +22,22 @@
 ]], [return mkdir ("conftest.dir/", 0700);])],
       [gl_cv_func_mkdir_trailing_slash_works=yes],
       [gl_cv_func_mkdir_trailing_slash_works=no],
-      [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
+       esac
+      ])
     rm -rf conftest.dir
     ]
   )
-  if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
-    REPLACE_MKDIR=1
-  fi
+  case "$gl_cv_func_mkdir_trailing_slash_works" in
+    *yes) ;;
+    *)
+      REPLACE_MKDIR=1
+      ;;
+  esac
 
   AC_CACHE_CHECK([whether mkdir handles trailing dot],
     [gl_cv_func_mkdir_trailing_dot_works],
@@ -38,13 +48,22 @@
 ]], [return !mkdir ("conftest.dir/./", 0700);])],
       [gl_cv_func_mkdir_trailing_dot_works=yes],
       [gl_cv_func_mkdir_trailing_dot_works=no],
-      [gl_cv_func_mkdir_trailing_dot_works="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+       esac
+      ])
     rm -rf conftest.dir
     ]
   )
-  if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
-    REPLACE_MKDIR=1
-    AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly
-      creates a directory given with a trailing dot component.])
-  fi
+  case "$gl_cv_func_mkdir_trailing_dot_works" in
+    *yes) ;;
+    *)
+      REPLACE_MKDIR=1
+      AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly
+        creates a directory given with a trailing dot component.])
+      ;;
+  esac
 ])
--- a/m4/mkfifo.m4
+++ b/m4/mkfifo.m4
@@ -1,4 +1,4 @@
-# serial 3
+# serial 4
 # See if we need to provide mkfifo replacement.
 
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@
 AC_DEFUN([gl_FUNC_MKFIFO],
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([mkfifo])
   if test $ac_cv_func_mkfifo = no; then
     HAVE_MKFIFO=0
@@ -37,12 +38,21 @@
              return result;
            ]])],
          [gl_cv_func_mkfifo_works=yes], [gl_cv_func_mkfifo_works=no],
-         [gl_cv_func_mkfifo_works="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_mkfifo_works="guessing no" ;;
+          esac
+         ])
        rm -f conftest.tmp conftest.lnk])
-    if test "$gl_cv_func_mkfifo_works" != yes; then
-      AC_DEFINE([MKFIFO_TRAILING_SLASH_BUG], [1], [Define to 1 if mkfifo
-        does not reject trailing slash])
-      REPLACE_MKFIFO=1
-    fi
+    case "$gl_cv_func_mkfifo_works" in
+      *yes) ;;
+      *)
+        AC_DEFINE([MKFIFO_TRAILING_SLASH_BUG], [1], [Define to 1 if mkfifo
+          does not reject trailing slash])
+        REPLACE_MKFIFO=1
+        ;;
+    esac
   fi
 ])
--- a/m4/mknod.m4
+++ b/m4/mknod.m4
@@ -1,4 +1,4 @@
-# serial 4
+# serial 5
 # See if we need to provide mknod replacement.
 
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@
 AC_DEFUN([gl_FUNC_MKNOD],
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_REQUIRE([gl_FUNC_MKFIFO])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_FUNCS_ONCE([mknod])
@@ -24,9 +25,16 @@
          [AC_LANG_PROGRAM(
            [[#include <sys/stat.h>
              #include <unistd.h>
+
+             /* Copied from root-uid.h.  FIXME: Just use root-uid.h.  */
+             #ifdef __TANDEM
+             # define ROOT_UID 65535
+             #else
+             # define ROOT_UID 0
+             #endif
 ]], [[/* Indeterminate for super-user, assume no.  Why are you running
          configure as root, anyway?  */
-      if (!geteuid ()) return 99;
+      if (geteuid () == ROOT_UID) return 99;
       if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;]])],
          [gl_cv_func_mknod_works=yes],
          [if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
@@ -34,14 +42,24 @@
 [(set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)])
           fi
           gl_cv_func_mknod_works=no],
-         [gl_cv_func_mknod_works="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_mknod_works="guessing no" ;;
+          esac
+         ])
        rm -f conftest.fifo])
-    if test "$gl_cv_func_mknod_works" != yes; then
-      AC_DEFINE([MKNOD_FIFO_BUG], [1], [Define to 1 if mknod cannot create
-        a fifo without super-user privileges])
-    fi
+    case "$gl_cv_func_mknod_works" in
+      *yes) ;;
+      *)
+        REPLACE_MKNOD=1
+        AC_DEFINE([MKNOD_FIFO_BUG], [1], [Define to 1 if mknod cannot create
+          a fifo without super-user privileges])
+        ;;
+    esac
     dnl Systems that mishandle trailing slash on mkfifo also goof on mknod.
-    if test $REPLACE_MKFIFO = 1 || test "$gl_cv_func_mknod_works" != yes; then
+    if test $REPLACE_MKFIFO = 1; then
       REPLACE_MKNOD=1
     fi
   fi
--- a/m4/mkstemp.m4
+++ b/m4/mkstemp.m4
@@ -1,4 +1,4 @@
-#serial 22
+#serial 23
 
 # Copyright (C) 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -16,6 +16,7 @@
 AC_DEFUN([gl_FUNC_MKSTEMP],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   AC_CHECK_FUNCS_ONCE([mkstemp])
   if test $ac_cv_func_mkstemp = yes; then
@@ -55,12 +56,21 @@
               return result;]])],
           [gl_cv_func_working_mkstemp=yes],
           [gl_cv_func_working_mkstemp=no],
-          [gl_cv_func_working_mkstemp="guessing no"])
+          [case "$host_os" in
+                     # Guess yes on glibc systems.
+             *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
+                     # If we don't know, assume the worst.
+             *)      gl_cv_func_working_mkstemp="guessing no" ;;
+           esac
+          ])
         rm -rf conftest.mkstemp
       ])
-    if test "$gl_cv_func_working_mkstemp" != yes; then
-      REPLACE_MKSTEMP=1
-    fi
+    case "$gl_cv_func_working_mkstemp" in
+      *yes) ;;
+      *)
+        REPLACE_MKSTEMP=1
+        ;;
+    esac
   else
     HAVE_MKSTEMP=0
   fi
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
-# serial 21
+# serial 24
 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -17,7 +17,7 @@
   AC_CHECK_FUNCS_ONCE([alarm])
   AC_REQUIRE([gl_MULTIARCH])
   if test $APPLE_UNIVERSAL_BUILD = 1; then
-    # A universal build on Apple MacOS X platforms.
+    # A universal build on Apple Mac OS X platforms.
     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
     # But we need a configuration result that is valid in both modes.
     gl_cv_func_working_mktime=no
@@ -192,20 +192,23 @@
       if (tz_strings[i])
         putenv (tz_strings[i]);
 
-      for (t = 0; t <= time_t_max - delta; t += delta)
+      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
         if (! mktime_test (t))
           result |= 1;
-      if (! (mktime_test ((time_t) 1)
-             && mktime_test ((time_t) (60 * 60))
-             && mktime_test ((time_t) (60 * 60 * 24))))
+      if ((result & 2) == 0
+          && ! (mktime_test ((time_t) 1)
+                && mktime_test ((time_t) (60 * 60))
+                && mktime_test ((time_t) (60 * 60 * 24))))
         result |= 2;
 
-      for (j = 1; ; j <<= 1)
-        if (! bigtime_test (j))
-          result |= 4;
-        else if (INT_MAX / 2 < j)
-          break;
-      if (! bigtime_test (INT_MAX))
+      for (j = 1; (result & 4) == 0; j <<= 1)
+        {
+          if (! bigtime_test (j))
+            result |= 4;
+          if (INT_MAX / 2 < j)
+            break;
+        }
+      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
         result |= 8;
     }
   if (! irix_6_4_bug ())
@@ -244,7 +247,4 @@
 ])
 
 # Prerequisites of lib/mktime.c.
-AC_DEFUN([gl_PREREQ_MKTIME],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_MKTIME], [:])
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,4 +1,4 @@
-# mmap-anon.m4 serial 9
+# mmap-anon.m4 serial 10
 dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,7 @@
 # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
 #   and MAP_ANON exist and have the same value.
 # - On HP-UX, only MAP_ANONYMOUS exists.
-# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
+# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
 # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
 #   used.
 
@@ -27,18 +27,18 @@
   gl_have_mmap_anonymous=no
   if test $gl_have_mmap = yes; then
     AC_MSG_CHECKING([for MAP_ANONYMOUS])
-    AC_EGREP_CPP([I cant identify this map], [
+    AC_EGREP_CPP([I cannot identify this map], [
 #include <sys/mman.h>
 #ifdef MAP_ANONYMOUS
-    I cant identify this map
+    I cannot identify this map
 #endif
 ],
       [gl_have_mmap_anonymous=yes])
     if test $gl_have_mmap_anonymous != yes; then
-      AC_EGREP_CPP([I cant identify this map], [
+      AC_EGREP_CPP([I cannot identify this map], [
 #include <sys/mman.h>
 #ifdef MAP_ANON
-    I cant identify this map
+    I cannot identify this map
 #endif
 ],
         [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON],
new file mode 100644
--- /dev/null
+++ b/m4/modf-ieee.m4
@@ -0,0 +1,15 @@
+# modf-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in modf.m4 and not inlined in the
+dnl module description), so that gl_FUNC_MODF can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_MODF_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_modf_required=ieee])
+  AC_REQUIRE([gl_FUNC_MODF])
+])
--- a/m4/modf.m4
+++ b/m4/modf.m4
@@ -1,4 +1,4 @@
-# modf.m4 serial 1
+# modf.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,78 @@
 
 AC_DEFUN([gl_FUNC_MODF],
 [
+  m4_divert_text([DEFAULTS], [gl_modf_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
   dnl Determine MODF_LIBM.
   gl_MATHFUNC([modf], [double], [(double, double *)])
+
+  m4_ifdef([gl_FUNC_MODF_IEEE], [
+    if test $gl_modf_required = ieee && test $REPLACE_MODF = 0; then
+      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+      AC_CACHE_CHECK([whether modf works according to ISO C 99 with IEC 60559],
+        [gl_cv_func_modf_ieee],
+        [
+          save_LIBS="$LIBS"
+          LIBS="$LIBS $MODF_LIBM"
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_DOUBLE_MINUS_ZERO_CODE[
+]gl_DOUBLE_SIGNBIT_CODE[
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+static double dummy (double x, double *iptr) { return 0; }
+double zero;
+double minus_one = - 1.0;
+int main (int argc, char *argv[])
+{
+  double (*my_modf) (double, double *) = argc ? modf : dummy;
+  int result = 0;
+  double i;
+  double f;
+  /* Test modf(NaN,...).
+     This test fails on NetBSD 5.1, Cygwin.  */
+  f = my_modf (zero / zero, &i);
+  if (numeric_equal (f, f))
+    result |= 1;
+  /* Test modf(-Inf,...).
+     This test fails on FreeBSD 6.4, OpenBSD 4.9, IRIX 6.5, OSF/1 5.1.  */
+  f = my_modf (minus_one / zero, &i);
+  if (!(f == 0.0) || (signbitd (minus_zerod) && !signbitd (f)))
+    result |= 2;
+  return result;
+}
+            ]])],
+            [gl_cv_func_modf_ieee=yes],
+            [gl_cv_func_modf_ieee=no],
+            [case "$host_os" in
+                       # Guess yes on glibc systems.
+               *-gnu*) gl_cv_func_modf_ieee="guessing yes" ;;
+                       # If we don't know, assume the worst.
+               *)      gl_cv_func_modf_ieee="guessing no" ;;
+             esac
+            ])
+          LIBS="$save_LIBS"
+        ])
+      case "$gl_cv_func_modf_ieee" in
+        *yes) ;;
+        *) REPLACE_MODF=1 ;;
+      esac
+    fi
+  ])
+  if test $REPLACE_MODF = 1; then
+    dnl Find libraries needed to link lib/modf.c.
+    AC_REQUIRE([gl_FUNC_TRUNC])
+    MODF_LIBM="$TRUNC_LIBM"
+  fi
 ])
new file mode 100644
--- /dev/null
+++ b/m4/modff-ieee.m4
@@ -0,0 +1,15 @@
+# modff-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in modff.m4 and not inlined in the
+dnl module description), so that gl_FUNC_MODFF can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_MODFF_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_modff_required=ieee])
+  AC_REQUIRE([gl_FUNC_MODFF])
+])
--- a/m4/modff.m4
+++ b/m4/modff.m4
@@ -1,4 +1,4 @@
-# modff.m4 serial 2
+# modff.m4 serial 5
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,16 +6,88 @@
 
 AC_DEFUN([gl_FUNC_MODFF],
 [
+  m4_divert_text([DEFAULTS], [gl_modff_required=plain])
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_MODF])
 
+  dnl Persuade glibc <math.h> to declare modff().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether modff() exists. We cannot assume that modff(), if it
   dnl exists, is defined in the same library as modf(). This is not the case
   dnl on FreeBSD, NetBSD, OpenBSD.
   gl_MATHFUNC([modff], [float], [(float, float *)])
-  if test $gl_cv_func_modff_no_libm = no \
-     && test $gl_cv_func_modff_in_libm = no; then
+  if test $gl_cv_func_modff_no_libm = yes \
+     || test $gl_cv_func_modff_in_libm = yes; then
+    :
+    m4_ifdef([gl_FUNC_MODFF_IEEE], [
+      if test $gl_modff_required = ieee && test $REPLACE_MODFF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether modff works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_modff_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $MODFF_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_FLOAT_MINUS_ZERO_CODE[
+]gl_FLOAT_SIGNBIT_CODE[
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (float x, float y)
+{
+  return x == y;
+}
+static float dummy (float x, float *iptr) { return 0; }
+float zero;
+float minus_one = - 1.0f;
+int main (int argc, char *argv[])
+{
+  float (*my_modff) (float, float *) = argc ? modff : dummy;
+  int result = 0;
+  float i;
+  float f;
+  /* Test modff(NaN,...).
+     This test fails on NetBSD 5.1, OpenBSD 4.9, Solaris 9, Cygwin.  */
+  f = my_modff (zero / zero, &i);
+  if (numeric_equal (f, f))
+    result |= 1;
+  /* Test modff(-Inf,...).
+     This test fails on IRIX 6.5, OSF/1 5.1, mingw.  */
+  f = my_modff (minus_one / zero, &i);
+  if (!(f == 0.0f) || (signbitf (minus_zerof) && !signbitf (f)))
+    result |= 2;
+  return result;
+}
+              ]])],
+              [gl_cv_func_modff_ieee=yes],
+              [gl_cv_func_modff_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_modff_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_modff_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_modff_ieee" in
+          *yes) ;;
+          *) REPLACE_MODFF=1 ;;
+        esac
+      fi
+    ])
+  else
     HAVE_MODFF=0
+  fi
+  if test $HAVE_MODFF = 0 || test $REPLACE_MODFF = 1; then
+    dnl Find libraries needed to link lib/modff.c.
     MODFF_LIBM="$MODF_LIBM"
   fi
   AC_SUBST([MODFF_LIBM])
new file mode 100644
--- /dev/null
+++ b/m4/modfl-ieee.m4
@@ -0,0 +1,15 @@
+# modfl-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in modfl.m4 and not inlined in the
+dnl module description), so that gl_FUNC_MODFL can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_MODFL_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_modfl_required=ieee])
+  AC_REQUIRE([gl_FUNC_MODFL])
+])
new file mode 100644
--- /dev/null
+++ b/m4/modfl.m4
@@ -0,0 +1,94 @@
+# modfl.m4 serial 3
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MODFL],
+[
+  m4_divert_text([DEFAULTS], [gl_modfl_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
+  dnl Persuade glibc <math.h> to declare modfl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether modfl() exists. We cannot assume that modfl(), if it
+  dnl exists, is defined in the same library as modf(). This is not the case
+  dnl on FreeBSD, Solaris.
+  gl_MATHFUNC([modfl], [long double], [(long double, long double *)])
+  if test $gl_cv_func_modfl_no_libm = yes \
+     || test $gl_cv_func_modfl_in_libm = yes; then
+    :
+    m4_ifdef([gl_FUNC_MODFL_IEEE], [
+      if test $gl_modfl_required = ieee && test $REPLACE_MODFL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether modfl works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_modfl_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $MODFL_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+]gl_LONG_DOUBLE_MINUS_ZERO_CODE[
+]gl_LONG_DOUBLE_SIGNBIT_CODE[
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (long double x, long double y)
+{
+  return x == y;
+}
+static long double dummy (long double x, long double *iptr) { return 0; }
+long double zero;
+long double minus_one = - 1.0L;
+int main (int argc, char *argv[])
+{
+  long double (*my_modfl) (long double, long double *) = argc ? modfl : dummy;
+  long double i;
+  long double f;
+  /* Test modfl(-Inf,...).
+     This test fails on IRIX 6.5, OSF/1 5.1, mingw.  */
+  f = my_modfl (minus_one / zero, &i);
+  if (!(f == 0.0L) || (signbitl (minus_zerol) && !signbitl (f)))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_modfl_ieee=yes],
+              [gl_cv_func_modfl_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_modfl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_modfl_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_modfl_ieee" in
+          *yes) ;;
+          *) REPLACE_MODFL=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_MODFL=0
+  fi
+  if test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; then
+    dnl Find libraries needed to link lib/modfl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      AC_REQUIRE([gl_FUNC_MODF])
+      MODFL_LIBM="$MODF_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_TRUNCL])
+      MODFL_LIBM="$TRUNCL_LIBM"
+    fi
+  fi
+  AC_SUBST([MODFL_LIBM])
+])
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,4 +1,4 @@
-# multiarch.m4 serial 6
+# multiarch.m4 serial 7
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@
 
 # Determine whether the compiler is or may be producing universal binaries.
 #
-# On MacOS X 10.5 and later systems, the user can create libraries and
+# On Mac OS X 10.5 and later systems, the user can create libraries and
 # executables that work on multiple system types--known as "fat" or
 # "universal" binaries--by specifying multiple '-arch' options to the
 # compiler but only a single '-arch' option to the preprocessor.  Like
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,4 +1,4 @@
-# serial 34
+# serial 36
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
@@ -13,10 +13,12 @@
 
 AC_DEFUN([gl_FUNC_NANOSLEEP],
 [
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
  dnl Persuade glibc and Solaris <time.h> to declare nanosleep.
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
  AC_CHECK_HEADERS_ONCE([sys/time.h])
  AC_REQUIRE([gl_FUNC_SELECT])
 
@@ -34,7 +36,7 @@
 
    AC_REQUIRE([gl_MULTIARCH])
    if test $APPLE_UNIVERSAL_BUILD = 1; then
-     # A universal build on Apple MacOS X platforms.
+     # A universal build on Apple Mac OS X platforms.
      # The test result would be 'no (mishandles large arguments)' in 64-bit
      # mode but 'yes' in 32-bit mode. But we need a configuration result that
      # is valid in both modes.
@@ -73,6 +75,7 @@
             static struct timespec ts_sleep;
             static struct timespec ts_remaining;
             static struct sigaction act;
+            /* Test for major problems first.  */
             if (! nanosleep)
               return 2;
             act.sa_handler = check_for_SIGALRM;
@@ -83,6 +86,7 @@
             alarm (1);
             if (nanosleep (&ts_sleep, NULL) != 0)
               return 3;
+            /* Test for a minor problem: the handling of large arguments.  */
             ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
             ts_sleep.tv_nsec = 999999999;
             alarm (1);
@@ -99,24 +103,37 @@
         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl (
         *)   gl_cv_func_nanosleep=no;;
         esac],
-       [gl_cv_func_nanosleep=cross-compiling])
+       [case "$host_os" in dnl ((
+          linux*) # Guess it halfway works when the kernel is Linux.
+            gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
+          *)      # If we don't know, assume the worst.
+            gl_cv_func_nanosleep='guessing no' ;;
+        esac
+       ])
     ])
-   if test "$gl_cv_func_nanosleep" = yes; then
-     REPLACE_NANOSLEEP=0
-   else
-     REPLACE_NANOSLEEP=1
-     if test "$gl_cv_func_nanosleep" = 'no (mishandles large arguments)'; then
-       AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], [1],
-         [Define to 1 if nanosleep mishandles large arguments.])
-     else
-       for ac_lib in $LIBSOCKET; do
-         case " $LIB_NANOSLEEP " in
-         *" $ac_lib "*) ;;
-         *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
-         esac
-       done
-     fi
-   fi
+   case "$gl_cv_func_nanosleep" in
+     *yes)
+       REPLACE_NANOSLEEP=0
+       ;;
+     *)
+       REPLACE_NANOSLEEP=1
+       case "$gl_cv_func_nanosleep" in
+         *"mishandles large arguments"*)
+           AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], [1],
+             [Define to 1 if nanosleep mishandles large arguments.])
+           ;;
+         *)
+           # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
+           for ac_lib in $LIBSOCKET; do
+             case " $LIB_NANOSLEEP " in
+               *" $ac_lib "*) ;;
+               *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
+             esac
+           done
+           ;;
+       esac
+       ;;
+   esac
  else
    HAVE_NANOSLEEP=0
  fi
new file mode 100644
--- /dev/null
+++ b/m4/net_if_h.m4
@@ -0,0 +1,31 @@
+# net_if_h.m4 serial 1
+dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_NET_IF],
+[
+  AC_CACHE_CHECK([whether <net/if.h> is self-contained],
+    [gl_cv_header_net_if_h_selfcontained],
+    [
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <net/if.h>]], [[]])],
+        [gl_cv_header_net_if_h_selfcontained=yes],
+        [gl_cv_header_net_if_h_selfcontained=no])
+    ])
+  if test $gl_cv_header_net_if_h_selfcontained = yes; then
+    NET_IF_H=''
+  else
+    NET_IF_H='net/if.h'
+    AC_CHECK_HEADERS([net/if.h], [], [], [[#include <sys/socket.h>]])
+    gl_NEXT_HEADERS([net/if.h])
+    if test $ac_cv_header_net_if_h = yes; then
+      HAVE_NET_IF_H=1
+    else
+      HAVE_NET_IF_H=0
+    fi
+    AC_SUBST([HAVE_NET_IF_H])
+  fi
+  AC_SUBST([NET_IF_H])
+  AM_CONDITIONAL([GL_GENERATE_NET_IF_H], [test -n "$NET_IF_H"])
+])
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,4 +1,4 @@
-# nocrash.m4 serial 3
+# nocrash.m4 serial 4
 dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,7 @@
 AC_DEFUN([GL_NOCRASH],[[
 #include <stdlib.h>
 #if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on MacOS X.  */
+/* Avoid a crash on Mac OS X.  */
 #include <mach/mach.h>
 #include <mach/mach_error.h>
 #include <mach/thread_status.h>
new file mode 100644
--- /dev/null
+++ b/m4/non-recursive-gnulib-prefix-hack.m4
@@ -0,0 +1,35 @@
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl gl_NON_RECURSIVE_GNULIB_PREFIX_HACK LIB_DIR
+dnl Adjust configure-set $gl_LIBOBJS and each AC_SUBST'd *_H variable
+dnl with a value ending in ".h" to reflect that these files are located
+dnl in the directory specified by LIB_DIR.
+AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
+[
+  # Tell AC_LIBSOURCES where to find source files like alloca.c.
+  AC_CONFIG_LIBOBJ_DIR([lib])
+
+  # This hack originated in bison.  It is required when using non-recursive
+  # automake rules to build from gnulib-provided lib/ sources.  Hence, LIB_DIR
+  # is usually simply "lib".  Those rules use the list of names like "fchdir.o"
+  # and "strstr.o" in gl_LIBOBJS.  With non-recursive make, we must prefix each
+  # such file name with the "lib/" prefix.  See also build-aux/prefix-gnulib-mk.
+  gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , $1/,g'`
+
+  # Listing the names of the variables to prefix is error-prone.
+  # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
+  # and whose value ends in '.h'.
+  for ac_var in $ac_subst_vars
+  do
+    eval "ac_val=\$$ac_var"
+    case $ac_var:$ac_val in
+      (*_H:*.h) eval "$ac_var=$1/\$$ac_var";;
+    esac
+  done
+
+  # If $ALLOCA is not empty, prefix its value with "lib/".
+  test -n "$ALLOCA" && ALLOCA="lib/$ALLOCA"
+])
new file mode 100644
--- /dev/null
+++ b/m4/off_t.m4
@@ -0,0 +1,18 @@
+# off_t.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check whether to override the 'off_t' type.
+dnl Set WINDOWS_64_BIT_OFF_T.
+
+AC_DEFUN([gl_TYPE_OFF_T],
+[
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([gl_LARGEFILE])
+  ], [
+    WINDOWS_64_BIT_OFF_T=0
+  ])
+  AC_SUBST([WINDOWS_64_BIT_OFF_T])
+])
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -1,4 +1,4 @@
-# open.m4 serial 13
+# open.m4 serial 14
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -86,7 +86,6 @@
 # Prerequisites of lib/open.c.
 AC_DEFUN([gl_PREREQ_OPEN],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
   :
 ])
--- a/m4/openat.m4
+++ b/m4/openat.m4
@@ -1,4 +1,4 @@
-# serial 43
+# serial 45
 # See if we need to use our replacement for Solaris' openat et al functions.
 
 dnl Copyright (C) 2004-2012 Free Software Foundation, Inc.
@@ -15,7 +15,7 @@
   AC_CHECK_FUNCS_ONCE([openat])
   AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
-  yes+yes)
+  yes+*yes)
     ;;
   yes+*)
     # Solaris 9 has *at functions, but uniformly mishandles trailing
@@ -31,7 +31,6 @@
 # Prerequisites of lib/openat.c.
 AC_DEFUN([gl_PREREQ_OPENAT],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
   :
 ])
--- a/m4/parse-datetime.m4
+++ b/m4/parse-datetime.m4
@@ -1,4 +1,4 @@
-# parse-datetime.m4 serial 19
+# parse-datetime.m4 serial 21
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -1,4 +1,4 @@
-# po.m4 serial 17a
+# po.m4 serial 17b
 dnl Copyright (C) 1995-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -130,12 +130,12 @@
               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
             fi
             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
           else
             # The set of available languages was given in configure.in.
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
           fi
           # Compute POFILES
@@ -317,7 +317,7 @@
     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
   fi
-  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  # Hide the ALL_LINGUAS assignment from automake < 1.5.
   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
   # Compute POFILES
   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
--- a/m4/poll.m4
+++ b/m4/poll.m4
@@ -1,4 +1,4 @@
-# poll.m4 serial 16
+# poll.m4 serial 17
 dnl Copyright (c) 2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
   else
     AC_CHECK_FUNC([poll],
       [# Check whether poll() works on special files (like /dev/null) and
-       # and ttys (like /dev/tty). On MacOS X 10.4.0 and AIX 5.3, it doesn't.
+       # and ttys (like /dev/tty). On Mac OS X 10.4.0 and AIX 5.3, it doesn't.
        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <fcntl.h>
 #include <poll.h>
@@ -24,7 +24,7 @@
            struct pollfd ufd;
            /* Try /dev/null for reading.  */
            ufd.fd = open ("/dev/null", O_RDONLY);
-           /* If /dev/null does not exist, it's not MacOS X nor AIX. */
+           /* If /dev/null does not exist, it's not Mac OS X nor AIX. */
            if (ufd.fd >= 0)
              {
                ufd.events = POLLIN;
@@ -34,7 +34,7 @@
              }
            /* Try /dev/null for writing.  */
            ufd.fd = open ("/dev/null", O_WRONLY);
-           /* If /dev/null does not exist, it's not MacOS X nor AIX. */
+           /* If /dev/null does not exist, it's not Mac OS X nor AIX. */
            if (ufd.fd >= 0)
              {
                ufd.events = POLLOUT;
@@ -48,7 +48,7 @@
          [gl_cv_func_poll=yes],
          [gl_cv_func_poll=no],
          [# When cross-compiling, assume that poll() works everywhere except on
-          # MacOS X or AIX, regardless of its version.
+          # Mac OS X or AIX, regardless of its version.
           AC_EGREP_CPP([MacOSX], [
 #if (defined(__APPLE__) && defined(__MACH__)) || defined(_AIX)
 This is MacOSX or AIX
--- a/m4/posix_spawn.m4
+++ b/m4/posix_spawn.m4
@@ -1,4 +1,4 @@
-# posix_spawn.m4 serial 10
+# posix_spawn.m4 serial 11
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -499,6 +499,7 @@
       [AC_RUN_IFELSE(
          [AC_LANG_SOURCE([[
 #include <spawn.h>
+#include <fcntl.h>
 int main ()
 {
   posix_spawn_file_actions_t actions;
--- a/m4/powf.m4
+++ b/m4/powf.m4
@@ -1,4 +1,4 @@
-# powf.m4 serial 1
+# powf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_POW])
 
+  dnl Persuade glibc <math.h> to declare powf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether powf() exists. Assume that powf(), if it exists, is
   dnl defined in the same library as pow().
   save_LIBS="$LIBS"
--- a/m4/printf-frexpl.m4
+++ b/m4/printf-frexpl.m4
@@ -1,4 +1,4 @@
-# printf-frexpl.m4 serial 9
+# printf-frexpl.m4 serial 10
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -28,7 +28,7 @@
     AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
       [Define if the frexpl function is available in libc.])
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
   fi
 
@@ -40,7 +40,7 @@
         AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1],
           [Define if the ldexpl function is available in libc.])
         dnl Also check whether it's declared.
-        dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+        dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
         AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
         ;;
     esac
--- a/m4/printf.m4
+++ b/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 48
+# printf.m4 serial 50
 dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -63,7 +63,7 @@
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
-                                 # Guess yes on MacOS X >= 10.3.
+                                 # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
                                  # Guess yes on OpenBSD >= 3.9.
@@ -222,7 +222,7 @@
                                  # Guess yes on FreeBSD >= 6.
            freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
-                                 # Guess yes on MacOS X >= 10.3.
+                                 # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
                                  # Guess yes on HP-UX >= 11.
@@ -507,14 +507,14 @@
   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
       || buf[0] == '0')
     result |= 8;
-  /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
+  /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
   if (sprintf (buf, "%.1a", 1.999) < 0
       || (strcmp (buf, "0x1.0p+1") != 0
           && strcmp (buf, "0x2.0p+0") != 0
           && strcmp (buf, "0x4.0p-1") != 0
           && strcmp (buf, "0x8.0p-2") != 0))
     result |= 16;
-  /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+  /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
      glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
   if (sprintf (buf, "%.1La", 1.999L) < 0
       || (strcmp (buf, "0x1.0p+1") != 0
@@ -590,7 +590,7 @@
                                  # Guess yes on FreeBSD >= 6.
            freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
-                                 # Guess yes on MacOS X >= 10.3.
+                                 # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
                                  # Guess yes on Solaris >= 2.10.
@@ -1028,8 +1028,9 @@
 changequote([,])dnl
           ])])
           if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-            (./conftest
+            (./conftest 2>&AS_MESSAGE_LOG_FD
              result=$?
+             _AS_ECHO_LOG([\$? = $result])
              if test $result != 0 && test $result != 77; then result=1; fi
              exit $result
             ) >/dev/null 2>/dev/null
@@ -1043,7 +1044,7 @@
           fi
           rm -fr conftest*
         else
-          dnl A universal build on Apple MacOS X platforms.
+          dnl A universal build on Apple Mac OS X platforms.
           dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
           dnl But we need a configuration result that is valid in both modes.
           gl_cv_func_printf_enomem="guessing no"
@@ -1137,7 +1138,7 @@
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4]*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
-                                 # Guess yes on MacOS X >= 10.3.
+                                 # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
            darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess yes on OpenBSD >= 3.9.
@@ -1236,7 +1237,7 @@
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
-                                 # Guess yes on MacOS X >= 10.3.
+                                 # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # Guess yes on OpenBSD >= 3.9.
@@ -1317,7 +1318,7 @@
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4]*)        gl_cv_func_snprintf_directive_n="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
-                                 # Guess yes on MacOS X >= 10.3.
+                                 # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_snprintf_directive_n="guessing no";;
            darwin*)              gl_cv_func_snprintf_directive_n="guessing yes";;
                                  # Guess yes on Solaris >= 2.6.
@@ -1459,7 +1460,7 @@
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4]*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                                 # Guess yes on MacOS X >= 10.3.
+                                 # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
            darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on Cygwin.
@@ -1539,8 +1540,8 @@
 dnl   glibc 2.5                      .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
 dnl   glibc 2.3.6                    .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
 dnl   FreeBSD 5.4, 6.1               .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
-dnl   MacOS X 10.5.8                 .  .  .  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
-dnl   MacOS X 10.3.9                 .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   Mac OS X 10.5.8                .  .  .  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   Mac OS X 10.3.9                .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
 dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  #  .  #  .  #  .  #  .  .  .  .  .  .
 dnl   Cygwin 1.7.0 (2009)            .  .  .  #  .  .  .  ?  .  .  .  .  .  ?  .  .  .  .  .  .
 dnl   Cygwin 1.5.25 (2008)           .  .  .  #  #  .  .  #  .  .  .  .  .  #  .  .  .  .  .  .
--- a/m4/priv-set.m4
+++ b/m4/priv-set.m4
@@ -1,4 +1,4 @@
-# serial 7
+# serial 8
 
 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
@@ -10,7 +10,6 @@
 
 AC_DEFUN([gl_PRIV_SET],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_FUNCS([getppriv])
   AC_CHECK_HEADERS_ONCE([priv.h])
 ])
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,4 +1,4 @@
-# pselect.m4
+# pselect.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,44 @@
                 return !p;]])],
          [gl_cv_sig_pselect=yes],
          [gl_cv_sig_pselect=no])])
+
+    dnl On FreeBSD 8.2, pselect() doesn't always reject bad fds.
+    AC_CACHE_CHECK([whether pselect detects invalid fds],
+      [gl_cv_func_pselect_detects_ebadf],
+      [
+        AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
+]],[[
+  fd_set set;
+  dup2(0, 16);
+  FD_ZERO(&set);
+  FD_SET(16, &set);
+  close(16);
+  struct timespec timeout;
+  timeout.tv_sec = 0;
+  timeout.tv_nsec = 5000;
+  return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
+]])], [gl_cv_func_pselect_detects_ebadf=yes],
+      [gl_cv_func_pselect_detects_ebadf=no],
+          [
+           case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_pselect_detects_ebadf="guessing no" ;;
+           esac
+          ])
+      ])
+    case $gl_cv_func_pselect_detects_ebadf in
+      *yes) ;;
+      *) REPLACE_PSELECT=1 ;;
+    esac
   fi
 
   if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
--- a/m4/pthread.m4
+++ b/m4/pthread.m4
@@ -1,4 +1,4 @@
-# pthread.m4 serial 3
+# pthread.m4 serial 7
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,6 +30,7 @@
       test $ac_cv_type_pthread_t != yes ||
       test $ac_cv_type_pthread_spinlock_t != yes; then
      PTHREAD_H='pthread.h'
+     AC_LIBOBJ([pthread])
    else
      PTHREAD_H=
    fi
@@ -41,32 +42,37 @@
      dnl We cannot use AC_SEARCH_LIBS here, because on OSF/1 5.1 pthread_join
      dnl is defined as a macro which expands to __phread_join, and libpthread
      dnl contains a definition for __phread_join but none for pthread_join.
-     AC_CACHE_CHECK([for library containing pthread_join],
-       [gl_cv_search_pthread_join],
-       [gl_saved_libs="$LIBS"
-        gl_cv_search_pthread_join=
-        AC_LINK_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[#include <pthread.h>]],
-             [[pthread_join (pthread_self (), (void **) 0);]])],
-          [gl_cv_search_pthread_join="none required"])
-        if test -z "$gl_cv_search_pthread_join"; then
-          LIBS="-lpthread $gl_saved_libs"
+     dnl Also, FreeBSD 9 puts pthread_create in libpthread and pthread_join
+     dnl in libc, whereas on IRIX 6.5 the reverse is true; so check for both.
+     AC_CACHE_CHECK([for library containing pthread_create and pthread_join],
+       [gl_cv_lib_pthread],
+       [gl_saved_libs=$LIBS
+        gl_cv_lib_pthread=
+        for gl_lib_prefix in '' '-lpthread'; do
+          LIBS="$gl_lib_prefix $gl_saved_libs"
           AC_LINK_IFELSE(
             [AC_LANG_PROGRAM(
-               [[#include <pthread.h>]],
-               [[pthread_join (pthread_self (), (void **) 0);]])],
-            [gl_cv_search_pthread_join="-lpthread"])
-        fi
+               [[#include <pthread.h>
+                 void *noop (void *p) { return p; }]],
+               [[pthread_t pt;
+                 void *arg = 0;
+                 pthread_create (&pt, 0, noop, arg);
+                 pthread_join (pthread_self (), &arg);]])],
+            [if test -z "$gl_lib_prefix"; then
+               gl_cv_lib_pthread="none required"
+             else
+               gl_cv_lib_pthread=$gl_lib_prefix
+             fi])
+          test -n "$gl_cv_lib_pthread" && break
+        done
         LIBS="$gl_saved_libs"
        ])
-     if test "$gl_cv_search_pthread_join" != "none required"; then
-       LIB_PTHREAD="$gl_cv_search_pthread_join"
+     if test "$gl_cv_lib_pthread" != "none required"; then
+       LIB_PTHREAD="$gl_cv_lib_pthread"
      fi
    fi
    AC_SUBST([LIB_PTHREAD])
 
-   AC_REQUIRE([AC_C_INLINE])
    AC_REQUIRE([AC_C_RESTRICT])
 ])
 
--- a/m4/ptsname.m4
+++ b/m4/ptsname.m4
@@ -1,4 +1,4 @@
-# ptsname.m4 serial 2
+# ptsname.m4 serial 3
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,26 @@
   AC_CHECK_FUNCS([ptsname])
   if test $ac_cv_func_ptsname = no; then
     HAVE_PTSNAME=0
+  else
+    AC_CACHE_CHECK([whether ptsname sets errno on failure],
+      [gl_cv_func_ptsname_sets_errno],
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM([[#include <errno.h>
+      ]], [[
+      return ptsname (-1) || !errno;
+           ]])],
+         [gl_cv_func_ptsname_sets_errno=yes],
+         [gl_cv_func_ptsname_sets_errno=no],
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_ptsname_sets_errno="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_ptsname_sets_errno="guessing no" ;;
+          esac
+         ])])
+    case $gl_cv_func_ptsname_sets_errno in
+      *no) REPLACE_PTSNAME=1 ;;
+    esac
   fi
 ])
 
--- a/m4/ptsname_r.m4
+++ b/m4/ptsname_r.m4
@@ -1,4 +1,4 @@
-# ptsname_r.m4 serial 2
+# ptsname_r.m4 serial 3
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -46,5 +46,38 @@
 
 # Prerequisites of lib/ptsname.c.
 AC_DEFUN([gl_PREREQ_PTSNAME_R], [
-  :
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether isatty sets errno when it fails],
+    [gl_cv_func_isatty_sets_errno],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <errno.h>
+            #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+            # include <io.h>
+            #else
+            # include <unistd.h>
+            #endif
+          ]],
+          [[errno = 0;
+            isatty (-1);
+            return errno == 0;
+          ]])
+       ],
+       [gl_cv_func_isatty_sets_errno=yes],
+       [gl_cv_func_isatty_sets_errno=no],
+       [case "$host_os" in
+          irix* | solaris* | mingw*)
+            gl_cv_func_isatty_sets_errno="guessing no";;
+          *)
+            gl_cv_func_isatty_sets_errno="guessing yes";;
+        esac
+       ])
+    ])
+  case "$gl_cv_func_isatty_sets_errno" in
+    *yes) ;;
+    *)
+      AC_DEFINE([ISATTY_FAILS_WITHOUT_SETTING_ERRNO], [1],
+        [Define to 1 if isatty() may fail without setting errno.])
+      ;;
+  esac
 ])
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,4 +1,4 @@
-# putenv.m4 serial 18
+# putenv.m4 serial 19
 dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,7 @@
 AC_DEFUN([gl_FUNC_PUTENV],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
    [gl_cv_func_svid_putenv],
    [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
@@ -32,9 +33,18 @@
              gl_cv_func_svid_putenv=yes,
              gl_cv_func_svid_putenv=no,
              dnl When crosscompiling, assume putenv is broken.
-             gl_cv_func_svid_putenv=no)
+             [case "$host_os" in
+                        # Guess yes on glibc systems.
+                *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+                        # If we don't know, assume the worst.
+                *)      gl_cv_func_svid_putenv="guessing no" ;;
+              esac
+             ])
    ])
-  if test $gl_cv_func_svid_putenv = no; then
-    REPLACE_PUTENV=1
-  fi
+  case "$gl_cv_func_svid_putenv" in
+    *yes) ;;
+    *)
+      REPLACE_PUTENV=1
+      ;;
+  esac
 ])
--- a/m4/pwrite.m4
+++ b/m4/pwrite.m4
@@ -1,4 +1,4 @@
-# pwrite.m4 serial 4
+# pwrite.m4 serial 5
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -82,10 +82,6 @@
       return 13;
   }
   return 0;
-}
-
-
-  return 0;
 }]])],
           [gl_cv_func_pwrite_works=yes],
           [gl_cv_func_pwrite_works=no],
--- a/m4/raise.m4
+++ b/m4/raise.m4
@@ -1,4 +1,4 @@
-# raise.m4 serial 2
+# raise.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -31,6 +31,4 @@
 ])
 
 # Prerequisites of lib/raise.c.
-AC_DEFUN([gl_PREREQ_RAISE], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_RAISE], [:])
new file mode 100644
--- /dev/null
+++ b/m4/random.m4
@@ -0,0 +1,20 @@
+# random.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RANDOM],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+  AC_CHECK_FUNCS([random])
+  if test $ac_cv_func_random = no; then
+    HAVE_RANDOM=0
+  fi
+])
+
+# Prerequisites of lib/random.c.
+AC_DEFUN([gl_PREREQ_RANDOM], [
+  :
+])
--- a/m4/random_r.m4
+++ b/m4/random_r.m4
@@ -1,4 +1,4 @@
-# serial 4
+# serial 5
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_FUNC_RANDOM_R],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
 
   AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
   if test $ac_cv_header_random_h = no; then
@@ -21,10 +22,19 @@
       #endif
     ]])
 
-  AC_CHECK_FUNCS([random_r])
-  if test $ac_cv_func_random_r = no; then
-    HAVE_RANDOM_R=0
-  fi
+  dnl On AIX and OSF/1, these functions exist, but with different declarations.
+  dnl Override them all.
+  case "$host_os" in
+    aix* | osf*)
+      REPLACE_RANDOM_R=1
+      ;;
+    *)
+      AC_CHECK_FUNCS([random_r])
+      if test $ac_cv_func_random_r = no; then
+        HAVE_RANDOM_R=0
+      fi
+      ;;
+  esac
 ])
 
 # Prerequisites of lib/random_r.c.
--- a/m4/read.m4
+++ b/m4/read.m4
@@ -1,4 +1,4 @@
-# read.m4 serial 3
+# read.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -23,7 +23,4 @@
 ])
 
 # Prerequisites of lib/read.c.
-AC_DEFUN([gl_PREREQ_READ],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_READ], [:])
--- a/m4/readline.m4
+++ b/m4/readline.m4
@@ -1,4 +1,4 @@
-# readline.m4 serial 9
+# readline.m4 serial 10
 dnl Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,7 @@
     am_save_LIBS="$LIBS"
     dnl On some systems, -lreadline doesn't link without an additional
     dnl -lncurses or -ltermcap.
-    dnl Try -lncurses before -ltermcap, because libtermcap is unsecure
+    dnl Try -lncurses before -ltermcap, because libtermcap is insecure
     dnl by design and obsolete since 1994. Try -lcurses last, because
     dnl libcurses is unusable on some old Unices.
     for extra_lib in "" ncurses termcap curses; do
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,4 +1,4 @@
-# readlink.m4 serial 11
+# readlink.m4 serial 12
 dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_FUNC_READLINK],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([readlink])
   if test $ac_cv_func_readlink = no; then
     HAVE_READLINK=0
@@ -32,15 +33,26 @@
 ]], [[char buf[20];
       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
          [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
-         [gl_cv_func_readlink_works="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_readlink_works="guessing no" ;;
+          esac
+         ])
       rm -f conftest.link conftest.lnk2])
-    if test "$gl_cv_func_readlink_works" != yes; then
-      AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
-        fails to recognize a trailing slash.])
-      REPLACE_READLINK=1
-    elif test "$gl_cv_decl_readlink_works" != yes; then
-      REPLACE_READLINK=1
-    fi
+    case "$gl_cv_func_readlink_works" in
+      *yes)
+        if test "$gl_cv_decl_readlink_works" != yes; then
+          REPLACE_READLINK=1
+        fi
+        ;;
+      *)
+        AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
+          fails to recognize a trailing slash.])
+        REPLACE_READLINK=1
+        ;;
+    esac
   fi
 ])
 
--- a/m4/readutmp.m4
+++ b/m4/readutmp.m4
@@ -1,4 +1,4 @@
-# readutmp.m4 serial 19
+# readutmp.m4 serial 20
 dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,6 @@
   AC_CHECK_HEADERS_ONCE([utmp.h utmpx.h])
   if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
     dnl Prerequisites of lib/readutmp.h and lib/readutmp.c.
-    AC_REQUIRE([AC_C_INLINE])
     AC_CHECK_FUNCS_ONCE([utmpname utmpxname])
     AC_CHECK_DECLS([getutent],,,[[
 /* <sys/types.h> is a prerequisite of <utmp.h> on FreeBSD 8.0, OpenBSD 4.6.  */
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,9 +1,47 @@
-# realloc.m4 serial 12
+# realloc.m4 serial 13
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([_AC_FUNC_REALLOC_IF],
+[
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([stdlib.h])
+  AC_CACHE_CHECK([for GNU libc compatible realloc],
+    [ac_cv_func_realloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *realloc ();
+            #endif
+          ]],
+          [[return ! realloc (0, 0);]])
+       ],
+       [ac_cv_func_realloc_0_nonnull=yes],
+       [ac_cv_func_realloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_realloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_realloc_0_nonnull=no ;;
+        esac
+       ])
+    ])
+  AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2])
+])# AC_FUNC_REALLOC
+
+])
+
 # gl_FUNC_REALLOC_GNU
 # -------------------
 # Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-# serial 60
+# serial 61
 
 # Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc.
 #
@@ -175,6 +175,9 @@
   esac
 
   if test $ac_use_included_regex = yes; then
+    AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1],
+      [Define if you want <regex.h> to include <limits.h>, so that it
+       consistently overrides <limits.h>'s RE_DUP_MAX.])
     AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
       [Define if you want regoff_t to be at least as wide POSIX requires.])
     AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
--- a/m4/relocatable-lib.m4
+++ b/m4/relocatable-lib.m4
@@ -45,4 +45,3 @@
   AC_SUBST([RELOCATABLE])
   AC_MSG_RESULT([$RELOCATABLE])
 ])
-
--- a/m4/relocatable.m4
+++ b/m4/relocatable.m4
@@ -1,4 +1,4 @@
-# relocatable.m4 serial 17
+# relocatable.m4 serial 18
 dnl Copyright (C) 2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -41,7 +41,7 @@
     AC_CHECK_FUNCS([_NSGetExecutablePath])
     case "$host_os" in
       mingw*) is_noop=yes ;;
-      linux*) use_elf_origin_trick=yes ;;
+      linux* | kfreebsd*) use_elf_origin_trick=yes ;;
     esac
     if test $is_noop = yes; then
       RELOCATABLE_LDFLAGS=:
new file mode 100644
--- /dev/null
+++ b/m4/remainder-ieee.m4
@@ -0,0 +1,15 @@
+# remainder-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_REMAINDER can test whether 'aclocal'
+dnl has found uses of this macro.
+
+AC_DEFUN([gl_FUNC_REMAINDER_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_remainder_required=ieee])
+  AC_REQUIRE([gl_FUNC_REMAINDER])
+])
new file mode 100644
--- /dev/null
+++ b/m4/remainder.m4
@@ -0,0 +1,135 @@
+# remainder.m4 serial 4
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_REMAINDER],
+[
+  m4_divert_text([DEFAULTS], [gl_remainder_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
+  dnl Test whether remainder() is declared. On IRIX 5.3 it is not declared.
+  AC_CHECK_DECL([remainder], , [HAVE_DECL_REMAINDER=0], [[#include <math.h>]])
+
+  REMAINDER_LIBM=
+  AC_CACHE_CHECK([whether remainder() can be used without linking with libm],
+    [gl_cv_func_remainder_no_libm],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             double x;
+             double y;]],
+           [[return remainder (x, y) > 1;]])],
+        [gl_cv_func_remainder_no_libm=yes],
+        [gl_cv_func_remainder_no_libm=no])
+    ])
+  if test $gl_cv_func_remainder_no_libm = no; then
+    AC_CACHE_CHECK([whether remainder() can be used with libm],
+      [gl_cv_func_remainder_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#ifndef __NO_MATH_INLINES
+               # define __NO_MATH_INLINES 1 /* for glibc */
+               #endif
+               #include <math.h>
+               double x;
+               double y;]],
+             [[return remainder (x, y) > 1;]])],
+          [gl_cv_func_remainder_in_libm=yes],
+          [gl_cv_func_remainder_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_remainder_in_libm = yes; then
+      REMAINDER_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_remainder_no_libm = yes \
+     || test $gl_cv_func_remainder_in_libm = yes; then
+    :
+    m4_ifdef([gl_FUNC_REMAINDER_IEEE], [
+      if test $gl_remainder_required = ieee && test $REPLACE_REMAINDER = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether remainder works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_remainder_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $REMAINDER_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (double x, double y)
+{
+  return x == y;
+}
+static double dummy (double x, double y) { return 0; }
+int main (int argc, char *argv[])
+{
+  double (*my_remainder) (double, double) = argc ? remainder : dummy;
+  double f;
+  /* Test remainder(...,0.0).
+     This test fails on OSF/1 5.1.  */
+  f = my_remainder (2.0, 0.0);
+  if (numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_remainder_ieee=yes],
+              [gl_cv_func_remainder_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_remainder_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_remainder_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_remainder_ieee" in
+          *yes) ;;
+          *) REPLACE_REMAINDER=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_REMAINDER=0
+  fi
+  if test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1; then
+    dnl Find libraries needed to link lib/remainder.c.
+    AC_REQUIRE([gl_FUNC_FABS])
+    AC_REQUIRE([gl_FUNC_FMOD])
+    AC_REQUIRE([gl_FUNC_ISNAND])
+    REMAINDER_LIBM=
+    dnl Append $FABS_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates.
+    case " $REMAINDER_LIBM " in
+      *" $FABS_LIBM "*) ;;
+      *) REMAINDER_LIBM="$REMAINDER_LIBM $FABS_LIBM" ;;
+    esac
+    dnl Append $FMOD_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates.
+    case " $REMAINDER_LIBM " in
+      *" $FMOD_LIBM "*) ;;
+      *) REMAINDER_LIBM="$REMAINDER_LIBM $FMOD_LIBM" ;;
+    esac
+    dnl Append $ISNAND_LIBM to REMAINDER_LIBM, avoiding gratuitous duplicates.
+    case " $REMAINDER_LIBM " in
+      *" $ISNAND_LIBM "*) ;;
+      *) REMAINDER_LIBM="$REMAINDER_LIBM $ISNAND_LIBM" ;;
+    esac
+  fi
+  AC_SUBST([REMAINDER_LIBM])
+])
new file mode 100644
--- /dev/null
+++ b/m4/remainderf-ieee.m4
@@ -0,0 +1,15 @@
+# remainderf-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_REMAINDERF can test whether 'aclocal'
+dnl has found uses of this macro.
+
+AC_DEFUN([gl_FUNC_REMAINDERF_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_remainderf_required=ieee])
+  AC_REQUIRE([gl_FUNC_REMAINDERF])
+])
new file mode 100644
--- /dev/null
+++ b/m4/remainderf.m4
@@ -0,0 +1,190 @@
+# remainderf.m4 serial 7
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_REMAINDERF],
+[
+  m4_divert_text([DEFAULTS], [gl_remainderf_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_REMAINDER])
+
+  dnl Persuade glibc <math.h> to declare remainderf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether remainderf() exists. Assume that remainderf(), if it exists, is
+  dnl defined in the same library as remainder().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $REMAINDER_LIBM"
+  AC_CACHE_CHECK([for remainderf],
+    [gl_cv_func_remainderf],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             float remainderf (float, float);
+             float (*funcptr) (float, float) = remainderf;
+             float x;
+             float y;]],
+           [[return funcptr (x, y) > 1
+                    || remainderf (x, y) > 1;]])],
+        [gl_cv_func_remainderf=yes],
+        [gl_cv_func_remainderf=no])
+    ])
+  LIBS="$save_LIBS"
+  if test $gl_cv_func_remainderf = yes; then
+    REMAINDERF_LIBM="$REMAINDER_LIBM"
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $REMAINDERF_LIBM"
+    gl_FUNC_REMAINDERF_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_remainderf_works" in
+      *yes) ;;
+      *) REPLACE_REMAINDERF=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_REMAINDERF_IEEE], [
+      if test $gl_remainderf_required = ieee && test $REPLACE_REMAINDERF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether remainderf works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_remainderf_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $REMAINDERF_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+float remainderf (float, float);
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (float x, float y)
+{
+  return x == y;
+}
+static float dummy (float x, float y) { return 0; }
+int main (int argc, char *argv[])
+{
+  float (*my_remainderf) (float, float) = argc ? remainderf : dummy;
+  float f;
+  /* Test remainderf(...,0.0f).
+     This test fails on OSF/1 5.1.  */
+  f = my_remainderf (2.0f, 0.0f);
+  if (numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_remainderf_ieee=yes],
+              [gl_cv_func_remainderf_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_remainderf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_remainderf_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_remainderf_ieee" in
+          *yes) ;;
+          *) REPLACE_REMAINDERF=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_REMAINDERF=0
+  fi
+  if test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1; then
+    dnl Find libraries needed to link lib/remainderf.c.
+    if test $gl_cv_func_remainder_no_libm = yes \
+       || test $gl_cv_func_remainder_in_libm = yes; then
+      AC_DEFINE([HAVE_REMAINDER], [1],
+        [Define to 1 if the remainder() function is available in libc or libm.])
+      REMAINDERF_LIBM="$REMAINDER_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_FABSF])
+      AC_REQUIRE([gl_FUNC_FMODF])
+      AC_REQUIRE([gl_FUNC_ISNANF])
+      REMAINDERF_LIBM=
+      dnl Append $FABSF_LIBM to REMAINDERF_LIBM, avoiding gratuitous duplicates.
+      case " $REMAINDERF_LIBM " in
+        *" $FABSF_LIBM "*) ;;
+        *) REMAINDERF_LIBM="$REMAINDERF_LIBM $FABSF_LIBM" ;;
+      esac
+      dnl Append $FMODF_LIBM to REMAINDERF_LIBM, avoiding gratuitous duplicates.
+      case " $REMAINDERF_LIBM " in
+        *" $FMODF_LIBM "*) ;;
+        *) REMAINDERF_LIBM="$REMAINDERF_LIBM $FMODF_LIBM" ;;
+      esac
+      dnl Append $ISNANF_LIBM to REMAINDERF_LIBM, avoiding gratuitous duplicates.
+      case " $REMAINDERF_LIBM " in
+        *" $ISNANF_LIBM "*) ;;
+        *) REMAINDERF_LIBM="$REMAINDERF_LIBM $ISNANF_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([REMAINDERF_LIBM])
+])
+
+dnl Test whether remainderf() works.
+dnl It runs into an endless loop on IRIX 6.5.
+AC_DEFUN([gl_FUNC_REMAINDERF_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CHECK_FUNCS_ONCE([alarm])
+  AC_CACHE_CHECK([whether remainderf works], [gl_cv_func_remainderf_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <math.h>
+#if HAVE_ALARM
+# include <unistd.h>
+#endif
+extern
+#ifdef __cplusplus
+"C"
+#endif
+float remainderf (float, float);
+volatile float x;
+volatile float y;
+float z;
+int main ()
+{
+#if HAVE_ALARM
+  alarm (5);
+#endif
+  /* This test fails on IRIX 6.5.  */
+  x = 9.316161e+37f;
+  y = 0.5475547314f;
+  z = remainderf (x, y);
+  return 0;
+}
+]])],
+        [gl_cv_func_remainderf_works=yes],
+        [gl_cv_func_remainderf_works=no],
+        [case "$host_os" in
+           irix*) gl_cv_func_remainderf_works="guessing no";;
+           *)     gl_cv_func_remainderf_works="guessing yes";;
+         esac
+        ])
+    ])
+])
new file mode 100644
--- /dev/null
+++ b/m4/remainderl-ieee.m4
@@ -0,0 +1,15 @@
+# remainderl-ieee.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in remainderl.m4 and not inlined in the
+dnl module description), so that gl_FUNC_REMAINDER can test whether 'aclocal'
+dnl has found uses of this macro.
+
+AC_DEFUN([gl_FUNC_REMAINDERL_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_remainderl_required=ieee])
+  AC_REQUIRE([gl_FUNC_REMAINDERL])
+])
new file mode 100644
--- /dev/null
+++ b/m4/remainderl.m4
@@ -0,0 +1,191 @@
+# remainderl.m4 serial 7
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_REMAINDERL],
+[
+  m4_divert_text([DEFAULTS], [gl_remainderl_required=plain])
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  AC_REQUIRE([gl_FUNC_REMAINDER])
+
+  dnl Persuade glibc <math.h> to declare remainderl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Test whether remainderl() exists. Assume that remainderl(), if it exists, is
+  dnl defined in the same library as remainder().
+  save_LIBS="$LIBS"
+  LIBS="$LIBS $REMAINDER_LIBM"
+  AC_CACHE_CHECK([for remainderl],
+    [gl_cv_func_remainderl],
+    [
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#ifndef __NO_MATH_INLINES
+             # define __NO_MATH_INLINES 1 /* for glibc */
+             #endif
+             #include <math.h>
+             extern
+             #ifdef __cplusplus
+             "C"
+             #endif
+             long double remainderl (long double, long double);
+             long double (*funcptr) (long double, long double) = remainderl;
+             long double x;
+             long double y;]],
+           [[return funcptr (x, y) > 1
+                    || remainderl (x, y) > 1;]])],
+        [gl_cv_func_remainderl=yes],
+        [gl_cv_func_remainderl=no])
+    ])
+  LIBS="$save_LIBS"
+  if test $gl_cv_func_remainderl = yes; then
+    HAVE_REMAINDERL=1
+    REMAINDERL_LIBM="$REMAINDER_LIBM"
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has remainderl() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECLS([remainderl], , [HAVE_DECL_REMAINDERL=0], [[#include <math.h>]])
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $REMAINDERL_LIBM"
+    gl_FUNC_REMAINDERL_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_remainderl_works" in
+      *yes) ;;
+      *) REPLACE_REMAINDERL=1 ;;
+    esac
+
+    m4_ifdef([gl_FUNC_REMAINDERL_IEEE], [
+      if test $gl_remainderl_required = ieee && test $REPLACE_REMAINDERL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+        AC_CACHE_CHECK([whether remainderl works according to ISO C 99 with IEC 60559],
+          [gl_cv_func_remainderl_ieee],
+          [
+            save_LIBS="$LIBS"
+            LIBS="$LIBS $REMAINDERL_LIBM"
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double remainderl (long double, long double);
+/* Compare two numbers with ==.
+   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+   'x == x' test.  */
+static int
+numeric_equal (long double x, long double y)
+{
+  return x == y;
+}
+static long double dummy (long double x, long double y) { return 0; }
+int main (int argc, char *argv[])
+{
+  long double (*my_remainderl) (long double, long double) = argc ? remainderl : dummy;
+  long double f;
+  /* Test remainderl(...,0.0L).
+     This test fails on OSF/1 5.1.  */
+  f = my_remainderl (2.0L, 0.0L);
+  if (numeric_equal (f, f))
+    return 1;
+  return 0;
+}
+              ]])],
+              [gl_cv_func_remainderl_ieee=yes],
+              [gl_cv_func_remainderl_ieee=no],
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_remainderl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_remainderl_ieee="guessing no" ;;
+               esac
+              ])
+            LIBS="$save_LIBS"
+          ])
+        case "$gl_cv_func_remainderl_ieee" in
+          *yes) ;;
+          *) REPLACE_REMAINDERL=1 ;;
+        esac
+      fi
+    ])
+  else
+    HAVE_REMAINDERL=0
+    HAVE_DECL_REMAINDERL=0
+  fi
+  if test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; then
+    dnl Find libraries needed to link lib/remainderl.c.
+    if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+      REMAINDERL_LIBM="$REMAINDER_LIBM"
+    else
+      AC_REQUIRE([gl_FUNC_FABSL])
+      AC_REQUIRE([gl_FUNC_FMODL])
+      AC_REQUIRE([gl_FUNC_ISNANL])
+      REMAINDERL_LIBM=
+      dnl Append $FABSL_LIBM to REMAINDERL_LIBM, avoiding gratuitous duplicates.
+      case " $REMAINDERL_LIBM " in
+        *" $FABSL_LIBM "*) ;;
+        *) REMAINDERL_LIBM="$REMAINDERL_LIBM $FABSL_LIBM" ;;
+      esac
+      dnl Append $FMODL_LIBM to REMAINDERL_LIBM, avoiding gratuitous duplicates.
+      case " $REMAINDERL_LIBM " in
+        *" $FMODL_LIBM "*) ;;
+        *) REMAINDERL_LIBM="$REMAINDERL_LIBM $FMODL_LIBM" ;;
+      esac
+      dnl Append $ISNANL_LIBM to REMAINDERL_LIBM, avoiding gratuitous duplicates.
+      case " $REMAINDERL_LIBM " in
+        *" $ISNANL_LIBM "*) ;;
+        *) REMAINDERL_LIBM="$REMAINDERL_LIBM $ISNANL_LIBM" ;;
+      esac
+    fi
+  fi
+  AC_SUBST([REMAINDERL_LIBM])
+])
+
+dnl Test whether remainderl() works.
+dnl It produces completely wrong values on OpenBSD 5.1/SPARC.
+AC_DEFUN([gl_FUNC_REMAINDERL_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether remainderl works], [gl_cv_func_remainderl_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#ifndef __NO_MATH_INLINES
+# define __NO_MATH_INLINES 1 /* for glibc */
+#endif
+#include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double remainderl (long double, long double);
+volatile long double x;
+volatile long double y;
+long double z;
+int main ()
+{
+  /* This test fails on OpenBSD 5.1/SPARC.  */
+  x = 9.245907126L;
+  y = 3.141592654L;
+  z = remainderl (x, y);
+  if (z >= 0.0L)
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_remainderl_works=yes],
+        [gl_cv_func_remainderl_works=no],
+        [case "$host_os" in
+           openbsd*) gl_cv_func_remainderl_works="guessing no";;
+           *)        gl_cv_func_remainderl_works="guessing yes";;
+         esac
+        ])
+    ])
+])
--- a/m4/remove.m4
+++ b/m4/remove.m4
@@ -1,4 +1,4 @@
-# remove.m4 serial 3
+# remove.m4 serial 5
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,11 @@
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_RMDIR])
   AC_REQUIRE([gl_FUNC_UNLINK])
-  if test "$gl_cv_func_rmdir_works:$gl_cv_func_unlink_works" != yes:yes; then
+  if { case "$gl_cv_func_rmdir_works:$gl_cv_func_unlink_honors_slashes" in
+         *yes:*yes) false;;
+         *) true;;
+       esac
+     }; then
     dnl If either underlying syscall is broken, then remove likely has
     dnl the same bug; blindly use our replacement.
     REPLACE_REMOVE=1
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,4 +1,4 @@
-# serial 25
+# serial 26
 
 # Copyright (C) 2001, 2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -54,15 +54,24 @@
       [gl_cv_func_rename_slash_dst_works=yes],
       [gl_cv_func_rename_slash_dst_works=no],
       dnl When crosscompiling, assume rename is broken.
-      [gl_cv_func_rename_slash_dst_works="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
+       esac
+      ])
     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
   ])
-  if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
-    REPLACE_RENAME=1
-    AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
-      [Define if rename does not correctly handle slashes on the destination
-       argument, such as on Solaris 10 or NetBSD 1.6.])
-  fi
+  case "$gl_cv_func_rename_slash_dst_works" in
+    *yes) ;;
+    *)
+      REPLACE_RENAME=1
+      AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
+        [Define if rename does not correctly handle slashes on the destination
+         argument, such as on Solaris 10 or NetBSD 1.6.])
+      ;;
+  esac
 
   dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name").
   dnl Solaris 9 mistakenly allows rename("file/","name").
@@ -97,15 +106,24 @@
       [gl_cv_func_rename_slash_src_works=yes],
       [gl_cv_func_rename_slash_src_works=no],
       dnl When crosscompiling, assume rename is broken.
-      [gl_cv_func_rename_slash_src_works="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
+       esac
+      ])
     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
   ])
-  if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
-    REPLACE_RENAME=1
-    AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
-      [Define if rename does not correctly handle slashes on the source
-       argument, such as on Solaris 9 or cygwin 1.5.])
-  fi
+  case "$gl_cv_func_rename_slash_src_works" in
+    *yes) ;;
+    *)
+      REPLACE_RENAME=1
+      AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
+        [Define if rename does not correctly handle slashes on the source
+         argument, such as on Solaris 9 or cygwin 1.5.])
+      ;;
+  esac
 
   dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count
   dnl on rename("h1","h2").
@@ -137,7 +155,13 @@
            [gl_cv_func_rename_link_works=yes],
            [gl_cv_func_rename_link_works=no],
            dnl When crosscompiling, assume rename is broken.
-           [gl_cv_func_rename_link_works="guessing no"])
+           [case "$host_os" in
+                      # Guess yes on glibc systems.
+              *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+                      # If we don't know, assume the worst.
+              *)      gl_cv_func_rename_link_works="guessing no" ;;
+            esac
+           ])
        else
          gl_cv_func_rename_link_works="guessing no"
        fi
@@ -146,12 +170,15 @@
        gl_cv_func_rename_link_works=yes
      fi
     ])
-  if test "x$gl_cv_func_rename_link_works" != xyes; then
-    REPLACE_RENAME=1
-    AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
-      [Define if rename fails to leave hard links alone, as on NetBSD 1.6
-       or Cygwin 1.5.])
-  fi
+  case "$gl_cv_func_rename_link_works" in
+    *yes) ;;
+    *)
+      REPLACE_RENAME=1
+      AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
+        [Define if rename fails to leave hard links alone, as on NetBSD 1.6
+         or Cygwin 1.5.])
+      ;;
+  esac
 
   dnl Cygwin 1.5.x mistakenly allows rename("dir","file").
   dnl mingw mistakenly forbids rename("dir1","dir2").
@@ -177,13 +204,22 @@
       [gl_cv_func_rename_dest_works=yes],
       [gl_cv_func_rename_dest_works=no],
       dnl When crosscompiling, assume rename is broken.
-      [gl_cv_func_rename_dest_works="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_rename_dest_works="guessing no" ;;
+       esac
+      ])
     rm -rf conftest.f conftest.d1 conftest.d2
   ])
-  if test "x$gl_cv_func_rename_dest_works" != xyes; then
-    REPLACE_RENAME=1
-    AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
-      [Define if rename does not work when the destination file exists,
-       as on Cygwin 1.5 or Windows.])
-  fi
+  case "$gl_cv_func_rename_dest_works" in
+    *yes) ;;
+    *)
+      REPLACE_RENAME=1
+      AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
+        [Define if rename does not work when the destination file exists,
+         as on Cygwin 1.5 or Windows.])
+      ;;
+  esac
 ])
--- a/m4/rintf.m4
+++ b/m4/rintf.m4
@@ -1,4 +1,4 @@
-# rintf.m4 serial 2
+# rintf.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,11 +8,26 @@
 [
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
 
+  dnl Persuade glibc <math.h> to declare rintf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Determine RINTF_LIBM.
-  gl_MATHFUNC([rintf], [float], [(float)])
-  if test $gl_cv_func_rintf_no_libm = no \
-     && test $gl_cv_func_rintf_in_libm = no; then
+  gl_MATHFUNC([rintf], [float], [(float)],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     float rintf (float);
+    ])
+  if test $gl_cv_func_rintf_no_libm = yes \
+     || test $gl_cv_func_rintf_in_libm = yes; then
+    HAVE_RINTF=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has rintf() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECLS([rintf], , [HAVE_DECL_RINTF=0], [[#include <math.h>]])
+  else
     HAVE_RINTF=0
+    HAVE_DECL_RINTF=0
     RINTF_LIBM=
   fi
   AC_SUBST([RINTF_LIBM])
--- a/m4/rintl.m4
+++ b/m4/rintl.m4
@@ -1,4 +1,4 @@
-# rintl.m4 serial 3
+# rintl.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
+  dnl Persuade glibc <math.h> to declare rintl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Determine RINTL_LIBM.
   gl_MATHFUNC([rintl], [long double], [(long double)])
   if test $gl_cv_func_rintl_no_libm = no \
--- a/m4/rmdir.m4
+++ b/m4/rmdir.m4
@@ -1,4 +1,4 @@
-# rmdir.m4 serial 12
+# rmdir.m4 serial 13
 dnl Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_FUNC_RMDIR],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   dnl Detect cygwin 1.5.x bug.
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
@@ -31,9 +32,18 @@
       return result;
     ]])],
        [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
-       [gl_cv_func_rmdir_works="guessing no"])
+       [case "$host_os" in
+                  # Guess yes on glibc systems.
+          *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+                  # If we don't know, assume the worst.
+          *)      gl_cv_func_rmdir_works="guessing no" ;;
+        esac
+       ])
      rm -rf conftest.dir conftest.file])
-  if test x"$gl_cv_func_rmdir_works" != xyes; then
-    REPLACE_RMDIR=1
-  fi
+  case "$gl_cv_func_rmdir_works" in
+    *yes) ;;
+    *)
+      REPLACE_RMDIR=1
+      ;;
+  esac
 ])
--- a/m4/round.m4
+++ b/m4/round.m4
@@ -1,4 +1,4 @@
-# round.m4 serial 13
+# round.m4 serial 16
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,23 +8,42 @@
 [
   m4_divert_text([DEFAULTS], [gl_round_required=plain])
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
   dnl Persuade glibc <math.h> to declare round().
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_CHECK_DECLS([round], , , [[#include <math.h>]])
-  if test "$ac_cv_have_decl_round" = yes; then
-    gl_CHECK_MATH_LIB([ROUND_LIBM], [x = round (x);])
-    if test "$ROUND_LIBM" != missing; then
-      dnl Test whether round() produces correct results. On NetBSD 3.0, for
-      dnl x = 1/2 - 2^-54, the system's round() returns a wrong result.
-      AC_REQUIRE([AC_PROG_CC])
-      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-      AC_CACHE_CHECK([whether round works], [gl_cv_func_round_works],
-        [
-          save_LIBS="$LIBS"
-          LIBS="$LIBS $ROUND_LIBM"
-          AC_RUN_IFELSE([AC_LANG_SOURCE([[
+
+  gl_CHECK_MATH_LIB([ROUND_LIBM], [x = round (x);],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     double round (double);
+    ])
+  if test "$ROUND_LIBM" != missing; then
+    HAVE_ROUND=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has round() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECLS([round], , [HAVE_DECL_ROUND=0], [[#include <math.h>]])
+
+    dnl Test whether round() produces correct results. On NetBSD 3.0, for
+    dnl x = 1/2 - 2^-54, the system's round() returns a wrong result.
+    AC_REQUIRE([AC_PROG_CC])
+    AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+    AC_CACHE_CHECK([whether round works], [gl_cv_func_round_works],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS $ROUND_LIBM"
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <float.h>
 #include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+double round (double);
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
 int main()
 {
   /* 2^DBL_MANT_DIG.  */
@@ -40,22 +59,20 @@
   volatile double x = 0.5 - 0.5 / TWO_MANT_DIG;
   exit (x < 0.5 && round (x) != 0.0);
 }]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no],
-          [case "$host_os" in
-             netbsd* | aix*) gl_cv_func_round_works="guessing no";;
-             *)              gl_cv_func_round_works="guessing yes";;
-           esac
-          ])
-          LIBS="$save_LIBS"
+        [case "$host_os" in
+           netbsd* | aix*) gl_cv_func_round_works="guessing no";;
+           *)              gl_cv_func_round_works="guessing yes";;
+         esac
         ])
-      case "$gl_cv_func_round_works" in
-        *no) ROUND_LIBM=missing ;;
-      esac
-    fi
-    if test "$ROUND_LIBM" = missing; then
-      REPLACE_ROUND=1
-    fi
+        LIBS="$save_LIBS"
+      ])
+    case "$gl_cv_func_round_works" in
+      *no) REPLACE_ROUND=1 ;;
+    esac
+
     m4_ifdef([gl_FUNC_ROUND_IEEE], [
       if test $gl_round_required = ieee && test $REPLACE_ROUND = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether round works according to ISO C 99 with IEC 60559],
           [gl_cv_func_round_ieee],
           [
@@ -67,6 +84,11 @@
 # define __NO_MATH_INLINES 1 /* for glibc */
 #endif
 #include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+double round (double);
 ]gl_DOUBLE_MINUS_ZERO_CODE[
 ]gl_DOUBLE_SIGNBIT_CODE[
 static double dummy (double f) { return 0; }
@@ -81,7 +103,13 @@
               ]])],
               [gl_cv_func_round_ieee=yes],
               [gl_cv_func_round_ieee=no],
-              [gl_cv_func_round_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_round_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_round_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_round_ieee" in
@@ -91,9 +119,10 @@
       fi
     ])
   else
+    HAVE_ROUND=0
     HAVE_DECL_ROUND=0
   fi
-  if test $HAVE_DECL_ROUND = 0 || test $REPLACE_ROUND = 1; then
+  if test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1; then
     dnl Find libraries needed to link lib/round.c.
     gl_FUNC_FLOOR_LIBS
     gl_FUNC_CEIL_LIBS
--- a/m4/roundf.m4
+++ b/m4/roundf.m4
@@ -1,4 +1,4 @@
-# roundf.m4 serial 14
+# roundf.m4 serial 17
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,23 +8,42 @@
 [
   m4_divert_text([DEFAULTS], [gl_roundf_required=plain])
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
+
   dnl Persuade glibc <math.h> to declare roundf().
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_CHECK_DECLS([roundf], , , [[#include <math.h>]])
-  if test "$ac_cv_have_decl_roundf" = yes; then
-    gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = roundf (x);])
-    if test "$ROUNDF_LIBM" != missing; then
-      dnl Test whether roundf() produces correct results. On mingw, for
-      dnl x = 1/2 - 2^-25, the system's roundf() returns a wrong result.
-      AC_REQUIRE([AC_PROG_CC])
-      AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-      AC_CACHE_CHECK([whether roundf works], [gl_cv_func_roundf_works],
-        [
-          save_LIBS="$LIBS"
-          LIBS="$LIBS $ROUNDF_LIBM"
-          AC_RUN_IFELSE([AC_LANG_SOURCE([[
+
+  gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = roundf (x);],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     float roundf (float);
+    ])
+  if test "$ROUNDF_LIBM" != missing; then
+    HAVE_ROUNDF=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has roundf() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECLS([roundf], , [HAVE_DECL_ROUNDF=0], [[#include <math.h>]])
+
+    dnl Test whether roundf() produces correct results. On mingw, for
+    dnl x = 1/2 - 2^-25, the system's roundf() returns a wrong result.
+    AC_REQUIRE([AC_PROG_CC])
+    AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+    AC_CACHE_CHECK([whether roundf works], [gl_cv_func_roundf_works],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS $ROUNDF_LIBM"
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <float.h>
 #include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+float roundf (float);
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
 int main()
 {
   /* 2^FLT_MANT_DIG.  */
@@ -37,22 +56,20 @@
   volatile float x = 0.5f - 0.5f / TWO_MANT_DIG;
   exit (x < 0.5f && roundf (x) != 0.0f);
 }]])], [gl_cv_func_roundf_works=yes], [gl_cv_func_roundf_works=no],
-          [case "$host_os" in
-             mingw*) gl_cv_func_roundf_works="guessing no";;
-             *)      gl_cv_func_roundf_works="guessing yes";;
-           esac
-          ])
-          LIBS="$save_LIBS"
+        [case "$host_os" in
+           mingw*) gl_cv_func_roundf_works="guessing no";;
+           *)      gl_cv_func_roundf_works="guessing yes";;
+         esac
         ])
-      case "$gl_cv_func_roundf_works" in
-        *no) ROUNDF_LIBM=missing ;;
-      esac
-    fi
-    if test "$ROUNDF_LIBM" = missing; then
-      REPLACE_ROUNDF=1
-    fi
+        LIBS="$save_LIBS"
+      ])
+    case "$gl_cv_func_roundf_works" in
+      *no) REPLACE_ROUNDF=1 ;;
+    esac
+
     m4_ifdef([gl_FUNC_ROUNDF_IEEE], [
       if test $gl_roundf_required = ieee && test $REPLACE_ROUNDF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether roundf works according to ISO C 99 with IEC 60559],
           [gl_cv_func_roundf_ieee],
           [
@@ -64,6 +81,11 @@
 # define __NO_MATH_INLINES 1 /* for glibc */
 #endif
 #include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+float roundf (float);
 ]gl_FLOAT_MINUS_ZERO_CODE[
 ]gl_FLOAT_SIGNBIT_CODE[
 static float dummy (float f) { return 0; }
@@ -82,7 +104,13 @@
               ]])],
               [gl_cv_func_roundf_ieee=yes],
               [gl_cv_func_roundf_ieee=no],
-              [gl_cv_func_roundf_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_roundf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_roundf_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_roundf_ieee" in
@@ -92,9 +120,10 @@
       fi
     ])
   else
+    HAVE_ROUNDF=0
     HAVE_DECL_ROUNDF=0
   fi
-  if test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1; then
+  if test $HAVE_ROUNDF = 0 || test $REPLACE_ROUNDF = 1; then
     dnl Find libraries needed to link lib/roundf.c.
     AC_CHECK_DECLS([ceilf, floorf], , , [[#include <math.h>]])
     if test "$ac_cv_have_decl_floorf" = yes \
--- a/m4/roundl.m4
+++ b/m4/roundl.m4
@@ -1,4 +1,4 @@
-# roundl.m4 serial 13
+# roundl.m4 serial 15
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,14 +13,22 @@
   dnl Persuade glibc <math.h> to declare roundl().
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
-  AC_CHECK_DECLS([roundl], , , [[#include <math.h>]])
-  if test "$ac_cv_have_decl_roundl" = yes; then
-    gl_CHECK_MATH_LIB([ROUNDL_LIBM], [x = roundl (x);])
-    if test "$ROUNDL_LIBM" = missing; then
-      REPLACE_ROUNDL=1
-    fi
+  gl_CHECK_MATH_LIB([ROUNDL_LIBM], [x = roundl (x);],
+    [extern
+     #ifdef __cplusplus
+     "C"
+     #endif
+     long double roundl (long double);
+    ])
+  if test "$ROUNDL_LIBM" != missing; then
+    HAVE_ROUNDL=1
+    dnl Also check whether it's declared.
+    dnl IRIX 6.5 has roundl() in libm but doesn't declare it in <math.h>.
+    AC_CHECK_DECLS([roundl], , [HAVE_DECL_ROUNDL=0], [[#include <math.h>]])
+
     m4_ifdef([gl_FUNC_ROUNDL_IEEE], [
       if test $gl_roundl_required = ieee && test $REPLACE_ROUNDL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether roundl works according to ISO C 99 with IEC 60559],
           [gl_cv_func_roundl_ieee],
           [
@@ -32,6 +40,11 @@
 # define __NO_MATH_INLINES 1 /* for glibc */
 #endif
 #include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double roundl (long double);
 ]gl_LONG_DOUBLE_MINUS_ZERO_CODE[
 ]gl_LONG_DOUBLE_SIGNBIT_CODE[
 static long double dummy (long double f) { return 0; }
@@ -50,7 +63,13 @@
               ]])],
               [gl_cv_func_roundl_ieee=yes],
               [gl_cv_func_roundl_ieee=no],
-              [gl_cv_func_roundl_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_roundl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_roundl_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_roundl_ieee" in
@@ -60,9 +79,10 @@
       fi
     ])
   else
+    HAVE_ROUNDL=0
     HAVE_DECL_ROUNDL=0
   fi
-  if test $HAVE_DECL_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; then
+  if test $HAVE_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; then
     dnl Find libraries needed to link lib/roundl.c.
     if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
       AC_REQUIRE([gl_FUNC_ROUND])
--- a/m4/savewd.m4
+++ b/m4/savewd.m4
@@ -5,5 +5,4 @@
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_SAVEWD],
-  [AC_REQUIRE([AC_C_INLINE])])
+AC_DEFUN([gl_SAVEWD], [:])
--- a/m4/select.m4
+++ b/m4/select.m4
@@ -1,4 +1,4 @@
-# select.m4 serial 6
+# select.m4 serial 7
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -46,6 +46,44 @@
       *yes) ;;
       *) REPLACE_SELECT=1 ;;
     esac
+
+    dnl On FreeBSD 8.2, select() doesn't always reject bad fds.
+    AC_CACHE_CHECK([whether select detects invalid fds],
+      [gl_cv_func_select_detects_ebadf],
+      [
+        AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
+]],[[
+  fd_set set;
+  dup2(0, 16);
+  FD_ZERO(&set);
+  FD_SET(16, &set);
+  close(16);
+  struct timeval timeout;
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 5;
+  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
+]])], [gl_cv_func_select_detects_ebadf=yes],
+      [gl_cv_func_select_detects_ebadf=no],
+          [
+           case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_select_detects_ebadf="guessing no" ;;
+           esac
+          ])
+      ])
+    case $gl_cv_func_select_detects_ebadf in
+      *yes) ;;
+      *) REPLACE_SELECT=1 ;;
+    esac
   fi
 
   dnl Determine the needed libraries.
--- a/m4/setenv.m4
+++ b/m4/setenv.m4
@@ -1,4 +1,4 @@
-# setenv.m4 serial 25
+# setenv.m4 serial 26
 dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_FUNC_SETENV],
 [
   AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   if test $ac_cv_func_setenv = no; then
     HAVE_SETENV=0
   else
@@ -33,10 +34,19 @@
        return result;
       ]])],
       [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
-      [gl_cv_func_setenv_works="guessing no"])])
-    if test "$gl_cv_func_setenv_works" != yes; then
-      REPLACE_SETENV=1
-    fi
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_setenv_works="guessing no" ;;
+       esac
+      ])])
+    case "$gl_cv_func_setenv_works" in
+      *yes) ;;
+      *)
+        REPLACE_SETENV=1
+        ;;
+    esac
   fi
 ])
 
@@ -56,6 +66,7 @@
 AC_DEFUN([gl_FUNC_UNSETENV],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_DECLS_ONCE([unsetenv])
   if test $ac_cv_have_decl_unsetenv = no; then
     HAVE_DECL_UNSETENV=0
@@ -115,10 +126,19 @@
        if (getenv ("a")) return 6;
       ]])],
       [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
-      [gl_cv_func_unsetenv_works="guessing no"])])
-    if test "$gl_cv_func_unsetenv_works" != yes; then
-      REPLACE_UNSETENV=1
-    fi
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_unsetenv_works="guessing no" ;;
+       esac
+      ])])
+    case "$gl_cv_func_unsetenv_works" in
+      *yes) ;;
+      *)
+        REPLACE_UNSETENV=1
+        ;;
+    esac
   fi
 ])
 
--- a/m4/sha1.m4
+++ b/m4/sha1.m4
@@ -1,4 +1,4 @@
-# sha1.m4 serial 10
+# sha1.m4 serial 11
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@
 [
   dnl Prerequisites of lib/sha1.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])
--- a/m4/sha256.m4
+++ b/m4/sha256.m4
@@ -1,4 +1,4 @@
-# sha256.m4 serial 5
+# sha256.m4 serial 6
 dnl Copyright (C) 2005, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,5 +8,4 @@
 [
   dnl Prerequisites of lib/sha256.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
 ])
--- a/m4/sha512.m4
+++ b/m4/sha512.m4
@@ -1,4 +1,4 @@
-# sha512.m4 serial 6
+# sha512.m4 serial 7
 dnl Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,5 +8,4 @@
 [
   dnl Prerequisites of lib/sha512.c.
   AC_REQUIRE([gl_BIGENDIAN])
-  AC_REQUIRE([AC_C_INLINE])
 ])
--- a/m4/sig_atomic_t.m4
+++ b/m4/sig_atomic_t.m4
@@ -1,4 +1,4 @@
-# sig_atomic_t.m4 serial 2
+# sig_atomic_t.m4 serial 3
 dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,6 @@
   AC_CHECK_TYPES([sig_atomic_t], ,
     [AC_DEFINE([sig_atomic_t], [int],
        [Define as an integer type suitable for memory locations that can be
-        accessed atomically even in the presence of asynchnonous signals.])],
+        accessed atomically even in the presence of asynchronous signals.])],
     [#include <signal.h>])
 ])
--- a/m4/sigaction.m4
+++ b/m4/sigaction.m4
@@ -1,4 +1,4 @@
-# sigaction.m4 serial 6
+# sigaction.m4 serial 7
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -37,7 +37,4 @@
 ])
 
 # Prerequisites of lib/sig-handler.h.
-AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [:])
--- a/m4/signalblocking.m4
+++ b/m4/signalblocking.m4
@@ -1,4 +1,4 @@
-# signalblocking.m4 serial 13
+# signalblocking.m4 serial 14
 dnl Copyright (C) 2001-2002, 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,4 @@
 ])
 
 # Prerequisites of lib/sigprocmask.c.
-AC_DEFUN([gl_PREREQ_SIGPROCMASK], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
--- a/m4/signbit.m4
+++ b/m4/signbit.m4
@@ -1,4 +1,4 @@
-# signbit.m4 serial 11
+# signbit.m4 serial 13
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_SIGNBIT],
 [
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit],
     [
       AC_RUN_IFELSE(
@@ -27,7 +28,13 @@
 ])],
         [gl_cv_func_signbit=yes],
         [gl_cv_func_signbit=no],
-        [gl_cv_func_signbit="guessing no"])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_signbit="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_signbit="guessing no" ;;
+         esac
+        ])
     ])
   dnl GCC 4.0 and newer provides three built-ins for signbit.
   dnl They can be used without warnings, also in C++, regardless of <math.h>.
@@ -50,87 +57,99 @@
 ])],
         [gl_cv_func_signbit_gcc=yes],
         [gl_cv_func_signbit_gcc=no],
-        [gl_cv_func_signbit_gcc="guessing no"])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_signbit_gcc="guessing no" ;;
+         esac
+        ])
     ])
   dnl Use the compiler built-ins whenever possible, because they are more
   dnl efficient than the system library functions (if they exist).
-  if test "$gl_cv_func_signbit_gcc" = yes; then
-    REPLACE_SIGNBIT_USING_GCC=1
-  else
-    if test "$gl_cv_func_signbit" != yes; then
-      dnl REPLACE_SIGNBIT=1 makes sure the signbit[fdl] functions get built.
-      REPLACE_SIGNBIT=1
-      gl_FLOAT_SIGN_LOCATION
-      gl_DOUBLE_SIGN_LOCATION
-      gl_LONG_DOUBLE_SIGN_LOCATION
-      if test "$gl_cv_cc_float_signbit" = unknown; then
-        dnl Test whether copysignf() is declared.
-        AC_CHECK_DECLS([copysignf], , , [[#include <math.h>]])
-        if test "$ac_cv_have_decl_copysignf" = yes; then
-          dnl Test whether copysignf() can be used without libm.
-          AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
-            [gl_cv_func_copysignf_no_libm],
-            [
-              AC_LINK_IFELSE(
-                [AC_LANG_PROGRAM(
-                   [[#include <math.h>
-                     float x, y;]],
-                   [[return copysignf (x, y) < 0;]])],
-                [gl_cv_func_copysignf_no_libm=yes],
-                [gl_cv_func_copysignf_no_libm=no])
-            ])
-          if test $gl_cv_func_copysignf_no_libm = yes; then
-            AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
-              [Define if the copysignf function is declared in <math.h> and available in libc.])
+  case "$gl_cv_func_signbit_gcc" in
+    *yes)
+      REPLACE_SIGNBIT_USING_GCC=1
+      ;;
+    *)
+      case "$gl_cv_func_signbit" in
+        *yes) ;;
+        *)
+          dnl REPLACE_SIGNBIT=1 makes sure the signbit[fdl] functions get built.
+          REPLACE_SIGNBIT=1
+          gl_FLOAT_SIGN_LOCATION
+          gl_DOUBLE_SIGN_LOCATION
+          gl_LONG_DOUBLE_SIGN_LOCATION
+          if test "$gl_cv_cc_float_signbit" = unknown; then
+            dnl Test whether copysignf() is declared.
+            AC_CHECK_DECLS([copysignf], , , [[#include <math.h>]])
+            if test "$ac_cv_have_decl_copysignf" = yes; then
+              dnl Test whether copysignf() can be used without libm.
+              AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
+                [gl_cv_func_copysignf_no_libm],
+                [
+                  AC_LINK_IFELSE(
+                    [AC_LANG_PROGRAM(
+                       [[#include <math.h>
+                         float x, y;]],
+                       [[return copysignf (x, y) < 0;]])],
+                    [gl_cv_func_copysignf_no_libm=yes],
+                    [gl_cv_func_copysignf_no_libm=no])
+                ])
+              if test $gl_cv_func_copysignf_no_libm = yes; then
+                AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
+                  [Define if the copysignf function is declared in <math.h> and available in libc.])
+              fi
+            fi
           fi
-        fi
-      fi
-      if test "$gl_cv_cc_double_signbit" = unknown; then
-        dnl Test whether copysign() is declared.
-        AC_CHECK_DECLS([copysign], , , [[#include <math.h>]])
-        if test "$ac_cv_have_decl_copysign" = yes; then
-          dnl Test whether copysign() can be used without libm.
-          AC_CACHE_CHECK([whether copysign can be used without linking with libm],
-            [gl_cv_func_copysign_no_libm],
-            [
-              AC_LINK_IFELSE(
-                [AC_LANG_PROGRAM(
-                   [[#include <math.h>
-                     double x, y;]],
-                   [[return copysign (x, y) < 0;]])],
-                [gl_cv_func_copysign_no_libm=yes],
-                [gl_cv_func_copysign_no_libm=no])
-            ])
-          if test $gl_cv_func_copysign_no_libm = yes; then
-            AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
-              [Define if the copysign function is declared in <math.h> and available in libc.])
+          if test "$gl_cv_cc_double_signbit" = unknown; then
+            dnl Test whether copysign() is declared.
+            AC_CHECK_DECLS([copysign], , , [[#include <math.h>]])
+            if test "$ac_cv_have_decl_copysign" = yes; then
+              dnl Test whether copysign() can be used without libm.
+              AC_CACHE_CHECK([whether copysign can be used without linking with libm],
+                [gl_cv_func_copysign_no_libm],
+                [
+                  AC_LINK_IFELSE(
+                    [AC_LANG_PROGRAM(
+                       [[#include <math.h>
+                         double x, y;]],
+                       [[return copysign (x, y) < 0;]])],
+                    [gl_cv_func_copysign_no_libm=yes],
+                    [gl_cv_func_copysign_no_libm=no])
+                ])
+              if test $gl_cv_func_copysign_no_libm = yes; then
+                AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
+                  [Define if the copysign function is declared in <math.h> and available in libc.])
+              fi
+            fi
           fi
-        fi
-      fi
-      if test "$gl_cv_cc_long_double_signbit" = unknown; then
-        dnl Test whether copysignl() is declared.
-        AC_CHECK_DECLS([copysignl], , , [[#include <math.h>]])
-        if test "$ac_cv_have_decl_copysignl" = yes; then
-          dnl Test whether copysignl() can be used without libm.
-          AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
-            [gl_cv_func_copysignl_no_libm],
-            [
-              AC_LINK_IFELSE(
-                [AC_LANG_PROGRAM(
-                   [[#include <math.h>
-                     long double x, y;]],
-                   [[return copysignl (x, y) < 0;]])],
-                [gl_cv_func_copysignl_no_libm=yes],
-                [gl_cv_func_copysignl_no_libm=no])
-            ])
-          if test $gl_cv_func_copysignl_no_libm = yes; then
-            AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
-              [Define if the copysignl function is declared in <math.h> and available in libc.])
+          if test "$gl_cv_cc_long_double_signbit" = unknown; then
+            dnl Test whether copysignl() is declared.
+            AC_CHECK_DECLS([copysignl], , , [[#include <math.h>]])
+            if test "$ac_cv_have_decl_copysignl" = yes; then
+              dnl Test whether copysignl() can be used without libm.
+              AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
+                [gl_cv_func_copysignl_no_libm],
+                [
+                  AC_LINK_IFELSE(
+                    [AC_LANG_PROGRAM(
+                       [[#include <math.h>
+                         long double x, y;]],
+                       [[return copysignl (x, y) < 0;]])],
+                    [gl_cv_func_copysignl_no_libm=yes],
+                    [gl_cv_func_copysignl_no_libm=no])
+                ])
+              if test $gl_cv_func_copysignl_no_libm = yes; then
+                AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
+                  [Define if the copysignl function is declared in <math.h> and available in libc.])
+              fi
+            fi
           fi
-        fi
-      fi
-    fi
-  fi
+          ;;
+      esac
+      ;;
+  esac
 ])
 
 AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[
@@ -151,7 +170,7 @@
 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
    So we use another constant expression instead.
    But that expression does not work on other platforms, such as when
-   cross-compiling to PowerPC on MacOS X 10.5.  */
+   cross-compiling to PowerPC on Mac OS X 10.5.  */
 long double p0l = 0.0L;
 #if defined __hpux || defined __sgi
 long double m0l = -LDBL_MIN * LDBL_MIN;
--- a/m4/sinf.m4
+++ b/m4/sinf.m4
@@ -1,4 +1,4 @@
-# sinf.m4 serial 1
+# sinf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_SIN])
 
+  dnl Persuade glibc <math.h> to declare sinf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether sinf() exists. Assume that sinf(), if it exists, is
   dnl defined in the same library as sin().
   save_LIBS="$LIBS"
--- a/m4/sinhf.m4
+++ b/m4/sinhf.m4
@@ -1,4 +1,4 @@
-# sinhf.m4 serial 1
+# sinhf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_SINH])
 
+  dnl Persuade glibc <math.h> to declare sinhf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether sinhf() exists. Assume that sinhf(), if it exists, is
   dnl defined in the same library as sinh().
   save_LIBS="$LIBS"
--- a/m4/sinl.m4
+++ b/m4/sinl.m4
@@ -1,4 +1,4 @@
-# sinl.m4 serial 6
+# sinl.m4 serial 8
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = sinl;
              long double x;]],
-           [[return sinl (x) > 0.4;]])],
+           [[return funcptr (x) > 0.4
+                    || sinl (x) > 0.4;]])],
         [gl_cv_func_sinl_no_libm=yes],
         [gl_cv_func_sinl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = sinl;
                long double x;]],
-             [[return sinl (x) > 0.4;]])],
+             [[return funcptr (x) > 0.4
+                      || sinl (x) > 0.4;]])],
           [gl_cv_func_sinl_in_libm=yes],
           [gl_cv_func_sinl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,7 +56,7 @@
   if test $gl_cv_func_sinl_no_libm = yes \
      || test $gl_cv_func_sinl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has sinl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has sinl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([sinl], , [HAVE_DECL_SINL=0], [[#include <math.h>]])
   else
     HAVE_DECL_SINL=0
--- a/m4/sleep.m4
+++ b/m4/sleep.m4
@@ -1,4 +1,4 @@
-# sleep.m4 serial 6
+# sleep.m4 serial 7
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN([gl_FUNC_SLEEP],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   dnl We expect to see the declaration of sleep() in a header file.
   dnl Older versions of mingw have a sleep() function that is an alias to
   dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep():
@@ -44,9 +45,18 @@
     return 0;
     ]])],
       [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
-      [gl_cv_func_sleep_works="guessing no"])])
-    if test "$gl_cv_func_sleep_works" != yes; then
-      REPLACE_SLEEP=1
-    fi
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_sleep_works="guessing no" ;;
+       esac
+      ])])
+    case "$gl_cv_func_sleep_works" in
+      *yes) ;;
+      *)
+        REPLACE_SLEEP=1
+        ;;
+    esac
   fi
 ])
--- a/m4/spawn-pipe.m4
+++ b/m4/spawn-pipe.m4
@@ -1,4 +1,4 @@
-# spawn-pipe.m4 serial 1
+# spawn-pipe.m4 serial 2
 dnl Copyright (C) 2004, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,5 @@
 AC_DEFUN([gl_SPAWN_PIPE],
 [
   dnl Prerequisites of lib/spawn-pipe.c.
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_TYPE_MODE_T])
 ])
--- a/m4/sqrtf.m4
+++ b/m4/sqrtf.m4
@@ -1,4 +1,4 @@
-# sqrtf.m4 serial 1
+# sqrtf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_SQRT])
 
+  dnl Persuade glibc <math.h> to declare sqrtf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether sqrtf() exists. Assume that sqrtf(), if it exists, is
   dnl defined in the same library as sqrt().
   save_LIBS="$LIBS"
--- a/m4/sqrtl.m4
+++ b/m4/sqrtl.m4
@@ -1,4 +1,4 @@
-# sqrtl.m4 serial 6
+# sqrtl.m4 serial 9
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = sqrtl;
              long double x;]],
-           [[return sqrtl (x) > 0.4;]])],
+           [[return funcptr (x) > 0.4
+                    || sqrtl (x) > 0.4;]])],
         [gl_cv_func_sqrtl_no_libm=yes],
         [gl_cv_func_sqrtl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = sqrtl;
                long double x;]],
-             [[return sqrtl (x) > 0.4;]])],
+             [[return funcptr (x) > 0.4
+                      || sqrtl (x) > 0.4;]])],
           [gl_cv_func_sqrtl_in_libm=yes],
           [gl_cv_func_sqrtl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,11 +56,22 @@
   if test $gl_cv_func_sqrtl_no_libm = yes \
      || test $gl_cv_func_sqrtl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has sqrtl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has sqrtl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([sqrtl], , [HAVE_DECL_SQRTL=0], [[#include <math.h>]])
+
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $SQRTL_LIBM"
+    gl_FUNC_SQRTL_WORKS
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_sqrtl_works" in
+      *yes) ;;
+      *) REPLACE_SQRTL=1 ;;
+    esac
   else
     HAVE_DECL_SQRTL=0
     HAVE_SQRTL=0
+  fi
+  if test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; then
     dnl Find libraries needed to link lib/sqrtl.c.
     if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
       AC_REQUIRE([gl_FUNC_SQRT])
@@ -90,3 +105,58 @@
   fi
   AC_SUBST([SQRTL_LIBM])
 ])
+
+dnl Test whether sqrtl() works.
+dnl On OpenBSD 5.1/SPARC, sqrtl(8.1974099812331540680810141969554806865L) has
+dnl rounding errors that eat up the last 8 to 9 decimal digits.
+AC_DEFUN([gl_FUNC_SQRTL_WORKS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether sqrtl works], [gl_cv_func_sqrtl_works],
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <float.h>
+#include <math.h>
+#ifndef sqrtl /* for AIX */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double sqrtl (long double);
+#endif
+static long double
+my_ldexpl (long double x, int d)
+{
+  for (; d > 0; d--)
+    x *= 2.0L;
+  for (; d < 0; d++)
+    x *= 0.5L;
+  return x;
+}
+volatile long double x;
+volatile long double y;
+long double z;
+int main ()
+{
+  x = 8.1974099812331540680810141969554806865L;
+  y = sqrtl (x);
+  z = y * y - x;
+  z = my_ldexpl (z, LDBL_MANT_DIG);
+  if (z < 0)
+    z = - z;
+  if (z > 100.0L)
+    return 1;
+  return 0;
+}
+]])],
+        [gl_cv_func_sqrtl_works=yes],
+        [gl_cv_func_sqrtl_works=no],
+        [case "$host_os" in
+           openbsd*) gl_cv_func_sqrtl_works="guessing no";;
+           *)        gl_cv_func_sqrtl_works="guessing yes";;
+         esac
+        ])
+    ])
+])
--- a/m4/stat-time.m4
+++ b/m4/stat-time.m4
@@ -19,7 +19,6 @@
 
 AC_DEFUN([gl_STAT_TIME],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_HEADERS_ONCE([sys/time.h])
 
@@ -70,7 +69,6 @@
 #
 AC_DEFUN([gl_STAT_BIRTHTIME],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_HEADERS_ONCE([sys/time.h])
   AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 8
+# serial 11
 
 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
@@ -23,8 +23,9 @@
             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
             *) gl_cv_func_stat_dir_slash="guessing yes";;
           esac])])
-  dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
-  dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
+  dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
+  dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
+  dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
   AC_CACHE_CHECK([whether stat handles trailing slashes on files],
       [gl_cv_func_stat_file_slash],
       [touch conftest.tmp
@@ -46,7 +47,13 @@
       return result;
            ]])],
          [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
-         [gl_cv_func_stat_file_slash="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_stat_file_slash="guessing no" ;;
+          esac
+         ])
        rm -f conftest.tmp conftest.lnk])
   case $gl_cv_func_stat_dir_slash in
     *no) REPLACE_STAT=1
@@ -61,8 +68,4 @@
 ])
 
 # Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT],
-[
-  AC_REQUIRE([AC_C_INLINE])
-  :
-])
+AC_DEFUN([gl_PREREQ_STAT], [:])
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -14,13 +14,27 @@
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
           [[#include <stdalign.h>
-            int align_int = alignof (int) + _Alignof (double);
+            #include <stddef.h>
+
+            /* Test that alignof yields a result consistent with offsetof.
+               This catches GCC bug 52023
+               <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
+            #ifdef __cplusplus
+               template <class t> struct alignof_helper { char a; t b; };
+            # define ao(type) offsetof (alignof_helper<type>, b)
+            #else
+            # define ao(type) offsetof (struct { char a; type b; }, b)
+            #endif
+            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
+            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
+            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
 
             /* Test _Alignas only on platforms where gnulib can help.  */
             #if \
                 (__GNUC__ || __IBMC__ || __IBMCPP__ \
                  || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
               int alignas (8) alignas_int = 1;
+              char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
             #endif
           ]])],
        [gl_cv_header_working_stdalign_h=yes],
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 41
+# stdio_h.m4 serial 43
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,13 +7,14 @@
 AC_DEFUN([gl_STDIO_H],
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
-  AC_REQUIRE([AC_C_INLINE])
   gl_NEXT_HEADERS([stdio.h])
 
   dnl No need to create extra modules for these functions. Everyone who uses
   dnl <stdio.h> likely needs them.
   GNULIB_FSCANF=1
+  gl_MODULE_INDICATOR([fscanf])
   GNULIB_SCANF=1
+  gl_MODULE_INDICATOR([scanf])
   GNULIB_FGETC=1
   GNULIB_GETC=1
   GNULIB_GETCHAR=1
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 39
+# stdlib_h.m4 serial 41
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -20,8 +20,9 @@
 # include <random.h>
 #endif
     ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
-    initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt
-    ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srandom_r
+    initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
+    posix_openpt ptsname ptsname_r random random_r realpath rpmatch
+    setenv setstate setstate_r srandom srandom_r
     strtod strtoll strtoull unlockpt unsetenv])
 ])
 
@@ -54,6 +55,7 @@
   GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
   GNULIB_PTSNAME_R=0;     AC_SUBST([GNULIB_PTSNAME_R])
   GNULIB_PUTENV=0;        AC_SUBST([GNULIB_PUTENV])
+  GNULIB_RANDOM=0;        AC_SUBST([GNULIB_RANDOM])
   GNULIB_RANDOM_R=0;      AC_SUBST([GNULIB_RANDOM_R])
   GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
   GNULIB_REALPATH=0;      AC_SUBST([GNULIB_REALPATH])
@@ -81,6 +83,7 @@
   HAVE_POSIX_OPENPT=1;       AC_SUBST([HAVE_POSIX_OPENPT])
   HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
   HAVE_PTSNAME_R=1;          AC_SUBST([HAVE_PTSNAME_R])
+  HAVE_RANDOM=1;             AC_SUBST([HAVE_RANDOM])
   HAVE_RANDOM_H=1;           AC_SUBST([HAVE_RANDOM_H])
   HAVE_RANDOM_R=1;           AC_SUBST([HAVE_RANDOM_R])
   HAVE_REALPATH=1;           AC_SUBST([HAVE_REALPATH])
@@ -99,8 +102,10 @@
   REPLACE_MALLOC=0;          AC_SUBST([REPLACE_MALLOC])
   REPLACE_MBTOWC=0;          AC_SUBST([REPLACE_MBTOWC])
   REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
+  REPLACE_PTSNAME=0;         AC_SUBST([REPLACE_PTSNAME])
   REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
+  REPLACE_RANDOM_R=0;        AC_SUBST([REPLACE_RANDOM_R])
   REPLACE_REALLOC=0;         AC_SUBST([REPLACE_REALLOC])
   REPLACE_REALPATH=0;        AC_SUBST([REPLACE_REALPATH])
   REPLACE_SETENV=0;          AC_SUBST([REPLACE_SETENV])
new file mode 100644
--- /dev/null
+++ b/m4/stdnoreturn.m4
@@ -0,0 +1,41 @@
+# Check for stdnoreturn.h that conforms to C11.
+
+dnl Copyright 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prepare for substituting <stdnoreturn.h> if it is not supported.
+
+AC_DEFUN([gl_STDNORETURN_H],
+[
+  AC_CACHE_CHECK([for working stdnoreturn.h],
+    [gl_cv_header_working_stdnoreturn_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdlib.h>
+            #include <stdnoreturn.h>
+            /* Do not check for 'noreturn' after the return type.
+               C11 allows it, but it's rarely done that way
+               and circa-2012 bleeding-edge GCC rejects it when given
+               -Werror=old-style-declaration.  */
+            noreturn void foo1 (void) { exit (0); }
+            _Noreturn void foo2 (void) { exit (0); }
+            int testit (int argc, char **argv) {
+              if (argc & 1)
+                return 0;
+              (argv[0][0] ? foo1 : foo2) ();
+            }
+          ]])],
+       [gl_cv_header_working_stdnoreturn_h=yes],
+       [gl_cv_header_working_stdnoreturn_h=no])])
+
+  if test $gl_cv_header_working_stdnoreturn_h = yes; then
+    STDNORETURN_H=''
+  else
+    STDNORETURN_H='stdnoreturn.h'
+  fi
+
+  AC_SUBST([STDNORETURN_H])
+  AM_CONDITIONAL([GL_GENERATE_STDNORETURN_H], [test -n "$STDNORETURN_H"])
+])
--- a/m4/stpncpy.m4
+++ b/m4/stpncpy.m4
@@ -1,4 +1,4 @@
-# stpncpy.m4 serial 15
+# stpncpy.m4 serial 16
 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -74,15 +74,18 @@
 #ifdef __GNU_LIBRARY__
   Thanks for using GNU
 #endif
-], [gl_cv_func_stpncpy=yes], [gl_cv_func_stpncpy=no])
+], [gl_cv_func_stpncpy="guessing yes"], [gl_cv_func_stpncpy="guessing no"])
         ])
     ])
-    if test $gl_cv_func_stpncpy = yes; then
-      AC_DEFINE([HAVE_STPNCPY], [1],
-        [Define if you have the stpncpy() function and it works.])
-    else
-      REPLACE_STPNCPY=1
-    fi
+    case "$gl_cv_func_stpncpy" in
+      *yes)
+        AC_DEFINE([HAVE_STPNCPY], [1],
+          [Define if you have the stpncpy() function and it works.])
+        ;;
+      *)
+        REPLACE_STPNCPY=1
+        ;;
+    esac
   else
     HAVE_STPNCPY=0
   fi
--- a/m4/strcasestr.m4
+++ b/m4/strcasestr.m4
@@ -1,4 +1,4 @@
-# strcasestr.m4 serial 20
+# strcasestr.m4 serial 21
 dnl Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -54,13 +54,16 @@
   Lucky user
 #endif
              ],
-             [gl_cv_func_strcasestr_works_always=yes],
+             [gl_cv_func_strcasestr_works_always="guessing yes"],
              [gl_cv_func_strcasestr_works_always="guessing no"])
           ])
         ])
-      if test "$gl_cv_func_strcasestr_works_always" != yes; then
-        REPLACE_STRCASESTR=1
-      fi
+      case "$gl_cv_func_strcasestr_works_always" in
+        *yes) ;;
+        *)
+          REPLACE_STRCASESTR=1
+          ;;
+      esac
     fi
   fi
 ]) # gl_FUNC_STRCASESTR_SIMPLE
@@ -120,13 +123,16 @@
  #endif
 #endif
            ],
-           [gl_cv_func_strcasestr_linear=yes],
+           [gl_cv_func_strcasestr_linear="guessing yes"],
            [gl_cv_func_strcasestr_linear="guessing no"])
         ])
       ])
-    if test "$gl_cv_func_strcasestr_linear" != yes; then
-      REPLACE_STRCASESTR=1
-    fi
+    case "$gl_cv_func_strcasestr_linear" in
+      *yes) ;;
+      *)
+        REPLACE_STRCASESTR=1
+        ;;
+    esac
   fi
 ]) # gl_FUNC_STRCASESTR
 
--- a/m4/strerror.m4
+++ b/m4/strerror.m4
@@ -1,4 +1,4 @@
-# strerror.m4 serial 16
+# strerror.m4 serial 17
 dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_ERRNO_H])
   AC_REQUIRE([gl_FUNC_STRERROR_0])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
     AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
   ])
@@ -22,14 +23,22 @@
            [[if (!*strerror (-2)) return 1;]])],
         [gl_cv_func_working_strerror=yes],
         [gl_cv_func_working_strerror=no],
-        [dnl Be pessimistic on cross-compiles for now.
-         gl_cv_func_working_strerror="guessing no"])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_working_strerror="guessing no" ;;
+         esac
+        ])
     ])
-    if test "$gl_cv_func_working_strerror" != yes; then
-      dnl The system's strerror() fails to return a string for out-of-range
-      dnl integers. Replace it.
-      REPLACE_STRERROR=1
-    fi
+    case "$gl_cv_func_working_strerror" in
+      *yes) ;;
+      *)
+        dnl The system's strerror() fails to return a string for out-of-range
+        dnl integers. Replace it.
+        REPLACE_STRERROR=1
+        ;;
+    esac
     m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
       dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
       dnl buffer, we must replace strerror.
@@ -48,6 +57,7 @@
 dnl return a string that matches strerror(-1)).
 AC_DEFUN([gl_FUNC_STRERROR_0],
 [
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   REPLACE_STRERROR_0=0
   AC_CACHE_CHECK([whether strerror(0) succeeds],
    [gl_cv_func_strerror_0_works],
@@ -67,12 +77,20 @@
            return result;]])],
       [gl_cv_func_strerror_0_works=yes],
       [gl_cv_func_strerror_0_works=no],
-      [dnl Be pessimistic on cross-compiles for now.
-       gl_cv_func_strerror_0_works="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_strerror_0_works="guessing no" ;;
+       esac
+      ])
   ])
-  if test "$gl_cv_func_strerror_0_works" != yes; then
-    REPLACE_STRERROR_0=1
-    AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
-      does not return a message implying success.])
-  fi
+  case "$gl_cv_func_strerror_0_works" in
+    *yes) ;;
+    *)
+      REPLACE_STRERROR_0=1
+      AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
+        does not return a message implying success.])
+      ;;
+  esac
 ])
--- a/m4/strerror_r.m4
+++ b/m4/strerror_r.m4
@@ -1,4 +1,4 @@
-# strerror_r.m4 serial 14
+# strerror_r.m4 serial 15
 dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -76,7 +76,7 @@
         dnl HP-UX 11.31 strerror_r always fails when the buffer length argument
         dnl is less than 80.
         dnl FreeBSD 8.s strerror_r claims failure on 0
-        dnl MacOS X 10.5 strerror_r treats 0 like -1
+        dnl Mac OS X 10.5 strerror_r treats 0 like -1
         dnl Solaris 10 strerror_r corrupts errno on failure
         AC_CACHE_CHECK([whether strerror_r works],
           [gl_cv_func_strerror_r_works],
--- a/m4/strndup.m4
+++ b/m4/strndup.m4
@@ -1,4 +1,4 @@
-# strndup.m4 serial 20
+# strndup.m4 serial 21
 dnl Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -24,7 +24,7 @@
       [AC_RUN_IFELSE([
          AC_LANG_PROGRAM([[#include <string.h>
                            #include <stdlib.h>]], [[
-#ifndef HAVE_DECL_STRNDUP
+#if !HAVE_DECL_STRNDUP
   extern
   #ifdef __cplusplus
   "C"
--- a/m4/strstr.m4
+++ b/m4/strstr.m4
@@ -1,4 +1,4 @@
-# strstr.m4 serial 15
+# strstr.m4 serial 16
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -46,13 +46,16 @@
   Lucky user
 #endif
            ],
-           [gl_cv_func_strstr_works_always=yes],
+           [gl_cv_func_strstr_works_always="guessing yes"],
            [gl_cv_func_strstr_works_always="guessing no"])
         ])
       ])
-    if test "$gl_cv_func_strstr_works_always" != yes; then
-      REPLACE_STRSTR=1
-    fi
+    case "$gl_cv_func_strstr_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
   fi
 ]) # gl_FUNC_STRSTR_SIMPLE
 
@@ -113,12 +116,15 @@
  #endif
 #endif
            ],
-           [gl_cv_func_strstr_linear=yes],
+           [gl_cv_func_strstr_linear="guessing yes"],
            [gl_cv_func_strstr_linear="guessing no"])
         ])
       ])
-    if test "$gl_cv_func_strstr_linear" != yes; then
-      REPLACE_STRSTR=1
-    fi
+    case "$gl_cv_func_strstr_linear" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
   fi
 ]) # gl_FUNC_STRSTR
--- a/m4/strtod.m4
+++ b/m4/strtod.m4
@@ -1,4 +1,4 @@
-# strtod.m4 serial 21
+# strtod.m4 serial 22
 dnl Copyright (C) 2002-2003, 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -112,11 +112,14 @@
  #endif
 #endif
            ],
-           [gl_cv_func_strtod_works=yes],
+           [gl_cv_func_strtod_works="guessing yes"],
            [gl_cv_func_strtod_works="guessing no"])])])
-    if test "$gl_cv_func_strtod_works" != yes; then
-      REPLACE_STRTOD=1
-    fi
+    case "$gl_cv_func_strtod_works" in
+      *yes) ;;
+      *)
+        REPLACE_STRTOD=1
+        ;;
+    esac
   fi
 ])
 
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,4 +1,4 @@
-# strtoimax.m4 serial 12
+# strtoimax.m4 serial 13
 dnl Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,22 +18,13 @@
   if test $ac_cv_func_strtoimax = yes; then
     HAVE_STRTOIMAX=1
     dnl On AIX 5.1, strtoimax() fails for values outside the 'int' range.
-    AC_REQUIRE([gl_AC_HEADER_STDINT_H])
-    AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
     AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
     AC_CACHE_CHECK([whether strtoimax works], [gl_cv_func_strtoimax],
       [AC_RUN_IFELSE(
          [AC_LANG_SOURCE([[
 #include <errno.h>
-#include <stdio.h>
 #include <string.h>
-#include <sys/types.h>
-#if HAVE_STDINT_H_WITH_UINTMAX
-# include <stdint.h>
-#endif
-#if HAVE_INTTYPES_H_WITH_UINTMAX
-# include <inttypes.h>
-#endif
+#include <inttypes.h>
 int main ()
 {
   if (sizeof (intmax_t) > sizeof (int))
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,4 +1,4 @@
-# serial 5
+# serial 6
 # See if we need to provide symlink replacement.
 
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@
 AC_DEFUN([gl_FUNC_SYMLINK],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([symlink])
   dnl The best we can do on mingw is provide a dummy that always fails, so
   dnl that compilation can proceed with fewer ifdefs.  On FreeBSD 7.2, AIX 7.1,
@@ -34,10 +35,19 @@
              return result;
            ]])],
          [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
-         [gl_cv_func_symlink_works="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_symlink_works="guessing no" ;;
+          esac
+         ])
       rm -f conftest.f conftest.link conftest.lnk2])
-    if test "$gl_cv_func_symlink_works" != yes; then
-      REPLACE_SYMLINK=1
-    fi
+    case "$gl_cv_func_symlink_works" in
+      *yes) ;;
+      *)
+        REPLACE_SYMLINK=1
+        ;;
+    esac
   fi
 ])
new file mode 100644
--- /dev/null
+++ b/m4/sys_resource_h.m4
@@ -0,0 +1,47 @@
+# sys_resource_h.m4 serial 2
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_SYS_RESOURCE],
+[
+  AC_REQUIRE([gl_SYS_RESOURCE_H_DEFAULTS])
+  dnl <sys/resource.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([sys/resource.h])
+  if test $ac_cv_header_sys_resource_h = yes; then
+    HAVE_SYS_RESOURCE_H=1
+  else
+    HAVE_SYS_RESOURCE_H=0
+  fi
+  AC_SUBST([HAVE_SYS_RESOURCE_H])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+#if HAVE_SYS_RESOURCE_H
+/* At least FreeBSD 5.0 needs extra headers before <sys/resource.h>
+   will compile.  */
+# include <sys/types.h>
+# include <sys/time.h>
+# include <sys/resource.h>
+#endif
+    ]],
+    [getrusage])
+])
+
+AC_DEFUN([gl_SYS_RESOURCE_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SYS_RESOURCE_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_RESOURCE_H_DEFAULTS],
+[
+  GNULIB_GETRUSAGE=0;     AC_SUBST([GNULIB_GETRUSAGE])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_GETRUSAGE=1;       AC_SUBST([HAVE_GETRUSAGE])
+])
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 22
+# sys_socket_h.m4 serial 23
 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,6 @@
 [
   AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_C_INLINE])
 
   dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
   dnl old-style declarations (with return type 'int' instead of 'ssize_t')
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 26   -*- Autoconf -*-
+# sys_stat_h.m4 serial 28   -*- Autoconf -*-
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,9 +11,6 @@
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
 
-  dnl For the mkdir substitute.
-  AC_REQUIRE([AC_C_INLINE])
-
   dnl Check for broken stat macros.
   AC_REQUIRE([AC_HEADER_STAT])
 
@@ -22,6 +19,19 @@
   dnl Ensure the type mode_t gets defined.
   AC_REQUIRE([AC_TYPE_MODE_T])
 
+  dnl Whether to override 'struct stat'.
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([gl_LARGEFILE])
+  ], [
+    WINDOWS_64_BIT_ST_SIZE=0
+  ])
+  AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
+  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+    AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1],
+      [Define to 1 if Gnulib overrides 'struct stat' on Windows so that
+       struct stat.st_size becomes 64-bit.])
+  fi
+
   dnl Define types that are supposed to be defined in <sys/types.h> or
   dnl <sys/stat.h>.
   AC_CHECK_TYPE([nlink_t], [],
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -1,5 +1,5 @@
 # Configure a replacement for <sys/time.h>.
-# serial 7
+# serial 8
 
 # Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -43,9 +43,40 @@
           ]],
           [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
        [gl_cv_sys_struct_timeval=yes],
-       [gl_cv_sys_struct_timeval=no])])
+       [gl_cv_sys_struct_timeval=no])
+    ])
   if test $gl_cv_sys_struct_timeval != yes; then
     HAVE_STRUCT_TIMEVAL=0
+  else
+    dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined
+    dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
+    dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
+    dnl smaller than the 'time_t' type mandated by POSIX.
+    dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but
+    dnl that is good enough.
+    AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member],
+      [gl_cv_sys_struct_timeval_tv_sec],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#if HAVE_SYS_TIME_H
+               #include <sys/time.h>
+              #endif
+              #include <time.h>
+              #if HAVE_WINSOCK2_H
+              # include <winsock2.h>
+              #endif
+            ]],
+            [[static struct timeval x;
+              typedef int verify_tv_sec_type[
+                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
+              ];
+            ]])],
+         [gl_cv_sys_struct_timeval_tv_sec=yes],
+         [gl_cv_sys_struct_timeval_tv_sec=no])
+      ])
+    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
+      REPLACE_STRUCT_TIMEVAL=1
+    fi
   fi
 
   dnl Check for declarations of anything we want to poison if the
@@ -75,4 +106,5 @@
   HAVE_STRUCT_TIMEVAL=1;     AC_SUBST([HAVE_STRUCT_TIMEVAL])
   HAVE_SYS_TIME_H=1;         AC_SUBST([HAVE_SYS_TIME_H])
   REPLACE_GETTIMEOFDAY=0;    AC_SUBST([REPLACE_GETTIMEOFDAY])
+  REPLACE_STRUCT_TIMEVAL=0;  AC_SUBST([REPLACE_STRUCT_TIMEVAL])
 ])
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -1,4 +1,4 @@
-# sys_types_h.m4 serial 2
+# sys_types_h.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,9 @@
 
   dnl Ensure the type mode_t gets defined.
   AC_REQUIRE([AC_TYPE_MODE_T])
+
+  dnl Whether to override the 'off_t' type.
+  AC_REQUIRE([gl_TYPE_OFF_T])
 ])
 
 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
--- a/m4/tanf.m4
+++ b/m4/tanf.m4
@@ -1,4 +1,4 @@
-# tanf.m4 serial 1
+# tanf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_TAN])
 
+  dnl Persuade glibc <math.h> to declare tanf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether tanf() exists. Assume that tanf(), if it exists, is
   dnl defined in the same library as tan().
   save_LIBS="$LIBS"
--- a/m4/tanhf.m4
+++ b/m4/tanhf.m4
@@ -1,4 +1,4 @@
-# tanhf.m4 serial 1
+# tanhf.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,9 @@
   AC_REQUIRE([gl_MATH_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_TANH])
 
+  dnl Persuade glibc <math.h> to declare tanhf().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   dnl Test whether tanhf() exists. Assume that tanhf(), if it exists, is
   dnl defined in the same library as tanh().
   save_LIBS="$LIBS"
--- a/m4/tanl.m4
+++ b/m4/tanl.m4
@@ -1,4 +1,4 @@
-# tanl.m4 serial 6
+# tanl.m4 serial 8
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,8 +22,10 @@
              # define __NO_MATH_INLINES 1 /* for glibc */
              #endif
              #include <math.h>
+             long double (*funcptr) (long double) = tanl;
              long double x;]],
-           [[return tanl (x) > 0.4;]])],
+           [[return funcptr (x) > 0.4
+                    || tanl (x) > 0.4;]])],
         [gl_cv_func_tanl_no_libm=yes],
         [gl_cv_func_tanl_no_libm=no])
     ])
@@ -39,8 +41,10 @@
                # define __NO_MATH_INLINES 1 /* for glibc */
                #endif
                #include <math.h>
+               long double (*funcptr) (long double) = tanl;
                long double x;]],
-             [[return tanl (x) > 0.4;]])],
+             [[return funcptr (x) > 0.4
+                      || tanl (x) > 0.4;]])],
           [gl_cv_func_tanl_in_libm=yes],
           [gl_cv_func_tanl_in_libm=no])
         LIBS="$save_LIBS"
@@ -52,7 +56,7 @@
   if test $gl_cv_func_tanl_no_libm = yes \
      || test $gl_cv_func_tanl_in_libm = yes; then
     dnl Also check whether it's declared.
-    dnl MacOS X 10.3 has tanl() in libc but doesn't declare it in <math.h>.
+    dnl Mac OS X 10.3 has tanl() in libc but doesn't declare it in <math.h>.
     AC_CHECK_DECL([tanl], , [HAVE_DECL_TANL=0], [[#include <math.h>]])
   else
     HAVE_DECL_TANL=0
--- a/m4/thread.m4
+++ b/m4/thread.m4
@@ -1,4 +1,4 @@
-# thread.m4 serial 2
+# thread.m4 serial 3
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,6 @@
 AC_DEFUN([gl_THREAD],
 [
   AC_REQUIRE([gl_THREADLIB])
-  AC_REQUIRE([AC_C_INLINE])
 
   if test $gl_threads_api = posix; then
     gl_save_LIBS="$LIBS"
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 9 (gettext-0.18.2)
+# threadlib.m4 serial 10 (gettext-0.18.2)
 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -319,50 +319,50 @@
 
 dnl Survey of platforms:
 dnl
-dnl Platform          Available   Compiler    Supports   test-lock
-dnl                   flavours    option      weak       result
-dnl ---------------   ---------   ---------   --------   ---------
-dnl Linux 2.4/glibc   posix       -lpthread       Y      OK
+dnl Platform           Available  Compiler    Supports   test-lock
+dnl                    flavours   option      weak       result
+dnl ---------------    ---------  ---------   --------   ---------
+dnl Linux 2.4/glibc    posix      -lpthread       Y      OK
 dnl
-dnl GNU Hurd/glibc    posix
+dnl GNU Hurd/glibc     posix
 dnl
-dnl FreeBSD 5.3       posix       -lc_r           Y
-dnl                   posix       -lkse ?         Y
-dnl                   posix       -lpthread ?     Y
-dnl                   posix       -lthr           Y
+dnl FreeBSD 5.3        posix      -lc_r           Y
+dnl                    posix      -lkse ?         Y
+dnl                    posix      -lpthread ?     Y
+dnl                    posix      -lthr           Y
 dnl
-dnl FreeBSD 5.2       posix       -lc_r           Y
-dnl                   posix       -lkse           Y
-dnl                   posix       -lthr           Y
+dnl FreeBSD 5.2        posix      -lc_r           Y
+dnl                    posix      -lkse           Y
+dnl                    posix      -lthr           Y
 dnl
-dnl FreeBSD 4.0,4.10  posix       -lc_r           Y      OK
+dnl FreeBSD 4.0,4.10   posix      -lc_r           Y      OK
 dnl
-dnl NetBSD 1.6        --
+dnl NetBSD 1.6         --
 dnl
-dnl OpenBSD 3.4       posix       -lpthread       Y      OK
+dnl OpenBSD 3.4        posix      -lpthread       Y      OK
 dnl
-dnl MacOS X 10.[123]  posix       -lpthread       Y      OK
+dnl Mac OS X 10.[123]  posix      -lpthread       Y      OK
 dnl
-dnl Solaris 7,8,9     posix       -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
-dnl                   solaris     -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
+dnl Solaris 7,8,9      posix      -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
+dnl                    solaris    -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
 dnl
-dnl HP-UX 11          posix       -lpthread       N (cc) OK
+dnl HP-UX 11           posix      -lpthread       N (cc) OK
 dnl                                               Y (gcc)
 dnl
-dnl IRIX 6.5          posix       -lpthread       Y      0.5
+dnl IRIX 6.5           posix      -lpthread       Y      0.5
 dnl
-dnl AIX 4.3,5.1       posix       -lpthread       N      AIX 4: 0.5; AIX 5: OK
+dnl AIX 4.3,5.1        posix      -lpthread       N      AIX 4: 0.5; AIX 5: OK
 dnl
-dnl OSF/1 4.0,5.1     posix       -pthread (cc)   N      OK
+dnl OSF/1 4.0,5.1      posix      -pthread (cc)   N      OK
 dnl                               -lpthread (gcc) Y
 dnl
-dnl Cygwin            posix       -lpthread       Y      OK
+dnl Cygwin             posix      -lpthread       Y      OK
 dnl
-dnl Any of the above  pth         -lpth                  0.0
+dnl Any of the above   pth        -lpth                  0.0
 dnl
-dnl Mingw             windows                     N      OK
+dnl Mingw              windows                    N      OK
 dnl
-dnl BeOS 5            --
+dnl BeOS 5             --
 dnl
 dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
 dnl turned off:
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
-# serial 6
+# serial 7
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,7 @@
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 ])
 
-dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared
+dnl Check whether 'struct timespec' is declared
 dnl in time.h, sys/time.h, or pthread.h.
 
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
--- a/m4/time_r.m4
+++ b/m4/time_r.m4
@@ -17,7 +17,7 @@
 
   dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is
   dnl not defined.
-  AC_CHECK_DECLS_ONCE([localtime_r])
+  AC_CHECK_DECLS([localtime_r], [], [], [[#include <time.h>]])
   if test $ac_cv_have_decl_localtime_r = no; then
     HAVE_DECL_LOCALTIME_R=0
   fi
--- a/m4/timer_time.m4
+++ b/m4/timer_time.m4
@@ -1,4 +1,4 @@
-# timer_time.m4 serial 1
+# timer_time.m4 serial 2
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,7 @@
   dnl Based on clock_time.m4. See details there.
 
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([gl_THREADLIB])
 
   LIB_TIMER_TIME=
   AC_SUBST([LIB_TIMER_TIME])
@@ -18,6 +19,21 @@
     AC_SEARCH_LIBS([timer_settime], [rt posix4],
                    [test "$ac_cv_search_timer_settime" = "none required" ||
                     LIB_TIMER_TIME=$ac_cv_search_timer_settime])
+    dnl GLIBC uses threads to emulate posix timers when kernel support
+    dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
+    dnl Now the pthread lib is linked automatically in the normal case,
+    dnl but when linking statically, it needs to be explicitly specified.
+    AC_EGREP_CPP([Thread],
+      [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
+     && !defined __UCLIBC__
+  Thread emulation available
+ #endif
+#endif
+      ],
+      [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"])
     AC_CHECK_FUNCS([timer_settime])
   LIBS=$gl_saved_libs
 ])
--- a/m4/timespec.m4
+++ b/m4/timespec.m4
@@ -1,4 +1,4 @@
-#serial 14
+#serial 15
 
 # Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
@@ -8,8 +8,4 @@
 
 dnl From Jim Meyering
 
-AC_DEFUN([gl_TIMESPEC],
-[
-  dnl Prerequisites of lib/timespec.h.
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_TIMESPEC], [:])
--- a/m4/trunc.m4
+++ b/m4/trunc.m4
@@ -1,4 +1,4 @@
-# trunc.m4 serial 8
+# trunc.m4 serial 9
 dnl Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -43,6 +43,7 @@
     fi
     m4_ifdef([gl_FUNC_TRUNC_IEEE], [
       if test $gl_trunc_required = ieee && test $REPLACE_TRUNC = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether trunc works according to ISO C 99 with IEC 60559],
           [gl_cv_func_trunc_ieee],
           [
@@ -68,7 +69,13 @@
               ]])],
               [gl_cv_func_trunc_ieee=yes],
               [gl_cv_func_trunc_ieee=no],
-              [gl_cv_func_trunc_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_trunc_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_trunc_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_trunc_ieee" in
--- a/m4/truncf.m4
+++ b/m4/truncf.m4
@@ -1,4 +1,4 @@
-# truncf.m4 serial 8
+# truncf.m4 serial 9
 dnl Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -43,6 +43,7 @@
     fi
     m4_ifdef([gl_FUNC_TRUNCF_IEEE], [
       if test $gl_truncf_required = ieee && test $REPLACE_TRUNCF = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether truncf works according to ISO C 99 with IEC 60559],
           [gl_cv_func_truncf_ieee],
           [
@@ -68,7 +69,13 @@
               ]])],
               [gl_cv_func_truncf_ieee=yes],
               [gl_cv_func_truncf_ieee=no],
-              [gl_cv_func_truncf_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_truncf_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_truncf_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_truncf_ieee" in
--- a/m4/truncl.m4
+++ b/m4/truncl.m4
@@ -1,4 +1,4 @@
-# truncl.m4 serial 10
+# truncl.m4 serial 11
 dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -74,6 +74,7 @@
     esac
     m4_ifdef([gl_FUNC_TRUNCL_IEEE], [
       if test $gl_truncl_required = ieee && test $REPLACE_TRUNCL = 0; then
+        AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
         AC_CACHE_CHECK([whether truncl works according to ISO C 99 with IEC 60559],
           [gl_cv_func_truncl_ieee],
           [
@@ -99,7 +100,13 @@
               ]])],
               [gl_cv_func_truncl_ieee=yes],
               [gl_cv_func_truncl_ieee=no],
-              [gl_cv_func_truncl_ieee="guessing no"])
+              [case "$host_os" in
+                         # Guess yes on glibc systems.
+                 *-gnu*) gl_cv_func_truncl_ieee="guessing yes" ;;
+                         # If we don't know, assume the worst.
+                 *)      gl_cv_func_truncl_ieee="guessing no" ;;
+               esac
+              ])
             LIBS="$save_LIBS"
           ])
         case "$gl_cv_func_truncl_ieee" in
--- a/m4/ttyname_r.m4
+++ b/m4/ttyname_r.m4
@@ -1,4 +1,4 @@
-# ttyname_r.m4 serial 8
+# ttyname_r.m4 serial 9
 dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,7 +22,7 @@
     HAVE_TTYNAME_R=0
   else
     HAVE_TTYNAME_R=1
-    dnl On MacOS X 10.4 (and Solaris 10 without gl_USE_SYSTEM_EXTENSIONS)
+    dnl On Mac OS X 10.4 (and Solaris 10 without gl_USE_SYSTEM_EXTENSIONS)
     dnl the return type is 'char *', not 'int'.
     AC_CACHE_CHECK([whether ttyname_r is compatible with its POSIX signature],
       [gl_cv_func_ttyname_r_posix],
--- a/m4/tzset.m4
+++ b/m4/tzset.m4
@@ -1,4 +1,4 @@
-# serial 6
+# serial 7
 
 # Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -20,6 +20,7 @@
 AC_DEFUN([gl_FUNC_TZSET_CLOBBER],
 [
   AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether tzset clobbers localtime buffer],
                  gl_cv_func_tzset_clobber,
   [
@@ -47,7 +48,13 @@
   ]])],
        [gl_cv_func_tzset_clobber=no],
        [gl_cv_func_tzset_clobber=yes],
-       [gl_cv_func_tzset_clobber=yes])])
+       [case "$host_os" in
+                  # Guess all is fine on glibc systems.
+          *-gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
+                  # If we don't know, assume the worst.
+          *)      gl_cv_func_tzset_clobber="guessing yes" ;;
+        esac
+       ])])
 
   AC_DEFINE([HAVE_RUN_TZSET_TEST], [1],
     [Define to 1 if you have run the test for working tzset.])
--- a/m4/ungetc.m4
+++ b/m4/ungetc.m4
@@ -1,4 +1,4 @@
-# ungetc.m4 serial 2
+# ungetc.m4 serial 3
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@
 AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
 [
   AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   AC_CACHE_CHECK([whether ungetc works on arbitrary bytes],
     [gl_cv_func_ungetc_works],
@@ -27,10 +28,19 @@
            if (fgetc (f) != 'c') return 11;
            fclose (f); remove ("conftest.tmp");])],
         [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
-        [gl_cv_func_ungetc_works='guessing no'])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_ungetc_works="guessing no" ;;
+         esac
+        ])
     ])
-  if test "$gl_cv_func_ungetc_works" != yes; then
-    AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
-      [Define to 1 if ungetc is broken when used on arbitrary bytes.])
-  fi
+  case "$gl_cv_func_ungetc_works" in
+    *yes) ;;
+    *)
+      AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
+        [Define to 1 if ungetc is broken when used on arbitrary bytes.])
+      ;;
+  esac
 ])
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 63
+# unistd_h.m4 serial 66
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,6 @@
   dnl Use AC_REQUIRE here, so that the default behavior below is expanded
   dnl once only, before all statements that occur in other macros.
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-  AC_REQUIRE([AC_C_INLINE])
 
   gl_CHECK_NEXT_HEADERS([unistd.h])
   if test $ac_cv_header_unistd_h = yes; then
@@ -24,6 +23,9 @@
   dnl Ensure the type pid_t gets defined.
   AC_REQUIRE([AC_TYPE_PID_T])
 
+  dnl Determine WINDOWS_64_BIT_OFF_T.
+  AC_REQUIRE([gl_TYPE_OFF_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
@@ -155,6 +157,7 @@
   REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
+  REPLACE_FTRUNCATE=0;    AC_SUBST([REPLACE_FTRUNCATE])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
   REPLACE_GETLOGIN_R=0;   AC_SUBST([REPLACE_GETLOGIN_R])
--- a/m4/unlink.m4
+++ b/m4/unlink.m4
@@ -1,4 +1,4 @@
-# unlink.m4 serial 9
+# unlink.m4 serial 11
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_CHECK_HEADERS_ONCE([unistd.h])
+
   dnl Detect FreeBSD 7.2, AIX 7.1, Solaris 9 bug.
   AC_CACHE_CHECK([whether unlink honors trailing slashes],
     [gl_cv_func_unlink_honors_slashes],
@@ -41,16 +42,28 @@
          ]])],
       [gl_cv_func_unlink_honors_slashes=yes],
       [gl_cv_func_unlink_honors_slashes=no],
-      [gl_cv_func_unlink_honors_slashes="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
+       esac
+      ])
      rm -f conftest.file conftest.lnk])
-  dnl Detect MacOS X 10.5.6 bug: On read-write HFS mounts, unlink("..") or
+  case "$gl_cv_func_unlink_honors_slashes" in
+    *no)
+      REPLACE_UNLINK=1
+      ;;
+  esac
+
+  dnl Detect Mac OS X 10.5.6 bug: On read-write HFS mounts, unlink("..") or
   dnl unlink("../..") succeeds without doing anything.
   AC_CACHE_CHECK([whether unlink of a parent directory fails as it should],
     [gl_cv_func_unlink_parent_fails],
     [case "$host_os" in
        darwin*)
          dnl Try to unlink a subdirectory of /tmp, because /tmp is usually on a
-         dnl HFS mount on MacOS X. Use a subdirectory, owned by the current
+         dnl HFS mount on Mac OS X. Use a subdirectory, owned by the current
          dnl user, because otherwise unlink() may fail due to permissions
          dnl reasons, and because when running as root we don't want to risk
          dnl destroying the entire /tmp.
@@ -93,7 +106,9 @@
               ]])],
              [gl_cv_func_unlink_parent_fails=yes],
              [gl_cv_func_unlink_parent_fails=no],
-             [gl_cv_func_unlink_parent_fails="guessing no"])
+             [# If we don't know, assume the worst.
+              gl_cv_func_unlink_parent_fails="guessing no"
+             ])
            unset GL_SUBDIR_FOR_UNLINK
            rm -rf "$tmp"
          else
@@ -107,16 +122,9 @@
     ])
   case "$gl_cv_func_unlink_parent_fails" in
     *no)
+      REPLACE_UNLINK=1
       AC_DEFINE([UNLINK_PARENT_BUG], [1],
         [Define to 1 if unlink() on a parent directory may succeed])
       ;;
   esac
-  if test "$gl_cv_func_unlink_honors_slashes" != yes \
-     || { case "$gl_cv_func_unlink_parent_fails" in
-            *yes) false;;
-            *no) true;;
-          esac
-        }; then
-    REPLACE_UNLINK=1
-  fi
 ])
--- a/m4/unlinkat.m4
+++ b/m4/unlinkat.m4
@@ -1,4 +1,4 @@
-# unlinkat.m4 serial 1
+# unlinkat.m4 serial 2
 dnl Copyright (C) 2004-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -16,15 +16,18 @@
   if test $ac_cv_func_unlinkat = no; then
     HAVE_UNLINKAT=0
   else
-    if test $gl_cv_func_lstat_dereferences_slashed_symlink != yes; then
-      # Solaris 9 has *at functions, but uniformly mishandles trailing
-      # slash in all of them.
-      REPLACE_UNLINKAT=1
-    else
-      # GNU/Hurd has unlinkat, but it has the same bug as unlink.
-      if test $REPLACE_UNLINK = 1; then
+    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+      *no)
+        # Solaris 9 has *at functions, but uniformly mishandles trailing
+        # slash in all of them.
         REPLACE_UNLINKAT=1
-      fi
-    fi
+        ;;
+      *)
+        # GNU/Hurd has unlinkat, but it has the same bug as unlink.
+        if test $REPLACE_UNLINK = 1; then
+          REPLACE_UNLINKAT=1
+        fi
+        ;;
+    esac
   fi
 ])
--- a/m4/usleep.m4
+++ b/m4/usleep.m4
@@ -1,4 +1,4 @@
-# usleep.m4 serial 2
+# usleep.m4 serial 3
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,7 @@
   dnl usleep was required in POSIX 2001, but dropped as obsolete in
   dnl POSIX 2008; therefore, it is not always exposed in headers.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([usleep])
   AC_CHECK_TYPE([useconds_t], [],
     [AC_DEFINE([useconds_t], [unsigned int], [Define to an unsigned 32-bit
@@ -27,9 +28,18 @@
 #include <unistd.h>
 ]], [[return !!usleep (1000000);]])],
         [gl_cv_func_usleep_works=yes], [gl_cv_func_usleep_works=no],
-        [gl_cv_func_usleep_works="guessing no"])])
-    if test "$gl_cv_func_usleep_works" != yes; then
-      REPLACE_USLEEP=1
-    fi
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_usleep_works="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_usleep_works="guessing no" ;;
+         esac
+        ])])
+    case "$gl_cv_func_usleep_works" in
+      *yes) ;;
+      *)
+        REPLACE_USLEEP=1
+        ;;
+    esac
   fi
 ])
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -3,7 +3,7 @@
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-dnl serial 6
+dnl serial 7
 
 AC_DEFUN([gl_UTIMENS],
 [
@@ -11,6 +11,7 @@
   AC_REQUIRE([gl_FUNC_UTIMES])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([futimes futimesat futimens utimensat lutimes])
 
   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
@@ -30,11 +31,20 @@
         ]])],
         [gl_cv_func_futimesat_works=yes],
         [gl_cv_func_futimesat_works=no],
-        [gl_cv_func_futimesat_works="guessing no"])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_futimesat_works="guessing no" ;;
+         esac
+        ])
       rm -f conftest.file])
-    if test "$gl_cv_func_futimesat_works" != yes; then
-      AC_DEFINE([FUTIMESAT_NULL_BUG], [1],
-        [Define to 1 if futimesat mishandles a NULL file name.])
-    fi
+    case "$gl_cv_func_futimesat_works" in
+      *yes) ;;
+      *)
+        AC_DEFINE([FUTIMESAT_NULL_BUG], [1],
+          [Define to 1 if futimesat mishandles a NULL file name.])
+        ;;
+    esac
   fi
 ])
--- a/m4/vasnprintf.m4
+++ b/m4/vasnprintf.m4
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 34
+# vasnprintf.m4 serial 36
 dnl Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,7 @@
   gl_PREREQ_ASNPRINTF
 ])
 
-# Prequisites of lib/printf-args.h, lib/printf-args.c.
+# Prerequisites of lib/printf-args.h, lib/printf-args.c.
 AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 [
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
@@ -37,7 +37,7 @@
   AC_REQUIRE([gt_TYPE_WINT_T])
 ])
 
-# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
+# Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
 AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 [
   AC_REQUIRE([gl_FEATURES_H])
@@ -55,7 +55,6 @@
 # Prerequisites of lib/vasnprintf.c.
 AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
 [
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([AC_FUNC_ALLOCA])
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
--- a/m4/visibility.m4
+++ b/m4/visibility.m4
@@ -1,4 +1,4 @@
-# visibility.m4 serial 4 (gettext-0.18.2)
+# visibility.m4 serial 5 (gettext-0.18.2)
 dnl Copyright (C) 2005, 2008, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,7 @@
 dnl __attribute__((__visibility__("default"))).
 dnl Does *not* test for __visibility__("protected") - which has tricky
 dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
-dnl MacOS X.
+dnl Mac OS X.
 dnl Does *not* test for __visibility__("internal") - which has processor
 dnl dependent semantics.
 dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
--- a/m4/wait-process.m4
+++ b/m4/wait-process.m4
@@ -1,4 +1,4 @@
-# wait-process.m4 serial 5
+# wait-process.m4 serial 6
 dnl Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,6 @@
 AC_DEFUN([gl_WAIT_PROCESS],
 [
   dnl Prerequisites of lib/wait-process.c.
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
   AC_CHECK_FUNCS([waitid])
 ])
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -1,4 +1,4 @@
-# warnings.m4 serial 5
+# warnings.m4 serial 7
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,24 +14,48 @@
 [m4_define([gl_AS_VAR_APPEND],
 [AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
 
-# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
-# ------------------------------------------------
-# Adds parameter to WARN_CFLAGS if the compiler supports it.  For example,
-# gl_WARN_ADD([-Wparentheses]).
-AC_DEFUN([gl_WARN_ADD],
-dnl FIXME: gl_Warn must be used unquoted until we can assume
-dnl autoconf 2.64 or newer.
-[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
-AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [
-  gl_save_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="${CPPFLAGS} $1"
-  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
+
+# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
+#                       [PROGRAM = AC_LANG_PROGRAM()])
+# -----------------------------------------------------------------
+# Check if the compiler supports OPTION when compiling PROGRAM.
+#
+# FIXME: gl_Warn must be used unquoted until we can assume Autoconf
+# 2.64 or newer.
+AC_DEFUN([gl_COMPILER_OPTION_IF],
+[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
+AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
+  gl_save_compiler_FLAGS="$gl_Flags"
+  gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $1"])
+  AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
                     [AS_VAR_SET(gl_Warn, [yes])],
                     [AS_VAR_SET(gl_Warn, [no])])
-  CPPFLAGS="$gl_save_CPPFLAGS"
+  gl_Flags="$gl_save_compiler_FLAGS"
+])
+AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
+AS_VAR_POPDEF([gl_Flags])dnl
+AS_VAR_POPDEF([gl_Warn])dnl
 ])
-AS_VAR_IF(gl_Warn, [yes],
-  [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
-AS_VAR_POPDEF([gl_Warn])dnl
-m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
+
+
+# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS],
+#             [PROGRAM = AC_LANG_PROGRAM()])
+# ---------------------------------------------
+# Adds parameter to WARN_CFLAGS if the compiler supports it when
+# compiling PROGRAM.  For example, gl_WARN_ADD([-Wparentheses]).
+#
+# If VARIABLE is a variable name, AC_SUBST it.
+AC_DEFUN([gl_WARN_ADD],
+[gl_COMPILER_OPTION_IF([$1],
+  [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
+  [],
+  [$3])
+m4_ifval([$2],
+         [AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
+         [AC_SUBST([WARN_CFLAGS])])dnl
 ])
+
+# Local Variables:
+# mode: autoconf
+# End:
--- a/m4/wctype_h.m4
+++ b/m4/wctype_h.m4
@@ -1,4 +1,4 @@
-# wctype_h.m4 serial 16
+# wctype_h.m4 serial 18
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
@@ -22,8 +22,6 @@
   fi
   AC_SUBST([HAVE_ISWCNTRL])
 
-  AC_REQUIRE([AC_C_INLINE])
-
   AC_REQUIRE([gt_TYPE_WINT_T])
   if test $gt_cv_c_wint_t = yes; then
     HAVE_WINT_T=1
@@ -57,7 +55,8 @@
                           #if __GNU_LIBRARY__ == 1
                           Linux libc5 i18n is broken.
                           #endif]], [])],
-              [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+              [gl_cv_func_iswcntrl_works="guessing yes"],
+              [gl_cv_func_iswcntrl_works="guessing no"])
             ])
         ])
     fi
@@ -67,11 +66,10 @@
   fi
   AC_SUBST([HAVE_WCTYPE_H])
 
-  if test "$gl_cv_func_iswcntrl_works" = no; then
-    REPLACE_ISWCNTRL=1
-  else
-    REPLACE_ISWCNTRL=0
-  fi
+  case "$gl_cv_func_iswcntrl_works" in
+    *yes) REPLACE_ISWCNTRL=0 ;;
+    *)    REPLACE_ISWCNTRL=1 ;;
+  esac
   AC_SUBST([REPLACE_ISWCNTRL])
 
   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
--- a/m4/wcwidth.m4
+++ b/m4/wcwidth.m4
@@ -1,4 +1,4 @@
-# wcwidth.m4 serial 21
+# wcwidth.m4 serial 23
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,7 +36,8 @@
 
   if test $ac_cv_func_wcwidth = yes; then
     HAVE_WCWIDTH=1
-    dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+    dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+    dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
     dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
     dnl This leads to bugs in 'ls' (coreutils).
     AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
@@ -69,8 +70,10 @@
     {
       if (wcwidth (0x0301) > 0)
         result |= 1;
+      if (wcwidth (0x05B0) > 0)
+        result |= 2;
       if (wcwidth (0x200B) > 0)
-        result |= 2;
+        result |= 4;
     }
   return result;
 }]])],
--- a/m4/write.m4
+++ b/m4/write.m4
@@ -1,4 +1,4 @@
-# write.m4 serial 4
+# write.m4 serial 5
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,4 @@
 ])
 
 # Prerequisites of lib/write.c.
-AC_DEFUN([gl_PREREQ_WRITE],
-[
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_WRITE], [:])
--- a/m4/xalloc.m4
+++ b/m4/xalloc.m4
@@ -1,22 +1,7 @@
-# xalloc.m4 serial 17
+# xalloc.m4 serial 18
 dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_XALLOC],
-[
-  gl_PREREQ_XALLOC
-  gl_PREREQ_XMALLOC
-])
-
-# Prerequisites of lib/xalloc.h.
-AC_DEFUN([gl_PREREQ_XALLOC], [
-  AC_REQUIRE([gl_INLINE])
-  :
-])
-
-# Prerequisites of lib/xmalloc.c.
-AC_DEFUN([gl_PREREQ_XMALLOC], [
-  :
-])
+AC_DEFUN([gl_XALLOC], [:])
--- a/m4/xsize.m4
+++ b/m4/xsize.m4
@@ -1,4 +1,4 @@
-# xsize.m4 serial 4
+# xsize.m4 serial 5
 dnl Copyright (C) 2003-2004, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@
 [
   dnl Prerequisites of lib/xsize.h.
   AC_REQUIRE([gl_SIZE_MAX])
-  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_HEADERS([stdint.h])
 ])
--- a/m4/xvasprintf.m4
+++ b/m4/xvasprintf.m4
@@ -1,11 +1,8 @@
-# xvasprintf.m4 serial 1
+# xvasprintf.m4 serial 2
 dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_XVASPRINTF],
-[
-  dnl Prerequisites of lib/xvasprintf.c.
-  AC_REQUIRE([AC_C_INLINE])
-])
+dnl Prerequisites of lib/xvasprintf.c.
+AC_DEFUN([gl_XVASPRINTF], [:])
--- a/modules/acl
+++ b/modules/acl
@@ -12,6 +12,7 @@
 
 Depends-on:
 error
+extern-inline
 fstat
 gettext-h
 quote
--- a/modules/acosf
+++ b/modules/acosf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 acos            [test $HAVE_ACOSF = 0]
 
 configure.ac:
--- a/modules/announce-gen
+++ b/modules/announce-gen
@@ -1,5 +1,5 @@
 Description:
-Generate a release announcement message.
+Generate a release announcement message.  See also readme-release.
 
 Files:
 build-aux/announce-gen
--- a/modules/asinf
+++ b/modules/asinf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 asin            [test $HAVE_ASINF = 0]
 
 configure.ac:
--- a/modules/atan2f
+++ b/modules/atan2f
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 atan2           [test $HAVE_ATAN2F = 0]
 
 configure.ac:
--- a/modules/atanf
+++ b/modules/atanf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 atan            [test $HAVE_ATANF = 0]
 
 configure.ac:
--- a/modules/binary-io
+++ b/modules/binary-io
@@ -3,14 +3,16 @@
 
 Files:
 lib/binary-io.h
+lib/binary-io.c
 
 Depends-on:
+extern-inline
 fcntl-h
 
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += binary-io.h
+lib_SOURCES += binary-io.h binary-io.c
 
 Include:
 "binary-io.h"
@@ -20,4 +22,3 @@
 
 Maintainer:
 Bruno Haible
-
--- a/modules/bitrotate
+++ b/modules/bitrotate
@@ -3,15 +3,16 @@
 
 Files:
 lib/bitrotate.h
+lib/bitrotate.c
 
 Depends-on:
+extern-inline
 stdint
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
-lib_SOURCES += bitrotate.h
+lib_SOURCES += bitrotate.h bitrotate.c
 
 Include:
 "bitrotate.h"
--- a/modules/cbrt
+++ b/modules/cbrt
@@ -2,12 +2,24 @@
 cbrt() function: cube root.
 
 Files:
+lib/cbrt.c
+m4/cbrt.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
+extensions
+isfinite        [test $HAVE_CBRT = 0]
+fabs            [test $HAVE_CBRT = 0]
+frexp           [test $HAVE_CBRT = 0]
+ldexp           [test $HAVE_CBRT = 0]
 
 configure.ac:
-gl_COMMON_DOUBLE_MATHFUNC([cbrt])
+gl_FUNC_CBRT
+if test $HAVE_CBRT = 0; then
+  AC_LIBOBJ([cbrt])
+fi
+gl_MATH_MODULE_INDICATOR([cbrt])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/cbrt-ieee
@@ -0,0 +1,24 @@
+Description:
+cbrt() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+cbrt
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(CBRT_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/cbrt-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-cbrt-ieee.c
+tests/test-cbrt-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-cbrt-ieee
+check_PROGRAMS += test-cbrt-ieee
+test_cbrt_ieee_LDADD = $(LDADD) @CBRT_LIBM@
--- a/modules/cbrt-tests
+++ b/modules/cbrt-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-cbrt.c
+tests/test-cbrt.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-cbrt
 check_PROGRAMS += test-cbrt
+test_cbrt_SOURCES = test-cbrt.c randomd.c
 test_cbrt_LDADD = $(LDADD) @CBRT_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/cbrtf
@@ -0,0 +1,37 @@
+Description:
+cbrtf() function: cube root.
+
+Files:
+lib/cbrtf.c
+m4/cbrtf.m4
+m4/cbrt.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+isfinite        [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1]
+fabsf           [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1]
+frexpf          [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1]
+ldexpf          [test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1]
+
+configure.ac:
+gl_FUNC_CBRTF
+if test $HAVE_CBRTF = 0 || test $REPLACE_CBRTF = 1; then
+  AC_LIBOBJ([cbrtf])
+fi
+gl_MATH_MODULE_INDICATOR([cbrtf])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(CBRTF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/cbrtf-ieee
@@ -0,0 +1,24 @@
+Description:
+cbrtf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+cbrtf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(CBRTF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/cbrtf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-cbrtf-ieee.c
+tests/test-cbrt-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-cbrtf-ieee
+check_PROGRAMS += test-cbrtf-ieee
+test_cbrtf_ieee_LDADD = $(LDADD) @CBRTF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/cbrtf-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-cbrtf.c
+tests/test-cbrt.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-cbrtf
+check_PROGRAMS += test-cbrtf
+test_cbrtf_SOURCES = test-cbrtf.c randomf.c
+test_cbrtf_LDADD = $(LDADD) @CBRTF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/cbrtl
@@ -0,0 +1,37 @@
+Description:
+cbrtl() function: cube root.
+
+Files:
+lib/cbrtl.c
+m4/cbrtl.m4
+m4/cbrt.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+cbrt            [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isfinite        [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl          [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [{ test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_CBRTL
+if test $HAVE_CBRTL = 0 || test $REPLACE_CBRTL = 1; then
+  AC_LIBOBJ([cbrtl])
+fi
+gl_MATH_MODULE_INDICATOR([cbrtl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(CBRTL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/cbrtl-ieee
@@ -0,0 +1,28 @@
+Description:
+cbrtl() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/cbrtl-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+cbrtl
+fpieee
+
+configure.ac:
+gl_FUNC_CBRTL_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(CBRTL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/cbrtl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-cbrtl-ieee.c
+tests/test-cbrt-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-cbrtl-ieee
+check_PROGRAMS += test-cbrtl-ieee
+test_cbrtl_ieee_LDADD = $(LDADD) @CBRTL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/cbrtl-tests
@@ -0,0 +1,17 @@
+Files:
+tests/test-cbrtl.c
+tests/test-cbrt.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-cbrtl
+check_PROGRAMS += test-cbrtl
+test_cbrtl_SOURCES = test-cbrtl.c randoml.c
+test_cbrtl_LDADD = $(LDADD) @CBRTL_LIBM@
--- a/modules/ceil-ieee-tests
+++ b/modules/ceil-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-ceil-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnand-nolibm
 float
 signbit
 
--- a/modules/ceilf-ieee-tests
+++ b/modules/ceilf-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-ceilf-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnanf-nolibm
 float
 signbit
 
--- a/modules/ceill-ieee-tests
+++ b/modules/ceill-ieee-tests
@@ -1,10 +1,13 @@
 Files:
 tests/test-ceill-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
 fpucw
+isnanl-nolibm
 float
 signbit
 
--- a/modules/cond
+++ b/modules/cond
@@ -10,6 +10,7 @@
 threadlib
 lock
 errno
+extern-inline
 stdbool
 time
 gettimeofday
@@ -28,4 +29,3 @@
 
 Maintainer:
 Yoann Vandoorselaere
-
--- a/modules/configmake
+++ b/modules/configmake
@@ -44,7 +44,7 @@
 	  echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
 	  echo '#define PKGLIBDIR "$(pkglibdir)"'; \
 	  echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
-	} | sed '/""/d' > $@-t
+	} | sed '/""/d' > $@-t && \
 	mv -f $@-t $@
 
 BUILT_SOURCES += configmake.h
--- a/modules/copy-file
+++ b/modules/copy-file
@@ -14,6 +14,7 @@
 full-write
 gettext-h
 open
+quote
 safe-read
 stdlib
 unistd
--- a/modules/copysignf
+++ b/modules/copysignf
@@ -8,6 +8,7 @@
 
 Depends-on:
 math
+extensions
 signbit         [test $HAVE_COPYSIGNF = 0]
 
 configure.ac:
--- a/modules/copysignl
+++ b/modules/copysignl
@@ -8,6 +8,7 @@
 
 Depends-on:
 math
+extensions
 copysign        [test $HAVE_COPYSIGNL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
 signbit         [test $HAVE_COPYSIGNL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 
--- a/modules/cosf
+++ b/modules/cosf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 cos             [test $HAVE_COSF = 0]
 
 configure.ac:
--- a/modules/coshf
+++ b/modules/coshf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 cosh            [test $HAVE_COSHF = 0]
 
 configure.ac:
new file mode 100644
--- /dev/null
+++ b/modules/count-leading-zeros
@@ -0,0 +1,26 @@
+Description:
+Counts the number of leading 0-bits in a word.
+
+Files:
+lib/count-leading-zeros.c
+lib/count-leading-zeros.h
+m4/count-leading-zeros.m4
+
+Depends-on:
+extern-inline
+verify
+
+configure.ac:
+gl_COUNT_LEADING_ZEROS
+
+Makefile.am:
+lib_SOURCES += count-leading-zeros.c
+
+Include:
+"count-leading-zeros.h"
+
+License:
+LGPLv2+
+
+Maintainer:
+Eric Blake
new file mode 100644
--- /dev/null
+++ b/modules/count-leading-zeros-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-count-leading-zeros.c
+tests/macros.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-count-leading-zeros
+check_PROGRAMS += test-count-leading-zeros
--- a/modules/count-one-bits
+++ b/modules/count-one-bits
@@ -2,16 +2,19 @@
 Counts the number of 1-bits in a word.
 
 Files:
+lib/count-one-bits.c
 lib/count-one-bits.h
 m4/count-one-bits.m4
 
 Depends-on:
+extern-inline
 verify
 
 configure.ac:
 gl_COUNT_ONE_BITS
 
 Makefile.am:
+lib_SOURCES += count-one-bits.c
 
 Include:
 "count-one-bits.h"
--- a/modules/do-release-commit-and-tag
+++ b/modules/do-release-commit-and-tag
@@ -1,5 +1,5 @@
 Description:
-Automate the release-commit and tag process.
+Automate the release-commit and tag process.  See also readme-release.
 
 Files:
 build-aux/do-release-commit-and-tag
--- a/modules/dummy
+++ b/modules/dummy
@@ -14,7 +14,7 @@
 Include:
 
 License:
-LGPLv2+
+public domain
 
 Maintainer:
 all
--- a/modules/eealloc
+++ b/modules/eealloc
@@ -3,14 +3,19 @@
 
 Files:
 lib/eealloc.h
+lib/eealloc.c
 m4/eealloc.m4
+m4/malloc.m4
+m4/realloc.m4
 
 Depends-on:
+extern-inline
 
 configure.ac:
 gl_EEALLOC
 
 Makefile.am:
+lib_SOURCES += eealloc.c
 
 Include:
 <eealloc.h>
deleted file mode 100644
--- a/modules/elisp-comp
+++ /dev/null
@@ -1,19 +0,0 @@
-Description:
-Compile Emacs Lisp files.
-
-Files:
-build-aux/elisp-comp
-
-Depends-on:
-
-configure.ac:
-
-Makefile.am:
-
-Include:
-
-License:
-GPLed build tool
-
-Maintainer:
-Alexandre Duret-Lutz
--- a/modules/euidaccess
+++ b/modules/euidaccess
@@ -8,6 +8,7 @@
 Depends-on:
 unistd
 extensions
+root-uid
 group-member    [test $HAVE_EUIDACCESS = 0]
 stat            [test $HAVE_EUIDACCESS = 0]
 sys_stat        [test $HAVE_EUIDACCESS = 0]
new file mode 100644
--- /dev/null
+++ b/modules/execinfo
@@ -0,0 +1,43 @@
+Description:
+A GNU-like <execinfo.h>.
+
+Files:
+lib/execinfo.c
+lib/execinfo.in.h
+m4/execinfo.m4
+
+Depends-on:
+extern-inline
+
+configure.ac:
+gl_EXECINFO_H
+
+Makefile.am:
+BUILT_SOURCES += $(EXECINFO_H)
+
+# We need the following in order to create <execinfo.h> when the system
+# doesn't have one that works.
+if GL_GENERATE_EXECINFO_H
+execinfo.h: execinfo.in.h $(top_builddir)/config.status
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  cat $(srcdir)/execinfo.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+else
+execinfo.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += execinfo.h execinfo.h-t
+
+Include:
+<execinfo.h>
+
+Link:
+$(LIB_EXECINFO)
+
+License:
+LGPLv2+
+
+Maintainer:
+all
new file mode 100644
--- /dev/null
+++ b/modules/exp-ieee
@@ -0,0 +1,24 @@
+Description:
+exp() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+exp
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXP_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/exp-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-exp-ieee.c
+tests/test-exp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-exp-ieee
+check_PROGRAMS += test-exp-ieee
+test_exp_ieee_LDADD = $(LDADD) @EXP_LIBM@
--- a/modules/exp-tests
+++ b/modules/exp-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-exp.c
+tests/test-exp.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-exp
 check_PROGRAMS += test-exp
+test_exp_SOURCES = test-exp.c randomd.c
 test_exp_LDADD = $(LDADD) @EXP_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/exp2
@@ -0,0 +1,35 @@
+Description:
+exp2() function: exponential base 2 function.
+
+Files:
+lib/exp2.c
+m4/exp2.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+isnand          [test $HAVE_EXP2 = 0 || test $REPLACE_EXP2 = 1]
+round           [test $HAVE_EXP2 = 0 || test $REPLACE_EXP2 = 1]
+ldexp           [test $HAVE_EXP2 = 0 || test $REPLACE_EXP2 = 1]
+
+configure.ac:
+gl_FUNC_EXP2
+if test $HAVE_EXP2 = 0 || test $REPLACE_EXP2 = 1; then
+  AC_LIBOBJ([exp2])
+fi
+gl_MATH_MODULE_INDICATOR([exp2])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXP2_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/exp2-ieee
@@ -0,0 +1,24 @@
+Description:
+exp2() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+exp2
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXP2_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/exp2-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-exp2-ieee.c
+tests/test-exp2-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-exp2-ieee
+check_PROGRAMS += test-exp2-ieee
+test_exp2_ieee_LDADD = $(LDADD) @EXP2_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/exp2-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-exp2.c
+tests/test-exp2.h
+tests/signature.h
+tests/macros.h
+tests/randomd.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-exp2
+check_PROGRAMS += test-exp2
+test_exp2_SOURCES = test-exp2.c randomd.c
+test_exp2_LDADD = $(LDADD) @EXP2_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/exp2f
@@ -0,0 +1,32 @@
+Description:
+exp2f() function: exponential base 2 function.
+
+Files:
+lib/exp2f.c
+m4/exp2f.m4
+
+Depends-on:
+math
+extensions
+exp2            [test $HAVE_EXP2F = 0]
+
+configure.ac:
+gl_FUNC_EXP2F
+if test $HAVE_EXP2F = 0; then
+  AC_LIBOBJ([exp2f])
+fi
+gl_MATH_MODULE_INDICATOR([exp2f])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXP2F_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/exp2f-ieee
@@ -0,0 +1,24 @@
+Description:
+exp2f() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+exp2f
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXP2F_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/exp2f-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-exp2f-ieee.c
+tests/test-exp2-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-exp2f-ieee
+check_PROGRAMS += test-exp2f-ieee
+test_exp2f_ieee_LDADD = $(LDADD) @EXP2F_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/exp2f-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-exp2f.c
+tests/test-exp2.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-exp2f
+check_PROGRAMS += test-exp2f
+test_exp2f_SOURCES = test-exp2f.c randomf.c
+test_exp2f_LDADD = $(LDADD) @EXP2F_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/exp2l
@@ -0,0 +1,38 @@
+Description:
+exp2l() function: exponential base 2 function with long double argument.
+
+Files:
+lib/exp2l.c
+lib/expl-table.c
+m4/exp2l.m4
+
+Depends-on:
+math
+extensions
+exp2            [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float           [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+roundl          [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_EXP2L
+if test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; then
+  AC_LIBOBJ([exp2l])
+  AC_LIBOBJ([expl-table])
+fi
+gl_MATH_MODULE_INDICATOR([exp2l])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXP2L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/exp2l-ieee
@@ -0,0 +1,26 @@
+Description:
+exp2l() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/exp2l-ieee.m4
+
+Depends-on:
+exp2l
+fpieee
+
+configure.ac:
+gl_FUNC_EXP2L_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXP2L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/exp2l-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-exp2l-ieee.c
+tests/test-exp2-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-exp2l-ieee
+check_PROGRAMS += test-exp2l-ieee
+test_exp2l_ieee_LDADD = $(LDADD) @EXP2L_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/exp2l-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-exp2l.c
+tests/test-exp2.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-exp2l
+check_PROGRAMS += test-exp2l
+test_exp2l_SOURCES = test-exp2l.c randoml.c
+test_exp2l_LDADD = $(LDADD) @EXP2L_LIBM@
--- a/modules/expf
+++ b/modules/expf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 exp             [test $HAVE_EXPF = 0]
 
 configure.ac:
new file mode 100644
--- /dev/null
+++ b/modules/expf-ieee
@@ -0,0 +1,24 @@
+Description:
+expf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+expf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-expf-ieee.c
+tests/test-exp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expf-ieee
+check_PROGRAMS += test-expf-ieee
+test_expf_ieee_LDADD = $(LDADD) @EXPF_LIBM@
--- a/modules/expf-tests
+++ b/modules/expf-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-expf.c
+tests/test-exp.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-expf
 check_PROGRAMS += test-expf
+test_expf_SOURCES = test-expf.c randomf.c
 test_expf_LDADD = $(LDADD) @EXPF_LIBM@
--- a/modules/expl
+++ b/modules/expl
@@ -3,6 +3,7 @@
 
 Files:
 lib/expl.c
+lib/expl-table.c
 m4/expl.m4
 
 Depends-on:
@@ -10,12 +11,15 @@
 extensions
 exp             [test $HAVE_EXPL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
 float           [test $HAVE_EXPL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-floorl          [test $HAVE_EXPL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [test $HAVE_EXPL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+roundl          [test $HAVE_EXPL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [test $HAVE_EXPL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 
 configure.ac:
 gl_FUNC_EXPL
 if test $HAVE_EXPL = 0; then
   AC_LIBOBJ([expl])
+  AC_LIBOBJ([expl-table])
 fi
 gl_MATH_MODULE_INDICATOR([expl])
 
@@ -31,4 +35,4 @@
 LGPL
 
 Maintainer:
-Paolo Bonzini
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expl-ieee
@@ -0,0 +1,24 @@
+Description:
+expl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+expl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-expl-ieee.c
+tests/test-exp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expl-ieee
+check_PROGRAMS += test-expl-ieee
+test_expl_ieee_LDADD = $(LDADD) @EXPL_LIBM@
--- a/modules/expl-tests
+++ b/modules/expl-tests
@@ -1,14 +1,18 @@
 Files:
 tests/test-expl.c
+tests/test-exp.h
 tests/signature.h
 tests/macros.h
+tests/randoml.c
 
 Depends-on:
 fpucw
+float
 
 configure.ac:
 
 Makefile.am:
 TESTS += test-expl
 check_PROGRAMS += test-expl
+test_expl_SOURCES = test-expl.c randoml.c
 test_expl_LDADD = $(LDADD) @EXPL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/expm1
@@ -0,0 +1,36 @@
+Description:
+expm1() function: exponential function minus one.
+
+Files:
+lib/expm1.c
+m4/expm1.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+isnand          [test $HAVE_EXPM1 = 0 || test $REPLACE_EXPM1 = 1]
+exp             [test $HAVE_EXPM1 = 0 || test $REPLACE_EXPM1 = 1]
+round           [test $HAVE_EXPM1 = 0 || test $REPLACE_EXPM1 = 1]
+ldexp           [test $HAVE_EXPM1 = 0 || test $REPLACE_EXPM1 = 1]
+
+configure.ac:
+gl_FUNC_EXPM1
+if test $HAVE_EXPM1 = 0 || test $REPLACE_EXPM1 = 1; then
+  AC_LIBOBJ([expm1])
+fi
+gl_MATH_MODULE_INDICATOR([expm1])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPM1_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expm1-ieee
@@ -0,0 +1,28 @@
+Description:
+expm1() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/expm1-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+expm1
+fpieee
+
+configure.ac:
+gl_FUNC_EXPM1_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPM1_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expm1-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-expm1-ieee.c
+tests/test-expm1-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expm1-ieee
+check_PROGRAMS += test-expm1-ieee
+test_expm1_ieee_LDADD = $(LDADD) @EXPM1_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/expm1-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-expm1.c
+tests/test-expm1.h
+tests/signature.h
+tests/macros.h
+tests/randomd.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expm1
+check_PROGRAMS += test-expm1
+test_expm1_SOURCES = test-expm1.c randomd.c
+test_expm1_LDADD = $(LDADD) @EXPM1_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/expm1f
@@ -0,0 +1,32 @@
+Description:
+expm1f() function: exponential function minus one.
+
+Files:
+lib/expm1f.c
+m4/expm1f.m4
+
+Depends-on:
+math
+extensions
+expm1           [test $HAVE_EXPM1F = 0 || test $REPLACE_EXPM1F = 1]
+
+configure.ac:
+gl_FUNC_EXPM1F
+if test $HAVE_EXPM1F = 0 || test $REPLACE_EXPM1F = 1; then
+  AC_LIBOBJ([expm1f])
+fi
+gl_MATH_MODULE_INDICATOR([expm1f])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPM1F_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expm1f-ieee
@@ -0,0 +1,26 @@
+Description:
+expm1f() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+expm1f
+fpieee
+expm1-ieee      [test $HAVE_EXPM1F = 0]
+
+configure.ac:
+AC_REQUIRE([gl_FUNC_EXPM1F])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPM1F_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expm1f-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-expm1f-ieee.c
+tests/test-expm1-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expm1f-ieee
+check_PROGRAMS += test-expm1f-ieee
+test_expm1f_ieee_LDADD = $(LDADD) @EXPM1F_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/expm1f-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-expm1f.c
+tests/test-expm1.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expm1f
+check_PROGRAMS += test-expm1f
+test_expm1f_SOURCES = test-expm1f.c randomf.c
+test_expm1f_LDADD = $(LDADD) @EXPM1F_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/expm1l
@@ -0,0 +1,37 @@
+Description:
+expm1l() function: exponential function minus one with long double argument.
+
+Files:
+lib/expm1l.c
+m4/expm1l.m4
+
+Depends-on:
+math
+extensions
+expm1           [test $HAVE_EXPM1L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float           [test $HAVE_EXPM1L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [test $HAVE_EXPM1L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+expl            [test $HAVE_EXPM1L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+roundl          [test $HAVE_EXPM1L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [test $HAVE_EXPM1L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_EXPM1L
+if test $HAVE_EXPM1L = 0; then
+  AC_LIBOBJ([expm1l])
+fi
+gl_MATH_MODULE_INDICATOR([expm1l])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPM1L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expm1l-ieee
@@ -0,0 +1,26 @@
+Description:
+expm1l() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+expm1l
+fpieee
+expm1-ieee      [test $HAVE_EXPM1L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+
+configure.ac:
+AC_REQUIRE([gl_FUNC_EXPM1L])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPM1L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/expm1l-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-expm1l-ieee.c
+tests/test-expm1-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expm1l-ieee
+check_PROGRAMS += test-expm1l-ieee
+test_expm1l_ieee_LDADD = $(LDADD) @EXPM1L_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/expm1l-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-expm1l.c
+tests/test-expm1.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-expm1l
+check_PROGRAMS += test-expm1l
+test_expm1l_SOURCES = test-expm1l.c randoml.c
+test_expm1l_LDADD = $(LDADD) @EXPM1L_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/extern-inline
@@ -0,0 +1,20 @@
+Description:
+'extern inline' a la ISO C99.
+
+Files:
+m4/extern-inline.m4
+
+Depends-on:
+
+configure.ac:
+AC_REQUIRE([gl_EXTERN_INLINE])
+
+Makefile.am:
+
+Include:
+
+License:
+unlimited
+
+Maintainer:
+all
new file mode 100644
--- /dev/null
+++ b/modules/fabs-ieee
@@ -0,0 +1,24 @@
+Description:
+fabs() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+fabs
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FABS_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fabs-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-fabs-ieee.c
+tests/test-fabs-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fabs-ieee
+check_PROGRAMS += test-fabs-ieee
+test_fabs_ieee_LDADD = $(LDADD) @FABS_LIBM@
--- a/modules/fabs-tests
+++ b/modules/fabs-tests
@@ -1,13 +1,18 @@
 Files:
 tests/test-fabs.c
+tests/test-fabs.h
 tests/signature.h
+tests/minus-zero.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
+signbit
 
 configure.ac:
 
 Makefile.am:
 TESTS += test-fabs
 check_PROGRAMS += test-fabs
+test_fabs_SOURCES = test-fabs.c randomd.c
 test_fabs_LDADD = $(LDADD) @FABS_LIBM@
--- a/modules/fabsf
+++ b/modules/fabsf
@@ -8,6 +8,7 @@
 
 Depends-on:
 math
+extensions
 fabs            [test $HAVE_FABSF = 0]
 
 configure.ac:
new file mode 100644
--- /dev/null
+++ b/modules/fabsf-ieee
@@ -0,0 +1,24 @@
+Description:
+fabsf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+fabsf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FABSF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fabsf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-fabsf-ieee.c
+tests/test-fabs-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fabsf-ieee
+check_PROGRAMS += test-fabsf-ieee
+test_fabsf_ieee_LDADD = $(LDADD) @FABSF_LIBM@
--- a/modules/fabsf-tests
+++ b/modules/fabsf-tests
@@ -1,13 +1,18 @@
 Files:
 tests/test-fabsf.c
+tests/test-fabs.h
 tests/signature.h
+tests/minus-zero.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
+signbit
 
 configure.ac:
 
 Makefile.am:
 TESTS += test-fabsf
 check_PROGRAMS += test-fabsf
+test_fabsf_SOURCES = test-fabsf.c randomf.c
 test_fabsf_LDADD = $(LDADD) @FABSF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/fabsl
@@ -0,0 +1,34 @@
+Description:
+fabsl() function: absolute value.
+
+Files:
+lib/fabsl.c
+m4/fabsl.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+fabs            [{ test $HAVE_FABSL = 0 || test $REPLACE_FABSL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+signbit         [{ test $HAVE_FABSL = 0 || test $REPLACE_FABSL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_FABSL
+if test $HAVE_FABSL = 0 || test $REPLACE_FABSL = 1; then
+  AC_LIBOBJ([fabsl])
+fi
+gl_MATH_MODULE_INDICATOR([fabsl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FABSL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fabsl-ieee
@@ -0,0 +1,24 @@
+Description:
+fabsl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+fabsl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FABSL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fabsl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-fabsl-ieee.c
+tests/test-fabs-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fabsl-ieee
+check_PROGRAMS += test-fabsl-ieee
+test_fabsl_ieee_LDADD = $(LDADD) @FABSL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/fabsl-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-fabsl.c
+tests/test-fabs.h
+tests/signature.h
+tests/minus-zero.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fabsl
+check_PROGRAMS += test-fabsl
+test_fabsl_SOURCES = test-fabsl.c randoml.c
+test_fabsl_LDADD = $(LDADD) @FABSL_LIBM@
--- a/modules/faccessat
+++ b/modules/faccessat
@@ -4,7 +4,6 @@
 Files:
 lib/faccessat.c
 lib/at-func.c
-lib/openat-priv.h
 m4/faccessat.m4
 
 Depends-on:
--- a/modules/fchmodat
+++ b/modules/fchmodat
@@ -3,8 +3,8 @@
 
 Files:
 lib/fchmodat.c
+lib/chmodat.c
 lib/at-func.c
-lib/openat-priv.h
 m4/fchmodat.m4
 
 Depends-on:
@@ -13,6 +13,7 @@
 at-internal     [test $HAVE_FCHMODAT = 0]
 dosname         [test $HAVE_FCHMODAT = 0]
 errno           [test $HAVE_FCHMODAT = 0]
+extern-inline   [test $HAVE_FCHMODAT = 0]
 fchdir          [test $HAVE_FCHMODAT = 0]
 fcntl-h         [test $HAVE_FCHMODAT = 0]
 openat-die      [test $HAVE_FCHMODAT = 0]
@@ -24,11 +25,11 @@
 if test $HAVE_FCHMODAT = 0; then
   AC_LIBOBJ([fchmodat])
 fi
-AC_REQUIRE([AC_C_INLINE]) dnl because 'inline' is used in lib/openat.h
 gl_MODULE_INDICATOR([fchmodat]) dnl for lib/openat.h
 gl_SYS_STAT_MODULE_INDICATOR([fchmodat])
 
 Makefile.am:
+lib_SOURCES += chmodat.c
 
 Include:
 <sys/stat.h>
--- a/modules/fchownat
+++ b/modules/fchownat
@@ -3,8 +3,8 @@
 
 Files:
 lib/fchownat.c
+lib/chownat.c
 lib/at-func.c
-lib/openat-priv.h
 m4/fchownat.m4
 
 Depends-on:
@@ -13,6 +13,7 @@
 at-internal     [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
 dosname         [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
 errno           [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
+extern-inline   [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
 fchdir          [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
 fcntl-h         [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
 lchown          [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
@@ -26,11 +27,11 @@
 if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
   AC_LIBOBJ([fchownat])
 fi
-AC_REQUIRE([AC_C_INLINE]) dnl because 'inline' is used in lib/openat.h
 gl_MODULE_INDICATOR([fchownat]) dnl for lib/openat.h
 gl_UNISTD_MODULE_INDICATOR([fchownat])
 
 Makefile.am:
+lib_SOURCES += chownat.c
 
 Include:
 <unistd.h>
--- a/modules/fcntl
+++ b/modules/fcntl
@@ -8,6 +8,7 @@
 Depends-on:
 fcntl-h
 extensions
+close           [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]
 dup2            [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]
 getdtablesize   [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]
 msvc-nothrow    [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]
--- a/modules/fcntl-h
+++ b/modules/fcntl-h
@@ -12,6 +12,7 @@
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
+sys_types
 unistd
 
 configure.ac:
--- a/modules/fdutimensat
+++ b/modules/fdutimensat
@@ -10,7 +10,6 @@
 utimensat
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE]) dnl because 'inline' is used in lib/utimens.h
 gl_MODULE_INDICATOR([fdutimensat])
 
 Makefile.am:
--- a/modules/fdutimensat-tests
+++ b/modules/fdutimensat-tests
@@ -17,7 +17,6 @@
 utimecmp
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 TESTS += test-fdutimensat
--- a/modules/fflush
+++ b/modules/fflush
@@ -8,12 +8,13 @@
 
 Depends-on:
 stdio
-fpurge          [test $REPLACE_FFLUSH = 1]
-ftello          [test $REPLACE_FFLUSH = 1]
-freading        [test $REPLACE_FFLUSH = 1]
-lseek           [test $REPLACE_FFLUSH = 1]
-unistd          [test $REPLACE_FFLUSH = 1]
-fseeko          [test $REPLACE_FFLUSH = 1]
+snippet/unused-parameter  [test $REPLACE_FFLUSH = 1]
+fpurge                    [test $REPLACE_FFLUSH = 1]
+ftello                    [test $REPLACE_FFLUSH = 1]
+freading                  [test $REPLACE_FFLUSH = 1]
+lseek                     [test $REPLACE_FFLUSH = 1]
+unistd                    [test $REPLACE_FFLUSH = 1]
+fseeko                    [test $REPLACE_FFLUSH = 1]
 
 configure.ac-early:
 AC_REQUIRE([AC_FUNC_FSEEKO])
--- a/modules/filevercmp
+++ b/modules/filevercmp
@@ -11,7 +11,6 @@
 string
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 lib_SOURCES += filevercmp.c
--- a/modules/floor-ieee-tests
+++ b/modules/floor-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-floor-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnand-nolibm
 float
 signbit
 
--- a/modules/floorf-ieee-tests
+++ b/modules/floorf-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-floorf-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnanf-nolibm
 float
 signbit
 
--- a/modules/floorl-ieee-tests
+++ b/modules/floorl-ieee-tests
@@ -1,10 +1,13 @@
 Files:
 tests/test-floorl-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
 fpucw
+isnanl-nolibm
 float
 signbit
 
new file mode 100644
--- /dev/null
+++ b/modules/fma-ieee
@@ -0,0 +1,24 @@
+Description:
+fma() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+fma
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FMA_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fma-ieee-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-fma-ieee.c
+tests/test-fma-ieee.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fma-ieee
+check_PROGRAMS += test-fma-ieee
+test_fma_ieee_LDADD = $(LDADD) @FMA_LIBM@
--- a/modules/fmaf
+++ b/modules/fmaf
@@ -11,6 +11,7 @@
 
 Depends-on:
 math
+extensions
 float           [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
 stdbool         [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
 verify          [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
new file mode 100644
--- /dev/null
+++ b/modules/fmaf-ieee
@@ -0,0 +1,24 @@
+Description:
+fmaf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+fmaf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FMAF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fmaf-ieee-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-fmaf-ieee.c
+tests/test-fma-ieee.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fmaf-ieee
+check_PROGRAMS += test-fmaf-ieee
+test_fmaf_ieee_LDADD = $(LDADD) @FMAF_LIBM@
--- a/modules/fmal
+++ b/modules/fmal
@@ -11,6 +11,7 @@
 
 Depends-on:
 math
+extensions
 fma             [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
 float           [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 stdbool         [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
new file mode 100644
--- /dev/null
+++ b/modules/fmal-ieee
@@ -0,0 +1,24 @@
+Description:
+fmal() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+fmal
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FMAL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fmal-ieee-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-fmal-ieee.c
+tests/test-fma-ieee.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fmal-ieee
+check_PROGRAMS += test-fmal-ieee
+test_fmal_ieee_LDADD = $(LDADD) @FMAL_LIBM@
--- a/modules/fmod
+++ b/modules/fmod
@@ -2,13 +2,27 @@
 fmod() function: floating-point remainder function.
 
 Files:
+lib/fmod.c
 m4/fmod.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
+isfinite        [test $REPLACE_FMOD = 1]
+signbit         [test $REPLACE_FMOD = 1]
+fabs            [test $REPLACE_FMOD = 1]
+frexp           [test $REPLACE_FMOD = 1]
+trunc           [test $REPLACE_FMOD = 1]
+ldexp           [test $REPLACE_FMOD = 1]
+isnand          [test $REPLACE_FMOD = 1]
+isinf           [test $REPLACE_FMOD = 1]
 
 configure.ac:
 gl_FUNC_FMOD
+if test $REPLACE_FMOD = 1; then
+  AC_LIBOBJ([fmod])
+fi
+gl_MATH_MODULE_INDICATOR([fmod])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/fmod-ieee
@@ -0,0 +1,28 @@
+Description:
+fmod() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/fmod-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+fmod
+fpieee
+
+configure.ac:
+gl_FUNC_FMOD_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FMOD_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fmod-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-fmod-ieee.c
+tests/test-fmod-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fmod-ieee
+check_PROGRAMS += test-fmod-ieee
+test_fmod_ieee_LDADD = $(LDADD) @FMOD_LIBM@
--- a/modules/fmod-tests
+++ b/modules/fmod-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-fmod.c
+tests/test-fmod.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-fmod
 check_PROGRAMS += test-fmod
+test_fmod_SOURCES = test-fmod.c randomd.c
 test_fmod_LDADD = $(LDADD) @FMOD_LIBM@
--- a/modules/fmodf
+++ b/modules/fmodf
@@ -7,11 +7,12 @@
 
 Depends-on:
 math
-fmod            [test $HAVE_FMODF = 0]
+extensions
+fmod            [test $HAVE_FMODF = 0 || test $REPLACE_FMODF = 1]
 
 configure.ac:
 gl_FUNC_FMODF
-if test $HAVE_FMODF = 0; then
+if test $HAVE_FMODF = 0 || test $REPLACE_FMODF = 1; then
   AC_LIBOBJ([fmodf])
 fi
 gl_MATH_MODULE_INDICATOR([fmodf])
new file mode 100644
--- /dev/null
+++ b/modules/fmodf-ieee
@@ -0,0 +1,27 @@
+Description:
+fmodf() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/fmodf-ieee.m4
+
+Depends-on:
+fmodf
+fpieee
+fmod-ieee       [test $HAVE_FMODF = 0]
+
+configure.ac:
+gl_FUNC_FMODF_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FMODF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fmodf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-fmodf-ieee.c
+tests/test-fmod-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fmodf-ieee
+check_PROGRAMS += test-fmodf-ieee
+test_fmodf_ieee_LDADD = $(LDADD) @FMODF_LIBM@
--- a/modules/fmodf-tests
+++ b/modules/fmodf-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-fmodf.c
+tests/test-fmod.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-fmodf
 check_PROGRAMS += test-fmodf
+test_fmodf_SOURCES = test-fmodf.c randomf.c
 test_fmodf_LDADD = $(LDADD) @FMODF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/fmodl
@@ -0,0 +1,43 @@
+Description:
+fmodl() function: floating-point remainder function.
+
+Files:
+lib/fmodl.c
+lib/fmod.c
+m4/fmodl.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+fmod            [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float           [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isfinite        [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+signbit         [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+fabsl           [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl          [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+truncl          [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isinf           [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_FMODL
+if test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; then
+  AC_LIBOBJ([fmodl])
+fi
+gl_MATH_MODULE_INDICATOR([fmodl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FMODL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fmodl-ieee
@@ -0,0 +1,27 @@
+Description:
+fmodl() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/fmodl-ieee.m4
+
+Depends-on:
+fmodl
+fpieee
+fmod-ieee       [{ test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+
+configure.ac:
+gl_FUNC_FMODL_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FMODL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/fmodl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-fmodl-ieee.c
+tests/test-fmod-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fmodl-ieee
+check_PROGRAMS += test-fmodl-ieee
+test_fmodl_ieee_LDADD = $(LDADD) @FMODL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/fmodl-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-fmodl.c
+tests/test-fmod.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fmodl
+check_PROGRAMS += test-fmodl
+test_fmodl_SOURCES = test-fmodl.c randoml.c
+test_fmodl_LDADD = $(LDADD) @FMODL_LIBM@
--- a/modules/freadahead
+++ b/modules/freadahead
@@ -6,13 +6,17 @@
 lib/freadahead.h
 lib/freadahead.c
 lib/stdio-impl.h
+m4/freadahead.m4
 
 Depends-on:
 
 configure.ac:
+gl_FUNC_FREADAHEAD
+if test $ac_cv_func___freadahead = no; then
+  AC_LIBOBJ([freadahead])
+fi
 
 Makefile.am:
-lib_SOURCES += freadahead.c
 
 Include:
 "freadahead.h"
--- a/modules/freadptr
+++ b/modules/freadptr
@@ -5,13 +5,17 @@
 lib/freadptr.h
 lib/freadptr.c
 lib/stdio-impl.h
+m4/freadptr.m4
 
 Depends-on:
 
 configure.ac:
+gl_FUNC_FREADPTR
+if test $ac_cv_func___freadptr = no; then
+  AC_LIBOBJ([freadptr])
+fi
 
 Makefile.am:
-lib_SOURCES += freadptr.c
 
 Include:
 "freadptr.h"
--- a/modules/freadseek
+++ b/modules/freadseek
@@ -5,6 +5,7 @@
 lib/freadseek.h
 lib/freadseek.c
 lib/stdio-impl.h
+m4/freadseek.m4
 
 Depends-on:
 freadahead
@@ -13,7 +14,7 @@
 lseek
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
+gl_FUNC_FREADSEEK
 
 Makefile.am:
 lib_SOURCES += freadseek.c
new file mode 100644
--- /dev/null
+++ b/modules/frexp-ieee
@@ -0,0 +1,24 @@
+Description:
+frexp() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+frexp
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FREXP_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/frexp-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-frexp-ieee.c
+tests/test-frexp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-frexp-ieee
+check_PROGRAMS += test-frexp-ieee
+test_frexp_ieee_LDADD = $(LDADD) @FREXP_LIBM@
--- a/modules/frexp-nolibm-tests
+++ b/modules/frexp-nolibm-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-frexp.c
+tests/test-frexp.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 isnand-nolibm
@@ -15,4 +17,4 @@
 Makefile.am:
 TESTS += test-frexp-nolibm
 check_PROGRAMS += test-frexp-nolibm
-test_frexp_nolibm_SOURCES = test-frexp.c
+test_frexp_nolibm_SOURCES = test-frexp.c randomd.c
--- a/modules/frexp-tests
+++ b/modules/frexp-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-frexp.c
+tests/test-frexp.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 isnand-nolibm
@@ -15,4 +17,5 @@
 Makefile.am:
 TESTS += test-frexp
 check_PROGRAMS += test-frexp
+test_frexp_SOURCES = test-frexp.c randomd.c
 test_frexp_LDADD = $(LDADD) @FREXP_LIBM@
--- a/modules/frexpf
+++ b/modules/frexpf
@@ -8,6 +8,7 @@
 
 Depends-on:
 math
+extensions
 frexp           [test $HAVE_FREXPF = 0 || test $REPLACE_FREXPF = 1]
 
 configure.ac:
new file mode 100644
--- /dev/null
+++ b/modules/frexpf-ieee
@@ -0,0 +1,24 @@
+Description:
+frexpf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+frexpf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FREXPF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/frexpf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-frexpf-ieee.c
+tests/test-frexp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-frexpf-ieee
+check_PROGRAMS += test-frexpf-ieee
+test_frexpf_ieee_LDADD = $(LDADD) @FREXPF_LIBM@
--- a/modules/frexpf-tests
+++ b/modules/frexpf-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-frexpf.c
+tests/test-frexp.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 isnanf-nolibm
@@ -15,4 +17,5 @@
 Makefile.am:
 TESTS += test-frexpf
 check_PROGRAMS += test-frexpf
+test_frexpf_SOURCES = test-frexpf.c randomf.c
 test_frexpf_LDADD = $(LDADD) @FREXPF_LIBM@
--- a/modules/frexpl
+++ b/modules/frexpl
@@ -8,6 +8,7 @@
 
 Depends-on:
 math
+extensions
 frexp           [{ test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
 isnanl-nolibm   [{ test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 fpucw           [{ test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
new file mode 100644
--- /dev/null
+++ b/modules/frexpl-ieee
@@ -0,0 +1,24 @@
+Description:
+frexpl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+frexpl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(FREXPL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/frexpl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-frexpl-ieee.c
+tests/test-frexp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-frexpl-ieee
+check_PROGRAMS += test-frexpl-ieee
+test_frexpl_ieee_LDADD = $(LDADD) @FREXPL_LIBM@
--- a/modules/frexpl-nolibm-tests
+++ b/modules/frexpl-nolibm-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-frexpl.c
+tests/test-frexp.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randoml.c
 
 Depends-on:
 fpucw
@@ -16,4 +18,4 @@
 Makefile.am:
 TESTS += test-frexpl-nolibm
 check_PROGRAMS += test-frexpl-nolibm
-test_frexpl_nolibm_SOURCES = test-frexpl.c
+test_frexpl_nolibm_SOURCES = test-frexpl.c randoml.c
--- a/modules/frexpl-tests
+++ b/modules/frexpl-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-frexpl.c
+tests/test-frexp.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randoml.c
 
 Depends-on:
 fpucw
@@ -17,4 +19,5 @@
 Makefile.am:
 TESTS += test-frexpl
 check_PROGRAMS += test-frexpl
+test_frexpl_SOURCES = test-frexpl.c randoml.c
 test_frexpl_LDADD = $(LDADD) @FREXPL_LIBM@
--- a/modules/fseeko
+++ b/modules/fseeko
@@ -11,6 +11,7 @@
 largefile
 lseek
 stdio
+sys_types
 # Just to guarantee consistency between fseek() and fseeko().
 fseek
 
@@ -21,6 +22,7 @@
 gl_FUNC_FSEEKO
 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
   AC_LIBOBJ([fseeko])
+  gl_PREREQ_FSEEKO
 fi
 gl_STDIO_MODULE_INDICATOR([fseeko])
 
--- a/modules/fseterr
+++ b/modules/fseterr
@@ -5,13 +5,17 @@
 lib/fseterr.h
 lib/fseterr.c
 lib/stdio-impl.h
+m4/fseterr.m4
 
 Depends-on:
 
 configure.ac:
+gl_FUNC_FSETERR
+if test $ac_cv_func___fseterr = no; then
+  AC_LIBOBJ([fseterr])
+fi
 
 Makefile.am:
-lib_SOURCES += fseterr.c
 
 Include:
 "fseterr.h"
--- a/modules/fstatat
+++ b/modules/fstatat
@@ -3,8 +3,8 @@
 
 Files:
 lib/fstatat.c
+lib/statat.c
 lib/at-func.c
-lib/openat-priv.h
 m4/fstatat.m4
 m4/lstat.m4
 
@@ -14,6 +14,7 @@
 at-internal     [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
 dosname         [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
 errno           [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
+extern-inline   [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
 fchdir          [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
 fcntl-h         [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
 lstat           [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
@@ -26,11 +27,11 @@
 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
   AC_LIBOBJ([fstatat])
 fi
-AC_REQUIRE([AC_C_INLINE]) dnl because 'inline' is used in lib/openat.h
 gl_MODULE_INDICATOR([fstatat]) dnl for lib/openat.h
 gl_SYS_STAT_MODULE_INDICATOR([fstatat])
 
 Makefile.am:
+lib_SOURCES += statat.c
 
 Include:
 <sys/stat.h>
--- a/modules/ftello
+++ b/modules/ftello
@@ -11,6 +11,7 @@
 stdio
 extensions
 largefile
+sys_types
 lseek           [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1]
 # Just to guarantee consistency between ftell() and ftello().
 ftell
@@ -22,6 +23,7 @@
 gl_FUNC_FTELLO
 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
   AC_LIBOBJ([ftello])
+  gl_PREREQ_FTELLO
 fi
 gl_STDIO_MODULE_INDICATOR([ftello])
 
--- a/modules/ftruncate
+++ b/modules/ftruncate
@@ -7,12 +7,14 @@
 
 Depends-on:
 unistd
+sys_types
 largefile
-msvc-inval      [test $HAVE_FTRUNCATE = 0]
+msvc-nothrow    [test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1]
+msvc-inval      [test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1]
 
 configure.ac:
 gl_FUNC_FTRUNCATE
-if test $HAVE_FTRUNCATE = 0; then
+if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
   AC_LIBOBJ([ftruncate])
   gl_PREREQ_FTRUNCATE
 fi
--- a/modules/fts
+++ b/modules/fts
@@ -18,6 +18,7 @@
 fchdir
 fcntl-h
 fcntl-safer
+fdopendir
 fstat
 hash
 i-ring
--- a/modules/futimens-tests
+++ b/modules/futimens-tests
@@ -15,7 +15,6 @@
 utimecmp
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 TESTS += test-futimens
--- a/modules/get-rusage-as
+++ b/modules/get-rusage-as
@@ -14,7 +14,6 @@
 vma-iter
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 AC_CHECK_FUNCS_ONCE([setrlimit])
 gl_FUNC_MMAP_ANON
 AC_CHECK_HEADERS_ONCE([sys/mman.h])
--- a/modules/get-rusage-data
+++ b/modules/get-rusage-data
@@ -14,7 +14,6 @@
 vma-iter
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 AC_CHECK_FUNCS_ONCE([setrlimit])
 gl_FUNC_MMAP_ANON
 
--- a/modules/gethrxtime
+++ b/modules/gethrxtime
@@ -3,6 +3,7 @@
 
 Files:
 lib/xtime.h
+lib/xtime.c
 lib/gethrxtime.c
 lib/gethrxtime.h
 m4/gethrxtime.m4
@@ -11,17 +12,15 @@
 Depends-on:
 clock-time
 extensions
+extern-inline
 gettime
 sys_time
 
 configure.ac:
 gl_GETHRXTIME
-if test $ac_cv_have_decl_gethrtime = no || test $gl_cv_arithmetic_hrtime_t = no; then
-  AC_LIBOBJ([gethrxtime])
-  gl_PREREQ_GETHRXTIME
-fi
 
 Makefile.am:
+lib_SOURCES += gethrxtime.c xtime.c
 
 Include:
 "xtime.h"
new file mode 100644
--- /dev/null
+++ b/modules/getrusage
@@ -0,0 +1,28 @@
+Description:
+getrusage() function: Get resource usage of current process.
+
+Files:
+lib/getrusage.c
+m4/getrusage.m4
+
+Depends-on:
+sys_resource
+stdint          [test $HAVE_GETRUSAGE = 0]
+
+configure.ac:
+gl_FUNC_GETRUSAGE
+if test $HAVE_GETRUSAGE = 0; then
+  AC_LIBOBJ([getrusage])
+fi
+gl_SYS_RESOURCE_MODULE_INDICATOR([getrusage])
+
+Makefile.am:
+
+Include:
+<sys/resource.h>
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/getrusage-tests
@@ -0,0 +1,13 @@
+Files:
+tests/test-getrusage.c
+tests/signature.h
+tests/macros.h
+
+Depends-on:
+gettimeofday
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-getrusage
+check_PROGRAMS += test-getrusage
--- a/modules/gnu-web-doc-update
+++ b/modules/gnu-web-doc-update
@@ -1,5 +1,6 @@
 Description:
-update the official GNU web documentation for your project
+Update the official GNU web documentation for your project.
+See also readme-release.
 
 Files:
 build-aux/gnu-web-doc-update
--- a/modules/gnumakefile
+++ b/modules/gnumakefile
@@ -21,7 +21,7 @@
 Makefile.am:
 distclean-local: clean-GNUmakefile
 clean-GNUmakefile:
-	test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+	test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
 
 Include:
 
--- a/modules/grantpt
+++ b/modules/grantpt
@@ -9,7 +9,6 @@
 Depends-on:
 stdlib
 extensions
-fcntl-h         [test $HAVE_GRANTPT = 0]
 pt_chown        [test $HAVE_GRANTPT = 0]
 waitpid         [test $HAVE_GRANTPT = 0]
 configmake      [test $HAVE_GRANTPT = 0]
--- a/modules/group-member
+++ b/modules/group-member
@@ -8,9 +8,8 @@
 Depends-on:
 unistd
 extensions
-getgroups       [test $HAVE_GROUP_MEMBER = 0]
-xalloc          [test $HAVE_GROUP_MEMBER = 0]
-stdbool         [test $HAVE_GROUP_MEMBER = 0]
+getgroups        [test $HAVE_GROUP_MEMBER = 0]
+xalloc-oversized [test $HAVE_GROUP_MEMBER = 0]
 
 configure.ac:
 gl_FUNC_GROUP_MEMBER
--- a/modules/hash-pjw
+++ b/modules/hash-pjw
@@ -16,8 +16,7 @@
 "hash-pjw.h"
 
 License:
-GPL
+LGPLv2+
 
 Maintainer:
 Jim Meyering
-
new file mode 100644
--- /dev/null
+++ b/modules/hash-pjw-bare
@@ -0,0 +1,22 @@
+Description:
+Compute a hash value for a buffer of known size.
+
+Files:
+lib/hash-pjw-bare.h
+lib/hash-pjw-bare.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += hash-pjw-bare.h hash-pjw-bare.c
+
+Include:
+"hash-pjw-bare.h"
+
+License:
+LGPLv2+
+
+Maintainer:
+Jim Meyering
--- a/modules/human
+++ b/modules/human
@@ -11,6 +11,7 @@
 argmatch
 error
 intprops
+localeconv
 memmove
 xstrtoumax
 stdbool
--- a/modules/hypot
+++ b/modules/hypot
@@ -2,12 +2,26 @@
 hypot() function: length of a vector in the plane.
 
 Files:
+lib/hypot.c
+m4/hypot.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
+extensions
+isfinite        [test $REPLACE_HYPOT = 1]
+fabs            [test $REPLACE_HYPOT = 1]
+frexp           [test $REPLACE_HYPOT = 1]
+ldexp           [test $REPLACE_HYPOT = 1]
+sqrt            [test $REPLACE_HYPOT = 1]
+isinf           [test $REPLACE_HYPOT = 1]
 
 configure.ac:
-gl_COMMON_DOUBLE_MATHFUNC([hypot])
+gl_FUNC_HYPOT
+if test $REPLACE_HYPOT = 1; then
+  AC_LIBOBJ([hypot])
+fi
+gl_MATH_MODULE_INDICATOR([hypot])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/hypot-ieee
@@ -0,0 +1,26 @@
+Description:
+hypot() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/hypot-ieee.m4
+
+Depends-on:
+hypot
+fpieee
+
+configure.ac:
+gl_FUNC_HYPOT_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(HYPOT_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/hypot-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-hypot-ieee.c
+tests/test-hypot-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-hypot-ieee
+check_PROGRAMS += test-hypot-ieee
+test_hypot_ieee_LDADD = $(LDADD) @HYPOT_LIBM@
--- a/modules/hypot-tests
+++ b/modules/hypot-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-hypot.c
+tests/test-hypot.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-hypot
 check_PROGRAMS += test-hypot
+test_hypot_SOURCES = test-hypot.c randomd.c
 test_hypot_LDADD = $(LDADD) @HYPOT_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/hypotf
@@ -0,0 +1,33 @@
+Description:
+hypotf() function: length of a vector in the plane.
+
+Files:
+lib/hypotf.c
+m4/hypotf.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+hypot           [test $HAVE_HYPOTF = 0 || test $REPLACE_HYPOTF = 1]
+
+configure.ac:
+gl_FUNC_HYPOTF
+if test $HAVE_HYPOTF = 0 || test $REPLACE_HYPOTF = 1; then
+  AC_LIBOBJ([hypotf])
+fi
+gl_MATH_MODULE_INDICATOR([hypotf])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(HYPOTF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/hypotf-ieee
@@ -0,0 +1,27 @@
+Description:
+hypotf() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/hypotf-ieee.m4
+
+Depends-on:
+hypotf
+fpieee
+hypot-ieee      [test $HAVE_HYPOTF = 0 || test $REPLACE_HYPOTF = 1]
+
+configure.ac:
+gl_FUNC_HYPOTF_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(HYPOTF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/hypotf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-hypotf-ieee.c
+tests/test-hypot-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-hypotf-ieee
+check_PROGRAMS += test-hypotf-ieee
+test_hypotf_ieee_LDADD = $(LDADD) @HYPOTF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/hypotf-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-hypotf.c
+tests/test-hypot.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-hypotf
+check_PROGRAMS += test-hypotf
+test_hypotf_SOURCES = test-hypotf.c randomf.c
+test_hypotf_LDADD = $(LDADD) @HYPOTF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/hypotl
@@ -0,0 +1,39 @@
+Description:
+hypotl() function: length of a vector in the plane.
+
+Files:
+lib/hypotl.c
+m4/hypotl.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+hypot           [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isfinite        [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+fabsl           [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl          [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+sqrtl           [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isinf           [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_HYPOTL
+if test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; then
+  AC_LIBOBJ([hypotl])
+fi
+gl_MATH_MODULE_INDICATOR([hypotl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(HYPOTL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/hypotl-ieee
@@ -0,0 +1,27 @@
+Description:
+hypotl() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/hypotl-ieee.m4
+
+Depends-on:
+hypotl
+fpieee
+hypot-ieee      [{ test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+
+configure.ac:
+gl_FUNC_HYPOTL_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(HYPOTL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/hypotl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-hypotl-ieee.c
+tests/test-hypot-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-hypotl-ieee
+check_PROGRAMS += test-hypotl-ieee
+test_hypotl_ieee_LDADD = $(LDADD) @HYPOTL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/hypotl-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-hypotl.c
+tests/test-hypot.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-hypotl
+check_PROGRAMS += test-hypotl
+test_hypotl_SOURCES = test-hypotl.c randoml.c
+test_hypotl_LDADD = $(LDADD) @HYPOTL_LIBM@
--- a/modules/ignore-value
+++ b/modules/ignore-value
@@ -7,7 +7,6 @@
 Depends-on:
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/ilogb
@@ -0,0 +1,34 @@
+Description:
+ilogb() function: get exponent as integer.
+
+Files:
+lib/ilogb.c
+m4/ilogb.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+isfinite        [test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1]
+frexp           [test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1]
+isnand          [test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1]
+
+configure.ac:
+gl_FUNC_ILOGB
+if test $HAVE_ILOGB = 0 || test $REPLACE_ILOGB = 1; then
+  AC_LIBOBJ([ilogb])
+fi
+gl_MATH_MODULE_INDICATOR([ilogb])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(ILOGB_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/ilogb-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-ilogb.c
+tests/test-ilogb.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/signature.h
+tests/macros.h
+tests/randomd.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-ilogb
+check_PROGRAMS += test-ilogb
+test_ilogb_SOURCES = test-ilogb.c randomd.c
+test_ilogb_LDADD = $(LDADD) @ILOGB_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/ilogbf
@@ -0,0 +1,36 @@
+Description:
+ilogbf() function: get exponent as integer.
+
+Files:
+lib/ilogbf.c
+lib/ilogb.c
+m4/ilogbf.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+isfinite        [test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1]
+frexpf          [test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1]
+isnanf          [test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1]
+
+configure.ac:
+gl_FUNC_ILOGBF
+if test $HAVE_ILOGBF = 0 || test $REPLACE_ILOGBF = 1; then
+  AC_LIBOBJ([ilogbf])
+fi
+gl_MATH_MODULE_INDICATOR([ilogbf])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(ILOGBF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/ilogbf-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-ilogbf.c
+tests/test-ilogb.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-ilogbf
+check_PROGRAMS += test-ilogbf
+test_ilogbf_SOURCES = test-ilogbf.c randomf.c
+test_ilogbf_LDADD = $(LDADD) @ILOGBF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/ilogbl
@@ -0,0 +1,37 @@
+Description:
+ilogbl() function: get exponent as integer.
+
+Files:
+lib/ilogbl.c
+lib/ilogb.c
+m4/ilogbl.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+ilogb           [test $HAVE_ILOGBL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isfinite        [test $HAVE_ILOGBL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl          [test $HAVE_ILOGBL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [test $HAVE_ILOGBL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_ILOGBL
+if test $HAVE_ILOGBL = 0; then
+  AC_LIBOBJ([ilogbl])
+fi
+gl_MATH_MODULE_INDICATOR([ilogbl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(ILOGBL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/ilogbl-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-ilogbl.c
+tests/test-ilogb.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-ilogbl
+check_PROGRAMS += test-ilogbl
+test_ilogbl_SOURCES = test-ilogbl.c randoml.c
+test_ilogbl_LDADD = $(LDADD) @ILOGBL_LIBM@
--- a/modules/inttostr
+++ b/modules/inttostr
@@ -30,7 +30,7 @@
 "inttostr.h"
 
 License:
-LGPL
+LGPLv2+
 
 Maintainer:
 Paul Eggert
--- a/modules/isatty
+++ b/modules/isatty
@@ -24,7 +24,7 @@
 <unistd.h>
 
 License:
-LGPL
+LGPLv2+
 
 Maintainer:
 Bruno Haible
--- a/modules/largefile
+++ b/modules/largefile
@@ -10,6 +10,7 @@
 AC_REQUIRE([AC_SYS_LARGEFILE])
 
 configure.ac:
+AC_REQUIRE([gl_LARGEFILE])
 
 Makefile.am:
 
--- a/modules/ldexp
+++ b/modules/ldexp
@@ -18,7 +18,7 @@
 $(LDEXP_LIBM)
 
 License:
-LGPL
+LGPLv2+
 
 Maintainer:
 Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/ldexp-ieee
@@ -0,0 +1,24 @@
+Description:
+ldexp() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+ldexp
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LDEXP_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/ldexp-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-ldexp-ieee.c
+tests/test-ldexp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-ldexp-ieee
+check_PROGRAMS += test-ldexp-ieee
+test_ldexp_ieee_LDADD = $(LDADD) @LDEXP_LIBM@
--- a/modules/ldexp-tests
+++ b/modules/ldexp-tests
@@ -6,6 +6,7 @@
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 isnand-nolibm
@@ -17,4 +18,5 @@
 Makefile.am:
 TESTS += test-ldexp
 check_PROGRAMS += test-ldexp
+test_ldexp_SOURCES = test-ldexp.c randomd.c
 test_ldexp_LDADD = $(LDADD) @LDEXP_LIBM@
--- a/modules/ldexpf
+++ b/modules/ldexpf
@@ -8,6 +8,7 @@
 
 Depends-on:
 math
+extensions
 ldexp           [test $HAVE_LDEXPF = 0]
 
 configure.ac:
new file mode 100644
--- /dev/null
+++ b/modules/ldexpf-ieee
@@ -0,0 +1,24 @@
+Description:
+ldexpf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+ldexpf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LDEXPF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/ldexpf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-ldexpf-ieee.c
+tests/test-ldexp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-ldexpf-ieee
+check_PROGRAMS += test-ldexpf-ieee
+test_ldexpf_ieee_LDADD = $(LDADD) @LDEXPF_LIBM@
--- a/modules/ldexpf-tests
+++ b/modules/ldexpf-tests
@@ -6,6 +6,7 @@
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 isnanf-nolibm
@@ -17,4 +18,5 @@
 Makefile.am:
 TESTS += test-ldexpf
 check_PROGRAMS += test-ldexpf
+test_ldexpf_SOURCES = test-ldexpf.c randomf.c
 test_ldexpf_LDADD = $(LDADD) @LDEXPF_LIBM@
--- a/modules/ldexpl
+++ b/modules/ldexpl
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 ldexp           [{ test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
 isnanl          [{ test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 fpucw           [{ test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
new file mode 100644
--- /dev/null
+++ b/modules/ldexpl-ieee
@@ -0,0 +1,24 @@
+Description:
+ldexpl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+ldexpl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LDEXPL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/ldexpl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-ldexpl-ieee.c
+tests/test-ldexp-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-ldexpl-ieee
+check_PROGRAMS += test-ldexpl-ieee
+test_ldexpl_ieee_LDADD = $(LDADD) @LDEXPL_LIBM@
--- a/modules/ldexpl-tests
+++ b/modules/ldexpl-tests
@@ -6,6 +6,7 @@
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randoml.c
 
 Depends-on:
 fpucw
@@ -18,4 +19,5 @@
 Makefile.am:
 TESTS += test-ldexpl
 check_PROGRAMS += test-ldexpl
+test_ldexpl_SOURCES = test-ldexpl.c randoml.c
 test_ldexpl_LDADD = $(LDADD) @LDEXPL_LIBM@
--- a/modules/list
+++ b/modules/list
@@ -4,14 +4,12 @@
 Files:
 lib/gl_list.h
 lib/gl_list.c
-m4/gl_list.m4
 
 Depends-on:
-inline
+extern-inline
 stdbool
 
 configure.ac:
-gl_LIST
 
 Makefile.am:
 lib_SOURCES += gl_list.h gl_list.c
--- a/modules/locale
+++ b/modules/locale
@@ -29,12 +29,15 @@
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+	      -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
 	      -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
 	      -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
 	      -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
 	      -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+	      -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
 	      -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
 	      -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+	      -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
new file mode 100644
--- /dev/null
+++ b/modules/localeconv
@@ -0,0 +1,29 @@
+Description:
+localeconv() function: query locale dependent information for formatting
+numbers.
+
+Files:
+lib/localeconv.c
+m4/localeconv.m4
+
+Depends-on:
+locale
+
+configure.ac:
+gl_FUNC_LOCALECONV
+if test $REPLACE_LOCALECONV = 1; then
+  AC_LIBOBJ([localeconv])
+  gl_PREREQ_LOCALECONV
+fi
+gl_LOCALE_MODULE_INDICATOR([localeconv])
+
+Makefile.am:
+
+Include:
+<locale.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/localeconv-tests
@@ -0,0 +1,12 @@
+Files:
+tests/test-localeconv.c
+tests/signature.h
+tests/macros.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-localeconv
+check_PROGRAMS += test-localeconv
--- a/modules/log
+++ b/modules/log
@@ -2,13 +2,19 @@
 log() function: natural logarithmic function.
 
 Files:
+lib/log.c
 m4/log.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
 
 configure.ac:
-gl_FUNC_LOG
+AC_REQUIRE([gl_FUNC_LOG])
+if test $REPLACE_LOG = 1; then
+  AC_LIBOBJ([log])
+fi
+gl_MATH_MODULE_INDICATOR([log])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/log-ieee
@@ -0,0 +1,26 @@
+Description:
+log() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log-ieee.m4
+
+Depends-on:
+log
+fpieee
+
+configure.ac:
+gl_FUNC_LOG_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log-ieee.c
+tests/test-log-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log-ieee
+check_PROGRAMS += test-log-ieee
+test_log_ieee_LDADD = $(LDADD) @LOG_LIBM@
--- a/modules/log-tests
+++ b/modules/log-tests
@@ -1,7 +1,10 @@
 Files:
 tests/test-log.c
+tests/test-log.h
+tests/minus-zero.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +13,5 @@
 Makefile.am:
 TESTS += test-log
 check_PROGRAMS += test-log
+test_log_SOURCES = test-log.c randomd.c
 test_log_LDADD = $(LDADD) @LOG_LIBM@
--- a/modules/log10
+++ b/modules/log10
@@ -2,13 +2,19 @@
 log10() function: base 10 logarithmic function.
 
 Files:
+lib/log10.c
 m4/log10.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
 
 configure.ac:
 gl_FUNC_LOG10
+if test $REPLACE_LOG10 = 1; then
+  AC_LIBOBJ([log10])
+fi
+gl_MATH_MODULE_INDICATOR([log10])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/log10-ieee
@@ -0,0 +1,26 @@
+Description:
+log10() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log10-ieee.m4
+
+Depends-on:
+log10
+fpieee
+
+configure.ac:
+gl_FUNC_LOG10_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG10_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log10-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log10-ieee.c
+tests/test-log10-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log10-ieee
+check_PROGRAMS += test-log10-ieee
+test_log10_ieee_LDADD = $(LDADD) @LOG10_LIBM@
--- a/modules/log10-tests
+++ b/modules/log10-tests
@@ -1,7 +1,10 @@
 Files:
 tests/test-log10.c
+tests/test-log10.h
+tests/minus-zero.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +13,5 @@
 Makefile.am:
 TESTS += test-log10
 check_PROGRAMS += test-log10
+test_log10_SOURCES = test-log10.c randomd.c
 test_log10_LDADD = $(LDADD) @LOG10_LIBM@
--- a/modules/log10f
+++ b/modules/log10f
@@ -7,11 +7,12 @@
 
 Depends-on:
 math
-log10           [test $HAVE_LOG10F = 0]
+extensions
+log10           [test $HAVE_LOG10F = 0 || test $REPLACE_LOG10F = 1]
 
 configure.ac:
 gl_FUNC_LOG10F
-if test $HAVE_LOG10F = 0; then
+if test $HAVE_LOG10F = 0 || test $REPLACE_LOG10F = 1; then
   AC_LIBOBJ([log10f])
 fi
 gl_MATH_MODULE_INDICATOR([log10f])
new file mode 100644
--- /dev/null
+++ b/modules/log10f-ieee
@@ -0,0 +1,27 @@
+Description:
+log10f() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log10f-ieee.m4
+
+Depends-on:
+log10f
+fpieee
+log10-ieee      [test $HAVE_LOG10F = 0 || test $REPLACE_LOG10F = 1]
+
+configure.ac:
+gl_FUNC_LOG10F_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG10F_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log10f-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log10f-ieee.c
+tests/test-log10-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log10f-ieee
+check_PROGRAMS += test-log10f-ieee
+test_log10f_ieee_LDADD = $(LDADD) @LOG10F_LIBM@
--- a/modules/log10f-tests
+++ b/modules/log10f-tests
@@ -1,7 +1,10 @@
 Files:
 tests/test-log10f.c
+tests/test-log10.h
+tests/minus-zero.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 
@@ -10,4 +13,5 @@
 Makefile.am:
 TESTS += test-log10f
 check_PROGRAMS += test-log10f
+test_log10f_SOURCES = test-log10f.c randomf.c
 test_log10f_LDADD = $(LDADD) @LOG10F_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log10l
@@ -0,0 +1,34 @@
+Description:
+log10l() function: base 10 logarithmic function.
+
+Files:
+lib/log10l.c
+m4/log10l.m4
+
+Depends-on:
+math
+extensions
+log10           [{ test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float           [{ test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+logl            [{ test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_LOG10L
+if test $HAVE_LOG10L = 0 || test $REPLACE_LOG10L = 1; then
+  AC_LIBOBJ([log10l])
+fi
+gl_MATH_MODULE_INDICATOR([log10l])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG10L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log10l-ieee
@@ -0,0 +1,24 @@
+Description:
+log10l() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+log10l
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG10L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log10l-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log10l-ieee.c
+tests/test-log10-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log10l-ieee
+check_PROGRAMS += test-log10l-ieee
+test_log10l_ieee_LDADD = $(LDADD) @LOG10L_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log10l-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-log10l.c
+tests/test-log10.h
+tests/minus-zero.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log10l
+check_PROGRAMS += test-log10l
+test_log10l_SOURCES = test-log10l.c randoml.c
+test_log10l_LDADD = $(LDADD) @LOG10L_LIBM@
--- a/modules/log1p
+++ b/modules/log1p
@@ -2,12 +2,23 @@
 log1p() function: natural logarithm of 1 plus argument.
 
 Files:
+lib/log1p.c
+m4/log1p.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
+extensions
+isnand          [test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1]
+log             [test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1]
+round           [test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1]
 
 configure.ac:
-gl_COMMON_DOUBLE_MATHFUNC([log1p])
+gl_FUNC_LOG1P
+if test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1; then
+  AC_LIBOBJ([log1p])
+fi
+gl_MATH_MODULE_INDICATOR([log1p])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/log1p-ieee
@@ -0,0 +1,28 @@
+Description:
+log1p() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log1p-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+log1p
+fpieee
+
+configure.ac:
+gl_FUNC_LOG1P_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG1P_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log1p-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log1p-ieee.c
+tests/test-log1p-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log1p-ieee
+check_PROGRAMS += test-log1p-ieee
+test_log1p_ieee_LDADD = $(LDADD) @LOG1P_LIBM@
--- a/modules/log1p-tests
+++ b/modules/log1p-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-log1p.c
+tests/test-log1p.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-log1p
 check_PROGRAMS += test-log1p
+test_log1p_SOURCES = test-log1p.c randomd.c
 test_log1p_LDADD = $(LDADD) @LOG1P_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log1pf
@@ -0,0 +1,32 @@
+Description:
+log1pf() function: natural logarithm of 1 plus argument.
+
+Files:
+lib/log1pf.c
+m4/log1pf.m4
+
+Depends-on:
+math
+extensions
+log1p           [test $HAVE_LOG1PF = 0 || test $REPLACE_LOG1PF = 1]
+
+configure.ac:
+gl_FUNC_LOG1PF
+if test $HAVE_LOG1PF = 0 || test $REPLACE_LOG1PF = 1; then
+  AC_LIBOBJ([log1pf])
+fi
+gl_MATH_MODULE_INDICATOR([log1pf])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG1PF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log1pf-ieee
@@ -0,0 +1,29 @@
+Description:
+log1pf() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log1pf-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+log1pf
+fpieee
+log1p-ieee      [test $HAVE_LOG1PF = 0 || test $REPLACE_LOG1PF = 1]
+
+configure.ac:
+gl_FUNC_LOG1PF_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG1PF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log1pf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log1pf-ieee.c
+tests/test-log1p-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log1pf-ieee
+check_PROGRAMS += test-log1pf-ieee
+test_log1pf_ieee_LDADD = $(LDADD) @LOG1PF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log1pf-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-log1pf.c
+tests/test-log1p.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log1pf
+check_PROGRAMS += test-log1pf
+test_log1pf_SOURCES = test-log1pf.c randomf.c
+test_log1pf_LDADD = $(LDADD) @LOG1PF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log1pl
@@ -0,0 +1,35 @@
+Description:
+log1pl() function: natural logarithm of 1 plus argument.
+
+Files:
+lib/log1pl.c
+m4/log1pl.m4
+
+Depends-on:
+math
+extensions
+log1p           [{ test $HAVE_LOG1PL = 0 || test $REPLACE_LOG1PL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isnanl          [{ test $HAVE_LOG1PL = 0 || test $REPLACE_LOG1PL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+logl            [{ test $HAVE_LOG1PL = 0 || test $REPLACE_LOG1PL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+roundl          [{ test $HAVE_LOG1PL = 0 || test $REPLACE_LOG1PL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_LOG1PL
+if test $HAVE_LOG1PL = 0 || test $REPLACE_LOG1PL = 1; then
+  AC_LIBOBJ([log1pl])
+fi
+gl_MATH_MODULE_INDICATOR([log1pl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG1PL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log1pl-ieee
@@ -0,0 +1,29 @@
+Description:
+log1pl() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log1pl-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+log1pl
+fpieee
+log1p-ieee      [{ test $HAVE_LOG1PL = 0 || test $REPLACE_LOG1PL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+
+configure.ac:
+gl_FUNC_LOG1PL_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG1PL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log1pl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log1pl-ieee.c
+tests/test-log1p-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log1pl-ieee
+check_PROGRAMS += test-log1pl-ieee
+test_log1pl_ieee_LDADD = $(LDADD) @LOG1PL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log1pl-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-log1pl.c
+tests/test-log1p.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log1pl
+check_PROGRAMS += test-log1pl
+test_log1pl_SOURCES = test-log1pl.c randoml.c
+test_log1pl_LDADD = $(LDADD) @LOG1PL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log2
@@ -0,0 +1,35 @@
+Description:
+log2() function: base 2 logarithm.
+
+Files:
+lib/log2.c
+m4/log2.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+isnand          [test $HAVE_LOG2 = 0 || test $REPLACE_LOG2 = 1]
+frexp           [test $HAVE_LOG2 = 0 || test $REPLACE_LOG2 = 1]
+log             [test $HAVE_LOG2 = 0 || test $REPLACE_LOG2 = 1]
+
+configure.ac:
+gl_FUNC_LOG2
+if test $HAVE_LOG2 = 0 || test $REPLACE_LOG2 = 1; then
+  AC_LIBOBJ([log2])
+fi
+gl_MATH_MODULE_INDICATOR([log2])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG2_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log2-ieee
@@ -0,0 +1,26 @@
+Description:
+log2() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log2-ieee.m4
+
+Depends-on:
+log2
+fpieee
+
+configure.ac:
+gl_FUNC_LOG2_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG2_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log2-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log2-ieee.c
+tests/test-log2-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log2-ieee
+check_PROGRAMS += test-log2-ieee
+test_log2_ieee_LDADD = $(LDADD) @LOG2_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log2-tests
@@ -0,0 +1,17 @@
+Files:
+tests/test-log2.c
+tests/test-log2.h
+tests/minus-zero.h
+tests/signature.h
+tests/macros.h
+tests/randomd.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log2
+check_PROGRAMS += test-log2
+test_log2_SOURCES = test-log2.c randomd.c
+test_log2_LDADD = $(LDADD) @LOG2_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log2f
@@ -0,0 +1,35 @@
+Description:
+log2f() function: base 2 logarithm.
+
+Files:
+lib/log2f.c
+m4/log2f.m4
+
+Depends-on:
+math
+extensions
+log2            [test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1]
+isnanf          [test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1]
+frexpf          [test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1]
+logf            [test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1]
+
+configure.ac:
+gl_FUNC_LOG2F
+if test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1; then
+  AC_LIBOBJ([log2f])
+fi
+gl_MATH_MODULE_INDICATOR([log2f])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG2F_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log2f-ieee
@@ -0,0 +1,27 @@
+Description:
+log2f() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/log2f-ieee.m4
+
+Depends-on:
+log2f
+fpieee
+log2-ieee       [test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1]
+
+configure.ac:
+gl_FUNC_LOG2F_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG2F_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log2f-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log2f-ieee.c
+tests/test-log2-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log2f-ieee
+check_PROGRAMS += test-log2f-ieee
+test_log2f_ieee_LDADD = $(LDADD) @LOG2F_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log2f-tests
@@ -0,0 +1,17 @@
+Files:
+tests/test-log2f.c
+tests/test-log2.h
+tests/minus-zero.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log2f
+check_PROGRAMS += test-log2f
+test_log2f_SOURCES = test-log2f.c randomf.c
+test_log2f_LDADD = $(LDADD) @LOG2F_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log2l
@@ -0,0 +1,35 @@
+Description:
+log2() function: base 2 logarithm.
+
+Files:
+lib/log2l.c
+m4/log2l.m4
+
+Depends-on:
+math
+extensions
+log2            [{ test $HAVE_LOG2L = 0 || test $REPLACE_LOG2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isnanl          [{ test $HAVE_LOG2L = 0 || test $REPLACE_LOG2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl          [{ test $HAVE_LOG2L = 0 || test $REPLACE_LOG2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+logl            [{ test $HAVE_LOG2L = 0 || test $REPLACE_LOG2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_LOG2L
+if test $HAVE_LOG2L = 0 || test $REPLACE_LOG2L = 1; then
+  AC_LIBOBJ([log2l])
+fi
+gl_MATH_MODULE_INDICATOR([log2l])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG2L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log2l-ieee
@@ -0,0 +1,24 @@
+Description:
+log2l() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+log2l
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOG2L_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/log2l-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log2l-ieee.c
+tests/test-log2-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log2l-ieee
+check_PROGRAMS += test-log2l-ieee
+test_log2l_ieee_LDADD = $(LDADD) @LOG2L_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/log2l-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-log2l.c
+tests/test-log2.h
+tests/minus-zero.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-log2l
+check_PROGRAMS += test-log2l
+test_log2l_SOURCES = test-log2l.c randoml.c
+test_log2l_LDADD = $(LDADD) @LOG2L_LIBM@
--- a/modules/logb
+++ b/modules/logb
@@ -2,14 +2,22 @@
 logb() function: get exponent.
 
 Files:
+lib/logb.c
 m4/logb.m4
 m4/mathfunc.m4
 
 Depends-on:
 math
+extensions
+isfinite        [test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1]
+frexp           [test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1]
+isnand          [test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1]
 
 configure.ac:
 gl_FUNC_LOGB
+if test $HAVE_LOGB = 0 || test $REPLACE_LOGB = 1; then
+  AC_LIBOBJ([logb])
+fi
 gl_MATH_MODULE_INDICATOR([logb])
 
 Makefile.am:
new file mode 100644
--- /dev/null
+++ b/modules/logb-ieee
@@ -0,0 +1,24 @@
+Description:
+logb() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+logb
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGB_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/logb-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-logb-ieee.c
+tests/test-logb-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-logb-ieee
+check_PROGRAMS += test-logb-ieee
+test_logb_ieee_LDADD = $(LDADD) @LOGB_LIBM@
--- a/modules/logb-tests
+++ b/modules/logb-tests
@@ -1,7 +1,10 @@
 Files:
 tests/test-logb.c
+tests/test-logb.h
+tests/minus-zero.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +13,5 @@
 Makefile.am:
 TESTS += test-logb
 check_PROGRAMS += test-logb
+test_logb_SOURCES = test-logb.c randomd.c
 test_logb_LDADD = $(LDADD) @LOGB_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/logbf
@@ -0,0 +1,36 @@
+Description:
+logbf() function: get exponent.
+
+Files:
+lib/logbf.c
+lib/logb.c
+m4/logbf.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+isfinite        [test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1]
+frexpf          [test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1]
+isnanf          [test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1]
+
+configure.ac:
+gl_FUNC_LOGBF
+if test $HAVE_LOGBF = 0 || test $REPLACE_LOGBF = 1; then
+  AC_LIBOBJ([logbf])
+fi
+gl_MATH_MODULE_INDICATOR([logbf])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGBF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/logbf-ieee
@@ -0,0 +1,24 @@
+Description:
+logbf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+logbf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGBF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/logbf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-logbf-ieee.c
+tests/test-logb-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-logbf-ieee
+check_PROGRAMS += test-logbf-ieee
+test_logbf_ieee_LDADD = $(LDADD) @LOGBF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/logbf-tests
@@ -0,0 +1,17 @@
+Files:
+tests/test-logbf.c
+tests/test-logb.h
+tests/minus-zero.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-logbf
+check_PROGRAMS += test-logbf
+test_logbf_SOURCES = test-logbf.c randomf.c
+test_logbf_LDADD = $(LDADD) @LOGBF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/logbl
@@ -0,0 +1,37 @@
+Description:
+logbl() function: get exponent.
+
+Files:
+lib/logbl.c
+lib/logb.c
+m4/logbl.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+logb            [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isfinite        [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl          [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [{ test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_LOGBL
+if test $HAVE_LOGBL = 0 || test $REPLACE_LOGBL = 1; then
+  AC_LIBOBJ([logbl])
+fi
+gl_MATH_MODULE_INDICATOR([logbl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGBL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/logbl-ieee
@@ -0,0 +1,24 @@
+Description:
+logbl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+logbl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGBL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/logbl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-logbl-ieee.c
+tests/test-logb-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-logbl-ieee
+check_PROGRAMS += test-logbl-ieee
+test_logbl_ieee_LDADD = $(LDADD) @LOGBL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/logbl-tests
@@ -0,0 +1,17 @@
+Files:
+tests/test-logbl.c
+tests/test-logb.h
+tests/minus-zero.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-logbl
+check_PROGRAMS += test-logbl
+test_logbl_SOURCES = test-logbl.c randoml.c
+test_logbl_LDADD = $(LDADD) @LOGBL_LIBM@
--- a/modules/logf
+++ b/modules/logf
@@ -7,11 +7,12 @@
 
 Depends-on:
 math
-log             [test $HAVE_LOGF = 0]
+extensions
+log             [test $HAVE_LOGF = 0 || test $REPLACE_LOGF = 1]
 
 configure.ac:
 gl_FUNC_LOGF
-if test $HAVE_LOGF = 0; then
+if test $HAVE_LOGF = 0 || test $REPLACE_LOGF = 1; then
   AC_LIBOBJ([logf])
 fi
 gl_MATH_MODULE_INDICATOR([logf])
new file mode 100644
--- /dev/null
+++ b/modules/logf-ieee
@@ -0,0 +1,27 @@
+Description:
+logf() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/logf-ieee.m4
+
+Depends-on:
+logf
+fpieee
+log-ieee        [test $HAVE_LOGF = 0 || test $REPLACE_LOGF = 1]
+
+configure.ac:
+gl_FUNC_LOGF_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/logf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-logf-ieee.c
+tests/test-log-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-logf-ieee
+check_PROGRAMS += test-logf-ieee
+test_logf_ieee_LDADD = $(LDADD) @LOGF_LIBM@
--- a/modules/logf-tests
+++ b/modules/logf-tests
@@ -1,7 +1,10 @@
 Files:
 tests/test-logf.c
+tests/test-log.h
+tests/minus-zero.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 
@@ -10,4 +13,5 @@
 Makefile.am:
 TESTS += test-logf
 check_PROGRAMS += test-logf
+test_logf_SOURCES = test-logf.c randomf.c
 test_logf_LDADD = $(LDADD) @LOGF_LIBM@
--- a/modules/logl
+++ b/modules/logl
@@ -8,14 +8,14 @@
 Depends-on:
 math
 extensions
-log             [test $HAVE_LOGL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
-frexpl          [test $HAVE_LOGL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-isnanl          [test $HAVE_LOGL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-floorl          [test $HAVE_LOGL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+log             [{ test $HAVE_LOGL = 0 || test $REPLACE_LOGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+frexpl          [{ test $HAVE_LOGL = 0 || test $REPLACE_LOGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [{ test $HAVE_LOGL = 0 || test $REPLACE_LOGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+floorl          [{ test $HAVE_LOGL = 0 || test $REPLACE_LOGL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 
 configure.ac:
 gl_FUNC_LOGL
-if test $HAVE_LOGL = 0; then
+if test $HAVE_LOGL = 0 || test $REPLACE_LOGL = 1; then
   AC_LIBOBJ([logl])
 fi
 gl_MATH_MODULE_INDICATOR([logl])
new file mode 100644
--- /dev/null
+++ b/modules/logl-ieee
@@ -0,0 +1,24 @@
+Description:
+logl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+logl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/logl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-logl-ieee.c
+tests/test-log-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-logl-ieee
+check_PROGRAMS += test-logl-ieee
+test_logl_ieee_LDADD = $(LDADD) @LOGL_LIBM@
--- a/modules/logl-tests
+++ b/modules/logl-tests
@@ -1,14 +1,19 @@
 Files:
 tests/test-logl.c
+tests/test-log.h
+tests/minus-zero.h
 tests/signature.h
 tests/macros.h
+tests/randoml.c
 
 Depends-on:
 fpucw
+float
 
 configure.ac:
 
 Makefile.am:
 TESTS += test-logl
 check_PROGRAMS += test-logl
+test_logl_SOURCES = test-logl.c randoml.c
 test_logl_LDADD = $(LDADD) @LOGL_LIBM@
--- a/modules/lseek
+++ b/modules/lseek
@@ -7,6 +7,7 @@
 
 Depends-on:
 unistd
+sys_types
 largefile
 msvc-nothrow    [test $REPLACE_LSEEK = 1]
 fstat           [test $REPLACE_LSEEK = 1]
--- a/modules/maintainer-makefile
+++ b/modules/maintainer-makefile
@@ -1,5 +1,6 @@
 Description:
 Helper GNUmakefile with syntax checks, build improvements, etc.
+See also readme-release.
 
 Files:
 top/maint.mk
--- a/modules/malloca
+++ b/modules/malloca
@@ -11,6 +11,7 @@
 
 Depends-on:
 alloca-opt
+stdint
 verify
 
 configure.ac:
--- a/modules/math
+++ b/modules/math
@@ -3,9 +3,11 @@
 
 Files:
 lib/math.in.h
+lib/math.c
 m4/math_h.m4
 
 Depends-on:
+extern-inline
 include_next
 snippet/arg-nonnull
 snippet/c++defs
@@ -17,6 +19,7 @@
 
 Makefile.am:
 BUILT_SOURCES += math.h
+lib_SOURCES += math.c
 
 # We need the following in order to create <math.h> when the system
 # doesn't have one that works with the given compiler.
@@ -35,6 +38,9 @@
 	      -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \
 	      -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \
 	      -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \
+	      -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \
+	      -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \
+	      -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \
 	      -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \
 	      -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \
 	      -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \
@@ -46,17 +52,33 @@
 	      -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \
 	      -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \
 	      -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \
+	      -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \
+	      -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \
+	      -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \
+	      -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \
+	      -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \
+	      -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \
 	      -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \
+	      -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \
 	      -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \
 	      -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \
 	      -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \
 	      -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \
 	      -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \
 	      -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \
+	      -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \
 	      -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \
+	      -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \
 	      -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \
 	      -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \
 	      -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \
+	      -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \
+	      -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \
+	      -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \
+	      < $(srcdir)/math.in.h | \
+	  sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \
+	      -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \
+	      -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \
 	      -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \
 	      -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \
 	      -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \
@@ -65,12 +87,28 @@
 	      -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \
 	      -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \
 	      -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \
-	      -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \
+	      -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \
 	      -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \
 	      -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \
+	      -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \
 	      -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \
+	      -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \
+	      -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \
+	      -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \
+	      -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \
+	      -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \
+	      -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \
+	      -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \
+	      -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \
+	      -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \
+	      -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \
+	      -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \
 	      -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \
+	      -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \
 	      -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \
+	      -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \
+	      -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \
+	      -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \
 	      -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \
 	      -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \
 	      -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \
@@ -89,7 +127,7 @@
 	      -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \
 	      -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \
 	      -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \
-	      < $(srcdir)/math.in.h | \
+	  | \
 	  sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \
 	      -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
 	      -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \
@@ -97,20 +135,31 @@
 	      -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \
 	      -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
 	      -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \
+	      -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \
+	      -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \
+	      -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \
 	      -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \
-	      -e 's|@''HAVE_COPYSIGNF''@|$(HAVE_COPYSIGNF)|g' \
 	      -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \
 	      -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \
 	      -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
 	      -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \
 	      -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \
 	      -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+	      -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \
+	      -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \
 	      -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \
+	      -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \
 	      -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \
 	      -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \
 	      -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \
 	      -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \
+	      -e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \
 	      -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \
+	      -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \
+	      -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \
+	      -e 's|@''HAVE_ILOGB''@|$(HAVE_ILOGB)|g' \
+	      -e 's|@''HAVE_ILOGBF''@|$(HAVE_ILOGBF)|g' \
+	      -e 's|@''HAVE_ILOGBL''@|$(HAVE_ILOGBL)|g' \
 	      -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
 	      -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
 	      -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
@@ -118,10 +167,18 @@
 	      -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \
 	      -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
 	      -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \
+	      -e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \
+	      -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \
+	      -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \
+	      -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \
+	      -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \
+	      -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \
 	      -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \
+	      -e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \
 	      -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \
+	      -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \
+	      -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \
 	      -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \
-	      -e 's|@''HAVE_RINTF''@|$(HAVE_RINTF)|g' \
 	      -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \
 	      -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \
 	      -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
@@ -134,16 +191,30 @@
 	      -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
 	      -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
 	      -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+	      -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \
+	      -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \
 	      -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
 	      -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
+	      -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \
 	      -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
 	      -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+	      -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \
+	      -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \
+	      -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \
+	      -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \
 	      -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
 	      -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
 	      -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
 	      -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
+	      -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+	      -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \
+	      -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \
+	      -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \
+	      -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \
 	      -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
-	      -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+	      -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \
+	      -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \
+	      -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \
 	      -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
 	      -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
 	      -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
@@ -154,30 +225,67 @@
 	      -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
 	      -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
 	  | \
-	  sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
+	  sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
+	      -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \
+	      -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
 	      -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
 	      -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+	      -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \
+	      -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \
+	      -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \
+	      -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \
+	      -e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \
 	      -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \
 	      -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
 	      -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
 	      -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \
 	      -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \
 	      -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \
+	      -e 's|@''REPLACE_FMOD''@|$(REPLACE_FMOD)|g' \
+	      -e 's|@''REPLACE_FMODF''@|$(REPLACE_FMODF)|g' \
+	      -e 's|@''REPLACE_FMODL''@|$(REPLACE_FMODL)|g' \
 	      -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \
 	      -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
 	      -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
 	      -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+	      -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \
+	      -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \
+	      -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \
+	      -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \
+	      -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \
 	      -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
 	      -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
 	      -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
 	      -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \
 	      -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+	      -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \
+	      -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \
+	      -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \
+	      -e 's|@''REPLACE_LOG10''@|$(REPLACE_LOG10)|g' \
+	      -e 's|@''REPLACE_LOG10F''@|$(REPLACE_LOG10F)|g' \
+	      -e 's|@''REPLACE_LOG10L''@|$(REPLACE_LOG10L)|g' \
+	      -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \
+	      -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \
+	      -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \
+	      -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \
+	      -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \
+	      -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \
+	      -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \
+	      -e 's|@''REPLACE_LOGBF''@|$(REPLACE_LOGBF)|g' \
+	      -e 's|@''REPLACE_LOGBL''@|$(REPLACE_LOGBL)|g' \
+	      -e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \
+	      -e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \
+	      -e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \
 	      -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \
+	      -e 's|@''REPLACE_REMAINDER''@|$(REPLACE_REMAINDER)|g' \
+	      -e 's|@''REPLACE_REMAINDERF''@|$(REPLACE_REMAINDERF)|g' \
+	      -e 's|@''REPLACE_REMAINDERL''@|$(REPLACE_REMAINDERL)|g' \
 	      -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
 	      -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
 	      -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
 	      -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
 	      -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+	      -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \
 	      -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
 	      -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
 	      -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
--- a/modules/math-tests
+++ b/modules/math-tests
@@ -1,5 +1,6 @@
 Files:
 tests/test-math.c
+tests/macros.h
 
 Depends-on:
 math-c++-tests
--- a/modules/mbchar
+++ b/modules/mbchar
@@ -8,6 +8,7 @@
 
 Depends-on:
 extensions
+extern-inline
 stdbool
 wchar
 wctype-h
--- a/modules/mbfile
+++ b/modules/mbfile
@@ -3,10 +3,12 @@
 
 Files:
 lib/mbfile.h
+lib/mbfile.c
 m4/mbfile.m4
 m4/mbrtowc.m4
 
 Depends-on:
+extern-inline
 mbchar
 mbrtowc
 mbsinit
@@ -17,7 +19,7 @@
 gl_MBFILE
 
 Makefile.am:
-lib_SOURCES += mbfile.h
+lib_SOURCES += mbfile.h mbfile.c
 
 Include:
 "mbfile.h"
@@ -27,4 +29,3 @@
 
 Maintainer:
 Bruno Haible
-
--- a/modules/mbiter
+++ b/modules/mbiter
@@ -3,10 +3,12 @@
 
 Files:
 lib/mbiter.h
+lib/mbiter.c
 m4/mbiter.m4
 m4/mbrtowc.m4
 
 Depends-on:
+extern-inline
 mbchar
 mbrtowc
 mbsinit
@@ -17,7 +19,7 @@
 gl_MBITER
 
 Makefile.am:
-lib_SOURCES += mbiter.h
+lib_SOURCES += mbiter.h mbiter.c
 
 Include:
 "mbiter.h"
@@ -27,4 +29,3 @@
 
 Maintainer:
 Bruno Haible
-
--- a/modules/mbuiter
+++ b/modules/mbuiter
@@ -3,10 +3,12 @@
 
 Files:
 lib/mbuiter.h
+lib/mbuiter.c
 m4/mbiter.m4
 m4/mbrtowc.m4
 
 Depends-on:
+extern-inline
 mbchar
 mbrtowc
 mbsinit
@@ -18,7 +20,7 @@
 gl_MBITER
 
 Makefile.am:
-lib_SOURCES += mbuiter.h
+lib_SOURCES += mbuiter.h mbuiter.c
 
 Include:
 "mbuiter.h"
@@ -28,4 +30,3 @@
 
 Maintainer:
 Bruno Haible
-
--- a/modules/mkdirat
+++ b/modules/mkdirat
@@ -4,7 +4,6 @@
 Files:
 lib/mkdirat.c
 lib/at-func.c
-lib/openat-priv.h
 m4/mkdirat.m4
 
 Depends-on:
--- a/modules/modf
+++ b/modules/modf
@@ -2,13 +2,22 @@
 modf() function: get signed integer and fractional parts.
 
 Files:
+lib/modf.c
 m4/modf.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
+isfinite        [test $REPLACE_MODF = 1]
+trunc           [test $REPLACE_MODF = 1]
+isinf           [test $REPLACE_MODF = 1]
 
 configure.ac:
 gl_FUNC_MODF
+if test $REPLACE_MODF = 1; then
+  AC_LIBOBJ([modf])
+fi
+gl_MATH_MODULE_INDICATOR([modf])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/modf-ieee
@@ -0,0 +1,28 @@
+Description:
+modf() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/modf-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+modf
+fpieee
+
+configure.ac:
+gl_FUNC_MODF_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(MODF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/modf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-modf-ieee.c
+tests/test-modf-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-modf-ieee
+check_PROGRAMS += test-modf-ieee
+test_modf_ieee_LDADD = $(LDADD) @MODF_LIBM@
--- a/modules/modf-tests
+++ b/modules/modf-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-modf.c
+tests/test-modf.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-modf
 check_PROGRAMS += test-modf
+test_modf_SOURCES = test-modf.c randomd.c
 test_modf_LDADD = $(LDADD) @MODF_LIBM@
--- a/modules/modff
+++ b/modules/modff
@@ -8,11 +8,12 @@
 
 Depends-on:
 math
-modf            [test $HAVE_MODFF = 0]
+extensions
+modf            [test $HAVE_MODFF = 0 || test $REPLACE_MODFF = 1]
 
 configure.ac:
 gl_FUNC_MODFF
-if test $HAVE_MODFF = 0; then
+if test $HAVE_MODFF = 0 || test $REPLACE_MODFF = 1; then
   AC_LIBOBJ([modff])
 fi
 gl_MATH_MODULE_INDICATOR([modff])
new file mode 100644
--- /dev/null
+++ b/modules/modff-ieee
@@ -0,0 +1,29 @@
+Description:
+modff() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/modff-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+modff
+fpieee
+modf-ieee       [test $HAVE_MODFF = 0]
+
+configure.ac:
+gl_FUNC_MODFF_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(MODFF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/modff-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-modff-ieee.c
+tests/test-modf-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-modff-ieee
+check_PROGRAMS += test-modff-ieee
+test_modff_ieee_LDADD = $(LDADD) @MODFF_LIBM@
--- a/modules/modff-tests
+++ b/modules/modff-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-modff.c
+tests/test-modf.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-modff
 check_PROGRAMS += test-modff
+test_modff_SOURCES = test-modff.c randomf.c
 test_modff_LDADD = $(LDADD) @MODFF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/modfl
@@ -0,0 +1,36 @@
+Description:
+modfl() function: get signed integer and fractional parts.
+
+Files:
+lib/modfl.c
+m4/modfl.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+modf            [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+isfinite        [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+truncl          [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isinf           [{ test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_MODFL
+if test $HAVE_MODFL = 0 || test $REPLACE_MODFL = 1; then
+  AC_LIBOBJ([modfl])
+fi
+gl_MATH_MODULE_INDICATOR([modfl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(MODFL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/modfl-ieee
@@ -0,0 +1,29 @@
+Description:
+modfl() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/modfl-ieee.m4
+m4/minus-zero.m4
+m4/signbit.m4
+
+Depends-on:
+modfl
+fpieee
+modf-ieee       [test $HAVE_MODFL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+
+configure.ac:
+gl_FUNC_MODFL_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(MODFL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/modfl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-modfl-ieee.c
+tests/test-modf-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-modfl-ieee
+check_PROGRAMS += test-modfl-ieee
+test_modfl_ieee_LDADD = $(LDADD) @MODFL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/modfl-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-modfl.c
+tests/test-modf.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-modfl
+check_PROGRAMS += test-modfl
+test_modfl_SOURCES = test-modfl.c randoml.c
+test_modfl_LDADD = $(LDADD) @MODFL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/net_if
@@ -0,0 +1,49 @@
+Description:
+A <net/if.h> for systems lacking it.
+
+Files:
+lib/net_if.in.h
+m4/net_if_h.m4
+
+Depends-on:
+include_next
+sys_socket
+
+configure.ac:
+gl_HEADER_NET_IF
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += $(NET_IF_H)
+
+# We need the following in order to create <net/if.h> when the system
+# doesn't have one.
+if GL_GENERATE_NET_IF_H
+net/if.h: net_if.in.h $(top_builddir)/config.status
+	$(AM_V_at)$(MKDIR_P) net
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_NET_IF_H''@|$(NEXT_NET_IF_H)|g' \
+	      -e 's|@''HAVE_NET_IF_H''@|$(HAVE_NET_IF_H)|g' \
+	      < $(srcdir)/net_if.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+else
+net/if.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += net/if.h net/if.h-t
+MOSTLYCLEANDIRS += net
+
+Include:
+<net/if.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Eric Blake
--- a/modules/nl_langinfo
+++ b/modules/nl_langinfo
@@ -7,6 +7,7 @@
 
 Depends-on:
 langinfo
+localeconv      [test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1]
 
 configure.ac:
 gl_FUNC_NL_LANGINFO
new file mode 100644
--- /dev/null
+++ b/modules/non-recursive-gnulib-prefix-hack
@@ -0,0 +1,26 @@
+Description:
+Adjust a gnulib-generated gnulib.mk file and configure script so
+that they are usable in a non-recursive make framework.
+
+Files:
+build-aux/prefix-gnulib-mk
+m4/non-recursive-gnulib-prefix-hack.m4
+
+Depends-on:
+
+configure.ac:
+dnl Run our hack near the end, just before config.status creation.
+dnl It must happen late, i.e., after gl_LIBOBJS has been finalized.
+AC_CONFIG_COMMANDS_PRE([
+  gl_NON_RECURSIVE_GNULIB_PREFIX_HACK([lib])
+  ])
+
+Makefile.am:
+
+Include:
+
+License:
+unlimited
+
+Maintainer:
+Jim Meyering
--- a/modules/nonblocking-pipe-tests
+++ b/modules/nonblocking-pipe-tests
@@ -13,6 +13,7 @@
 unistd
 nonblocking
 wait-process
+progname
 pipe-posix
 dup2
 environ
--- a/modules/nonblocking-socket-tests
+++ b/modules/nonblocking-socket-tests
@@ -16,6 +16,7 @@
 sys_socket
 nonblocking
 wait-process
+progname
 environ
 posix_spawnp
 netinet_in
--- a/modules/openat
+++ b/modules/openat
@@ -3,7 +3,6 @@
 
 Files:
 lib/openat.c
-lib/openat-priv.h
 m4/openat.m4
 m4/lstat.m4
 m4/mode_t.m4
--- a/modules/openat-h
+++ b/modules/openat-h
@@ -5,6 +5,7 @@
 lib/openat.h
 
 Depends-on:
+extern-inline
 fcntl-h
 stdbool
 sys_stat
--- a/modules/oset
+++ b/modules/oset
@@ -4,14 +4,12 @@
 Files:
 lib/gl_oset.h
 lib/gl_oset.c
-m4/gl_list.m4
 
 Depends-on:
-inline
+extern-inline
 stdbool
 
 configure.ac:
-gl_LIST
 
 Makefile.am:
 lib_SOURCES += gl_oset.h gl_oset.c
--- a/modules/parse-duration
+++ b/modules/parse-duration
@@ -8,7 +8,6 @@
 Depends-on:
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 lib_SOURCES += parse-duration.c
@@ -17,8 +16,7 @@
 "parse-duration.h"
 
 License:
-GPL
+LGPLv2+
 
 Maintainer:
 Bruce Korb
-
--- a/modules/parse-duration-tests
+++ b/modules/parse-duration-tests
@@ -11,4 +11,4 @@
 Makefile.am:
 TESTS += test-parse-duration.sh
 check_PROGRAMS += test-parse-duration
-test_parse_duration_LDADD = $(LDADD) @LIBINTL@
+test_parse_duration_LDADD = $(LDADD)
--- a/modules/pathmax
+++ b/modules/pathmax
@@ -6,6 +6,7 @@
 m4/pathmax.m4
 
 Depends-on:
+unistd
 
 configure.ac:
 gl_PATHMAX
--- a/modules/pipe-filter-gi
+++ b/modules/pipe-filter-gi
@@ -5,11 +5,13 @@
 lib/pipe-filter.h
 lib/pipe-filter-gi.c
 lib/pipe-filter-aux.h
+lib/pipe-filter-aux.c
 
 Depends-on:
 spawn-pipe
 wait-process
 error
+extern-inline
 fcntl-h
 gettext-h
 stdbool
@@ -19,11 +21,10 @@
 unistd
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 AC_CHECK_FUNCS_ONCE([select])
 
 Makefile.am:
-lib_SOURCES += pipe-filter-gi.c
+lib_SOURCES += pipe-filter-gi.c pipe-filter-aux.c
 
 Include:
 "pipe-filter.h"
--- a/modules/pipe-filter-ii
+++ b/modules/pipe-filter-ii
@@ -5,11 +5,13 @@
 lib/pipe-filter.h
 lib/pipe-filter-ii.c
 lib/pipe-filter-aux.h
+lib/pipe-filter-aux.c
 
 Depends-on:
 spawn-pipe
 wait-process
 error
+extern-inline
 fcntl-h
 gettext-h
 stdbool
@@ -19,11 +21,10 @@
 unistd
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 AC_CHECK_FUNCS_ONCE([select])
 
 Makefile.am:
-lib_SOURCES += pipe-filter-ii.c
+lib_SOURCES += pipe-filter-ii.c pipe-filter-aux.c
 
 Include:
 "pipe-filter.h"
--- a/modules/poll-tests
+++ b/modules/poll-tests
@@ -1,6 +1,7 @@
 Files:
+tests/test-poll.c
 tests/signature.h
-tests/test-poll.c
+tests/macros.h
 
 Depends-on:
 stdbool
--- a/modules/posixtm-tests
+++ b/modules/posixtm-tests
@@ -5,6 +5,7 @@
 Depends-on:
 intprops
 setenv
+stdint
 strftime
 
 configure.ac:
--- a/modules/powf
+++ b/modules/powf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 pow             [test $HAVE_POWF = 0]
 
 configure.ac:
--- a/modules/priv-set
+++ b/modules/priv-set
@@ -8,6 +8,7 @@
 
 Depends-on:
 errno
+extern-inline
 stdbool
 
 configure.ac:
--- a/modules/pselect
+++ b/modules/pselect
@@ -9,6 +9,7 @@
 sys_select
 pthread_sigmask [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1]
 select          [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1]
+dup2            [test $REPLACE_PSELECT = 1]
 
 configure.ac:
 gl_FUNC_PSELECT
--- a/modules/pt_chown
+++ b/modules/pt_chown
@@ -7,6 +7,7 @@
 
 Depends-on:
 ptsname
+root-uid
 stdlib
 configmake
 
--- a/modules/pthread
+++ b/modules/pthread
@@ -2,10 +2,12 @@
 Implement a trivial subset of the pthreads library.
 
 Files:
+lib/pthread.c
 lib/pthread.in.h
 m4/pthread.m4
 
 Depends-on:
+extern-inline
 sched
 time
 
--- a/modules/ptsname
+++ b/modules/ptsname
@@ -12,7 +12,7 @@
 
 configure.ac:
 gl_FUNC_PTSNAME
-if test $HAVE_PTSNAME = 0; then
+if test $HAVE_PTSNAME = 0 || test $REPLACE_PTSNAME = 1; then
   AC_LIBOBJ([ptsname])
   gl_PREREQ_PTSNAME
 fi
--- a/modules/ptsname_r
+++ b/modules/ptsname_r
@@ -8,6 +8,7 @@
 Depends-on:
 stdlib
 extensions
+isatty          [test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1]
 ttyname_r       [test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1]
 
 configure.ac:
--- a/modules/quote
+++ b/modules/quote
@@ -3,7 +3,6 @@
 
 Files:
 lib/quote.h
-lib/quote.c
 m4/quote.m4
 
 Depends-on:
@@ -13,7 +12,6 @@
 gl_QUOTE
 
 Makefile.am:
-lib_SOURCES += quote.c
 
 Include:
 "quote.h"
--- a/modules/quotearg
+++ b/modules/quotearg
@@ -4,6 +4,7 @@
 Files:
 lib/quotearg.h
 lib/quotearg.c
+lib/quote.h
 m4/mbstate_t.m4
 m4/mbrtowc.m4
 m4/quotearg.m4
--- a/modules/quotearg-tests
+++ b/modules/quotearg-tests
@@ -18,6 +18,7 @@
 setenv
 unsetenv
 setlocale
+localcharset
 
 configure.ac:
 gt_LOCALE_FR
new file mode 100644
--- /dev/null
+++ b/modules/random
@@ -0,0 +1,30 @@
+Description:
+global random number generator
+
+Files:
+lib/random.c
+m4/random.m4
+
+Depends-on:
+stdlib
+stdint
+random_r        [test $HAVE_RANDOM = 0]
+
+configure.ac:
+gl_FUNC_RANDOM
+if test $HAVE_RANDOM = 0; then
+  AC_LIBOBJ([random])
+  gl_PREREQ_RANDOM
+fi
+gl_STDLIB_MODULE_INDICATOR([random])
+
+Makefile.am:
+
+Include:
+<stdlib.h>
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible, glibc
new file mode 100644
--- /dev/null
+++ b/modules/random-tests
@@ -0,0 +1,12 @@
+Files:
+tests/test-random.c
+tests/signature.h
+tests/macros.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-random
+check_PROGRAMS += test-random
--- a/modules/random_r
+++ b/modules/random_r
@@ -11,7 +11,7 @@
 
 configure.ac:
 gl_FUNC_RANDOM_R
-if test $HAVE_RANDOM_R = 0; then
+if test $HAVE_RANDOM_R = 0 || test $REPLACE_RANDOM_R = 1; then
   AC_LIBOBJ([random_r])
   gl_PREREQ_RANDOM_R
 fi
--- a/modules/readme-release
+++ b/modules/readme-release
@@ -17,6 +17,11 @@
 top/README-release
 
 Depends-on:
+announce-gen
+do-release-commit-and-tag
+gnu-web-doc-update
+gnupload
+maintainer-makefile
 
 configure.ac:
 
new file mode 100644
--- /dev/null
+++ b/modules/readtokens-tests
@@ -0,0 +1,13 @@
+Files:
+tests/macros.h
+tests/test-readtokens.c
+tests/test-readtokens.sh
+
+Depends-on:
+closeout
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-readtokens.sh
+check_PROGRAMS += test-readtokens
--- a/modules/regex
+++ b/modules/regex
@@ -26,10 +26,10 @@
 nl_langinfo     [test $ac_use_included_regex = yes]
 stdbool         [test $ac_use_included_regex = yes]
 stdint          [test $ac_use_included_regex = yes]
-strcase         [test $ac_use_included_regex = yes]
 wchar           [test $ac_use_included_regex = yes]
 wcrtomb         [test $ac_use_included_regex = yes]
 wctype-h        [test $ac_use_included_regex = yes]
+wctype          [test $ac_use_included_regex = yes]
 
 configure.ac:
 gl_REGEX
--- a/modules/relocatable-prog-wrapper
+++ b/modules/relocatable-prog-wrapper
@@ -39,6 +39,7 @@
 pathmax
 ssize_t
 stdbool
+stdint
 stdlib
 unistd
 environ
--- a/modules/remainder
+++ b/modules/remainder
@@ -2,12 +2,25 @@
 remainder() function: floating-point remainder function.
 
 Files:
+lib/remainder.c
+m4/remainder.m4
 m4/mathfunc.m4
 
 Depends-on:
+math
+isfinite        [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1]
+signbit         [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1]
+fabs            [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1]
+fmod            [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1]
+isnand          [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1]
+isinf           [test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1]
 
 configure.ac:
-gl_COMMON_DOUBLE_MATHFUNC([remainder])
+gl_FUNC_REMAINDER
+if test $HAVE_REMAINDER = 0 || test $REPLACE_REMAINDER = 1; then
+  AC_LIBOBJ([remainder])
+fi
+gl_MATH_MODULE_INDICATOR([remainder])
 
 Makefile.am:
 
new file mode 100644
--- /dev/null
+++ b/modules/remainder-ieee
@@ -0,0 +1,26 @@
+Description:
+remainder() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/remainder-ieee.m4
+
+Depends-on:
+remainder
+fpieee
+
+configure.ac:
+gl_FUNC_REMAINDER_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(REMAINDER_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/remainder-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-remainder-ieee.c
+tests/test-remainder-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-remainder-ieee
+check_PROGRAMS += test-remainder-ieee
+test_remainder_ieee_LDADD = $(LDADD) @REMAINDER_LIBM@
--- a/modules/remainder-tests
+++ b/modules/remainder-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-remainder.c
+tests/test-remainder.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-remainder
 check_PROGRAMS += test-remainder
+test_remainder_SOURCES = test-remainder.c randomd.c
 test_remainder_LDADD = $(LDADD) @REMAINDER_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/remainderf
@@ -0,0 +1,40 @@
+Description:
+remainderf() function: floating-point remainder function.
+
+Files:
+lib/remainderf.c
+lib/remainder.c
+m4/remainderf.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+remainder       [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+isfinite        [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+signbit         [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+fabsf           [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+fmodf           [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+isnanf          [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+isinf           [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+
+configure.ac:
+gl_FUNC_REMAINDERF
+if test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1; then
+  AC_LIBOBJ([remainderf])
+fi
+gl_MATH_MODULE_INDICATOR([remainderf])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(REMAINDERF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/remainderf-ieee
@@ -0,0 +1,27 @@
+Description:
+remainderf() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/remainderf-ieee.m4
+
+Depends-on:
+remainderf
+fpieee
+remainder-ieee  [test $HAVE_REMAINDERF = 0 || test $REPLACE_REMAINDERF = 1]
+
+configure.ac:
+gl_FUNC_REMAINDERF_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(REMAINDERF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/remainderf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-remainderf-ieee.c
+tests/test-remainder-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-remainderf-ieee
+check_PROGRAMS += test-remainderf-ieee
+test_remainderf_ieee_LDADD = $(LDADD) @REMAINDERF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/remainderf-tests
@@ -0,0 +1,16 @@
+Files:
+tests/test-remainderf.c
+tests/test-remainder.h
+tests/signature.h
+tests/macros.h
+tests/randomf.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-remainderf
+check_PROGRAMS += test-remainderf
+test_remainderf_SOURCES = test-remainderf.c randomf.c
+test_remainderf_LDADD = $(LDADD) @REMAINDERF_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/remainderl
@@ -0,0 +1,41 @@
+Description:
+remainderl() function: floating-point remainder function.
+
+Files:
+lib/remainderl.c
+lib/remainder.c
+m4/remainderl.m4
+m4/mathfunc.m4
+
+Depends-on:
+math
+extensions
+remainder       [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float           [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isfinite        [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+signbit         [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+fabsl           [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+fmodl           [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isinf           [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+
+configure.ac:
+gl_FUNC_REMAINDERL
+if test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; then
+  AC_LIBOBJ([remainderl])
+fi
+gl_MATH_MODULE_INDICATOR([remainderl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(REMAINDERL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/remainderl-ieee
@@ -0,0 +1,27 @@
+Description:
+remainderl() function according to ISO C 99 with IEC 60559.
+
+Files:
+m4/remainderl-ieee.m4
+
+Depends-on:
+remainderl
+fpieee
+remainder-ieee  [{ test $HAVE_REMAINDERL = 0 || test $REPLACE_REMAINDERL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+
+configure.ac:
+gl_FUNC_REMAINDERL_IEEE
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(REMAINDERL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/remainderl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-remainderl-ieee.c
+tests/test-remainder-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-remainderl-ieee
+check_PROGRAMS += test-remainderl-ieee
+test_remainderl_ieee_LDADD = $(LDADD) @REMAINDERL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/remainderl-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-remainderl.c
+tests/test-remainder.h
+tests/signature.h
+tests/macros.h
+tests/randoml.c
+
+Depends-on:
+fpucw
+float
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-remainderl
+check_PROGRAMS += test-remainderl
+test_remainderl_SOURCES = test-remainderl.c randoml.c
+test_remainderl_LDADD = $(LDADD) @REMAINDERL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/rint-ieee
@@ -0,0 +1,24 @@
+Description:
+rint() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+rint
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(RINT_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/rint-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-rint-ieee.c
+tests/test-rint-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-rint-ieee
+check_PROGRAMS += test-rint-ieee
+test_rint_ieee_LDADD = $(LDADD) @RINT_LIBM@
--- a/modules/rint-tests
+++ b/modules/rint-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-rint.c
+tests/test-rint.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 isnand-nolibm
@@ -14,4 +16,5 @@
 Makefile.am:
 TESTS += test-rint
 check_PROGRAMS += test-rint
+test_rint_SOURCES = test-rint.c randomd.c
 test_rint_LDADD = $(LDADD) @RINT_LIBM@
--- a/modules/rintf
+++ b/modules/rintf
@@ -9,6 +9,7 @@
 
 Depends-on:
 math
+extensions
 
 configure.ac:
 gl_FUNC_RINTF
new file mode 100644
--- /dev/null
+++ b/modules/rintf-ieee
@@ -0,0 +1,24 @@
+Description:
+rintf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+rintf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(RINTF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/rintf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-rintf-ieee.c
+tests/test-rint-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-rintf-ieee
+check_PROGRAMS += test-rintf-ieee
+test_rintf_ieee_LDADD = $(LDADD) @RINTF_LIBM@
--- a/modules/rintf-tests
+++ b/modules/rintf-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-rintf.c
+tests/test-rint.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 isnanf-nolibm
@@ -14,4 +16,5 @@
 Makefile.am:
 TESTS += test-rintf
 check_PROGRAMS += test-rintf
+test_rintf_SOURCES = test-rintf.c randomf.c
 test_rintf_LDADD = $(LDADD) @RINTF_LIBM@
--- a/modules/rintl
+++ b/modules/rintl
@@ -9,6 +9,7 @@
 
 Depends-on:
 math
+extensions
 rint            [test $HAVE_RINTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
 
 configure.ac:
new file mode 100644
--- /dev/null
+++ b/modules/rintl-ieee
@@ -0,0 +1,24 @@
+Description:
+rintl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+rintl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(RINTL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/rintl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-rintl-ieee.c
+tests/test-rint-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-rintl-ieee
+check_PROGRAMS += test-rintl-ieee
+test_rintl_ieee_LDADD = $(LDADD) @RINTL_LIBM@
--- a/modules/rintl-tests
+++ b/modules/rintl-tests
@@ -1,10 +1,12 @@
 Files:
 tests/test-rintl.c
+tests/test-rint.h
 tests/minus-zero.h
 tests/infinity.h
 tests/nan.h
 tests/signature.h
 tests/macros.h
+tests/randoml.c
 
 Depends-on:
 fpucw
@@ -16,4 +18,5 @@
 Makefile.am:
 TESTS += test-rintl
 check_PROGRAMS += test-rintl
+test_rintl_SOURCES = test-rintl.c randoml.c
 test_rintl_LDADD = $(LDADD) @RINTL_LIBM@
new file mode 100644
--- /dev/null
+++ b/modules/root-uid
@@ -0,0 +1,20 @@
+Description:
+ROOT_UID macro: superuser's user ID
+
+Files:
+lib/root-uid.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+"root-uid.h"
+
+License:
+LGPLv2+
+
+Maintainer:
+all
--- a/modules/round
+++ b/modules/round
@@ -11,12 +11,12 @@
 Depends-on:
 math
 extensions
-float           [test $HAVE_DECL_ROUND = 0 || test $REPLACE_ROUND = 1]
-floor           [test $HAVE_DECL_ROUND = 0 || test $REPLACE_ROUND = 1]
+float           [test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1]
+floor           [test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1]
 
 configure.ac:
 gl_FUNC_ROUND
-if test $HAVE_DECL_ROUND = 0 || test $REPLACE_ROUND = 1; then
+if test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1; then
   AC_LIBOBJ([round])
 fi
 gl_MATH_MODULE_INDICATOR([round])
--- a/modules/round-ieee
+++ b/modules/round-ieee
@@ -8,8 +8,8 @@
 
 Depends-on:
 round
-floor-ieee      [test $HAVE_DECL_ROUND = 0 || test $REPLACE_ROUND = 1]
-ceil-ieee       [test $HAVE_DECL_ROUND = 0 || test $REPLACE_ROUND = 1]
+floor-ieee      [test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1]
+ceil-ieee       [test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1]
 
 configure.ac:
 gl_FUNC_ROUND_IEEE
--- a/modules/round-ieee-tests
+++ b/modules/round-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-round-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnand-nolibm
 float
 signbit
 
--- a/modules/roundf
+++ b/modules/roundf
@@ -12,11 +12,11 @@
 Depends-on:
 math
 extensions
-float           [test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
+float           [test $HAVE_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
 
 configure.ac:
 gl_FUNC_ROUNDF
-if test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1; then
+if test $HAVE_ROUNDF = 0 || test $REPLACE_ROUNDF = 1; then
   AC_LIBOBJ([roundf])
 fi
 gl_MATH_MODULE_INDICATOR([roundf])
--- a/modules/roundf-ieee
+++ b/modules/roundf-ieee
@@ -8,8 +8,8 @@
 
 Depends-on:
 roundf
-floorf-ieee     [test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
-ceilf-ieee      [test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
+floorf-ieee     [test $HAVE_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
+ceilf-ieee      [test $HAVE_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
 
 configure.ac:
 gl_FUNC_ROUNDF_IEEE
--- a/modules/roundf-ieee-tests
+++ b/modules/roundf-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-roundf-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnanf-nolibm
 float
 signbit
 
--- a/modules/roundl
+++ b/modules/roundl
@@ -12,12 +12,12 @@
 Depends-on:
 math
 extensions
-round           [{ test $HAVE_DECL_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
-float           [{ test $HAVE_DECL_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+round           [{ test $HAVE_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float           [{ test $HAVE_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 
 configure.ac:
 gl_FUNC_ROUNDL
-if test $HAVE_DECL_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; then
+if test $HAVE_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; then
   AC_LIBOBJ([roundl])
 fi
 gl_MATH_MODULE_INDICATOR([roundl])
--- a/modules/roundl-ieee-tests
+++ b/modules/roundl-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-roundl-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnanl-nolibm
 float
 signbit
 
--- a/modules/savewd
+++ b/modules/savewd
@@ -10,12 +10,14 @@
 chdir
 dosname
 errno
+extern-inline
 fchdir
 fcntl-safer
 fcntl-h
 raise
 stdbool
 stdlib
+sys_wait
 xalloc
 
 configure.ac:
--- a/modules/select
+++ b/modules/select
@@ -8,7 +8,9 @@
 Depends-on:
 sys_select
 alloca          [test $REPLACE_SELECT = 1]
+dup2            [test $REPLACE_SELECT = 1]
 sockets         [test $REPLACE_SELECT = 1]
+sys_time        [test $REPLACE_SELECT = 1]
 msvc-nothrow    [test $REPLACE_SELECT = 1]
 
 configure.ac:
--- a/modules/selinux-h
+++ b/modules/selinux-h
@@ -5,23 +5,25 @@
 lib/getfilecon.c
 lib/se-context.in.h
 lib/se-selinux.in.h
+lib/se-context.c
+lib/se-selinux.c
 m4/selinux-context-h.m4
 m4/selinux-selinux-h.m4
 
 Depends-on:
 errno
+extern-inline
 snippet/unused-parameter
 
 configure.ac:
 gl_HEADERS_SELINUX_SELINUX_H
 gl_HEADERS_SELINUX_CONTEXT_H
-AC_REQUIRE([AC_C_INLINE])
 if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
   AC_LIBOBJ([getfilecon])
 fi
 
 Makefile.am:
-lib_SOURCES += se-context.in.h se-selinux.in.h
+lib_SOURCES += se-context.in.h se-selinux.in.h se-context.c se-selinux.c
 
 BUILT_SOURCES += selinux/selinux.h
 selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
--- a/modules/sethostname-tests
+++ b/modules/sethostname-tests
@@ -6,6 +6,7 @@
 
 Depends-on:
 gethostname
+root-uid
 
 configure.ac:
 AC_CHECK_FUNCS_ONCE([geteuid])
new file mode 100644
--- /dev/null
+++ b/modules/sh-quote-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-sh-quote.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sh-quote
+check_PROGRAMS += test-sh-quote
+test_sh_quote_LDADD = $(LDADD) @LIBINTL@
--- a/modules/sigaction
+++ b/modules/sigaction
@@ -4,9 +4,11 @@
 Files:
 lib/sigaction.c
 lib/sig-handler.h
+lib/sig-handler.c
 m4/sigaction.m4
 
 Depends-on:
+extern-inline
 signal-h
 sigprocmask     [test $HAVE_SIGACTION = 0]
 
@@ -19,6 +21,7 @@
 gl_SIGNAL_MODULE_INDICATOR([sigaction])
 
 Makefile.am:
+lib_SOURCES += sig-handler.c
 
 Include:
 <signal.h>
--- a/modules/sinf
+++ b/modules/sinf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 sin             [test $HAVE_SINF = 0]
 
 configure.ac:
--- a/modules/sinhf
+++ b/modules/sinhf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 sinh            [test $HAVE_SINHF = 0]
 
 configure.ac:
--- a/modules/spawn-pipe-tests
+++ b/modules/spawn-pipe-tests
@@ -6,6 +6,7 @@
 
 Depends-on:
 close
+progname
 
 configure.ac:
 
new file mode 100644
--- /dev/null
+++ b/modules/sqrt-ieee
@@ -0,0 +1,24 @@
+Description:
+sqrt() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+sqrt
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(SQRT_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/sqrt-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-sqrt-ieee.c
+tests/test-sqrt-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnand-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sqrt-ieee
+check_PROGRAMS += test-sqrt-ieee
+test_sqrt_ieee_LDADD = $(LDADD) @SQRT_LIBM@
--- a/modules/sqrt-tests
+++ b/modules/sqrt-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-sqrt.c
+tests/test-sqrt.h
 tests/signature.h
 tests/macros.h
+tests/randomd.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-sqrt
 check_PROGRAMS += test-sqrt
+test_sqrt_SOURCES = test-sqrt.c randomd.c
 test_sqrt_LDADD = $(LDADD) @SQRT_LIBM@
--- a/modules/sqrtf
+++ b/modules/sqrtf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 sqrt            [test $HAVE_SQRTF = 0]
 
 configure.ac:
new file mode 100644
--- /dev/null
+++ b/modules/sqrtf-ieee
@@ -0,0 +1,24 @@
+Description:
+sqrtf() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+sqrtf
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(SQRTF_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/sqrtf-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-sqrtf-ieee.c
+tests/test-sqrt-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanf-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sqrtf-ieee
+check_PROGRAMS += test-sqrtf-ieee
+test_sqrtf_ieee_LDADD = $(LDADD) @SQRTF_LIBM@
--- a/modules/sqrtf-tests
+++ b/modules/sqrtf-tests
@@ -1,7 +1,9 @@
 Files:
 tests/test-sqrtf.c
+tests/test-sqrt.h
 tests/signature.h
 tests/macros.h
+tests/randomf.c
 
 Depends-on:
 
@@ -10,4 +12,5 @@
 Makefile.am:
 TESTS += test-sqrtf
 check_PROGRAMS += test-sqrtf
+test_sqrtf_SOURCES = test-sqrtf.c randomf.c
 test_sqrtf_LDADD = $(LDADD) @SQRTF_LIBM@
--- a/modules/sqrtl
+++ b/modules/sqrtl
@@ -8,15 +8,15 @@
 Depends-on:
 math
 extensions
-sqrt            [test $HAVE_SQRTL = 0]
-float           [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-isnanl          [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-frexpl          [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-ldexpl          [test $HAVE_SQRTL = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+sqrt            [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; }]
+float           [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+frexpl          [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [{ test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 
 configure.ac:
 gl_FUNC_SQRTL
-if test $HAVE_SQRTL = 0; then
+if test $HAVE_SQRTL = 0 || test $REPLACE_SQRTL = 1; then
   AC_LIBOBJ([sqrtl])
 fi
 gl_MATH_MODULE_INDICATOR([sqrtl])
new file mode 100644
--- /dev/null
+++ b/modules/sqrtl-ieee
@@ -0,0 +1,24 @@
+Description:
+sqrtl() function according to ISO C 99 with IEC 60559.
+
+Files:
+
+Depends-on:
+sqrtl
+fpieee
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(SQRTL_LIBM)
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/sqrtl-ieee-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-sqrtl-ieee.c
+tests/test-sqrt-ieee.h
+tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
+tests/macros.h
+
+Depends-on:
+isnanl-nolibm
+float
+signbit
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sqrtl-ieee
+check_PROGRAMS += test-sqrtl-ieee
+test_sqrtl_ieee_LDADD = $(LDADD) @SQRTL_LIBM@
--- a/modules/sqrtl-tests
+++ b/modules/sqrtl-tests
@@ -1,14 +1,18 @@
 Files:
 tests/test-sqrtl.c
+tests/test-sqrt.h
 tests/signature.h
 tests/macros.h
+tests/randoml.c
 
 Depends-on:
 fpucw
+float
 
 configure.ac:
 
 Makefile.am:
 TESTS += test-sqrtl
 check_PROGRAMS += test-sqrtl
+test_sqrtl_SOURCES = test-sqrtl.c randoml.c
 test_sqrtl_LDADD = $(LDADD) @SQRTL_LIBM@
--- a/modules/stat-time
+++ b/modules/stat-time
@@ -3,23 +3,26 @@
 
 Files:
 lib/stat-time.h
+lib/stat-time.c
 m4/stat-time.m4
 
 Depends-on:
 time
 extensions
+extern-inline
 
 configure.ac:
 gl_STAT_TIME
 gl_STAT_BIRTHTIME
 
 Makefile.am:
+lib_SOURCES += stat-time.c
 
 Include:
 "stat-time.h"
 
 License:
-LGPL
+LGPLv2+
 
 Maintainer:
 Paul Eggert and Jim Meyering
--- a/modules/stdio
+++ b/modules/stdio
@@ -2,22 +2,26 @@
 A GNU-like <stdio.h>.
 
 Files:
+lib/stdio.c
 lib/stdio.in.h
 m4/stdio_h.m4
 
 Depends-on:
+extern-inline
 include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
 ssize_t
 stddef
+sys_types
 
 configure.ac:
 gl_STDIO_H
 
 Makefile.am:
 BUILT_SOURCES += stdio.h
+lib_SOURCES += stdio.c
 
 # We need the following in order to create <stdio.h> when the system
 # doesn't have one that works with the given compiler.
--- a/modules/stdlib
+++ b/modules/stdlib
@@ -49,6 +49,7 @@
 	      -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
 	      -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
 	      -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+	      -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
 	      -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
 	      -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
 	      -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
@@ -76,6 +77,7 @@
 	      -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
 	      -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
 	      -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+	      -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
 	      -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
 	      -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
 	      -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
@@ -93,8 +95,10 @@
 	      -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
 	      -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
 	      -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+	      -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
 	      -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
 	      -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+	      -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
 	      -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
 	      -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
 	      -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
new file mode 100644
--- /dev/null
+++ b/modules/stdnoreturn
@@ -0,0 +1,40 @@
+Description:
+A <stdnoreturn.h> that nearly conforms to ISO C11.
+
+Files:
+lib/stdnoreturn.in.h
+m4/stdnoreturn.m4
+
+Depends-on:
+snippet/_Noreturn
+
+configure.ac:
+gl_STDNORETURN_H
+
+Makefile.am:
+BUILT_SOURCES += $(STDNORETURN_H)
+
+# We need the following in order to create <stdnoreturn.h> when the system
+# doesn't have one that works.
+if GL_GENERATE_STDNORETURN_H
+stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+              < $(srcdir)/stdnoreturn.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+else
+stdnoreturn.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += stdnoreturn.h stdnoreturn.h-t
+
+Include:
+<stdnoreturn.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paul Eggert
new file mode 100644
--- /dev/null
+++ b/modules/stdnoreturn-tests
@@ -0,0 +1,10 @@
+Files:
+tests/test-stdnoreturn.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-stdnoreturn
+check_PROGRAMS += test-stdnoreturn
--- a/modules/strtoimax
+++ b/modules/strtoimax
@@ -4,8 +4,6 @@
 Files:
 lib/strtoimax.c
 m4/strtoimax.m4
-m4/stdint_h.m4
-m4/inttypes_h.m4
 m4/longlong.m4
 
 Depends-on:
new file mode 100644
--- /dev/null
+++ b/modules/sys_resource
@@ -0,0 +1,52 @@
+Description:
+A POSIX-like <sys/resource.h>.
+
+Files:
+lib/sys_resource.in.h
+m4/sys_resource_h.m4
+
+Depends-on:
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+sys_time
+
+configure.ac:
+gl_HEADER_SYS_RESOURCE
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += sys/resource.h
+
+# We need the following in order to create <sys/resource.h> when the system
+# doesn't have one.
+sys/resource.h: sys_resource.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_at)$(MKDIR_P) sys
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SYS_RESOURCE_H''@|$(NEXT_SYS_RESOURCE_H)|g' \
+	      -e 's|@''HAVE_SYS_RESOURCE_H''@|$(HAVE_SYS_RESOURCE_H)|g' \
+	      -e 's/@''GNULIB_GETRUSAGE''@/$(GNULIB_GETRUSAGE)/g' \
+	      -e 's/@''HAVE_GETRUSAGE''@/$(HAVE_GETRUSAGE)/g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/sys_resource.in.h; \
+	} > $@-t && \
+	mv -f $@-t $@
+MOSTLYCLEANFILES += sys/resource.h sys/resource.h-t
+MOSTLYCLEANDIRS += sys
+
+Include:
+<sys/resource.h>
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/sys_resource-tests
@@ -0,0 +1,10 @@
+Files:
+tests/test-sys_resource.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_resource
+check_PROGRAMS += test-sys_resource
--- a/modules/sys_socket
+++ b/modules/sys_socket
@@ -2,12 +2,14 @@
 A POSIX-like <sys/socket.h>.
 
 Files:
+lib/sys_socket.c
 lib/sys_socket.in.h
 m4/sys_socket_h.m4
 m4/sockpfaf.m4
 
 Depends-on:
 errno
+extern-inline
 include_next
 snippet/arg-nonnull
 snippet/c++defs
@@ -23,6 +25,7 @@
 
 Makefile.am:
 BUILT_SOURCES += sys/socket.h
+lib_SOURCES += sys_socket.c
 
 # We need the following in order to create <sys/socket.h> when the system
 # doesn't have one that works with the given compiler.
--- a/modules/sys_stat
+++ b/modules/sys_stat
@@ -11,6 +11,7 @@
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
+sys_types
 time
 
 configure.ac:
@@ -31,6 +32,7 @@
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+	      -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
 	      -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
 	      -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
 	      -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
--- a/modules/sys_time
+++ b/modules/sys_time
@@ -36,6 +36,7 @@
 	      -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
 	      -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
 	      -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+	      -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \
 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
--- a/modules/sys_types
+++ b/modules/sys_types
@@ -4,6 +4,7 @@
 Files:
 lib/sys_types.in.h
 m4/sys_types_h.m4
+m4/off_t.m4
 
 Depends-on:
 include_next
@@ -27,6 +28,7 @@
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
+	      -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
 	      < $(srcdir)/sys_types.in.h; \
 	} > $@-t && \
 	mv $@-t $@
new file mode 100644
--- /dev/null
+++ b/modules/system-quote
@@ -0,0 +1,24 @@
+Description:
+Quoting for a system command.
+
+Files:
+lib/system-quote.h
+lib/system-quote.c
+
+Depends-on:
+sh-quote
+xalloc
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += system-quote.h system-quote.c
+
+Include:
+"system-quote.h"
+
+License:
+GPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/system-quote-tests
@@ -0,0 +1,26 @@
+Status:
+longrunning-test
+
+Files:
+tests/test-system-quote.sh
+tests/test-system-quote-main.c
+tests/test-system-quote-child.c
+tests/macros.h
+
+Depends-on:
+stdbool
+unistd
+progname
+popen
+pclose
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-system-quote.sh
+check_PROGRAMS += test-system-quote-main test-system-quote-child
+test_system_quote_main_LDADD = $(LDADD) @LIBINTL@
+# The test-system-quote-child program must be a real executable, not a libtool
+# wrapper script, and should link against as few libraries as possible.
+# Therefore don't link it against any libraries other than -lc.
+test_system_quote_child_LDADD =
--- a/modules/tanf
+++ b/modules/tanf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 tan             [test $HAVE_TANF = 0]
 
 configure.ac:
--- a/modules/tanhf
+++ b/modules/tanhf
@@ -7,6 +7,7 @@
 
 Depends-on:
 math
+extensions
 tanh            [test $HAVE_TANHF = 0]
 
 configure.ac:
--- a/modules/thread
+++ b/modules/thread
@@ -8,6 +8,7 @@
 
 Depends-on:
 threadlib
+extern-inline
 lock
 
 configure.ac:
@@ -27,4 +28,3 @@
 
 Maintainer:
 Yoann Vandoorselaere
-
--- a/modules/timer-time
+++ b/modules/timer-time
@@ -7,6 +7,7 @@
 
 Depends-on:
 extensions
+threadlib
 
 configure.ac:
 gl_TIMER_TIME
--- a/modules/timespec
+++ b/modules/timespec
@@ -3,15 +3,18 @@
 
 Files:
 lib/timespec.h
+lib/timespec.c
 m4/timespec.m4
 
 Depends-on:
+extern-inline
 time
 
 configure.ac:
 gl_TIMESPEC
 
 Makefile.am:
+lib_SOURCES += timespec.c
 
 Include:
 "timespec.h"
--- a/modules/trunc-ieee-tests
+++ b/modules/trunc-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-trunc-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnand-nolibm
 float
 signbit
 
--- a/modules/truncf-ieee-tests
+++ b/modules/truncf-ieee-tests
@@ -1,9 +1,12 @@
 Files:
 tests/test-truncf-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
+isnanf-nolibm
 float
 signbit
 
--- a/modules/truncl-ieee-tests
+++ b/modules/truncl-ieee-tests
@@ -1,10 +1,13 @@
 Files:
 tests/test-truncl-ieee.c
 tests/minus-zero.h
+tests/infinity.h
+tests/nan.h
 tests/macros.h
 
 Depends-on:
 fpucw
+isnanl-nolibm
 float
 signbit
 
--- a/modules/u64
+++ b/modules/u64
@@ -3,14 +3,16 @@
 
 Files:
 lib/u64.h
+lib/u64.c
 
 Depends-on:
+extern-inline
 stdint
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
+lib_SOURCES += u64.c
 
 Include:
 "u64.h"
--- a/modules/unistd
+++ b/modules/unistd
@@ -3,21 +3,26 @@
 
 Files:
 m4/unistd_h.m4
+lib/unistd.c
 lib/unistd.in.h
+m4/off_t.m4
 
 Depends-on:
+extern-inline
 include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
 ssize_t
 stddef
+sys_types
 
 configure.ac:
 gl_UNISTD_H
 
 Makefile.am:
 BUILT_SOURCES += unistd.h
+lib_SOURCES += unistd.c
 
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
@@ -30,6 +35,7 @@
 	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 	      -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+	      -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
 	      -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
 	      -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
 	      -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
@@ -128,6 +134,7 @@
 	      -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
 	      -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
 	      -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+	      -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
 	      -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
 	      -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
 	      -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
--- a/modules/unlinkat
+++ b/modules/unlinkat
@@ -4,7 +4,6 @@
 Files:
 lib/unlinkat.c
 lib/at-func.c
-lib/openat-priv.h
 m4/unlinkat.m4
 m4/lstat.m4
 
--- a/modules/unlinkdir
+++ b/modules/unlinkdir
@@ -9,6 +9,7 @@
 Depends-on:
 stdbool
 priv-set
+root-uid
 
 configure.ac:
 gl_UNLINKDIR
--- a/modules/utimens
+++ b/modules/utimens
@@ -10,6 +10,7 @@
 
 Depends-on:
 errno
+extern-inline
 fcntl-h
 fstat
 lstat
--- a/modules/utimens-tests
+++ b/modules/utimens-tests
@@ -16,7 +16,6 @@
 utimecmp
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 TESTS += test-utimens
--- a/modules/utimensat-tests
+++ b/modules/utimensat-tests
@@ -14,7 +14,6 @@
 utimecmp
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 TESTS += test-utimensat
--- a/modules/vfscanf
+++ b/modules/vfscanf
@@ -8,6 +8,7 @@
 
 configure.ac:
 gl_STDIO_MODULE_INDICATOR([vfscanf])
+gl_MODULE_INDICATOR([vfscanf])
 
 Makefile.am:
 
--- a/modules/vscanf
+++ b/modules/vscanf
@@ -8,6 +8,7 @@
 
 configure.ac:
 gl_STDIO_MODULE_INDICATOR([vscanf])
+gl_MODULE_INDICATOR([vscanf])
 
 Makefile.am:
 
--- a/modules/warnings
+++ b/modules/warnings
@@ -7,7 +7,6 @@
 Depends-on:
 
 configure.ac:
-AC_SUBST([WARN_CFLAGS])
 
 License:
 unlimited
--- a/modules/wctype-h
+++ b/modules/wctype-h
@@ -3,10 +3,12 @@
 
 Files:
 lib/wctype.in.h
+lib/wctype-h.c
 m4/wctype_h.m4
 m4/wint_t.m4
 
 Depends-on:
+extern-inline
 include_next
 snippet/c++defs
 snippet/warn-on-use
@@ -16,6 +18,7 @@
 
 Makefile.am:
 BUILT_SOURCES += wctype.h
+lib_SOURCES += wctype-h.c
 
 # We need the following in order to create <wctype.h> when the system
 # doesn't have one that works with the given compiler.
--- a/modules/write-any-file
+++ b/modules/write-any-file
@@ -9,6 +9,7 @@
 Depends-on:
 stdbool
 priv-set
+root-uid
 
 configure.ac:
 gl_WRITE_ANY_FILE
--- a/modules/xalloc
+++ b/modules/xalloc
@@ -7,7 +7,7 @@
 m4/xalloc.m4
 
 Depends-on:
-inline
+extern-inline
 xalloc-die
 xalloc-oversized
 
--- a/modules/xlist
+++ b/modules/xlist
@@ -4,16 +4,14 @@
 Files:
 lib/gl_xlist.h
 lib/gl_xlist.c
-m4/gl_list.m4
 
 Depends-on:
 list
-inline
+extern-inline
 stdbool
 xalloc-die
 
 configure.ac:
-gl_LIST
 
 Makefile.am:
 lib_SOURCES += gl_xlist.h gl_xlist.c
--- a/modules/xoset
+++ b/modules/xoset
@@ -4,16 +4,14 @@
 Files:
 lib/gl_xoset.h
 lib/gl_xoset.c
-m4/gl_list.m4
 
 Depends-on:
 oset
-inline
+extern-inline
 stdbool
 xalloc-die
 
 configure.ac:
-gl_LIST
 
 Makefile.am:
 lib_SOURCES += gl_xoset.h gl_xoset.c
--- a/modules/xsize
+++ b/modules/xsize
@@ -3,16 +3,18 @@
 
 Files:
 lib/xsize.h
+lib/xsize.c
 m4/xsize.m4
 
 Depends-on:
+extern-inline
 size_max
 
 configure.ac:
 gl_XSIZE
 
 Makefile.am:
-lib_SOURCES += xsize.h
+lib_SOURCES += xsize.h xsize.c
 
 Include:
 "xsize.h"
@@ -22,4 +24,3 @@
 
 Maintainer:
 Bruno Haible
-
--- a/modules/xsublist
+++ b/modules/xsublist
@@ -7,6 +7,7 @@
 
 Depends-on:
 sublist
+extern-inline
 xalloc-die
 
 configure.ac:
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -207,6 +207,14 @@
   fi
 fi
 
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# That is part of the shell-selection test above.  Why use aliases rather
+# than functions?  Because support for hyphen-containing aliases is more
+# widespread than that for hyphen-containing function names.
 test -n "$EXEEXT" && shopt -s expand_aliases
 
 # Enable glibc's malloc-perturbing option.
@@ -255,7 +263,10 @@
   return 2
 }
 
-if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \
+   && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then
+  # diff accepts the -u option and does not (like AIX 7 'diff') produce an
+  # extra space on column 1 of every content line.
   if test -z "$diff_out_"; then
     compare_ () { diff -u "$@"; }
   else
@@ -400,8 +411,7 @@
     case $path_dir_ in
       '') fail_ "invalid path dir: '$1'";;
       /*) abs_path_dir_=$path_dir_;;
-      *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \
-           || fail_ "invalid path dir: $path_dir_";;
+      *) abs_path_dir_=$initial_cwd_/$path_dir_;;
     esac
     case $abs_path_dir_ in
       *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
@@ -437,7 +447,7 @@
   pfx_=`testdir_prefix_`
   test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
     || fail_ "failed to create temporary directory in $initial_cwd_"
-  cd "$test_dir_"
+  cd "$test_dir_" || fail_ "failed to cd to temporary directory"
 
   # As autoconf-generated configure scripts do, ensure that IFS
   # is defined initially, so that saving and restoring $IFS works.
--- a/tests/macros.h
+++ b/tests/macros.h
@@ -66,3 +66,8 @@
 /* STREQ (str1, str2)
    Return true if two strings compare equal.  */
 #define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Some numbers in the interval [0,1).  */
+extern const float randomf[1000];
+extern const double randomd[1000];
+extern const long double randoml[1000];
--- a/tests/minus-zero.h
+++ b/tests/minus-zero.h
@@ -24,7 +24,7 @@
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -FLT_MIN * FLT_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static float
 compute_minus_zerof (void)
@@ -42,7 +42,7 @@
 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static double
 compute_minus_zerod (void)
@@ -61,7 +61,7 @@
    IRIX cc can't put -0.0L into .data, but can compute at runtime.
    ICC 10.0 has a bug when optimizing the expression -zero.
    The expression -LDBL_MIN * LDBL_MIN does not work when cross-compiling
-   to PowerPC on MacOS X 10.5.  */
+   to PowerPC on Mac OS X 10.5.  */
 #if defined __hpux || defined __sgi || defined __ICC
 static long double
 compute_minus_zerol (void)
--- a/tests/nap.h
+++ b/tests/nap.h
@@ -19,48 +19,84 @@
 #ifndef GLTEST_NAP_H
 # define GLTEST_NAP_H
 
+static int
+lt_mtime (struct stat const *a, struct stat const *b)
+{
+  time_t as = a->st_mtime;
+  time_t bs = b->st_mtime;
+  int ans = get_stat_mtime_ns (a);
+  int bns = get_stat_mtime_ns (b);
+
+  return as < bs || (as == bs && ans < bns);
+}
+
+static void
+get_mtime (int fd, struct stat *st, int do_write)
+{
+  if (do_write)
+    ASSERT (write (fd, "\n", 1) == 1);
+  ASSERT (fstat (fd, st) == 0);
+}
+
+/* Given a file whose descriptor is FD, see whether delaying by DELAY
+   microseconds causes a change in a file's time stamp.  If the time
+   stamps differ, repeat the test one more time, in case we crossed a
+   quantization boundary on a file system with lower resolution.  *ST
+   is the file's status, recently gotten.  Update *ST to reflect the
+   latest status gotten.  */
+static int
+nap_works (int fd, int delay, struct stat *st)
+{
+  struct stat old_st;
+  old_st = *st;
+  usleep (delay);
+  get_mtime (fd, st, 1);
+  if (! lt_mtime (&old_st, st))
+    return 0;
+  old_st = *st;
+  usleep (delay);
+  get_mtime (fd, st, 1);
+  return lt_mtime (&old_st, st);
+}
+
+static int
+guess_delay (void)
+{
+  /* Try a 1-microsecond sleep first, for speed.  If that doesn't
+     work, try a 1 ms sleep; that should work with ext.  If it doesn't
+     work, try a 20 ms sleep.  xfs has a quantization of about 10
+     milliseconds, even though it has a granularity of 1 nanosecond,
+     and NTFS has a default quantization of 15.25 milliseconds, even
+     though it has a granularity of 100 nanoseconds, so 20 ms is a
+     good quantization to try.  If that doesn't work, try 1 second.
+     The worst case is 2 seconds, needed for FAT.  */
+  static int const delaytab[] = {1, 1000, 20000, 1000000 };
+  int fd = creat (BASE "tmp", 0600);
+  int i;
+  int delay = 2000000;
+  struct stat st;
+  ASSERT (0 <= fd);
+  get_mtime (fd, &st, 0);
+  for (i = 0; i < sizeof delaytab / sizeof delaytab[0]; i++)
+    if (nap_works (fd, delaytab[i], &st))
+      {
+        delay = delaytab[i];
+        break;
+      }
+  ASSERT (close (fd) == 0);
+  ASSERT (unlink (BASE "tmp") == 0);
+  return delay;
+}
+
 /* Sleep long enough to notice a timestamp difference on the file
    system in the current directory.  Assumes that BASE is defined,
    and requires that the test module depends on usleep.  */
 static void
 nap (void)
 {
-  static long delay;
+  static int delay;
   if (!delay)
-    {
-      /* Initialize only once, by sleeping for 20 milliseconds (needed
-         since xfs has a quantization of about 10 milliseconds, even
-         though it has a granularity of 1 nanosecond, and since NTFS
-         has a default quantization of 15.25 milliseconds, even though
-         it has a granularity of 100 nanoseconds).  If the seconds
-         differ, repeat the test one more time (in case we crossed a
-         quantization boundary on a file system with 1 second
-         resolution).  If we can't observe a difference in only the
-         nanoseconds, then fall back to 1 second if the time is odd,
-         and 2 seconds (needed for FAT) if time is even.  */
-      struct stat st1;
-      struct stat st2;
-      ASSERT (close (creat (BASE "tmp", 0600)) == 0);
-      ASSERT (stat (BASE "tmp", &st1) == 0);
-      ASSERT (unlink (BASE "tmp") == 0);
-      delay = 20000;
-      usleep (delay);
-      ASSERT (close (creat (BASE "tmp", 0600)) == 0);
-      ASSERT (stat (BASE "tmp", &st2) == 0);
-      ASSERT (unlink (BASE "tmp") == 0);
-      if (st1.st_mtime != st2.st_mtime)
-        {
-          /* Seconds differ, give it one more shot.  */
-          st1 = st2;
-          usleep (delay);
-          ASSERT (close (creat (BASE "tmp", 0600)) == 0);
-          ASSERT (stat (BASE "tmp", &st2) == 0);
-          ASSERT (unlink (BASE "tmp") == 0);
-        }
-      if (! (st1.st_mtime == st2.st_mtime
-             && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2)))
-        delay = (st1.st_mtime & 1) ? 1000000 : 2000000;
-    }
+    delay = guess_delay ();
   usleep (delay);
 }
 
new file mode 100644
--- /dev/null
+++ b/tests/randomd.c
@@ -0,0 +1,1028 @@
+/* Some random 'double' numbers used by gnulib tests.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "macros.h"
+
+/* Some numbers in the interval [0,1).  */
+
+const double randomd[1000] =
+{
+  /* Some not so random numbers at the beginning.  */
+  0.0,
+  /* Then some numbers generated by GNU clisp.  */
+  0.89255299921822260894833866359,
+  0.56160033401164667976788987953,
+  0.51743003502243816003616725706,
+  0.78419011286685927826225711525,
+  0.64400370685467819470063888148,
+  0.38151255107934048933308886009,
+  0.279822118770531878839000163945,
+  0.51983544681375980919751125922,
+  0.314601557551148376372971500376,
+  0.44551938964685651088492647794,
+  0.44235192503793823441729544512,
+  0.0040120762636767874958681841509,
+  0.57608572759464216512285032474,
+  0.69151953350396585566714564265,
+  0.65634190642598148152780718322,
+  0.68520459394253807590733184567,
+  0.60728078832107635628786818115,
+  0.376679934380311318950949959986,
+  0.48893422455419005003224231708,
+  0.59664228319132670346209747371,
+  0.70162191594290728927555900075,
+  0.70981089000005327192380201706,
+  0.480574069305863387682360414433,
+  0.369264627455974856929910550376,
+  0.42224495444170593700839286742,
+  0.96974027194201320964041066537,
+  0.69950081092902694549973698004,
+  0.366921803754944985368022837045,
+  0.19460757354611588216534077527,
+  0.046437559879825520495822908204,
+  0.57694149138457596563075731094,
+  0.49632733844850578203860859535,
+  0.80735347459453553970910033766,
+  0.210271595033975357161360058967,
+  0.176539870249396534142059724214,
+  0.75320267419158828905982021879,
+  0.09535042912249636739069790414,
+  0.41433965906065337672703334968,
+  0.62189345390648146852641556292,
+  0.322595610794052908153116342595,
+  0.173860860827838938281708881865,
+  0.55258425878412963601205794028,
+  0.066559056629606284504735241978,
+  0.0193835990781649263368095562556,
+  0.127101629778251450428653553143,
+  0.9603475517586241593077319367,
+  0.68429794014738591042302507235,
+  0.0139808909843634026741151214975,
+  0.0036035679428138856395527711611,
+  0.072656401341518399752950821809,
+  0.229562863635014486626281702425,
+  0.88337277579960676546469424767,
+  0.88850212167800818244030104263,
+  0.208063225990716089095767541316,
+  0.268304917462565269805874454916,
+  0.3195427196271617997151392088,
+  0.59101407246003811289573881403,
+  0.972093867752368095080492689,
+  0.409246208960242309650511849637,
+  0.84250639316418167849010246997,
+  0.063842712141624332977179722113,
+  0.96470327141354888687046060373,
+  0.43109879978424216966175314888,
+  0.14551248610248934836482236208,
+  0.84819094513299136408788493212,
+  0.41166757935215520377191731704,
+  0.96020915727830366672170130175,
+  0.55313106883839046701902022583,
+  0.9796595451013758579218900134,
+  0.74222694300533435700276764516,
+  0.117294243075539310976051880564,
+  0.32216824750097146958151447387,
+  0.59090211400137031908131441,
+  0.116841680533127258304897076543,
+  0.83595865401141052310417569507,
+  0.249488155772987988074361149176,
+  0.67896015287499211280971531326,
+  0.72256498621401843299673078876,
+  0.327315362968271601258667297595,
+  0.37438214921868498405279953481,
+  0.76929694812658272272027330778,
+  0.44282297788821568912463681727,
+  0.59517407740270913902014268964,
+  0.346217547960702024419571713567,
+  0.68339868731911838904373225224,
+  0.057507087039986776837238366719,
+  0.1189343986186977384509521024,
+  0.65646666532916174831489781194,
+  0.80925124288745606089697795707,
+  0.61302937875769552609444313984,
+  0.64367434863387777107222872563,
+  0.059228300879437554416166010005,
+  0.76899237494115809397158171526,
+  0.335797991302131791511629123206,
+  0.72923178692628392090326699514,
+  0.79300056654108221012876564405,
+  0.58866760551158502690719665335,
+  0.65249222174748700395779659047,
+  0.79573528799715877963614353006,
+  0.101363067664632247385474166088,
+  0.392494669960902131436398643207,
+  0.37323453200630776302168616197,
+  0.29857554596542776498065634631,
+  0.9796202149626312305197715787,
+  0.58770219934833805722677794788,
+  0.126574575737099431915356308504,
+  0.51086682994362911961448609847,
+  0.26221303911946316754295166201,
+  0.87331402410090670707406246035,
+  0.08604799064198292716037672196,
+  0.77880380648915901962140523059,
+  0.34131646312914811415381942246,
+  0.422787222735822749759714960156,
+  0.16550478231620269333824890372,
+  0.84087065799129220871741135711,
+  0.96561976597443996963329538915,
+  0.059890627133354026356081805998,
+  0.09359839900604706997291172522,
+  0.61463026659668017286248279853,
+  0.220582135665522265733252389516,
+  0.30146695094150797543070759948,
+  0.406591688270652513808216198946,
+  0.206959751707199812083987569348,
+  0.71382992952779021033600406503,
+  0.98971690700151825984363090029,
+  0.86339958328134745391858859595,
+  0.70037828363249257457230217791,
+  0.97380974339470107231135690474,
+  0.9184635965630883290893011311,
+  0.418605216026507942885819265225,
+  0.61793227858714759711625818653,
+  0.67394880797682685081908511723,
+  0.98871101941805039780826467279,
+  0.65973593853137069988371349845,
+  0.93348525072186907424189028727,
+  0.59164378220465485142298641014,
+  0.95303768733773138214124075961,
+  0.88667310242538944858141870801,
+  0.83785319781204861623008709825,
+  0.54026788227426708201242457367,
+  0.74842599257855801522259951132,
+  0.286624102305531463268442510375,
+  0.41180484980938874161376712508,
+  0.22754664620316922947541651384,
+  0.62360609793949755240041318939,
+  0.3311618194042077047850111557,
+  0.315407885695867020730009836503,
+  0.215221706711430951961780213436,
+  0.168600630933631406101821024413,
+  0.62661489373200405241464923618,
+  0.95357070304277219756741072036,
+  0.5186418766697788447635039428,
+  0.70772930521061953327927296944,
+  0.410376884797056150221504703145,
+  0.39705302343406249619577860633,
+  0.79215885822696034431481699125,
+  0.157831717946112504384603002152,
+  0.26892306298536012837855426922,
+  0.15697088614321016223211167568,
+  0.41395315712905823355235182393,
+  0.043977876945327860015049914653,
+  0.91453495544799358550673657283,
+  0.46230093259088633973148827911,
+  0.79479146768024434444120965094,
+  0.1466704986407674407377422815,
+  0.093614591443204076599999803382,
+  0.66061870961706149406527099303,
+  0.087462146328394574476138187113,
+  0.79683664444310818297700615557,
+  0.39732728185755441060070738751,
+  0.141934473990413594291362391075,
+  0.63111751995951919258061547632,
+  0.78521985432793823024330967029,
+  0.53307346282606806792796696141,
+  0.61679109370763781010143645189,
+  0.40696293619387120891515025426,
+  0.68670343879278712242412028794,
+  0.0115112936831136012901340526452,
+  0.70866056737692430987650236649,
+  0.75378980574358943122474800795,
+  0.17133202766710894969283150847,
+  0.36771201738922655520549864974,
+  0.64614182581953931840374311331,
+  0.354495602088990708111406368474,
+  0.96418771817934443444348833491,
+  0.51633426669933834634574104246,
+  0.064671329812306055349433587193,
+  0.084335079914541732137341401384,
+  0.98578018340150609333535890283,
+  0.32988119060114570391488875477,
+  0.70568290443337103364762141207,
+  0.7501960060851696034137148851,
+  0.141312840936106004164373056114,
+  0.60721022154106372815080238296,
+  0.49179275887283771965744826261,
+  0.85530668893284708999269819019,
+  0.09730053915339358769067661488,
+  0.48817911888023094845428570434,
+  0.37116312252354470380676793579,
+  0.61870369881699387959990992873,
+  0.381874188039839457469043174076,
+  0.68193837613090719561872304949,
+  0.4773618313988618747215621251,
+  0.152383599292709764750406667286,
+  0.54317522808228983459963725598,
+  0.363848788591302782268887022354,
+  0.0105589810271147011378412305973,
+  0.55582445068669939957392951111,
+  0.99910376130213936748996659383,
+  0.90286867348280161480903197439,
+  0.48268382934936288156485037692,
+  0.0976084557356802030533675394,
+  0.29004949962481398455881920169,
+  0.99169758897256717005011514856,
+  0.20722895154834288274430061308,
+  0.50294863638464584121275744208,
+  0.71094033855350495714847377558,
+  0.94078709219520224551350834268,
+  0.48088262771516317628650315489,
+  0.80538698628980761175811796611,
+  0.83495029615293903361580945571,
+  0.67996381940825251937974905761,
+  0.57936805772275234468590364926,
+  0.41778137764942046281708286844,
+  0.161602687591454506771276482303,
+  0.093910625156097743113739432334,
+  0.45716763620641108625606409874,
+  0.96455075374827233820027584808,
+  0.5179966880512917274934448216,
+  0.046797382046060065926143985952,
+  0.83673567319931334127111064225,
+  0.44224504444533247245974476514,
+  0.73281179385894336737033582786,
+  0.5642490153724193432309549673,
+  0.83700200507325250303481208805,
+  0.152714941779871552944298597052,
+  0.38606607994977770238226473985,
+  0.0155140917516105439042442246577,
+  0.51621537013393688713546096688,
+  0.311969390991657895966526156064,
+  0.83890647777450698803932943984,
+  0.54370750820133482930695388638,
+  0.98636765788772465929756760473,
+  0.77334255661128878905675504339,
+  0.57070354296508751519811368688,
+  0.8365252076669013372866223481,
+  0.344601601940890721182485798794,
+  0.92658930620470543221158939208,
+  0.72724523363899270076210273102,
+  0.413672082025645586061788451734,
+  0.5132836422023222169840403333,
+  0.82135610583961360173883281975,
+  0.423835065039748889417547786563,
+  0.87083598844595488941471761572,
+  0.59009392451459866513886634656,
+  0.206124826643305920436961792363,
+  0.288685540685143988030522421633,
+  0.7944357933456167153993184889,
+  0.090945230657758780394996530608,
+  0.52981750421369669363095418817,
+  0.091368944984485824360107751981,
+  0.81824925769562351657564377069,
+  0.083315412912658535228751011063,
+  0.59602276778799576464600065047,
+  0.52258035262146456789454411102,
+  0.394692074165738897132014378974,
+  0.92031214264405188928824363967,
+  0.32812665356161216265971156268,
+  0.79754299890007289545033977389,
+  0.3029021512227565310021437326,
+  0.81425785760698537744367921928,
+  0.85199399843570233736733560413,
+  0.096629890212080240754541391968,
+  0.60643798959967098211181910285,
+  0.75368518979236587723780129098,
+  0.451368813651510369666120626045,
+  0.86189868235067352904955566961,
+  0.239506411296874624231401913963,
+  0.143392266376287906568670938457,
+  0.035585084401323981008798496622,
+  0.89407531932950775763701297226,
+  0.56699767164913732414312190205,
+  0.6107715946195223295493238966,
+  0.980870588312723808697191463,
+  0.37603666613089681502774907483,
+  0.19565477083291620146833762404,
+  0.70326913680165706368122461762,
+  0.98247770640436619202690080984,
+  0.54911931698472764719220618506,
+  0.96749331150477343995263612791,
+  0.9349501605275792139661332597,
+  0.067704019779021886031495084945,
+  0.52883185005352261786874768842,
+  0.03879817199556086106868125058,
+  0.011268895714104342862021635882,
+  0.86781395233112768504418642287,
+  0.73610697666830606371057497872,
+  0.22595829849389174304359852447,
+  0.95990840938724981323147621815,
+  0.5938079875208820675776232526,
+  0.78655922365792476391655372464,
+  0.51099073264725007373467108776,
+  0.66474884887866769539664215292,
+  0.88640025828226102852258218854,
+  0.39889893489572927635368967129,
+  0.76340426725003756852384366924,
+  0.485534753598641026618647825146,
+  0.55957578573824837450384728978,
+  0.50840543283094885180866842941,
+  0.0102415845792896532313226969615,
+  0.74666891036262398733922051708,
+  0.49044748088989431070743849791,
+  0.184017043174756439606592004597,
+  0.0225210121470402648790231578307,
+  0.096909683465740960387467976065,
+  0.0521874432095560437920256545446,
+  0.108114343037383115951564617563,
+  0.77430486784405922952977031491,
+  0.73286432949907824441702845144,
+  0.083559249182272369453587951223,
+  0.074541345541671560054508020717,
+  0.55130541064331728019681677403,
+  0.101450912226971008587146654246,
+  0.74564503962660370005995595861,
+  0.55903832180264925580029280922,
+  0.86098138284846671753408133719,
+  0.76146956314354797691373262733,
+  0.5569854467166466965564479865,
+  0.61138555623626762560168304163,
+  0.93778268377974305185411499629,
+  0.106728342608615813606903105742,
+  0.51139895550624845300079248199,
+  0.8826404150665399364200384063,
+  0.79849755952621824621632991954,
+  0.60058338183244813128378689372,
+  0.57271235605091257806409062354,
+  0.134476676178095582804914204515,
+  0.62710051406343298533266304307,
+  0.21517566131268423511744492316,
+  0.87763268502269127056352092234,
+  0.259516013975152388767641295316,
+  0.54026961752737864438921779715,
+  0.0321012344232942464157113655476,
+  0.047765687217921465801489989111,
+  0.17851281529041807770891682623,
+  0.67864372391481596436180177405,
+  0.27188630999531652193578141334,
+  0.76570352378902765382129471855,
+  0.55727605717645959087760838806,
+  0.40035295538031700787360193533,
+  0.65772683660586524086245866733,
+  0.87515739410383285146563935658,
+  0.51637173718066431535845791928,
+  0.32843440805452173782945632394,
+  0.46789250836790673252530282969,
+  0.153916136058705475580104911632,
+  0.38115724589238346986896925035,
+  0.96911901452270741576104655076,
+  0.327510878721849788805057952285,
+  0.52921188196053063832762822112,
+  0.357891066893689952162669812174,
+  0.8109495999496825638917226258,
+  0.87378695338223548954000159812,
+  0.071735687760291841872657613394,
+  0.22099818521305441851106524174,
+  0.61319403424123059973018445501,
+  0.49185069904977836269777464774,
+  0.8465618819298531473261910176,
+  0.88263955123256235889766657732,
+  0.264605739218701311737446373095,
+  0.157257748694727606809000832224,
+  0.61172692557424578980817509135,
+  0.89224381101792427145783648267,
+  0.049436313890546252030141534714,
+  0.78472068655126867546237630366,
+  0.94890896727672958163705440614,
+  0.61244719025309458330037069759,
+  0.69652639673616920270100103049,
+  0.82306805868313923466426022855,
+  0.4619352653236511042512479492,
+  0.248913888569715263431474781448,
+  0.64972077945521993267494748532,
+  0.058989138867897862567374093665,
+  0.97969837050674699927934092348,
+  0.112860503606029382332397067852,
+  0.9148268966080465389473749031,
+  0.80522292073416096202056634334,
+  0.80810563925192214527344776336,
+  0.082994810842601316055993203972,
+  0.58154183958194788097113770541,
+  0.91401321304178026032151961143,
+  0.064162440925738934087179609749,
+  0.15233762499249088696399602351,
+  0.05051666992337641462246832006,
+  0.138526581114846840617440323377,
+  0.3330645447918149831766264793,
+  0.217487368997014213919568641696,
+  0.61893770768550649722673903221,
+  0.48128956859001312165262121487,
+  0.67074178502738313699688470847,
+  0.74389636308055141796746779725,
+  0.78623735396470085242463142878,
+  0.74044466560335570728816983391,
+  0.44977042205766449238521848558,
+  0.04936658918716696558210777333,
+  0.46898154881467544198433735515,
+  0.86577421926732888331279455256,
+  0.351697801257336354285066689416,
+  0.44607679846684358775746123434,
+  0.68542184287580537292736482205,
+  0.044146424753083577398366558491,
+  0.84496717026871403905274974765,
+  0.20398318496314438897842101827,
+  0.75107700174605698650069666924,
+  0.178571061661964354577482608798,
+  0.67178502534981979941629966218,
+  0.90847842600882488644789391115,
+  0.073076683947302775918335357377,
+  0.33981323802799502107773228774,
+  0.88205531070102240708858032672,
+  0.52395959911163033140017417074,
+  0.339537812421755656306362620887,
+  0.54102447887624739438002987695,
+  0.99615637434542139613844677579,
+  0.91178029521112995461052949527,
+  0.75825739605806537625994927603,
+  0.20376049709427102495755901889,
+  0.414724980644126108685694310425,
+  0.33340705339227162790042902392,
+  0.63442350111338002489027718102,
+  0.79083735924049231993808201264,
+  0.7022290803727963570326957922,
+  0.073051026670174816217706335151,
+  0.50842348505687696224462184336,
+  0.32363091931107924009593033016,
+  0.097074638787613630803324174721,
+  0.79231345620836950165162896374,
+  0.46134517653790366185204412042,
+  0.87767180094474465071641454817,
+  0.30504377737897498569142680272,
+  0.96430402804903305707372788262,
+  0.58722709934909516402891605024,
+  0.36287829330987989626587492725,
+  0.341369045118572012709880807167,
+  0.18622546427505557603629823709,
+  0.71794779555885705340742601105,
+  0.098775720656078510422828040021,
+  0.94170390436210924588938028149,
+  0.6256516749208606216856038288,
+  0.84990648194056707180867958453,
+  0.24897158268824763099382644974,
+  0.67126976686560821454618204853,
+  0.18287142221906188751198231263,
+  0.58301735289988287890086250316,
+  0.39451451502323596545833498888,
+  0.64778726863510310777659172018,
+  0.344060647976610102257104623935,
+  0.8543225374577925606075052273,
+  0.41721025737118350088955048104,
+  0.346301150923723212219486824146,
+  0.430145349151890094004681136873,
+  0.083653676599147505357408467754,
+  0.89927285917733406113015320169,
+  0.87717630249665962395834008139,
+  0.114609060439245285884826496387,
+  0.19079403943711412757743782207,
+  0.095752662525740063245815699042,
+  0.79249438764728213221559489213,
+  0.36889557473162465630046043798,
+  0.076691690566591062968137595944,
+  0.82502767429905549906741868154,
+  0.7665582347663079379259164121,
+  0.40329445688627141530172819257,
+  0.76025417855373928649612014969,
+  0.67742016809536470259225177395,
+  0.56458198627250149175789836481,
+  0.78923506303765674533158921804,
+  0.242546191857944356752822856477,
+  0.5429792204847717222270173404,
+  0.7269010821579782458839227112,
+  0.68884017933657182784660476876,
+  0.037868346502260087811459749823,
+  0.5900507745679403546108564628,
+  0.2867946536016681954708929644,
+  0.47061390957475445523849010039,
+  0.51289737877965767076806069599,
+  0.422963220866519099525024712084,
+  0.056516063514784913538055836342,
+  0.77559606292381102490968685122,
+  0.44812023547000818124896526252,
+  0.8496368064876247362896528731,
+  0.272242276648834925536741986616,
+  0.21366791927514210787832263868,
+  0.458126557153035507756298880855,
+  0.59095285049337797286946531198,
+  0.41387171106200290943847880691,
+  0.040527832792286543640976926214,
+  0.84749051864346812142321430329,
+  0.6591922374100337646083630177,
+  0.30504037894556796180304594549,
+  0.69588062596190762407598122745,
+  0.54615362946297678668402889519,
+  0.27179536774730804380125320985,
+  0.16312965572910266758089041195,
+  0.60443803311418335000528681396,
+  0.76221957063947757300487766314,
+  0.0012561481228798307955579245318,
+  0.38477311712200424042679172286,
+  0.86336953839931184684851388121,
+  0.85132017314817690655384788334,
+  0.79741410166633177181313320738,
+  0.81142674213295830272567127246,
+  0.90095974521916505411272740187,
+  0.461262866736651478343958282766,
+  0.163149749038393754125992055513,
+  0.079563568933303239293664877234,
+  0.0076308467066608702534098522771,
+  0.74020408989686798939059759005,
+  0.68004244363120265645245845544,
+  0.99423282025586676895879517721,
+  0.256512790150101579655974619204,
+  0.15841489307390214447222985222,
+  0.53156533193583516285295078457,
+  0.51195175518666885397864463638,
+  0.2688502522458221215136352473,
+  0.290743998007688539265414246556,
+  0.375642431327791011131765421904,
+  0.73366824563603699669790620984,
+  0.89031055476039433366324605036,
+  0.63269458446317741594059410575,
+  0.79677646360837164675956632,
+  0.91096051787867659208019728176,
+  0.056411022047894420770349313174,
+  0.7117937367428418076554349793,
+  0.494496454398059649677550547185,
+  0.9944698091905991687808626336,
+  0.195654008095567563746040882677,
+  0.33245249703376584453346565181,
+  0.91671965905832444523554539619,
+  0.104159073216349402499760928077,
+  0.78250381705179599027513221262,
+  0.82221952254403323129879405024,
+  0.25404653774104883427079980313,
+  0.89334850648967094099280368977,
+  0.2721479244387740074938025269,
+  0.58627710421889854554604323774,
+  0.80740872172002770008164688167,
+  0.295213737773499230779293451686,
+  0.366266263469556210902410635735,
+  0.72189449997560167388059780325,
+  0.91339160960295327548014703572,
+  0.27978723834100283634925494393,
+  0.44312275285067091147157546317,
+  0.88264479919648468925459438057,
+  0.74860386620420068665117140949,
+  0.97534502025842784289380076051,
+  0.183653687608870314454061893335,
+  0.14143760686328530307343938507,
+  0.7794390875763962068165432699,
+  0.79988123088296718350409621263,
+  0.91344402454829897860268279997,
+  0.3003753710559256572305330721,
+  0.92236868180619898327118824659,
+  0.85128995509445007265453349716,
+  0.51226586850988855988005111668,
+  0.59328586801467434659081264762,
+  0.131543061349700789237108200816,
+  0.97962864281984756641024957818,
+  0.80003961712390827564285728721,
+  0.07332191035039234849987853587,
+  0.33710892945255754021249327366,
+  0.237798240512212115424045579506,
+  0.050628096786899757905464602857,
+  0.36368141580193860149061967396,
+  0.074547282281222729072803274018,
+  0.32013351651022219595136046535,
+  0.50087363542319392259892635316,
+  0.95534128322832584718763016378,
+  0.63089810554419660091974256912,
+  0.45937043591639452731937380837,
+  0.77794827072126710252068287081,
+  0.5833967217973934570703322242,
+  0.89948711130168823436943591707,
+  0.88448792344727137087709578749,
+  0.75774410588649351850782212564,
+  0.51545850808454807305763364038,
+  0.89535564141616759448334976604,
+  0.433876155086630438489414332084,
+  0.263145194001722566517185175524,
+  0.094513715303174637696079970882,
+  0.0067905149976316075236601623182,
+  0.3746548325271489972742277758,
+  0.81418012245523025207375976459,
+  0.7382555515800124086679648947,
+  0.71505454385778976492869269043,
+  0.7698698840252614242858413632,
+  0.53096667868591647121855295207,
+  0.5913146508318579789498085478,
+  0.82865413011200335887487636747,
+  0.246477924915753655378269255135,
+  0.7718625116939460952174295485,
+  0.33088224685104582360581424038,
+  0.077396220323469426942810035952,
+  0.399851739373243384531661374094,
+  0.74828949567652386217126904324,
+  0.55533476993642340021791702209,
+  0.475356366587838670689554086714,
+  0.99199926249299355831492581518,
+  0.60739053074816626181185925167,
+  0.94570422855790142383862352906,
+  0.67410117583869264525962136333,
+  0.99340016295179621471645098914,
+  0.30521664837678549625426072163,
+  0.82786899862234431119578444516,
+  0.0246054418785779831964997687095,
+  0.33057040500642957115284791089,
+  0.325865542252271051046671982904,
+  0.116469964535698881624567000313,
+  0.38792519202192930208550481713,
+  0.147033252049062199325747990948,
+  0.333360890210745561370686771174,
+  0.267717098935309378552279527125,
+  0.473606191830554736751491306975,
+  0.69379726024488030302072707274,
+  0.39866105325920152799379542147,
+  0.075996151521605600512218326895,
+  0.43692155239290098173990417979,
+  0.63183509185797834489905365016,
+  0.327726835190132824885685947736,
+  0.82769389015654780671213364517,
+  0.38036542617183448008870457384,
+  0.06416363778906221378580326597,
+  0.95989693996326393340364540321,
+  0.77473792948077472252492320019,
+  0.73353080354752465520384745159,
+  0.79531316211939777703706647305,
+  0.31887745411495362933791547194,
+  0.5504233366621661345254817397,
+  0.133841546560512334978343647306,
+  0.93323316393590598213508657757,
+  0.219534116905903225236593922786,
+  0.352227557302752346568799070044,
+  0.50699048681296139093781410327,
+  0.56063256677949754339755086295,
+  0.97859418495668224120337606178,
+  0.43217748779939454097021337034,
+  0.6118800794139137562939270606,
+  0.8826339041571606455078384688,
+  0.190654349423411314990846249777,
+  0.0272323818569649486990095499454,
+  0.13501820915175992368033644254,
+  0.34430252524220055863712676536,
+  0.135013324503164182485257894453,
+  0.83301344777287732687815180326,
+  0.71146270180847724757833953093,
+  0.059584725284656364940760846576,
+  0.124388342467555907606115942139,
+  0.86760011350010388002288781466,
+  0.43443235444248399222879725088,
+  0.62257025564267773540408523682,
+  0.42224480338939459869117553607,
+  0.122203729563367693705179104655,
+  0.86763329805228175173701751082,
+  0.61852711996472568821866689006,
+  0.9981036801779161471700405786,
+  0.177126618334123901292041594724,
+  0.37033568941002233661950847289,
+  0.81720705981865203019383851894,
+  0.194752883553301253160228353622,
+  0.5399475493930702257701115294,
+  0.21555050095259535717046390477,
+  0.031480898918419061738395489394,
+  0.0108626235742996694506893658131,
+  0.29439861659506237876675916168,
+  0.25969803792963051605662393213,
+  0.64305111681301349941082616522,
+  0.398301763391130971280749586885,
+  0.82959279528518208376169366062,
+  0.494452121232255582677051524076,
+  0.032046850110252624668328949032,
+  0.304808216164121089322038632124,
+  0.43743086801077933536332835933,
+  0.067635143022119684849606244687,
+  0.062601171413915686472972559687,
+  0.80704249768256597155262089974,
+  0.049090587901867220876053770281,
+  0.14290280489067737067786839775,
+  0.85153414385190808252068833198,
+  0.052035578866778404379096518691,
+  0.84803461110488710482683367176,
+  0.323391780352303842858779454674,
+  0.52713499343541339922976296515,
+  0.91034109375479019837692785976,
+  0.106146556890642346491650008212,
+  0.291532189474064930184344798145,
+  0.330494959183718721493342551525,
+  0.6236537208920888603043773443,
+  0.89122121355780761549659392994,
+  0.51799810738861013193016943087,
+  0.249256177739037963581221438965,
+  0.76322106809612787470242640888,
+  0.97852511972383831461233976406,
+  0.52255677693690499607690355455,
+  0.4450034860583097087122794844,
+  0.79114162250324775713725095404,
+  0.94756217345536380876998110362,
+  0.58677918818329126036021764787,
+  0.84845252924877884299669190981,
+  0.30081720041370757827674016113,
+  0.27920525653128846538023076229,
+  0.33471466998109052439193176801,
+  0.77432114969973711331784009482,
+  0.79975078898170550460312445454,
+  0.90029380309155505829673878957,
+  0.22735855793472972935624370264,
+  0.83917898101167717908999667914,
+  0.96001063929762371813642857618,
+  0.80557845129235602137075744771,
+  0.227828260252387705994553631692,
+  0.45514459312672738783331856798,
+  0.6996049090759249573037751274,
+  0.76407211467383802388153449844,
+  0.35750763601712374361686514082,
+  0.090157662209549066428683554241,
+  0.95043897530001474792481472865,
+  0.97262166470012788338731033975,
+  0.203045895422423613196589718133,
+  0.217437635156560627036179586425,
+  0.5222956932204809424910993278,
+  0.52865060708104384493756729767,
+  0.97715373213739469800445297208,
+  0.5740174414400501666597490431,
+  0.172348314420047937640907870932,
+  0.57197038071649167881433868039,
+  0.26289948915209002196358225729,
+  0.177903112174726341611524884074,
+  0.74917239660013094610681443816,
+  0.59837085384984040836442442706,
+  0.065070324689375259831989322427,
+  0.44807493892928848916566949155,
+  0.59027783360778386064107723777,
+  0.122058971772529617939528531479,
+  0.18965096763129552013799044806,
+  0.179455202785822708296801760066,
+  0.032170979041981235014758366854,
+  0.297222966386620738492021519056,
+  0.91323423393143490893801153646,
+  0.75998869946268189685327906564,
+  0.83934073246383862944110864099,
+  0.17898779712956184324621175982,
+  0.480986398855505957279379560397,
+  0.60860751560721289727164165043,
+  0.298927282590269088379100218673,
+  0.77935020447343759584143119835,
+  0.480545242963934573648858250607,
+  0.85619790637736236353631524289,
+  0.96488893882602300700764346564,
+  0.36351865634843046736230405883,
+  0.82895257550724293657223335349,
+  0.79749691055514662573933190753,
+  0.20106705267868388883102752272,
+  0.33623918491977977623116871123,
+  0.93256466340279772952587363977,
+  0.88648669501682764515636262464,
+  0.47662235152771500250187825963,
+  0.52659238455883068245922982067,
+  0.94111676559395948458425469814,
+  0.323317713690175795284098362026,
+  0.34796405933091263994264450729,
+  0.52445433363119391822452105405,
+  0.525140277317638922334264421,
+  0.64469482443585357444532895759,
+  0.33472685924872903603447879104,
+  0.42400458791646499703641118014,
+  0.8222662798441265944554029489,
+  0.75524567154228028735673060411,
+  0.90790601849806560799894333131,
+  0.75164241313793249434488428193,
+  0.38724602290468111557712203885,
+  0.36352513950081020449187506395,
+  0.078398790907179055722325452963,
+  0.5003676822199407758422514133,
+  0.86055044548361328714384972985,
+  0.66748567445598821900669819042,
+  0.95450644393912187127659765969,
+  0.9536501355878008523425355652,
+  0.56207573012593503802043957099,
+  0.99057795680550440527031916411,
+  0.056136908924222021770088579728,
+  0.89322960593560085272815946927,
+  0.19380351076299398770342941398,
+  0.036881975481577328074706357897,
+  0.38834900979665334617449710449,
+  0.77196507761008668275581490587,
+  0.87539115393397618421355963533,
+  0.9131721846286054396553858461,
+  0.62245648254908013430163665866,
+  0.56021174819199355559539089633,
+  0.86987294559046384230921358438,
+  0.474584307464076041054198211805,
+  0.37224942408757353492416873571,
+  0.198307276357215222087716993615,
+  0.81633548414328354008913860616,
+  0.071192681637945014051745371309,
+  0.227203421058334439883665388655,
+  0.50527083273847576806586104904,
+  0.25911353175247232791676189983,
+  0.103567996992606824957067451526,
+  0.98316826751311017109085781757,
+  0.99206610065531611133123425907,
+  0.63838444880264351660305680771,
+  0.90013304139719692321619239255,
+  0.541419881593941428911392944,
+  0.434681681520065487913409442927,
+  0.0277935905905462584654818408167,
+  0.28736085880215502013374946299,
+  0.204706679291990486471085620508,
+  0.29639415300325412139805373353,
+  0.316818074164048785111401123944,
+  0.58068268044073033182148412246,
+  0.137736206950094621238996907006,
+  0.80907996549523150166492783923,
+  0.73799561611209772635015717353,
+  0.84013433924397440368969968592,
+  0.46126521311414726401422152854,
+  0.78013716447507497359555980298,
+  0.83405708922951231042933175851,
+  0.6366367969739079258896472192,
+  0.77353748358406402598000037557,
+  0.17489624725635947111471117775,
+  0.80267952648428412026314875447,
+  0.80437106861315296029137160672,
+  0.62834462177566783487584779777,
+  0.31539602345858033626133832055,
+  0.50541890853061839219557074283,
+  0.0195874476781850222509795360627,
+  0.011676447193909007242643314705,
+  0.85675479754070644130150816794,
+  0.09391269154749661204040398199,
+  0.369625667102334643216258483376,
+  0.84311577046357953313746551837,
+  0.66438426715728382263582851036,
+  0.70530906415261448155650458603,
+  0.446783684004800041373395690117,
+  0.75627790284213576819810990131,
+  0.57190285913753158265774292274,
+  0.97785681370875218892539297465,
+  0.0244503386494348881614690746194,
+  0.48528430854909558202793141933,
+  0.89436155397807056672243211894,
+  0.40757489194485346255194449191,
+  0.91772837786834838909335779229,
+  0.28020326531649972709359017096,
+  0.28847822326776188982020803144,
+  0.93193769743225684077624356649,
+  0.58336147304815741644785105161,
+  0.4004241800179331174134885947,
+  0.265790823692672203607418801725,
+  0.4137092141145146388568879939,
+  0.0255090449126572366852573357318,
+  0.47601725598948555645487446626,
+  0.69141516452580797436419291497,
+  0.187709862166242786826507443003,
+  0.31177816288567708916778389045,
+  0.79635247302484103596788484137,
+  0.14648403361265752358955335086,
+  0.0088027047060531475573345163528,
+  0.90053967411241805345616039474,
+  0.373822238382428585287035417224,
+  0.94303097002109978273901800507,
+  0.037263906643698883423150604649,
+  0.98416823398276433881119247311,
+  0.257766562836474661728601317803,
+  0.09336855716941364387765222813,
+  0.057604551843195630210060755775,
+  0.37732024813036636644231432449,
+  0.437099108019093398068604946814,
+  0.0298274889889844501626534131975,
+  0.54161045457572229928359302347,
+  0.354192069739745951755754451894,
+  0.9952629304832433588789284291,
+  0.61362350596285189174752077338,
+  0.23176197923774029736185020682,
+  0.259000332877923815426717028414,
+  0.77171708810079063604185854121,
+  0.87278431247491539306511051532,
+  0.386310463821549823085972724515,
+  0.19043920209178263945663905422,
+  0.77200547833114724875436606573,
+  0.2683024354984293205497398925,
+  0.144270112550972640008446091075,
+  0.36996280314557984925474224612,
+  0.163548224543250866742712583905,
+  0.54541238293503241055380526708,
+  0.54270760938500008382580072956,
+  0.7374073253240524865446763851,
+  0.93470960326436177572863031654,
+  0.71417607213823278615975270201,
+  0.65837463356664939532769528292,
+  0.433323451649582925271830911365,
+  0.79664580661766246494864588315,
+  0.392079017934601610514677836005,
+  0.212454387416532999103471570235,
+  0.198678082418012501322802116335,
+  0.61525672800559338657275986197,
+  0.99339589895181138684928419014,
+  0.53563057949945927383392076793,
+  0.68817192513245948798192690082,
+  0.59671938169380086666866042956,
+  0.5686075254645125832635026196,
+  0.25860953535454698758704936914,
+  0.60779864941995215785819783969,
+  0.46515241662568547274625942204,
+  0.8756966078479474164213834749,
+  0.89153160343113076353740745469,
+  0.57055911159151577684982200009,
+  0.39366246576557783924065683256,
+  0.53789676931469921495851209609,
+  0.95842028586447684249630374944,
+  0.25218284880717367924827402845,
+  0.23718965807272971860203662735,
+  0.334222632819004380754702693406,
+  0.6370849366068287810411454729,
+  0.722665796162802454203702773,
+  0.50216248905279887048328225791,
+  0.34529823309520970630714708672,
+  0.45098892404492692601908443802,
+  0.64640019115293913591196874603,
+  0.137077316379736192931987264458,
+  0.29368115076039970149731521521,
+  0.20091822953913855557804069085,
+  0.066267083813833718511605782276,
+  0.88094596104423280074202839474,
+  0.071730322265966936504743175424,
+  0.69735904142296779896396736035,
+  0.91352594564083795862432502567,
+  0.13244220377041278512040316988,
+  0.6283911312781029516331064494,
+  0.34896540167805105781090114462,
+  0.6795367801751911186206756471,
+  0.74898526486791573083377925403,
+  0.71700182398199203349731046015,
+  0.121142833366516620257163901501,
+  0.32678002036857151533698078636,
+  0.327511655875027224450064555456,
+  0.0079152053645354575349489795814,
+  0.84748954479623021059675156738,
+  0.75041561033954009809301550159,
+  0.41101693712463238996746228193,
+  0.90155864029338267639417046915,
+  0.35464670537047753945618208157,
+  0.68848712573944472430623590326,
+  0.08893193373618063124738179594,
+  0.58932830480784385636485098641,
+  0.0501618828375381577588978271165,
+  0.9451968329901169788400753848,
+  0.074994725566097580721185016702,
+  0.191860088196691871607965261685,
+  0.67853841063536805868885844477,
+  0.179445375284033906887325905976,
+  0.84157620913886056000430779083,
+  0.7377942162322144186341324232,
+  0.231126715579023126062082806996,
+  0.127662509645324778320005407937,
+  0.63062414859560283674777403205,
+  0.55283326072907470543330204975,
+  0.81243486031688046850257374808,
+  0.299095175225750536694802628506,
+  0.34284433830834748530634854762,
+  0.92098838107935607957057329632,
+  0.6334432153537539286206936299,
+  0.49203336326915182548719200464,
+  0.70089872986754081776092540042,
+  0.410346112246289262244008861334,
+  0.689375704219352519232614571,
+  0.53543492718830214408075484368,
+  0.78985504761729292283075540625,
+  0.66802245726332267870092702429,
+  0.75600588548341120124374250114,
+  0.83217485519464083512235296359,
+  0.77758150309412736979136465746,
+  0.067382141804836913185384124002,
+  0.7289836962356747770023887674,
+  0.453434776313686590560640460504,
+  0.3160796148757468204057886796,
+  0.0098933475787107681104048511314,
+  0.3620064234142809735084479026,
+  0.85993179373877360456391909506,
+  0.90684883450763884954227285187,
+  0.75959171037325548903969803948,
+  0.91219881792279148536349496306,
+  0.97175430264940118917041244436,
+  0.292364544897748356834218017667,
+  0.126096590956329503351026499397,
+  0.058210669685805595156500555938,
+  0.207143479048534791976348255132,
+  0.202837039257860939456824357966,
+  0.459137240079351948795601640776,
+  0.65480905235794807223708347609
+};
new file mode 100644
--- /dev/null
+++ b/tests/randomf.c
@@ -0,0 +1,1028 @@
+/* Some random 'float' numbers used by gnulib tests.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "macros.h"
+
+/* Some numbers in the interval [0,1).  */
+
+const float randomf[1000] =
+{
+  /* Some not so random numbers at the beginning.  */
+  0.0f,
+  /* Then some numbers generated by GNU clisp.  */
+  0.5475547223118679f,
+  0.34246776881920316f,
+  0.5392890035773527f,
+  0.7659977466712314f,
+  0.981777728216802f,
+  0.5072714919036858f,
+  0.013067187372820088f,
+  0.5939129809588458f,
+  0.8656766279019622f,
+  0.543285432935587f,
+  0.7356789332482375f,
+  0.6949986883963228f,
+  0.24549627232115334f,
+  0.5284831161749963f,
+  0.5155532691206044f,
+  0.8675046320312618f,
+  0.352112379604797f,
+  0.5531511159170834f,
+  0.4257973252348133f,
+  0.7215227011042165f,
+  0.5575120018630739f,
+  0.2520519492903103f,
+  0.3456359201929342f,
+  0.25704815923113167f,
+  0.36057213750359796f,
+  0.6627651999069352f,
+  0.9999061791846359f,
+  0.9869721576506404f,
+  0.8396349108647587f,
+  0.34769391515131565f,
+  0.9340894521969932f,
+  0.5424808409822306f,
+  0.009382726801272945f,
+  0.7172447826859077f,
+  0.862397729700756f,
+  0.698392965223199f,
+  0.5195043146318105f,
+  0.49168444269756373f,
+  0.8264031891811243f,
+  0.7559060906638857f,
+  0.13266314830856785f,
+  0.2391629428441715f,
+  0.6017152131019616f,
+  0.22027189520650348f,
+  0.41925898119869f,
+  0.9274097872091516f,
+  0.7902048244468082f,
+  0.7108913340210198f,
+  0.10649031944572607f,
+  0.4266029692987955f,
+  0.03527535488878786f,
+  0.041331843037360594f,
+  0.5192104824436203f,
+  0.9009097004084897f,
+  0.7976802929045396f,
+  0.406765756509179f,
+  0.5500787292907248f,
+  0.026198771701358203f,
+  0.12938940955589706f,
+  0.6163301794397298f,
+  0.5965154938276138f,
+  0.9714248063895202f,
+  0.8829976598456185f,
+  0.3079142008721768f,
+  0.9019455967476253f,
+  0.08118502115829951f,
+  0.79418709457667f,
+  0.08285569847670116f,
+  0.7388464672002745f,
+  0.19694666240439862f,
+  0.8747285795149943f,
+  0.4980757738068192f,
+  0.8710864074610076f,
+  0.5544461192019553f,
+  0.5535366739219252f,
+  0.8531224096704118f,
+  0.7330647502773139f,
+  0.19476121177098882f,
+  0.003267433381226703f,
+  0.7096422499194498f,
+  0.7631455315718761f,
+  0.8265563116010316f,
+  0.08996624819434318f,
+  0.08077165367195172f,
+  0.3288910472794292f,
+  0.07699719779019476f,
+  0.3832581523706602f,
+  0.22795219564408464f,
+  0.6815889165475738f,
+  0.06883556931675017f,
+  0.6645883282279411f,
+  0.0026652915245360953f,
+  0.3775784864303784f,
+  0.26117239170369033f,
+  0.37101095156844266f,
+  0.6705894911858857f,
+  0.603874286017153f,
+  0.49138756556829855f,
+  0.4120191593751654f,
+  0.15568263909489088f,
+  0.8455843808967949f,
+  0.1557418126051161f,
+  0.7969282799780705f,
+  0.6416800273925315f,
+  0.3326260772633173f,
+  0.4661531928012419f,
+  0.5103013106325823f,
+  0.46851987076092605f,
+  0.7032404652402595f,
+  0.7206429381025199f,
+  0.07292435960930232f,
+  0.26118738780412243f,
+  0.32180268048927285f,
+  0.5249542931728017f,
+  0.2258264794550554f,
+  0.2284828678399492f,
+  0.6884274691259129f,
+  0.9028427989008454f,
+  0.17484831816153923f,
+  0.5692105911087638f,
+  0.3778739413476637f,
+  0.23254030393127378f,
+  0.8332558207361702f,
+  0.9232891635646061f,
+  0.9452459425450176f,
+  0.9468869628924061f,
+  0.49990411105993937f,
+  0.8052835121615703f,
+  0.23598814519966105f,
+  0.9346375252542966f,
+  0.41044357229222284f,
+  0.9578601849290597f,
+  0.5376856180170664f,
+  0.5804421889023005f,
+  0.5990755681813117f,
+  0.5626649900980665f,
+  0.01114715984711745f,
+  0.38099296950686234f,
+  0.5083562785373716f,
+  0.24612063530549f,
+  0.8383007212364865f,
+  0.07484825288434482f,
+  0.7845452310740546f,
+  0.8176442756505333f,
+  0.5243753925074913f,
+  0.2234246588313149f,
+  0.6959988683145881f,
+  0.6777945628036938f,
+  0.7918823099563189f,
+  0.18066238206421303f,
+  0.6121174617763946f,
+  0.8338310374562098f,
+  0.5038948004728196f,
+  0.38886436956574855f,
+  0.9803320207568946f,
+  0.4602032757634912f,
+  0.05412527741218076f,
+  0.9382044088494068f,
+  0.23864140317598603f,
+  0.9414557715587952f,
+  0.6612942338268107f,
+  0.32740826668173995f,
+  0.10119708193368793f,
+  0.33505965714287866f,
+  0.005304703518218878f,
+  0.36310682241912684f,
+  0.6544306821561172f,
+  0.1916648542626438f,
+  0.6427036807312833f,
+  0.1353616651564049f,
+  0.7012355887610057f,
+  0.670269522818956f,
+  0.638947507627987f,
+  0.00685994842023685f,
+  0.7906866411448021f,
+  0.8858196316591407f,
+  0.85496288574892f,
+  0.5532859704937614f,
+  0.37081465614037246f,
+  0.4267228930541903f,
+  0.3255019267444226f,
+  0.3923590572867611f,
+  0.5019207972191081f,
+  0.9797902232862864f,
+  0.1667975343179291f,
+  0.8390471483322399f,
+  0.5679445685493473f,
+  0.00009512046962745213f,
+  0.45101151538823403f,
+  0.3244510225850582f,
+  0.42337401605641267f,
+  0.3632560558453465f,
+  0.48498603654394945f,
+  0.515860662331473f,
+  0.41320388516425266f,
+  0.9376428895448298f,
+  0.9307849853356603f,
+  0.07548279994910978f,
+  0.7034421665811081f,
+  0.013999751319752951f,
+  0.20553606388926804f,
+  0.9953400980883145f,
+  0.3596605455054189f,
+  0.5299985801041905f,
+  0.5980702503649645f,
+  0.44584529489222346f,
+  0.6110950147623863f,
+  0.02720519332721516f,
+  0.5398541103432654f,
+  0.07554226650800888f,
+  0.7377916485007319f,
+  0.27797209008589085f,
+  0.46772518631551985f,
+  0.6995227578726962f,
+  0.018299314504517494f,
+  0.5197533101890219f,
+  0.7159174564924151f,
+  0.31401481228756667f,
+  0.1754087501884085f,
+  0.2343414371252982f,
+  0.8748889416458473f,
+  0.37463912913252684f,
+  0.7574407218983685f,
+  0.4095218685944908f,
+  0.05444539793276071f,
+  0.2758436508902664f,
+  0.8925772862586221f,
+  0.22065577778239298f,
+  0.4886560839562061f,
+  0.9690045575479314f,
+  0.8537452387766703f,
+  0.0696792400658569f,
+  0.9200736328158772f,
+  0.6566998223667069f,
+  0.8715400640964278f,
+  0.9190276339920213f,
+  0.2007452583145617f,
+  0.5006604301495419f,
+  0.6327017259805733f,
+  0.857981533543089f,
+  0.5475236631810793f,
+  0.2808852311685398f,
+  0.9016360531299835f,
+  0.8389324819392409f,
+  0.8891739411761175f,
+  0.9434320970155204f,
+  0.7024826160013178f,
+  0.5210728314556657f,
+  0.7427761116550455f,
+  0.9743813902633102f,
+  0.49922751758804185f,
+  0.15900465228609295f,
+  0.056927866293708274f,
+  0.5374683162905625f,
+  0.811366988008925f,
+  0.4737767033472601f,
+  0.45924100026451486f,
+  0.31289277088342415f,
+  0.7026159916346512f,
+  0.4438341070930568f,
+  0.34563551431634276f,
+  0.9747930549159781f,
+  0.5801628965131567f,
+  0.9533980463252741f,
+  0.24893174717601252f,
+  0.2448986513794148f,
+  0.7419699161467839f,
+  0.23576281752326345f,
+  0.9242374345660919f,
+  0.4598503387538809f,
+  0.10962620252985711f,
+  0.049016989099534225f,
+  0.5886347360153683f,
+  0.5896957681859412f,
+  0.5842408608241418f,
+  0.5216841155798321f,
+  0.7526600754348718f,
+  0.6450527673201871f,
+  0.4628863883569321f,
+  0.6057869947432948f,
+  0.08108383618535264f,
+  0.41044780813790116f,
+  0.35308995880396477f,
+  0.0748353993141323f,
+  0.7204865144956878f,
+  0.4413265461569904f,
+  0.02286682967133724f,
+  0.004231535125555408f,
+  0.5311300599041392f,
+  0.2622309592838903f,
+  0.6238069610974072f,
+  0.6716002009400331f,
+  0.6606287579797276f,
+  0.7036581684316972f,
+  0.7247049992611678f,
+  0.8145407433117775f,
+  0.8969135886157091f,
+  0.3150808305983249f,
+  0.5932347165328861f,
+  0.18329926845587996f,
+  0.23799853066687315f,
+  0.7916453739552266f,
+  0.16317700382333922f,
+  0.3258669468350087f,
+  0.11603765281949063f,
+  0.3520402097383645f,
+  0.1246869681502828f,
+  0.5429926306737362f,
+  0.7131828947710726f,
+  0.005037728464599378f,
+  0.5751169077704663f,
+  0.9506250180875058f,
+  0.8067379081113383f,
+  0.642204624596683f,
+  0.6678748943357707f,
+  0.587273011513372f,
+  0.5811104131949243f,
+  0.894287809592808f,
+  0.6968416827790679f,
+  0.5037866695731186f,
+  0.8440565666448908f,
+  0.6887701845863844f,
+  0.05382575568815118f,
+  0.773064218810266f,
+  0.0847268319196075f,
+  0.4460976271155538f,
+  0.49657056809264966f,
+  0.35717772971205564f,
+  0.8110108736895665f,
+  0.8520804289905334f,
+  0.16480597646493933f,
+  0.7694189401912689f,
+  0.6036686195088797f,
+  0.14396385934147382f,
+  0.7818475345445793f,
+  0.46877396423993034f,
+  0.32477019528439555f,
+  0.8476730820339115f,
+  0.47924322727230084f,
+  0.9243121667109215f,
+  0.9179278277053134f,
+  0.9037267988146616f,
+  0.681963981964578f,
+  0.28700090261401956f,
+  0.2378229620136808f,
+  0.11932701828815362f,
+  0.4916476784995466f,
+  0.6064420813583503f,
+  0.34653213546577744f,
+  0.8841153835228883f,
+  0.005380110934837701f,
+  0.5300287045156323f,
+  0.7141513111823722f,
+  0.08710723862634762f,
+  0.007533428463922465f,
+  0.4220243811288321f,
+  0.7612123211607961f,
+  0.17229439887322673f,
+  0.47214472116396167f,
+  0.8400677642801001f,
+  0.18040158655594019f,
+  0.27041698182568075f,
+  0.31334242153361336f,
+  0.30659067767705417f,
+  0.4750731574716808f,
+  0.3444131407672746f,
+  0.8213216526064782f,
+  0.3126692013651349f,
+  0.15205733226941598f,
+  0.2860368906407802f,
+  0.2213649460559033f,
+  0.4917843362221145f,
+  0.006269299195295508f,
+  0.9011489888529892f,
+  0.7934080780628001f,
+  0.9010175764584769f,
+  0.9346112847206529f,
+  0.7211791925140819f,
+  0.98965974261415f,
+  0.3471560530710205f,
+  0.7166737866794407f,
+  0.5782587701443399f,
+  0.9877569165032273f,
+  0.6952311870087973f,
+  0.19973417756504908f,
+  0.8815298996070806f,
+  0.11697949495089088f,
+  0.09696564445257949f,
+  0.3255505102604569f,
+  0.5321211100868853f,
+  0.5950002583612376f,
+  0.07665704336219492f,
+  0.4364518839972684f,
+  0.4142976899942117f,
+  0.012690667384570586f,
+  0.41197255828637647f,
+  0.29822755675061974f,
+  0.40028527386485613f,
+  0.004468667483390476f,
+  0.7471694419866213f,
+  0.2773127373924035f,
+  0.8062613097709641f,
+  0.5416946531501049f,
+  0.8762370787863716f,
+  0.10976823981360184f,
+  0.237019947026749f,
+  0.28661541032862226f,
+  0.6334632900824139f,
+  0.6995620381194327f,
+  0.7568129386644367f,
+  0.4443518336754624f,
+  0.32891640445386783f,
+  0.38364174206573354f,
+  0.3238562389714733f,
+  0.5504378544998892f,
+  0.6663556280142761f,
+  0.10131154806389564f,
+  0.4260105781514779f,
+  0.6314014465283108f,
+  0.08106016480310774f,
+  0.9053970848801343f,
+  0.8551367166026472f,
+  0.1758976962249824f,
+  0.43507911288693335f,
+  0.25271502020815995f,
+  0.5576195001163454f,
+  0.3538843456722298f,
+  0.007408391441996454f,
+  0.5113335322440162f,
+  0.4985630827630304f,
+  0.9213453718913216f,
+  0.7165806712812219f,
+  0.12213589587615015f,
+  0.47716320602897744f,
+  0.2480646512080662f,
+  0.5131881642009434f,
+  0.8521737672506053f,
+  0.830742147409157f,
+  0.905940061252654f,
+  0.8798169522859522f,
+  0.5773222701067587f,
+  0.9649675109545004f,
+  0.2553523654497706f,
+  0.3759107558394229f,
+  0.03173270915740123f,
+  0.6477315276255807f,
+  0.4670723063425146f,
+  0.16505239786634962f,
+  0.9615778803671753f,
+  0.004209857724795429f,
+  0.4172236677660287f,
+  0.46216811862761775f,
+  0.12059522373101395f,
+  0.150587823880327f,
+  0.8927851836653784f,
+  0.8381556148202614f,
+  0.5449320597228242f,
+  0.4039634360472254f,
+  0.5451450181528735f,
+  0.31942982107700746f,
+  0.5447810512769755f,
+  0.005914655505116495f,
+  0.029197477421676443f,
+  0.21989628908424363f,
+  0.8503152910685781f,
+  0.2972465429512918f,
+  0.7654922983412695f,
+  0.6428399933730023f,
+  0.34942188758513915f,
+  0.2814063886631625f,
+  0.7629245529190241f,
+  0.5902428565937217f,
+  0.8547278063302949f,
+  0.514068905115535f,
+  0.939475650357859f,
+  0.6170146745277493f,
+  0.33743013428196f,
+  0.2563980528099574f,
+  0.37850013950725614f,
+  0.967656734157701f,
+  0.06541382770582327f,
+  0.8294761011508627f,
+  0.9580586187384915f,
+  0.13283697403899697f,
+  0.08317400182136891f,
+  0.10740988793389694f,
+  0.7907982984683039f,
+  0.7633935765511246f,
+  0.47103151745889704f,
+  0.08660073210173425f,
+  0.9118815410569904f,
+  0.8792568783747827f,
+  0.8211458725814851f,
+  0.4686958264892632f,
+  0.6524571162684528f,
+  0.31079615761213464f,
+  0.36782574970773996f,
+  0.19470502735943118f,
+  0.1361837534332525f,
+  0.3100852472567188f,
+  0.20963598469450906f,
+  0.8677907896100518f,
+  0.3362974381395415f,
+  0.2695924409888637f,
+  0.06080020802344055f,
+  0.0022314020619493835f,
+  0.13072478052139425f,
+  0.48579145266601f,
+  0.9694038277043615f,
+  0.0360548958439435f,
+  0.7927465270469074f,
+  0.9051936903219151f,
+  0.43988948497828106f,
+  0.044846368430479955f,
+  0.35470503710651646f,
+  0.7903025501952483f,
+  0.397351442866298f,
+  0.09422305185391677f,
+  0.28226020142921804f,
+  0.24299021046235592f,
+  0.43112935638913363f,
+  0.16848883348969745f,
+  0.8966907407638031f,
+  0.5227965079510017f,
+  0.7551931649502787f,
+  0.6129511091880081f,
+  0.9827440384434111f,
+  0.09764791416165375f,
+  0.3228304363491129f,
+  0.027417483946406085f,
+  0.019532357035312198f,
+  0.36450192616356725f,
+  0.5331281441295339f,
+  0.5483606192630778f,
+  0.4719755407501488f,
+  0.977406882112064f,
+  0.9667493326767498f,
+  0.4572561313262281f,
+  0.5802896212284382f,
+  0.7204922427559014f,
+  0.5885128074204738f,
+  0.052590298382207856f,
+  0.0850257078057971f,
+  0.8633748587750003f,
+  0.8542613167829832f,
+  0.7230429238161026f,
+  0.32515078936135267f,
+  0.9364866196095215f,
+  0.15953268411659216f,
+  0.15933835353815518f,
+  0.14668119444060002f,
+  0.8638290112234275f,
+  0.06752886600381314f,
+  0.6422725227505369f,
+  0.05935606291787421f,
+  0.3906428821750192f,
+  0.7538743309611952f,
+  0.34441069496127985f,
+  0.07886573610763825f,
+  0.7435076877625914f,
+  0.10567986756065306f,
+  0.5829507400483874f,
+  0.6921188004015523f,
+  0.46035589925787457f,
+  0.9123965430830294f,
+  0.9612694381632751f,
+  0.38306321567513635f,
+  0.32791194085676245f,
+  0.5859724376399529f,
+  0.3366328531446776f,
+  0.15654849988693675f,
+  0.36405512027748266f,
+  0.8478018248582174f,
+  0.5515793168788439f,
+  0.4977379517051803f,
+  0.7825992663820439f,
+  0.8199723041016637f,
+  0.8664762993974497f,
+  0.20456988081355598f,
+  0.8780001132967536f,
+  0.9583104061641029f,
+  0.03075093960964914f,
+  0.5307586362072558f,
+  0.767480025408335f,
+  0.26472185207532695f,
+  0.9302863574901106f,
+  0.0768494401965294f,
+  0.92807854995626f,
+  0.21632991037530513f,
+  0.7484940083803276f,
+  0.8668169718566633f,
+  0.46611831243541035f,
+  0.8489117605828772f,
+  0.5785595301841435f,
+  0.0477116521517994f,
+  0.05660238116876193f,
+  0.4321274895205861f,
+  0.4243582131573539f,
+  0.6498519666192254f,
+  0.49002413284687196f,
+  0.17405459502616338f,
+  0.5275378066366181f,
+  0.8450659610716539f,
+  0.7641054576151888f,
+  0.3925049239267835f,
+  0.9582832651908089f,
+  0.1404730815395544f,
+  0.6579536738774197f,
+  0.5906557864706367f,
+  0.40724633212919137f,
+  0.9453250684184721f,
+  0.726140007827964f,
+  0.8744637130263464f,
+  0.11614651156590494f,
+  0.9483786461009683f,
+  0.6502028629271439f,
+  0.14938541567905506f,
+  0.8845484058394134f,
+  0.7433287493335673f,
+  0.8850721284612192f,
+  0.5338852117683744f,
+  0.09030646762214534f,
+  0.13977966463344238f,
+  0.5379098054253879f,
+  0.4272507627796551f,
+  0.6611867582223439f,
+  0.5972658583765961f,
+  0.41688156734689885f,
+  0.6691959115905817f,
+  0.9351538361291434f,
+  0.21982185189899484f,
+  0.1873448587762514f,
+  0.22876660322100484f,
+  0.346834299797234f,
+  0.74859469389624f,
+  0.5729566556117136f,
+  0.8600417282991906f,
+  0.8776533295064971f,
+  0.9900067230063117f,
+  0.5392113255642317f,
+  0.16212917136246718f,
+  0.20713783644060546f,
+  0.11696510918368908f,
+  0.39689133838399804f,
+  0.4809616613933998f,
+  0.5028962086270113f,
+  0.28061482778290925f,
+  0.7629433903651869f,
+  0.09038624239948345f,
+  0.7867672141444203f,
+  0.9701423014910532f,
+  0.31628112082991044f,
+  0.09005583853336108f,
+  0.8146432782119785f,
+  0.5581245637806863f,
+  0.28600067990178435f,
+  0.45761044606550283f,
+  0.4074612561537845f,
+  0.4689258919044873f,
+  0.6095236869551317f,
+  0.6926614362904812f,
+  0.17087229189333075f,
+  0.40763895636775205f,
+  0.6981639522820537f,
+  0.4900694549026622f,
+  0.5410746107926108f,
+  0.0870749559902193f,
+  0.7476098022382854f,
+  0.8800212388800824f,
+  0.09432643467049251f,
+  0.8903026344091605f,
+  0.5308353481760503f,
+  0.2723999221244636f,
+  0.057624740704792954f,
+  0.9062271345759423f,
+  0.6109267084141932f,
+  0.8429576107595024f,
+  0.9580594776061538f,
+  0.7757259199424439f,
+  0.9113350734845562f,
+  0.6987780966068164f,
+  0.3483386418663157f,
+  0.7858222461671841f,
+  0.5810503231486027f,
+  0.26054308209329946f,
+  0.5459840476505373f,
+  0.6494085123494755f,
+  0.09219532375045736f,
+  0.2990908905891627f,
+  0.3237006688630618f,
+  0.4080216298026441f,
+  0.5075434461323427f,
+  0.06377340882985205f,
+  0.48841693850832646f,
+  0.8951570356655384f,
+  0.8554578634000446f,
+  0.9401105796209546f,
+  0.28649795534821476f,
+  0.19763483194100429f,
+  0.5497527352184964f,
+  0.07423883634402162f,
+  0.5726271901820882f,
+  0.5525111024549901f,
+  0.7919748779719854f,
+  0.4016623668018766f,
+  0.6798674287783886f,
+  0.1170365215329372f,
+  0.8936071105972272f,
+  0.517794898437164f,
+  0.9283834857107306f,
+  0.0491623877326538f,
+  0.45569924684198904f,
+  0.827801580710092f,
+  0.7103449614582252f,
+  0.3360907304981364f,
+  0.3434110658875834f,
+  0.41323682529942696f,
+  0.08849824808655793f,
+  0.8083763595701662f,
+  0.39298745804024204f,
+  0.052980440742318446f,
+  0.8459094513193763f,
+  0.7770722178998862f,
+  0.7886453193026567f,
+  0.8359686402267184f,
+  0.9243785757284735f,
+  0.7314195180970038f,
+  0.04689344485652891f,
+  0.8032233050272258f,
+  0.18902976543956007f,
+  0.5345894188523042f,
+  0.5457618464657904f,
+  0.0566774559989176f,
+  0.4565687633102006f,
+  0.5549715103758703f,
+  0.5364648833197362f,
+  0.7722977256119146f,
+  0.7247152075407223f,
+  0.17050426008009245f,
+  0.5749797675697298f,
+  0.5550038122931361f,
+  0.5403019372970221f,
+  0.0835571593703478f,
+  0.31104335684882956f,
+  0.5728847288753222f,
+  0.44355670005560743f,
+  0.8838564026074591f,
+  0.5720836739897385f,
+  0.9082135582484385f,
+  0.42604245354838455f,
+  0.2969608467653758f,
+  0.6795572773969863f,
+  0.5627540040989116f,
+  0.3397791307438376f,
+  0.5557831403802018f,
+  0.9352215687179875f,
+  0.5548704662060984f,
+  0.19503491740980927f,
+  0.33265375790545926f,
+  0.21482112873350812f,
+  0.5459314441036862f,
+  0.28428514030800867f,
+  0.6694408463675605f,
+  0.6066989989400801f,
+  0.4335081666030066f,
+  0.0698512488132017f,
+  0.3432100184701794f,
+  0.03283159011524972f,
+  0.34887497288278646f,
+  0.7727024563406344f,
+  0.10493135429536604f,
+  0.7897782376313944f,
+  0.49630130529804317f,
+  0.5999371092756777f,
+  0.22873484017595447f,
+  0.9470648076676018f,
+  0.2716449120458204f,
+  0.5484310240972476f,
+  0.8092160409549181f,
+  0.5404740857039461f,
+  0.09773761275055981f,
+  0.7221593653148952f,
+  0.24428189721651938f,
+  0.4977727627027194f,
+  0.41407409216811963f,
+  0.10069035691611172f,
+  0.3410469848642421f,
+  0.23435014479129213f,
+  0.2582900710750451f,
+  0.6963513752180115f,
+  0.4822770902665965f,
+  0.8562813353649777f,
+  0.876943749603141f,
+  0.037565025709907385f,
+  0.29088008483272565f,
+  0.9083164305267629f,
+  0.8030887226239095f,
+  0.9158608731237804f,
+  0.22993998645739155f,
+  0.6042849133898177f,
+  0.838150626109139f,
+  0.33405371714000753f,
+  0.5758030904844702f,
+  0.47742764644954083f,
+  0.37559297505251443f,
+  0.5930984294478054f,
+  0.2017055486150613f,
+  0.38814610483044376f,
+  0.5038839480330227f,
+  0.4551138194342286f,
+  0.60945368029026f,
+  0.8266775047665523f,
+  0.3262613239140131f,
+  0.32008100961156205f,
+  0.6466467404953736f,
+  0.4481894440740569f,
+  0.9347917419380432f,
+  0.3537095880630403f,
+  0.3469455187930015f,
+  0.7777967587549615f,
+  0.4762267387140793f,
+  0.5039807694527393f,
+  0.33089466084122765f,
+  0.02300122628077028f,
+  0.7471573091854371f,
+  0.34385894967665165f,
+  0.20478434271532786f,
+  0.9310515251261269f,
+  0.7559653351485073f,
+  0.6776733708589354f,
+  0.3950627534607333f,
+  0.6287250748226311f,
+  0.6890693694725202f,
+  0.8486796055420024f,
+  0.8557951070757511f,
+  0.38203644811395976f,
+  0.7189711094067612f,
+  0.6852818893060887f,
+  0.08666721619951345f,
+  0.21335846271710057f,
+  0.09159358281550112f,
+  0.023437837532345518f,
+  0.8990410489091613f,
+  0.31347573449050203f,
+  0.9304241188458786f,
+  0.7427256172141646f,
+  0.36754944074919227f,
+  0.18605004463131547f,
+  0.19494398034999616f,
+  0.2535918564210249f,
+  0.4047468782306264f,
+  0.4620168361099203f,
+  0.23086607701070172f,
+  0.3732648280113171f,
+  0.39629713611873507f,
+  0.3213965831498501f,
+  0.34965796032166974f,
+  0.5278428706938764f,
+  0.3342186363486709f,
+  0.4600305244394708f,
+  0.87487098572342f,
+  0.21805152007478223f,
+  0.8856663914319172f,
+  0.538739087463722f,
+  0.09276265080392032f,
+  0.6861783246559028f,
+  0.8347688548882991f,
+  0.052402848934370194f,
+  0.5447149970566559f,
+  0.7216731523238792f,
+  0.3350053839934308f,
+  0.5564614781263615f,
+  0.09895274639699725f,
+  0.5429226298138647f,
+  0.40963645618841205f,
+  0.18833820734244444f,
+  0.2390519629808241f,
+  0.6926991522147963f,
+  0.13767364363664059f,
+  0.4212854355698137f,
+  0.006757368446564382f,
+  0.8847786462175414f,
+  0.9629059753180412f,
+  0.9881506751452229f,
+  0.03658241461803846f,
+  0.7392307977715463f,
+  0.5634644934342894f,
+  0.9125683223055779f,
+  0.11971629445467569f,
+  0.34388072136862347f,
+  0.7194358099552696f,
+  0.5850654448257218f,
+  0.7347255283348286f,
+  0.5794449424978609f,
+  0.6160281540638518f,
+  0.8215999822705652f,
+  0.982549066685657f,
+  0.14583658291551338f,
+  0.019775044422458365f,
+  0.842011575285425f,
+  0.3632935031163117f,
+  0.22714291364046868f,
+  0.7652933567470941f,
+  0.1058998236152594f,
+  0.8323261199666414f,
+  0.7327762701386256f,
+  0.990085945097603f,
+  0.9434214647990755f,
+  0.5731605018978094f,
+  0.052296244741422915f,
+  0.5548885283342243f,
+  0.9185126109989331f,
+  0.9246437969158418f,
+  0.2614008976521043f,
+  0.08706717070307657f,
+  0.8620280229915241f,
+  0.8999363101326155f,
+  0.7165946124854435f,
+  0.08456253921940393f,
+  0.5123069962933747f,
+  0.7347935555305602f,
+  0.9760244023757451f,
+  0.5178764364609953f,
+  0.7006585043432928f,
+  0.902638056364798f,
+  0.9839907382214704f,
+  0.36761060761100584f,
+  0.01927020696981452f,
+  0.03393510518112841f,
+  0.45662657799100104f,
+  0.5350498213836747f,
+  0.9090357674511661f,
+  0.1773608497611583f,
+  0.4062507236059195f,
+  0.5632912841472252f,
+  0.10480745102351086f,
+  0.8402683058957803f,
+  0.7418950507272193f,
+  0.6064243255015211f,
+  0.37557090217998146f,
+  0.24595093137013035f,
+  0.8834976666080439f,
+  0.08425131605364489f,
+  0.497037788780631f,
+  0.24520379182090912f,
+  0.3272742622734103f,
+  0.46006110471540873f,
+  0.39416394939641153f,
+  0.3196776641087413f,
+  0.09975821941778973f,
+  0.5789469374377313f,
+  0.39108906997740767f,
+  0.11453597522913672f,
+  0.03801318035785928f,
+  0.0041676454256162065f,
+  0.5059973706766466f,
+  0.9379039051295712f,
+  0.8335144780298722f,
+  0.789065271895013f,
+  0.7283987068266926f,
+  0.6646157693552768f,
+  0.7772100140488211f,
+  0.12201749871726797f,
+  0.2163349395629246f,
+  0.4817599070562595f,
+  0.14324392374502237f,
+  0.2819470302066104f,
+  0.3510064305799273f,
+  0.9135197722938261f,
+  0.1488601978519304f,
+  0.34187227355599215f,
+  0.5863181027367688f,
+  0.5628129007635444f,
+  0.42797150245283f,
+  0.05800679832691469f,
+  0.03085367011276363f,
+  0.00722493274844116f,
+  0.9559042527275143f,
+  0.38190617770379254f,
+  0.6997636611964557f,
+  0.2867420361433859f,
+  0.3628144161699215f,
+  0.033158058905564336f,
+  0.37408070683251693f,
+  0.420779002565399f,
+  0.5732729666160159f,
+  0.5701251696241543f,
+  0.004957919248099851f,
+  0.39200630358015487f,
+  0.7095282154902541f,
+  0.39623042005509f,
+  0.6003221777395149f,
+  0.0344717437256552f,
+  0.19593437040782202f,
+  0.13929078524812377f,
+  0.5314571118623556f,
+  0.2635201193666006f,
+  0.002056463511965978f,
+  0.8413959697701179f
+};
new file mode 100644
--- /dev/null
+++ b/tests/randoml.c
@@ -0,0 +1,1028 @@
+/* Some random 'long double' numbers used by gnulib tests.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "macros.h"
+
+/* Some numbers in the interval [0,1).  */
+
+const long double randoml[1000] =
+{
+  /* Some not so random numbers at the beginning.  */
+  0.0L,
+  /* Then some numbers generated by GNU clisp.  */
+  0.709874756135422554674614242046304686448L,
+  0.486497838502717923110029188864352615388L,
+  0.474019570990182753146861083750226106848L,
+  0.998821069612940336401792152067298257397L,
+  0.68230324395444341476284133813649237509L,
+  0.0812383212795450007980350531141537177532L,
+  0.43131112016001535977175708439191217567L,
+  0.1596337172541222285215378906083607753005L,
+  0.0447361192177328171952931546845870270203L,
+  0.669148550486018286115665314826153614017L,
+  0.398752708644620313955955676251505325896L,
+  0.600019492390024166744893736290881101244L,
+  0.78337397012688890834008412364808365851L,
+  0.747414410152603863408503379239564644402L,
+  0.550615721371501982864462175362996180322L,
+  0.0073983673767251687422683917248311760491L,
+  0.693846360902780799478892082407382699085L,
+  0.751592057901191172906159475240427353057L,
+  0.74000578784995401707243054106755282117L,
+  0.847264623235961908747497547605068838836L,
+  0.917431426585209425652777605148791919017L,
+  0.267532476015101748449269162884835638528L,
+  0.486834088208986505203048715784492259319L,
+  0.4580154564181484580770749178538567666L,
+  0.391521076582874764982597286237947922907L,
+  0.69173131929214083677828129436922728366L,
+  0.995268639187054867212755710743514657877L,
+  0.553189251912843822062196619876802699895L,
+  0.632300552505301947698796653386744186037L,
+  0.445572801006840927064646197943103543344L,
+  0.993634311396905276414701816228609517838L,
+  0.611582274481091436495638926486363711255L,
+  0.017611091105275929341544154464243038417L,
+  0.598936378040443270534796418637146416803L,
+  0.939730325871014729497001074244817030738L,
+  0.385712528561693907444911228190200940125L,
+  0.48796444333495738271693214259711532603L,
+  0.508634972895891442259656591497940133962L,
+  0.88453398179301716552318999435310293852L,
+  0.509099535482633468613040057130206639612L,
+  0.333677997666677081186230843198919594355L,
+  0.82715349353996770180499230535973424237L,
+  0.0372593663309767971914036990047894757662L,
+  0.932828780275931267421133064996449298348L,
+  0.486099261359133830842098860485004683725L,
+  0.987156392631551825781809767746170502002L,
+  0.824739790678073493124786291053674093535L,
+  0.671869573118280976952523743592826377585L,
+  0.48088844444394888967684860088619551899L,
+  0.017233021606613044454327510797750273989L,
+  0.988102711714879869326666071903065279145L,
+  0.091615081537455465573860363408517029583L,
+  0.0113278995312253231106729997476313183323L,
+  0.294349528513080028346115860151112891433L,
+  0.0097058790914280197566968241982258935964L,
+  0.715113281550035710673074854712220192465L,
+  0.739627170474553083453358265804562580162L,
+  0.588476045636558489860462119645353521893L,
+  0.91330346819098343970944232526748274664L,
+  0.281457572112513183673653575304242456425L,
+  0.784192391468991402261628322552430383283L,
+  0.504857923842698553133786835061714061812L,
+  0.230410937725986177704701374433825197397L,
+  0.535805811877939822805608704986961969659L,
+  0.0508287955596506952822240797812703550548L,
+  0.179399756999629053194209501169297540332L,
+  0.675837373242984020977236431747771655704L,
+  0.981496523455084073391380532008173135055L,
+  0.325845075647804753424852268729037997407L,
+  0.832630951427200447589084239299500129776L,
+  0.825354056334755646582091209610369762364L,
+  0.574731012869980895104127749738122205757L,
+  0.799028354294603017571131513193291020045L,
+  0.537721586879667191016369071169775496218L,
+  0.83846801885738807298552515294277869191L,
+  0.0922901597877978587435698953162723703674L,
+  0.434458505758559675954739433438496373717L,
+  0.308017320632506922735963882703835222897L,
+  0.0192693232310748837390370764187488626234L,
+  0.65275462537999797862908920689650691667L,
+  0.357130585286320841741290333260811815153L,
+  0.359562085720204868627653630044659240449L,
+  0.758320826841831017712067337815543048118L,
+  0.62169722559489484088614873429559348682L,
+  0.17335411409874538731529771306978631118L,
+  0.154077331752487118534287271363344964006L,
+  0.148559174998934930922746358844164455867L,
+  0.881316225913391098839630896554038163768L,
+  0.89289796752480477623907740261818685845L,
+  0.57786655574695620371527391411424563834L,
+  0.318175774295281868509200498351278930862L,
+  0.194978302204782205514236430086515458283L,
+  0.87084962252516402992532937666368998137L,
+  0.362113882465068209502300826516448793743L,
+  0.273446496762640462316848141032810658473L,
+  0.1471399192242189033406154289397228481905L,
+  0.937157507052090331728212622934524925056L,
+  0.600045430164287985733450402316667890373L,
+  0.794478865621258499047814379367829521507L,
+  0.889115878933706260333129391997704491913L,
+  0.631825206206982866021784416451887594472L,
+  0.966422225095067311240936396545408962515L,
+  0.676845470105427028205320649846678927664L,
+  0.671163783319728784750606328490914935783L,
+  0.213726274743505026386536996423761328083L,
+  0.99483340496284948345969144891145513965L,
+  0.362072360280863974302182899205431874295L,
+  0.89135316959373017710710890812308229361L,
+  0.861008403776277958081202417380537907424L,
+  0.518258469677886348298849030872657409393L,
+  0.74995117457421590827489329835282465567L,
+  0.141688060236646135992059548400562463963L,
+  0.231055693687838328234866575264314255906L,
+  0.128367320195147852998795956530756587271L,
+  0.735643745226188370911313880883935933086L,
+  0.481951681233521227023903083881246017963L,
+  0.29797778097740396719094352844253033076L,
+  0.259026843185033526978277511857498182853L,
+  0.76454793636766387350530239448634042225L,
+  0.921742101320371872828332060575170679558L,
+  0.135594574885855893452962438848740230435L,
+  0.249482789438500604376469100084029356821L,
+  0.447893460512394580798054060401740249162L,
+  0.841167533365717681130523968098862274883L,
+  0.063885342343669943206116658917625959392L,
+  0.49268569222220133343083683720155184169L,
+  0.0320364278163828327673837310979596079469L,
+  0.83067006037141488187036282222404336846L,
+  0.32687090604018629599351990634445890267L,
+  0.524229581985562678867475657633756672726L,
+  0.26442137331545990230136529620604338964L,
+  0.1804465247704923307363156457827584866855L,
+  0.219897692414720290686302976466475627349L,
+  0.657372240957848561373923532613997515665L,
+  0.94917951707325275578037456019158874452L,
+  0.999935336870950506894538846120127792282L,
+  0.334292387732229479489367107895450895382L,
+  0.519605753222230586160238890634421180626L,
+  0.2353320030331258205431171147281090084686L,
+  0.697837952881171466097464830413620278996L,
+  0.337355949172173312279209733133367570558L,
+  0.59624609578396787690174902306338541087L,
+  0.430566868363073838098964774826687118822L,
+  0.303143768470597821848720008902412356097L,
+  0.45566572082779255052299434804712613961L,
+  0.63651052470632278377988990008643926753L,
+  0.88355849548999550762491205909993278845L,
+  0.857627182143034336666679544569747793963L,
+  0.579654405386150422035981447661995358225L,
+  0.527551502180559045145630115424486189773L,
+  0.227798290812497436015108334865799792168L,
+  0.860285575656798735433746383563482660567L,
+  0.657434642899561800145850990323893418457L,
+  0.991915916857419346367596676050775541352L,
+  0.0299053482258395117883768309912517801074L,
+  0.494186962160200346319995839440170254278L,
+  0.795837941248740362154274095100822390282L,
+  0.213898349709271555518444444268604992712L,
+  0.635385838537788174234352352696939407706L,
+  0.1161960540496013767418067989853615145483L,
+  0.236636716576793997613161803474856412323L,
+  0.250257128320679509772248555959408855321L,
+  0.754809883956726591031066199439807350575L,
+  0.240047496212680591313028855365466345707L,
+  0.125918185384015376472834932789271923263L,
+  0.830761928512260978768305988740912711273L,
+  0.0833746595456954680423678981938324373477L,
+  0.993235018876045312632920249583820095078L,
+  0.74457886551486005017424251252790500917L,
+  0.904041666312003998553971236017433817041L,
+  0.99682247674917724207607173416904094376L,
+  0.778185258630194559195184600522592063632L,
+  0.617908428541966249479693433082678846704L,
+  0.034201434638706652764862810175677292771L,
+  0.1166825963578175046863759835887066398776L,
+  0.618184997077951045734597662867931774914L,
+  0.67223166229200793562043589747700629457L,
+  0.50367723015643325152991864733820551338L,
+  0.287805524504497224349445840278160308547L,
+  0.418530565562949537953621246456529701546L,
+  0.356577284504836083965140033686046682705L,
+  0.727797226876543100474285620953868682292L,
+  0.261158535215243995918166290296126543963L,
+  0.1233681715943113445590872776925938156L,
+  0.397342365090131218507373938120760734013L,
+  0.33651833905580176460704582099080050591L,
+  0.124851176251609572087737060478799388707L,
+  0.49869389018540295598691678028277690211L,
+  0.603921102513219725593707198424421456834L,
+  0.0288068305492076274901316515486696644854L,
+  0.27635950491121559708402485015430409745L,
+  0.0219820746750707161670181537628175322048L,
+  0.893266704905772978187424688068554761406L,
+  0.055131714446612192984065196401480701447L,
+  0.478917803887421452005543212818108274705L,
+  0.1089109338581245135310441557812062287244L,
+  0.451355129465699006367714322379179082201L,
+  0.933539696310061306235683130737189659555L,
+  0.295046527696521751967458467625754033345L,
+  0.657654030109877699469191835246373699585L,
+  0.699519422709288537538980841108763784234L,
+  0.754780411476609088293217972311402262028L,
+  0.940185229424181440596885768821586612845L,
+  0.641206442188302531301220212171259413504L,
+  0.483623421775598486212538785028426545698L,
+  0.1819507033406890598006456890391145571876L,
+  0.3493992184159313422014002142021878866L,
+  0.2282143482135155999703670773974654680736L,
+  0.65404355620292102948676570623901452325L,
+  0.000126697620991797753719907018394969483701L,
+  0.000128697615694221449450257101713351917085L,
+  0.66277677565136622936757573048183355679L,
+  0.954427508631091518542647272554320259L,
+  0.821452416615550557725422642536361482673L,
+  0.783949133156224682132225528942727293192L,
+  0.883688268329322182794294084718215227776L,
+  0.887198477924019626901140168907684736036L,
+  0.301153686936585019868640358522761168745L,
+  0.97031160152938862140377079439908121466L,
+  0.613591225576913510391808189718881180802L,
+  0.973773801885628446394837963774216539007L,
+  0.969946092528631153860793542995840284225L,
+  0.0552318705490405481104532089875456066346L,
+  0.398506652226642658353465649824893657953L,
+  0.577466681084525459648007205600389579233L,
+  0.538305717497527581210294472297571817608L,
+  0.0378969572225333661087665511893845011475L,
+  0.82821208446292402852221418490682507414L,
+  0.207039760611344134455359310666092356869L,
+  0.278071434395492049592363658721835175976L,
+  0.418157919791356829061560807874478279737L,
+  0.917935426878916775097393966246600470752L,
+  0.968879316988430839484738642933327229065L,
+  0.836847484003257581736597938908686488306L,
+  0.95787762740618523171012745852536482523L,
+  0.381833463284092269744674988738521423563L,
+  0.585758801118634412354899474049588357203L,
+  0.590675098878457580254555486356030743515L,
+  0.999102261786447498899644398829003134788L,
+  0.278723779765613710807952395929736248799L,
+  0.150160483677965826860533794972733497469L,
+  0.39044191915595120943090707935299688844L,
+  0.882025297705744570797306391637391855587L,
+  0.26053886056730883704893455389142056588L,
+  0.530123960707389279621444598593626923328L,
+  0.307497951588709795568291546230129131789L,
+  0.755712717002473210112772528495042985208L,
+  0.403971099596680128749039001982260210321L,
+  0.0955902605698226580325595772471302440213L,
+  0.733946822526846681865131682504158670327L,
+  0.824558199580936798107294631591949429405L,
+  0.355777480091076251706346214380424670616L,
+  0.183210308747040172107746729630689571628L,
+  0.943081072447366944673610412439697363267L,
+  0.823437046917209496498923793615721213912L,
+  0.272212671889142468847791216625072718846L,
+  0.467586497114075237282436742306271250655L,
+  0.965430243779957305809196327799423550657L,
+  0.264527585376739963287684763043832918263L,
+  0.78305929918791974277407705060017330726L,
+  0.1569161089271269079867408493909342109635L,
+  0.385890512318945048667111881493883277209L,
+  0.748768801714747310036929893375463390286L,
+  0.9607241213632062657075501565333113635L,
+  0.681005349771442926258254424282975745535L,
+  0.417404611754855157969846623218352380733L,
+  0.384922954690351156114438668003273806442L,
+  0.0248688875333777009659560293287195312336L,
+  0.289622732329138351547499030028075517487L,
+  0.356660798938142089830284922931103513564L,
+  0.1092119220339924538904809107210351902013L,
+  0.263044604533896828574983495057823392153L,
+  0.72916056882229781356884933113775509031L,
+  0.277279616044198734111166028359400949283L,
+  0.448496025651349045553194567962243478962L,
+  0.397797975606664545700620422788810306397L,
+  0.915573317477921170464219734057440942223L,
+  0.565957191780698852582910000301549192135L,
+  0.0199640867363067059474765492007910956547L,
+  0.380718754942963039702539139065633248878L,
+  0.271561535356661429325107452975658450244L,
+  0.65703383768996023094650337496290243735L,
+  0.810303462640169412310932301780031244584L,
+  0.34389677270659068303923976829417662132L,
+  0.1459701849396526086771469906702178205394L,
+  0.0709566883230581731990192048699199874356L,
+  0.0273188133279639766234319338307950998466L,
+  0.189257375093862859152281617127963424911L,
+  0.483370049027267515091110020077746913052L,
+  0.6121051307445822901845022667347352688L,
+  0.0669683489197768142011855877890933175548L,
+  0.0462440353376468071116256899031962430102L,
+  0.66179099750239749196171922709429044667L,
+  0.331447780875915347204488922360787127231L,
+  0.88878630766137716878808504113561041651L,
+  0.57831688009568937419273238575083437733L,
+  0.1665758643537997337473156606765968668944L,
+  0.609499751553850514507525575752744468325L,
+  0.842660412678850878529299409778020570114L,
+  0.868735885617006579468607975714721515953L,
+  0.518323673739076029376626898444587264186L,
+  0.465048961779768578307935679739067346325L,
+  0.739933063031511059934522150792493137138L,
+  0.366097491036976922528977805725731033037L,
+  0.622890978255856721366594654155975719428L,
+  0.945120241233001881267096151974150875442L,
+  0.711795000549305806399598132955701848342L,
+  0.120093380051693652573317820347038096902L,
+  0.461420048084338423641881546847056927696L,
+  0.201645977777376722385295339631509175754L,
+  0.1479402104137110360277226090924965371445L,
+  0.287960179369955828242600303166176042591L,
+  0.788362667534075941033937374958276358103L,
+  0.610312055398887641020833805884097007991L,
+  0.758450801974187424825814780682156814865L,
+  0.64208882693968320907867911523798381855L,
+  0.255468285690834138126389042932304445888L,
+  0.0370478385689831649949675007793815537737L,
+  0.551880617631056560992613768623601574096L,
+  0.559262357532227558112085482526038868046L,
+  0.129705275018847798920129782613409588523L,
+  0.1076289463968801831500602693982998566697L,
+  0.272506325706516323678193293634687081578L,
+  0.721990855538151706841764025895777805643L,
+  0.523084042169573467351077180119310086396L,
+  0.0858615712848179826840482241961243288956L,
+  0.589714739430299853251893655400362103563L,
+  0.512412326166823937685402214713910254025L,
+  0.802350747297003067442509635888112412853L,
+  0.715817091619681167941132068164905209087L,
+  0.0824951218034037355816988555328185436778L,
+  0.829228234554153070848595829448989414728L,
+  0.59652037694553054648270061009002150308L,
+  0.133585725647906582691822880117773950377L,
+  0.812005216254498654412124509257882599085L,
+  0.808142463854396488512203093936737654517L,
+  0.570217922503074432494487309472855783614L,
+  0.704017977813333280013384719294741845102L,
+  0.0251797587779118690185681150429720019843L,
+  0.676272439608475367571481578590700290242L,
+  0.880796414989798318500723261307937258554L,
+  0.387922631107753361553377889431536170676L,
+  0.282350224157064849683455744598629321323L,
+  0.721001172978128539392551761867898599807L,
+  0.98720056526474911920598612334425157851L,
+  0.9951900286811655251775209231187451065L,
+  0.051844546479017627818996668613208776283L,
+  0.103738972117399718145836730690615155693L,
+  0.228544758674525285763674099492074936604L,
+  0.429309402103194762341587536897342160049L,
+  0.564535575507982971760351294178163523416L,
+  0.999063571593237112671743187500362701266L,
+  0.340374156369508513494787137157934959152L,
+  0.778748988242111504661479799747122556733L,
+  0.471307010869691772647781526213794708743L,
+  0.289707428078962269353959639691462373973L,
+  0.826577651264033230456965284610788939828L,
+  0.860667694131974131835140122175480202008L,
+  0.596405567348984902495263677852931818947L,
+  0.79786093770390728560184577433203234578L,
+  0.85492142888696693237980696048371212203L,
+  0.57242705004809831263405538576519171441L,
+  0.829648119655355629047392239460860046016L,
+  0.783260316181642610272420809845230036294L,
+  0.0941718863377651336163202407301145871807L,
+  0.156372209579300482444127671309443664823L,
+  0.95045258077372510217507306087908380692L,
+  0.1885289021059534081345247308001373861575L,
+  0.660776653890123229320677431688026234587L,
+  0.2333507388961794003755022400755269739225L,
+  0.926661255852332295794894190183342387092L,
+  0.862240624886232672002503279536846219655L,
+  0.093072473040365648693897225471155002338L,
+  0.210437952956145192084247103889970459783L,
+  0.98112543168220233380555460117617724093L,
+  0.740174391774267645790688716222038485627L,
+  0.0209886798500615011013258311339617682421L,
+  0.41833754096087514377582590206105535614L,
+  0.469019942905167330505858885046130048223L,
+  0.715228143253914303084091910768414947468L,
+  0.949215045400946624794326433082702896278L,
+  0.0839262379919984011512905346130401074556L,
+  0.358856470231875479544116669678510859691L,
+  0.676461324144301815445903930221360844898L,
+  0.321802718137104975636543941512529575137L,
+  0.993411285955596090334951526803325817472L,
+  0.860164319140927797258503749506400508873L,
+  0.94773452678939638468420772776729628408L,
+  0.786167026315331965750413583155691260173L,
+  0.45156944204188755542678210840170293585L,
+  0.490807428869058127589400400723875752095L,
+  0.1064150484458768919266881304357565451445L,
+  0.324460881496927069927267886879512784128L,
+  0.892536276084459403262968666925514247957L,
+  0.626906362142556286375622503025155623158L,
+  0.912617117728752553677432546319200457076L,
+  0.670287539555608481364011494943625670644L,
+  0.247614513279178220157281399165275150246L,
+  0.328334024179281412037962820247065990969L,
+  0.829445540957824174480776183273738605512L,
+  0.1787214688659462728637669907628671276175L,
+  0.925570168885833135397413435137754040344L,
+  0.98275386432184844551191217367555375122L,
+  0.364711512670624901280733420446798813805L,
+  0.0676060703890593392691073615176801081634L,
+  0.01088522590112897075539168583333589679446L,
+  0.0611693052224598303672047526429160913973L,
+  0.214589347780615411637055343786045569195L,
+  0.698097005257153990899739747284349971478L,
+  0.0354356066334430559162358810601367856981L,
+  0.0279531560831790454930326667914520406377L,
+  0.939682879995515407044885888120427639943L,
+  0.312419879113847025637130107480365284706L,
+  0.429063186024752762548549652686423948472L,
+  0.198325752893057589388425455067795077316L,
+  0.653970278037364931023007417819508007502L,
+  0.396811027519564931158159336303275106925L,
+  0.50451059823222344440248588902992099958L,
+  0.0862505815838354201964323759027263746603L,
+  0.957096030216378795442646824371057760147L,
+  0.587610162738417619467784731999441435863L,
+  0.582187586992416238476426545279573456436L,
+  0.535716130421670802716666237861890374707L,
+  0.090478847153957807764386571203708454605L,
+  0.788473620511487574655894325144660477707L,
+  0.610237648835883657058234607228408957708L,
+  0.678372723016422015853594971922211368707L,
+  0.0477042323920128297852928999674240977938L,
+  0.916676966783686851658830754268116450562L,
+  0.385373716764729378193009393283577714611L,
+  0.51049308234047313597601380814795899816L,
+  0.1196704708003806819299545192341910042065L,
+  0.446475706132336496196697021305914636716L,
+  0.22995164195921866005337396330755244987L,
+  0.632225374693904589951305492826903497058L,
+  0.1049567841702419598059377515889392050297L,
+  0.66749284825574584532432314559877621928L,
+  0.730750212627697291852996268443402535667L,
+  0.44210748459007730373853303409845654876L,
+  0.165882407048533464405922485111215401752L,
+  0.326102079042974476137893383568312181916L,
+  0.894926469777796621626659556932174565354L,
+  0.829811268916354531033773068150153342864L,
+  0.0607253283595596933368529290946492114805L,
+  0.0677752868787034912813695724240479638585L,
+  0.82861506635734784945473366382511846348L,
+  0.160085543323090657960949278634908144601L,
+  0.232569451519550129004668131405568301759L,
+  0.848363194546104528297512566450812116666L,
+  0.793640414525406609723674517332020118566L,
+  0.0908665486135344605492576594616215607582L,
+  0.98524892289773367881284955458176900047L,
+  0.232277847265217861619371474795084074907L,
+  0.2478103820537262599906715455471023544214L,
+  0.518524645780409202282547691600231775584L,
+  0.726858378884955244314303315523158335615L,
+  0.245545705017836867827662773158398435754L,
+  0.2242602776132220616213985660229694803996L,
+  0.69321599409749039262414070240230983052L,
+  0.0112978587458533729787299027903363211672L,
+  0.201700091442640051051557572594860881596L,
+  0.1553158804742445432796353137546288871905L,
+  0.297307958467221836656545818754009116053L,
+  0.858321137590160233755873079497950982112L,
+  0.66848174756798322137180974713907803341L,
+  0.996344263106353369755981871581860505522L,
+  0.0298469963581545313060582891253178820216L,
+  0.5825562269883888340326171333296281312L,
+  0.493316240919863194534203651249074989694L,
+  0.25506115557073666386519530923416434445L,
+  0.990037777634583670683401168871182857585L,
+  0.111966792328779238876716387539738843995L,
+  0.555536981182848652400091282463345207445L,
+  0.281763605895317871765768390877174374161L,
+  0.902702281907817546029803311979267829958L,
+  0.526223239446627547666226037912343453756L,
+  0.663322588876953268851644820272004691035L,
+  0.925956679854174995001911256195736125327L,
+  0.978687628923344717267490649565202182013L,
+  0.295452218109470204949110043833472171496L,
+  0.763317372768444290934585368155544717374L,
+  0.41484295515622153189510360412010755096L,
+  0.95319138766107113957717501566306191772L,
+  0.449833295238493367386837134824022661087L,
+  0.380903660964162496124546078818966824203L,
+  0.0591435603332779390763767398658188273838L,
+  0.594973116752510574186847848340951992488L,
+  0.66051154347057943107777082783767373976L,
+  0.9590947364014878778361002605613544034L,
+  0.141719503437180601174660143271258240733L,
+  0.72942088503531365739564056985302156428L,
+  0.96229479992042091317494337141213026865L,
+  0.51401712994901482942061876482808737646L,
+  0.09446204537625467018781365109090483186L,
+  0.568441523568450417056301286402539600564L,
+  0.598604342726174263070596195546293250945L,
+  0.774951017988365558347613104226790833317L,
+  0.81892086730816467017537310019875247387L,
+  0.890143355483709851496792149649550808793L,
+  0.2191477338352410954693547610221317715285L,
+  0.726897475480314385643181203422499653L,
+  0.756138778886812022822443490226271392144L,
+  0.36128016023552084266898937740898271179L,
+  0.410782581318000192446155911986931996913L,
+  0.223641334296034708685419059866928946095L,
+  0.0611617201563377229556630546893173872466L,
+  0.0454251140845604672274274573289906520655L,
+  0.292039969549662442463090760177927466818L,
+  0.0892783972345646734854765244000589132126L,
+  0.98769280749877429524697464655962686569L,
+  0.889843464657722517503667653048728011052L,
+  0.651776307404858375062718114948328477704L,
+  0.87617575855504123004785690824244025026L,
+  0.338359170956885135997817905734588127076L,
+  0.734032684330295341291816774804886223887L,
+  0.862422342223053851459695185679195132964L,
+  0.197333977370262353727756586852240555633L,
+  0.586060335783457129849055206578505427124L,
+  0.132898852938756538479400358451026471607L,
+  0.548298096092246267871555639877296879195L,
+  0.301119859270324657077136364646995297056L,
+  0.02186689635349189676964089313754648484195L,
+  0.037538023766844046167768352700498359816L,
+  0.739462465806194132819844936199304370748L,
+  0.306338591475158278790432712666553704959L,
+  0.0349382326130091592369352494672121905505L,
+  0.12659131714329909411210854142389581492L,
+  0.991566243159047696662802015340988687108L,
+  0.265613985138476447081523915107505113653L,
+  0.379928020809782559672193104868857287448L,
+  0.3311424971073397473661763760151895103L,
+  0.702177302636984264408758773725210449873L,
+  0.975045571615360787500646118846671455125L,
+  0.0373462862349996603561237755410350012631L,
+  0.846126776062337124521510357150131165153L,
+  0.604046707233534456382774833817964498043L,
+  0.1981113045697699450375369418161865703455L,
+  0.0223467484405979164693956414316536174577L,
+  0.67121960182601511325776586363807504696L,
+  0.165784481427263519151726479123968726022L,
+  0.721784618575898210943875783221281669927L,
+  0.247408211201465904622132596487935205602L,
+  0.474174174442367430962454680799704832459L,
+  0.38041380356189313505762491005159753494L,
+  0.412834591083812886132307610186713638625L,
+  0.294378742681402760124595985235966036022L,
+  0.319576442623415298744966071520183847465L,
+  0.17227236515412864866186439447886640924L,
+  0.19227796294349462194111033545303573433L,
+  0.701351402612222654905938605774127547107L,
+  0.55598633289035034815584162421930015865L,
+  0.402729648554369906881359212431684355721L,
+  0.595951760748834493622338584190905994085L,
+  0.119840257870361007206544525046135477756L,
+  0.90443395581066590152525534589406902782L,
+  0.205188871300477881549673944463237196075L,
+  0.339175278174772519132232276502457660768L,
+  0.447725444308107151040888910769680233742L,
+  0.541239546708188153505885726785683096117L,
+  0.12984235126732767588700711245028426254L,
+  0.0534701599183773436559514525508752846737L,
+  0.793436019832695131646422778046763975325L,
+  0.718125883729211211336344362949260539072L,
+  0.328649037343445105052694618356980072933L,
+  0.113307342739499399477248133420602576291L,
+  0.87683936228301044929749768481864525904L,
+  0.212591937265603187751611886807532831791L,
+  0.761002958456888912899646497131654914807L,
+  0.220849601519164170820922984026707209176L,
+  0.222305857213559738578093188054272365062L,
+  0.651516500020930005107266726995614198887L,
+  0.1505613416188572288472651067305496894266L,
+  0.166658450989632252583252879193540688162L,
+  0.249417632511505538283736333645627460544L,
+  0.50096054904291170172998992288713266662L,
+  0.173701146801321486346972068110605414347L,
+  0.93433415280052265881674202089278791561L,
+  0.1167900820460300938880016624066890278452L,
+  0.265137084235229705213901240937609442947L,
+  0.110072770364904306470596762714108445086L,
+  0.0670575770615268870829070207384379655213L,
+  0.92447493539224566948960065689964970346L,
+  0.187517201307673207566548753071237315229L,
+  0.935719666366703749433556454391358561756L,
+  0.964002672100646458888742916175546552353L,
+  0.6304136194377902875122727617639812134L,
+  0.497041144725381002743104205240568050483L,
+  0.589232636183711897405482721407549359295L,
+  0.524588285641300028631908965527617181296L,
+  0.786409662511483672510756944887012261427L,
+  0.9924030873238807048291154748671174581L,
+  0.891407534733792276848059682970952672076L,
+  0.308538095910260975496982224956384014562L,
+  0.949088891149549225900320967233005245566L,
+  0.507378396004105004571665876613293881214L,
+  0.348875146873077771786031143309488031474L,
+  0.129717394366372388305812826098578876617L,
+  0.371316171885006633822161450072014737125L,
+  0.550162123072752251266003313454007126843L,
+  0.822171979807031777641565545578299345138L,
+  0.75171547658293988559512988487590040284L,
+  0.329537443635543385256682239450819107475L,
+  0.159687481361602477899361671181005148163L,
+  0.788720723813465707294018605642035752394L,
+  0.1031423865826241581828274573741444954832L,
+  0.1925157943560383416361499973635531049876L,
+  0.771893047929845637497166550933789470487L,
+  0.681189132819106369246924892765206195007L,
+  0.180608768713011918428603967211913698036L,
+  0.0869303304414286810402604783458783443746L,
+  0.63890744831302111307395023326393791462L,
+  0.531696069328179766265158866360885671855L,
+  0.557357572478102464274432325432400878297L,
+  0.765306589402879669413870462450921612475L,
+  0.0941202729911292570046371838018359372082L,
+  0.902333472113108821746674873990738636997L,
+  0.165516366160118370026922089795742876131L,
+  0.0317472434880413278821576585103363607157L,
+  0.706107972335163251316361316043030620453L,
+  0.832472986392763388669796997227437520663L,
+  0.769939001736494466971306881365718899207L,
+  0.83093185023987157595917781461722256739L,
+  0.1143834825195292986705373579359335590854L,
+  0.283326017120251162360393258571085609729L,
+  0.301605389836836671045912951769199753359L,
+  0.855854391727628505548518803309296566532L,
+  0.089938332734139699450960989316391404434L,
+  0.310225946153425747793112265736973169299L,
+  0.96854812596413627994714291059983626441L,
+  0.279767360423571836833858253122290577619L,
+  0.113545981876279916290815278422648489865L,
+  0.943101270554056170747004305255027939268L,
+  0.812274724978801470221644756549524210083L,
+  0.9678011347395447510273023981530290554L,
+  0.514795136336602722878788704708053145966L,
+  0.50560840616487841567055789750974674943L,
+  0.127654209842819812026603428361923670116L,
+  0.273727399985085036497076514726791191553L,
+  0.964821797874257789566527793136425594082L,
+  0.853392912197074096341317268954834390727L,
+  0.914236806849585335611299422695886165192L,
+  0.277335361137281076359079507288838688219L,
+  0.865708792613433194377422367016717680172L,
+  0.761947879929658945814013586634774725302L,
+  0.276975494384441865188273120642155257808L,
+  0.0678895000408079241574268817560335475378L,
+  0.929521528875748672899760603996998763144L,
+  0.44453824299955605846877126958322272066L,
+  0.444318159420536625223816052640621069982L,
+  0.42913762214779045597457741573009821738L,
+  0.98994873802399078252493194985812582986L,
+  0.93065975343157446755652147574743540714L,
+  0.821639107980128580428385838275355600123L,
+  0.031337950421787684669360817154012683829L,
+  0.839516942888416107002513723437531514126L,
+  0.785501376812531727571251496474527490183L,
+  0.247978681554054401906203846371863203863L,
+  0.985774009303654108868853196421131421187L,
+  0.635347409930173147315815281304257764708L,
+  0.40087985483327734740658289294086718422L,
+  0.374059729085540852289174052767716446502L,
+  0.367226053686019780853702834825808619761L,
+  0.166424328898161772576167906091392715805L,
+  0.838115185925303343477055122060982270143L,
+  0.829549684532006011608856001441012324216L,
+  0.059867788238866724897690318151639504149L,
+  0.0253429734563284738087263277549928280781L,
+  0.953315773263436653713242828719775352192L,
+  0.597536998796130884349662459732857817956L,
+  0.0320571321493587106457025626624408278814L,
+  0.477506594803204144826488443400695434979L,
+  0.285541992141868221897101891229394096707L,
+  0.764190678950226854486968785768647879005L,
+  0.895489776830293129781335242249167913705L,
+  0.570740793029533496018083006013191540077L,
+  0.938316924714444954315906773563465846538L,
+  0.56157168133328941481074926451373503549L,
+  0.354184283860505415751320741296599995231L,
+  0.778294119283540721552919906619543293274L,
+  0.434953011661757598127924745629053141294L,
+  0.37156491156117895854194599593687697796L,
+  0.898767478977082606651667259049374990828L,
+  0.21819365919403129548458400006737057993L,
+  0.278163373548978939704874687746089548269L,
+  0.1089005781457343817756962209721573336768L,
+  0.85152888717082537570752846642305937149L,
+  0.2419243481761527583754399630924438738944L,
+  0.69442654829377168239365980152821108287L,
+  0.1512336533453368944625038813397779875445L,
+  0.617712962492924013140729661730350287525L,
+  0.935400762900002313827620435729493050175L,
+  0.79357339902161958573967958515254111256L,
+  0.734250188990467683521536859220675412636L,
+  0.748517858206364295837674601491185485078L,
+  0.82520014781239194590337105462135253912L,
+  0.1240649365160101108753438662971422995014L,
+  0.479769236133748631678854875312914195598L,
+  0.171269492636258554036912204801376697988L,
+  0.833025419245729049117746814929956940986L,
+  0.354429813451205200141830318428840891828L,
+  0.474809123369344367691189422128776480146L,
+  0.692239655770541262287308180705629028608L,
+  0.271366901464125731413801963807240905363L,
+  0.561330233800121182669429172066686942393L,
+  0.0695868383638479426233449148171168522655L,
+  0.627576910684655924911125045007979454546L,
+  0.423331542652214907262628326674848471962L,
+  0.354725031694671387579309719042578580595L,
+  0.312419264533145363169359084710774849388L,
+  0.167819037053563697473931127337972350099L,
+  0.99960836112225007722014049168024866743L,
+  0.820598666739967434549389339457492152643L,
+  0.689495024741546551592649728378054973272L,
+  0.831455766750164249604246627812180304754L,
+  0.515538871956858025876039391193370146897L,
+  0.011724889011994886395520178564059346913L,
+  0.587485679650311054946861235938601293477L,
+  0.113010564497810081892271654273794311467L,
+  0.381261245177928587613552004600730320213L,
+  0.466933821322235841488251157296771536952L,
+  0.646965031311287534221872388017990968767L,
+  0.1811101995014685369939482409137380098995L,
+  0.247896943912780884738461558340983142645L,
+  0.989351208835640462928338658234638846217L,
+  0.924605283008839688813842975338096967047L,
+  0.232010860908797395869871518793187418799L,
+  0.90274859050487649728273938229764570199L,
+  0.664078588165617572819884867627266650356L,
+  0.532118803501055886836301096658125012493L,
+  0.854049566634563277356849166147057535436L,
+  0.756477818237029394317820041473365538516L,
+  0.84578312219074068824832318394711642503L,
+  0.169914247711153055959592721695068126213L,
+  0.50848961455796310913779527189620088788L,
+  0.715231849280217810525151667911662744854L,
+  0.59666585539439202929452535210623694053L,
+  0.72343578283497935670188130618697814035L,
+  0.982228826906846431195861293729527133844L,
+  0.98068755339273420823366752414155272462L,
+  0.805277135157133623039231303778838094716L,
+  0.840154168539481858495551656699708834713L,
+  0.41783933695481411993780663692806809771L,
+  0.070981740672048589027432942629842679319L,
+  0.96664795205679820656636930925268162457L,
+  0.155178444292580006807274171645675417735L,
+  0.276407670358590477524508525465318694191L,
+  0.1054964292635286397825421772930229411286L,
+  0.354205947516472098240472076653525679013L,
+  0.583456972150065135260312420865576513532L,
+  0.338643867118430587299252775116788065723L,
+  0.146467849593879827355466951871059968293L,
+  0.0639448405747942007938896940026153617467L,
+  0.846536583732599902600485371566229612512L,
+  0.599728399399342923058515558777947417833L,
+  0.140387922890235239162309673093379598453L,
+  0.1613160217694973394489944660056369626715L,
+  0.151848582163159668039725770584081620756L,
+  0.663365628518336712743995463098831995163L,
+  0.752166976367665534193146852225632451022L,
+  0.911311062532571765386023433215793121138L,
+  0.692490353635171096989434518397248623866L,
+  0.990512559245857089458980255962574316578L,
+  0.135026433195284768293027372762691869458L,
+  0.82220389984592453325084678614092535756L,
+  0.385471328555065081327630832374267955206L,
+  0.108251633446048989722318564345306848022L,
+  0.429090236713339412878596384043906547999L,
+  0.983421429305507423332481562450757515935L,
+  0.0163920521681887489391607174895946079877L,
+  0.634276319224952361916496263299135133978L,
+  0.53164375434562160610011793242431018808L,
+  0.92801127390978303506935520414803575609L,
+  0.708525110316144414918831897015500504675L,
+  0.722458240987313977092360928226487539067L,
+  0.432028911017122242491499522489684865593L,
+  0.0001754664935299182587224394863719217640876L,
+  0.384266658709383389800969077999970411222L,
+  0.284964603427904715461598563563830112021L,
+  0.1541443027599544245798778784933517572175L,
+  0.958338802063400795313378181913830622686L,
+  0.636927309395779701122460610729048286624L,
+  0.0963946603295477475541191401069719222887L,
+  0.0995190436935072136624400787867889652226L,
+  0.294220607618706451139091631947946466958L,
+  0.180831121994104393794487526888221966969L,
+  0.635403971764105414766318934434540385347L,
+  0.333929089029202997624323059191296321991L,
+  0.498378678845335358166419186432789231466L,
+  0.79769145046274241777533636404451138797L,
+  0.269285209299779365433012558225847643041L,
+  0.110524792990169183853219228066613162975L,
+  0.252694136970632381193559370648931722998L,
+  0.447232396115786457656991370803052298542L,
+  0.136974250599080636030665381278567779455L,
+  0.67243844394695156696032636816317618716L,
+  0.280265952023932940327982570523639258968L,
+  0.960024614746466668963206103951264089396L,
+  0.83595031847062668345135859090890188348L,
+  0.127840531352213174558502027846545305518L,
+  0.333183884044346150282363573006579940787L,
+  0.480504229384957927069515726093850498988L,
+  0.768498913093287331615443023486434378468L,
+  0.940413493411219283289136687423264928073L,
+  0.548648592555019577089750862504091661273L,
+  0.57814360039222917342516307696519676185L,
+  0.752806287004316513987155718410926624384L,
+  0.328211694133870995310455637563825433641L,
+  0.153907665030571878436793446358668488233L,
+  0.694742699178286984320321272531890059073L,
+  0.25435421168640709608520313542078743933L,
+  0.61387638208113240104328972389071498415L,
+  0.250476311300881635346483832554226742174L,
+  0.345809836897231980069633800588202859833L,
+  0.343083789419841923142937785323119943136L,
+  0.319174378869537109008405333721782689566L,
+  0.158111477528301687597604325494967120237L,
+  0.244000500810322900960285910812181460829L,
+  0.23179705702278726416861948783067588642L,
+  0.54682924846605062799436489677774333716L,
+  0.549008127982055819651521103931442895238L,
+  0.262583044663608129412956518168777449925L,
+  0.00126513153702681878410946802239924274583L,
+  0.942613696151881635585127791325641506562L,
+  0.352686443706689559388572818776843215083L,
+  0.90689998425792029984240460273113807702L,
+  0.867511650419363872431681377574762734184L,
+  0.280671949468087158951852027769013272607L,
+  0.162038690615698843560500386213858514888L,
+  0.71179364933082197276587611716632482938L,
+  0.0967402545497599384082792036477527703823L,
+  0.465040868275334873151726613879001199556L,
+  0.621004503662486553272117361134036130264L,
+  0.732964940483576253705474121238830973672L,
+  0.423374863473223783721502627532544136435L,
+  0.490338535425760290944218064913112069833L,
+  0.0243433415988311460557576165617657963508L,
+  0.0502339423891456566961808478207103394328L,
+  0.57668149339841029115236469576085057193L,
+  0.654589079253818313716855283653923913987L,
+  0.1099728579252794893221972017964445810946L,
+  0.95067113980240197864048876003001477344L,
+  0.271440369581834169312179003284604198334L,
+  0.067152474145377434478612939162576726923L,
+  0.77434193893477314687843638736266814713L,
+  0.2095679937785625400917773512669417520444L,
+  0.7681370807102749183539277908648691358L,
+  0.24472807400083103884984122018932641814L,
+  0.191307162486577428460074174309309551616L,
+  0.637215617752531571162184184570005111405L,
+  0.858141525396878877938747690015117846998L,
+  0.338400625200720062249435065450813258281L,
+  0.564981422008979753676981861330327611986L,
+  0.809460314261206431741632790718777271837L,
+  0.879343403409393604462128113991125533726L,
+  0.284697509116613252542034824007026845569L,
+  0.497023470648395180497606069099534119801L,
+  0.650004713241995983979792197286941523L,
+  0.1177129995341492896184329340448111002318L,
+  0.923625966014428778639333261268345799732L,
+  0.698837131343914189577155394009532120604L,
+  0.28242326745092132457477019796509942259L,
+  0.70025600885251684699238650783454037429L,
+  0.876659050276528114198964471020380705343L,
+  0.52914892693002332233566353042454639365L,
+  0.319860854431864688430502078275989809115L,
+  0.83483115610648557287441551698147898778L,
+  0.727639064249568383685922880431792837046L,
+  0.58743287662861037184349933549802687836L,
+  0.510383231616356949495559076196319035197L,
+  0.00229935944348919214521608305418404052343L,
+  0.799567224020488433652933994297769381902L,
+  0.343651210821093611687224166251624444254L,
+  0.405948097827175151257603419529941300798L,
+  0.456473183882957921169800992232941517586L,
+  0.570248304776860782392105323292264026118L,
+  0.534779754769153667870756893044557559557L,
+  0.472965511839676757434979299779809656808L,
+  0.137335340499076127280155831169214403285L,
+  0.51975901660926295231312276736119435645L,
+  0.8085867293332018994761547260739912451L,
+  0.812416413241484848007226874256949892893L,
+  0.852994977709961112714176162016389410712L,
+  0.95270886248643660114015239563660004248L,
+  0.845133719240648570417568652136630304138L,
+  0.4074980021816323645978397907609428101L,
+  0.335850514497730546494305840184055599972L,
+  0.0882622233237065445998153436898044995127L,
+  0.936467561027640943446178111237050277205L,
+  0.56676472173638044722431698799123577376L,
+  0.528427769051008704179988533062745663408L,
+  0.460890427579778855697205646060084318038L,
+  0.754971897131798313468797543428083655928L,
+  0.980733597969419782109470537306886067907L,
+  0.204362127415649555111877580124343815074L,
+  0.424822548090499017266619697426652494042L,
+  0.790847149074521364262028407892114384257L,
+  0.559922683392730473870877613727301497865L,
+  0.779993507158626042106006393237738208875L,
+  0.30516368089713691312418593599115685319L,
+  0.68918765842229398168455844072311006826L,
+  0.972291357858071465096079542885284602882L,
+  0.92204286423973856982373873105566928589L,
+  0.488649453783638471576482476648021023315L,
+  0.467124744623849284659862825278549932824L,
+  0.548051233865943557014854568009331816852L,
+  0.306838990296265483205551142903402056051L,
+  0.497005516835688988273805238236922199451L,
+  0.341504433884138135798086132528045458722L,
+  0.969816416247460790089503289400709886528L,
+  0.63656435610220447227337751650167349487L,
+  0.83588076122262875881859751942918794857L,
+  0.647568600604975972308348018018445212894L,
+  0.916061870307308870029862807808332479077L,
+  0.767988745496844638880672392122527991445L,
+  0.1623230195628039449666927123215281227666L,
+  0.0791082835859634251558587844284289799848L,
+  0.575858643610197202634665099752882990844L,
+  0.559159434263749620344702466000799724913L,
+  0.063765998380760211208741798736948488376L,
+  0.230557913975359017084357477142151415967L,
+  0.702854691657277602758421942319022953845L,
+  0.789516660466782621905392733079230211954L,
+  0.491496186820051632244513986127898500904L,
+  0.171499215418269578563458417238340672634L,
+  0.626470061831746666081979158043673024967L,
+  0.258903137813870706268979320963343541457L,
+  0.64156850108405218894694811301875120511L,
+  0.534043520260340661507140771088018906496L,
+  0.388275182018399247097875416106759899469L,
+  0.920936363560998030495046998224168162945L,
+  0.826139404694006088220407338888245165242L,
+  0.343561253523163451528918423980552161597L,
+  0.921521003270491194867019217479780072647L,
+  0.656212467754097185125864111703195343744L,
+  0.628186262290474398328350301885606581942L,
+  0.573227336542237665153422986363073650388L,
+  0.94178975003001342039795597242477049832L,
+  0.0408103561362355768975182155847755354614L,
+  0.382581672073273072487550945526454964287L,
+  0.152851256046525520308098129538613498254L,
+  0.966735024597183045592313880114075824298L,
+  0.215564894798334550271993595018433286244L,
+  0.776491530531523589201618375156272004616L,
+  0.912460554179311241821569665648929177608L,
+  0.632880016212040018958086886452474382272L,
+  0.711577891112709305169603082360885583086L,
+  0.1120655756066491784920471129299439607153L,
+  0.691106483958832651050573402690448368687L,
+  0.227442567846797646970770128970529357636L,
+  0.837435613090485891584882062239924101455L,
+  0.524389161590691896070067767400758142565L,
+  0.591360583466508186135247682666313136762L,
+  0.103155847462960450706124014839446958843L,
+  0.98360160577671960281465138408293984545L,
+  0.197665014114674630647437622579741018817L,
+  0.1099709194312379594014239398842185159354L,
+  0.394053373921474751303577685990936074485L,
+  0.94945354787200894450508557094182436657L,
+  0.372593716084661547440393809983835348274L,
+  0.62514674616343692328572382301636412566L,
+  0.2001871481416310130073795585638383984926L,
+  0.148432902421401306477690922498335475507L,
+  0.687921673269487018193347305425182239764L,
+  0.470940334348984370262797433659013738143L,
+  0.1592476430730276812200821020958787823795L,
+  0.296776110696565927524970058176467314578L,
+  0.1491253105142218631726813695413369166796L,
+  0.579194717868638955003571989739802264354L,
+  0.0730543936466744761440131951539370917776L,
+  0.941296077873340797733875467209629660594L,
+  0.76720024949523806992504865943580486187L,
+  0.419526107681583337049761526455092560735L,
+  0.00688594806937144144337797612615981618743L,
+  0.931682704636487927763651991274577493318L,
+  0.660524215847727125058815911433184924133L,
+  0.71780972384903067744609138100002205676L,
+  0.02961791918271995070621856302848439458175L,
+  0.692791206212428997136050006631240567502L,
+  0.162762426697948445642880183096693062538L,
+  0.183637795551464341949019870428026949035L,
+  0.51263789620316407488619761125039609046L,
+  0.90238698122728366178818828411640824056L,
+  0.229784208410123517024401367798925386038L,
+  0.227218480059027721044118324890061381517L,
+  0.6555059570778176955459672492237825867L,
+  0.929815767583615624563413584598741896834L,
+  0.188559597559312695774663933876436875041L,
+  0.396184448063913762028147791554346199354L,
+  0.656329540957568516760105602115555736073L,
+  0.1410678455413176345310401990667063246115L,
+  0.621004667838855651847651367745487628637L,
+  0.01277988784767030635209958407461792778387L,
+  0.69482142276844418673788732511112265014L,
+  0.925705031133221932065307191539105635005L,
+  0.925744341385232535963050430363763081603L,
+  0.24189467813699258571134382505828701386L,
+  0.646009544609703485845605410919901799L,
+  0.051119212999532673562206731603906295406L,
+  0.85076142804383409765024452942896578158L
+};
--- a/tests/test-accept.c
+++ b/tests/test-accept.c
@@ -30,7 +30,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-accept4.c
+++ b/tests/test-accept4.c
@@ -33,7 +33,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-alloca-opt.c
+++ b/tests/test-alloca-opt.c
@@ -44,7 +44,7 @@
     {
       /* Try various values.
          n = 0 gave a crash on Alpha with gcc-2.5.8.
-         Some versions of MacOS X have a stack size limit of 512 KB.  */
+         Some versions of Mac OS X have a stack size limit of 512 KB.  */
       func (34);
       func (134);
       func (399);
--- a/tests/test-binary-io.c
+++ b/tests/test-binary-io.c
@@ -30,26 +30,40 @@
 #include "macros.h"
 
 int
-main ()
+main (int argc, char *argv[])
 {
   /* Test the O_BINARY macro.  */
   {
     int fd =
-      open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
+      open ("t-bin-out0.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
     if (write (fd, "Hello\n", 6) < 0)
       exit (1);
     close (fd);
   }
   {
     struct stat statbuf;
-    if (stat ("t-bin-out2.tmp", &statbuf) < 0)
+    if (stat ("t-bin-out0.tmp", &statbuf) < 0)
       exit (1);
     ASSERT (statbuf.st_size == 6);
   }
 
-  /* Test the SET_BINARY macro.  */
-  SET_BINARY (1);
-  fputs ("Hello\n", stdout);
+  switch (argv[1][0])
+    {
+    case '1':
+      /* Test the set_binary_mode() function.  */
+      set_binary_mode (1, O_BINARY);
+      fputs ("Hello\n", stdout);
+      break;
+
+    case '2':
+      /* Test the SET_BINARY macro.  */
+      SET_BINARY (1);
+      fputs ("Hello\n", stdout);
+      break;
+
+    default:
+      break;
+    }
 
   return 0;
 }
--- a/tests/test-binary-io.sh
+++ b/tests/test-binary-io.sh
@@ -3,9 +3,11 @@
 tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
-tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp"
-./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1
-cmp t-bin-out1.tmp t-bin-out2.tmp > /dev/null || exit 1
+tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp t-bin-out2.tmp"
+./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1
+./test-binary-io${EXEEXT} 2 > t-bin-out2.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out2.tmp > /dev/null || exit 1
 
 rm -fr $tmpfiles
 
--- a/tests/test-bind.c
+++ b/tests/test-bind.c
@@ -31,7 +31,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
new file mode 100644
--- /dev/null
+++ b/tests/test-cbrt-ieee.c
@@ -0,0 +1,45 @@
+/* Test of cbrt() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define CBRT cbrt
+#include "test-cbrt-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-cbrt-ieee.h
@@ -0,0 +1,40 @@
+/* Test of cbrt*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (ISNAN (CBRT (NAN)));
+
+  /* Signed zero.  */
+  {
+    DOUBLE y = CBRT (L_(0.0));
+    ASSERT (y == L_(0.0));
+    ASSERT (!signbit (y));
+  }
+  {
+    DOUBLE y = CBRT (MINUS_ZERO);
+    ASSERT (y == L_(0.0));
+    ASSERT (!!signbit (y) == !!signbit (MINUS_ZERO));
+  }
+
+  /* Infinity.  */
+  ASSERT (CBRT (INFINITY) == INFINITY);
+  ASSERT (CBRT (- INFINITY) == - INFINITY);
+}
--- a/tests/test-cbrt.c
+++ b/tests/test-cbrt.c
@@ -23,10 +23,16 @@
 #include "signature.h"
 SIGNATURE_CHECK (cbrt, double, (double));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define CBRT cbrt
+#define RANDOM randomd
+#include "test-cbrt.h"
 
 int
 main ()
@@ -36,5 +42,7 @@
   y = cbrt (x);
   ASSERT (y >= 0.8434326653 && y <= 0.8434326654);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-cbrt.h
@@ -0,0 +1,59 @@
+/* Test of cbrt*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM); i++)
+    {
+      DOUBLE x = L_(32.0) * RANDOM[i] - L_(16.0); /* -16.0 <= x <= 16.0 */
+      DOUBLE y = CBRT (x);
+      DOUBLE err = y * y * y - x;
+      ASSERT (err > - L_(4.0) * L_(16.0) / TWO_MANT_DIG
+              && err < L_(4.0) * L_(16.0) / TWO_MANT_DIG);
+    }
+
+  for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+    for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+      {
+        DOUBLE x = L_(32.0) * RANDOM[i] - L_(16.0); /* -16.0 <= x <= 16.0 */
+        DOUBLE y = L_(32.0) * RANDOM[j] - L_(16.0); /* -16.0 <= y <= 16.0 */
+        if (x != L_(0.0) && y != L_(0.0))
+          {
+            DOUBLE z = L_(1.0) / (x * y);
+            /* Approximately  x * y * z = 1.  */
+            DOUBLE p = CBRT (x) * CBRT (y) * CBRT (z);
+            ASSERT (p > L_(1.0) - L_(8.0) / TWO_MANT_DIG
+                    && p < L_(1.0) + L_(8.0) / TWO_MANT_DIG);
+          }
+      }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-cbrtf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of cbrtf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define CBRT cbrtf
+#include "test-cbrt-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-cbrtf.c
@@ -0,0 +1,48 @@
+/* Test of cbrtf() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (cbrtf, float, (float));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define CBRT cbrtf
+#define RANDOM randomf
+#include "test-cbrt.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6f;
+  y = cbrtf (x);
+  ASSERT (y >= 0.84343266f && y <= 0.84343270f);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-cbrtl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of cbrtl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define CBRT cbrtl
+#include "test-cbrt-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-cbrtl.c
@@ -0,0 +1,48 @@
+/* Test of cbrtl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (cbrtl, long double, (long double));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG DBL_MANT_DIG
+#define CBRT cbrtl
+#define RANDOM randoml
+#include "test-cbrt.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6L;
+  y = cbrtl (x);
+  ASSERT (y >= 0.8434326653L && y <= 0.8434326654L);
+
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-ceil-ieee.c
+++ b/tests/test-ceil-ieee.c
@@ -18,7 +18,10 @@
 
 #include <math.h>
 
+#include "isnand-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -39,5 +42,13 @@
   ASSERT (!!signbit (ceil (-0.3)) == !!signbit (minus_zerod));
   ASSERT (!!signbit (ceil (-0.7)) == !!signbit (minus_zerod));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnand (ceil (NaNd ())));
+  /* Infinity.  */
+  ASSERT (ceil (Infinityd ()) == Infinityd ());
+  ASSERT (ceil (- Infinityd ()) == - Infinityd ());
+
   return 0;
 }
--- a/tests/test-ceil2.c
+++ b/tests/test-ceil2.c
@@ -32,6 +32,12 @@
 #include "minus-zero.h"
 #include "macros.h"
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 
 /* The reference implementation, taken from lib/ceil.c.  */
 
--- a/tests/test-ceilf-ieee.c
+++ b/tests/test-ceilf-ieee.c
@@ -18,7 +18,10 @@
 
 #include <math.h>
 
+#include "isnanf-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 /* If IEEE compliance was not requested, the ICC compiler inlines its
@@ -52,5 +55,13 @@
   ASSERT (!!signbit (my_ceilf (-0.3f)) == !!signbit (minus_zerof));
   ASSERT (!!signbit (my_ceilf (-0.7f)) == !!signbit (minus_zerof));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanf (ceilf (NaNf ())));
+  /* Infinity.  */
+  ASSERT (ceilf (Infinityf ()) == Infinityf ());
+  ASSERT (ceilf (- Infinityf ()) == - Infinityf ());
+
   return 0;
 }
--- a/tests/test-ceilf2.c
+++ b/tests/test-ceilf2.c
@@ -32,6 +32,12 @@
 #include "minus-zero.h"
 #include "macros.h"
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 
 /* The reference implementation, taken from lib/ceil.c.  */
 
--- a/tests/test-ceill-ieee.c
+++ b/tests/test-ceill-ieee.c
@@ -19,7 +19,10 @@
 #include <math.h>
 
 #include "fpucw.h"
+#include "isnanl-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -44,5 +47,13 @@
   ASSERT (!!signbit (ceill (-0.3L)) == !!signbit (minus_zerol));
   ASSERT (!!signbit (ceill (-0.7L)) == !!signbit (minus_zerol));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanl (ceill (NaNl ())));
+  /* Infinity.  */
+  ASSERT (ceill (Infinityl ()) == Infinityl ());
+  ASSERT (ceill (- Infinityl ()) == - Infinityl ());
+
   return 0;
 }
--- a/tests/test-closein.c
+++ b/tests/test-closein.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
--- a/tests/test-closein.sh
+++ b/tests/test-closein.sh
@@ -6,7 +6,7 @@
 echo world > xout.tmp
 
 fail=0
-# Test with seekable stdin; followon process must see remaining data
+# Test with seekable stdin; follow-on process must see remaining data
 (test-closein; cat) < in.tmp > out1.tmp || fail=1
 cmp out1.tmp in.tmp || fail=1
 
--- a/tests/test-connect.c
+++ b/tests/test-connect.c
@@ -31,7 +31,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-copy-acl.sh
+++ b/tests/test-copy-acl.sh
@@ -111,7 +111,7 @@
           acl_flavor=aix
         else
           if (fsaclctl -v >/dev/null) 2>/dev/null; then
-            # MacOS X.
+            # Mac OS X.
             acl_flavor=macosx
           else
             if test -f /sbin/chacl; then
--- a/tests/test-copy-file-1.sh
+++ b/tests/test-copy-file-1.sh
@@ -10,4 +10,11 @@
 fi
 export TMPDIR
 
-exec "${srcdir}/test-copy-file.sh"
+"${srcdir}/test-copy-file.sh"
+ret1=$?
+NO_STDERR_OUTPUT=1 "${srcdir}/test-copy-file.sh"
+ret2=$?
+case $ret1 in
+  77 ) exit $ret2 ;;
+  * ) exit $ret1 ;;
+esac
--- a/tests/test-copy-file-2.sh
+++ b/tests/test-copy-file-2.sh
@@ -6,4 +6,11 @@
 TMPDIR=`pwd`
 export TMPDIR
 
-exec "${srcdir}/test-copy-file.sh"
+"${srcdir}/test-copy-file.sh"
+ret1=$?
+NO_STDERR_OUTPUT=1 "${srcdir}/test-copy-file.sh"
+ret2=$?
+case $ret1 in
+  77 ) exit $ret2 ;;
+  * ) exit $ret1 ;;
+esac
--- a/tests/test-copy-file.c
+++ b/tests/test-copy-file.c
@@ -20,6 +20,8 @@
 
 #include "copy-file.h"
 
+#include <stdlib.h>
+
 #include "progname.h"
 #include "macros.h"
 
@@ -28,6 +30,7 @@
 {
   const char *file1;
   const char *file2;
+  int null_stderr;
 
   set_program_name (argv[0]);
 
@@ -35,8 +38,12 @@
 
   file1 = argv[1];
   file2 = argv[2];
+  null_stderr = (getenv ("NO_STDERR_OUTPUT") != NULL);
 
-  copy_file_preserving (file1, file2);
+  if (null_stderr)
+    ASSERT (qcopy_file_preserving (file1, file2) == 0);
+  else
+    copy_file_preserving (file1, file2);
 
   return 0;
 }
--- a/tests/test-copy-file.sh
+++ b/tests/test-copy-file.sh
@@ -105,7 +105,7 @@
           acl_flavor=aix
         else
           if (fsaclctl -v >/dev/null) 2>/dev/null; then
-            # MacOS X.
+            # Mac OS X.
             acl_flavor=macosx
           else
             if test -f /sbin/chacl; then
new file mode 100644
--- /dev/null
+++ b/tests/test-count-leading-zeros.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2012 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 Eric Blake.  */
+
+#include <config.h>
+
+#include "count-leading-zeros.h"
+
+#include <limits.h>
+#include <stdio.h>
+
+#include "macros.h"
+
+#define UINT_BIT (sizeof (unsigned int) * CHAR_BIT)
+#define ULONG_BIT (sizeof (unsigned long int) * CHAR_BIT)
+#define ULLONG_BIT (sizeof (unsigned long long int) * CHAR_BIT)
+
+#ifndef ULLONG_MAX
+# define HALF (1ULL << (sizeof (unsigned long long int) * CHAR_BIT - 1))
+# define ULLONG_MAX (HALF - 1 + HALF)
+#endif
+
+int
+main (int argc, char *argv[])
+{
+  int i, j;
+
+#define TEST_COUNT_LEADING_ZEROS(FUNC, TYPE, BITS, MAX, ONE)    \
+  ASSERT (FUNC (0) == BITS);                                    \
+  for (i = 0; i < BITS; i++)                                    \
+    {                                                           \
+      ASSERT (FUNC (ONE << i) == BITS - i - 1);                 \
+      for (j = 0; j < i; j++)                                   \
+        ASSERT (FUNC ((ONE << i) | (ONE << j)) == BITS - i - 1);\
+    }                                                           \
+  for (i = 0; i < 1000; i++)                                    \
+    {                                                           \
+      TYPE value = rand () ^ (rand () << 31 << 1);              \
+      int count = 0;                                            \
+      for (j = 0; j < BITS; j++)                                \
+        if (value & (ONE << j))                                 \
+          count = BITS - j - 1;                                 \
+      ASSERT (count == FUNC (value));                           \
+    }                                                           \
+  ASSERT (FUNC (MAX) == 0);
+
+  TEST_COUNT_LEADING_ZEROS (count_leading_zeros, unsigned int,
+                            UINT_BIT, UINT_MAX, 1U);
+  TEST_COUNT_LEADING_ZEROS (count_leading_zeros_l, unsigned long int,
+                            ULONG_BIT, ULONG_MAX, 1UL);
+#ifdef HAVE_UNSIGNED_LONG_LONG_INT
+  TEST_COUNT_LEADING_ZEROS (count_leading_zeros_ll, unsigned long long int,
+                            ULLONG_BIT, ULLONG_MAX, 1ULL);
+#endif
+
+  return 0;
+}
--- a/tests/test-des.c
+++ b/tests/test-des.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Adapted for gnulib by Simon Josefsson, based on Libgcrypt. */
 
--- a/tests/test-errno.c
+++ b/tests/test-errno.c
@@ -98,6 +98,8 @@
 int e116 = ESTALE;
 int e122 = EDQUOT;
 int e125 = ECANCELED;
+int e130 = EOWNERDEAD;
+int e131 = ENOTRECOVERABLE;
 
 /* Don't verify that these errno values are all different, except for possibly
    EWOULDBLOCK == EAGAIN.  Even Linux/x86 does not pass this check: it has
--- a/tests/test-exclude7.sh
+++ b/tests/test-exclude7.sh
@@ -28,8 +28,8 @@
 EOT
 
 cat > expected <<EOT
+bar: 0
 bar: 1
-bar: 0
 EOT
 
 test-exclude in -include in -- bar > out || exit $?
new file mode 100644
--- /dev/null
+++ b/tests/test-exp-ieee.c
@@ -0,0 +1,45 @@
+/* Test of exp() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define EXP exp
+#include "test-exp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-exp-ieee.h
@@ -0,0 +1,43 @@
+/* Test of exp*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Underflow.  */
+  {
+    DOUBLE z = EXP (-100000.0);
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+
+  /* NaN.  */
+  ASSERT (ISNAN (EXP (NAN)));
+
+  /* Zero.  */
+  ASSERT (EXP (L_(0.0)) == L_(1.0));
+  ASSERT (EXP (MINUS_ZERO) == L_(1.0));
+
+  /* Infinity.  */
+  {
+    DOUBLE z = EXP (- INFINITY);
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  ASSERT (EXP (INFINITY) == INFINITY);
+}
--- a/tests/test-exp.c
+++ b/tests/test-exp.c
@@ -23,10 +23,16 @@
 #include "signature.h"
 SIGNATURE_CHECK (exp, double, (double));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define EXP exp
+#define RANDOM randomd
+#include "test-exp.h"
 
 int
 main ()
@@ -36,5 +42,7 @@
   y = exp (x);
   ASSERT (y >= 1.822118800 && y <= 1.822118801);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-exp.h
@@ -0,0 +1,88 @@
+/* Test of exp*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Randomized tests.  */
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in expl.c to
+          53 bits of precision.  */
+       L_(1350.0)
+#else
+       L_(4.0)
+#endif
+       : L_(2.0));
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+        DOUBLE y = EXP (x);
+        DOUBLE z = EXP (- x);
+        DOUBLE err = y * z - L_(1.0);
+        ASSERT (y > L_(0.0));
+        ASSERT (z > L_(0.0));
+        ASSERT (err > - err_bound / TWO_MANT_DIG
+                && err < err_bound / TWO_MANT_DIG);
+      }
+  }
+
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       L_(2400.0)
+#else
+       L_(24.0)
+#endif
+       : L_(24.0));
+
+    for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+        {
+          DOUBLE x = L_(32.0) * RANDOM[i] - L_(16.0); /* -16.0 <= x <= 16.0 */
+          DOUBLE y = L_(32.0) * RANDOM[j] - L_(16.0); /* -16.0 <= y <= 16.0 */
+          DOUBLE z = - x - y;
+          /* Approximately  x + y + z = 0.  */
+          DOUBLE err = EXP (x) * EXP (y) * EXP (z) - L_(1.0);
+          ASSERT (err > - err_bound / TWO_MANT_DIG
+                  && err < err_bound / TWO_MANT_DIG);
+        }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2-ieee.c
@@ -0,0 +1,45 @@
+/* Test of exp2() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define EXP2 exp2
+#include "test-exp2-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2-ieee.h
@@ -0,0 +1,43 @@
+/* Test of exp2*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Underflow.  */
+  {
+    DOUBLE z = EXP2 (-100000.0);
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+
+  /* NaN.  */
+  ASSERT (ISNAN (EXP2 (NAN)));
+
+  /* Zero.  */
+  ASSERT (EXP2 (L_(0.0)) == L_(1.0));
+  ASSERT (EXP2 (MINUS_ZERO) == L_(1.0));
+
+  /* Infinity.  */
+  {
+    DOUBLE z = EXP2 (- INFINITY);
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  ASSERT (EXP2 (INFINITY) == INFINITY);
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2.c
@@ -0,0 +1,50 @@
+/* Test of exp2() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (exp2, double, (double));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MAX_EXP DBL_MAX_EXP
+#define MIN_EXP DBL_MIN_EXP
+#define EXP2 exp2
+#define RANDOM randomd
+#include "test-exp2.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6;
+  y = exp2 (x);
+  ASSERT (y >= 1.515716566 && y <= 1.515716567);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2.h
@@ -0,0 +1,124 @@
+/* Test of exp2*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Integral arguments.  */
+  {
+    DOUBLE x = L_(0.0);
+    DOUBLE y = EXP2 (x);
+    ASSERT (y == L_(1.0));
+  }
+  /* <http://sourceware.org/bugzilla/show_bug.cgi?id=13824> */
+#if !(defined __linux__ && (defined __sparc__ || defined __powerpc__))
+  {
+    int e;
+    DOUBLE x;
+    DOUBLE y;
+    for (e = 0, x = L_(0.0), y = L_(1.0);
+         e <= MAX_EXP - 1;
+         e++, x = x + L_(1.0), y = y * L_(2.0))
+      {
+        /* Invariant: x = e, y = 2^e.  */
+        DOUBLE z = EXP2 (x);
+        ASSERT (z == y);
+      }
+  }
+  {
+    int e;
+    DOUBLE x;
+    DOUBLE y;
+    for (e = 0, x = L_(0.0), y = L_(1.0);
+         e >= MIN_EXP - 1;
+         e--, x = x - L_(1.0), y = y * L_(0.5))
+      {
+        /* Invariant: x = e, y = 2^e.  */
+        DOUBLE z = EXP2 (x);
+        ASSERT (z == y);
+      }
+  }
+#endif
+
+  /* Randomized tests.  */
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in exp2l.c to
+          53 bits of precision.  */
+       L_(1350.0)
+#else
+       L_(3.0)
+#endif
+       : L_(3.0));
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+        DOUBLE y = EXP2 (x);
+        DOUBLE z = EXP2 (- x);
+        DOUBLE err = y * z - L_(1.0);
+        ASSERT (y > L_(0.0));
+        ASSERT (z > L_(0.0));
+        ASSERT (err > - err_bound / TWO_MANT_DIG
+                && err < err_bound / TWO_MANT_DIG);
+      }
+  }
+
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       L_(2300.0)
+#else
+       L_(29.0)
+#endif
+       : L_(11.0));
+
+    for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+        {
+          DOUBLE x = L_(32.0) * RANDOM[i] - L_(16.0); /* -16.0 <= x <= 16.0 */
+          DOUBLE y = L_(32.0) * RANDOM[j] - L_(16.0); /* -16.0 <= y <= 16.0 */
+          DOUBLE z = - x - y;
+          /* Approximately  x + y + z = 0.  */
+          DOUBLE err = EXP2 (x) * EXP2 (y) * EXP2 (z) - L_(1.0);
+          ASSERT (err > - err_bound / TWO_MANT_DIG
+                  && err < err_bound / TWO_MANT_DIG);
+        }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2f-ieee.c
@@ -0,0 +1,45 @@
+/* Test of exp2f() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define EXP2 exp2f
+#include "test-exp2-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2f.c
@@ -0,0 +1,50 @@
+/* Test of exp2f() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010-2011.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (exp2f, float, (float));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MAX_EXP FLT_MAX_EXP
+#define MIN_EXP FLT_MIN_EXP
+#define EXP2 exp2f
+#define RANDOM randomf
+#include "test-exp2.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6f;
+  y = exp2f (x);
+  ASSERT (y >= 1.5157164f && y <= 1.5157167f);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2l-ieee.c
@@ -0,0 +1,45 @@
+/* Test of exp2l() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define EXP2 exp2l
+#include "test-exp2-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-exp2l.c
@@ -0,0 +1,55 @@
+/* Test of exp2l() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (exp2l, long double, (long double));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MAX_EXP LDBL_MAX_EXP
+#define MIN_EXP LDBL_MIN_EXP
+#define EXP2 exp2l
+#define RANDOM randoml
+#include "test-exp2.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 0.6L;
+  y = exp2l (x);
+  ASSERT (y >= 1.515716566L && y <= 1.515716567L);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-expf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of expf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define EXP expf
+#include "test-exp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-expf.c
+++ b/tests/test-expf.c
@@ -23,10 +23,16 @@
 #include "signature.h"
 SIGNATURE_CHECK (expf, float, (float));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile float x;
-float y;
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define EXP expf
+#define RANDOM randomf
+#include "test-exp.h"
 
 int
 main ()
@@ -36,5 +42,7 @@
   y = expf (x);
   ASSERT (y >= 1.8221188f && y <= 1.8221189f);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-expl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of expl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define EXP expl
+#include "test-exp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-expl.c
+++ b/tests/test-expl.c
@@ -23,11 +23,17 @@
 #include "signature.h"
 SIGNATURE_CHECK (expl, long double, (long double));
 
+#include <float.h>
+
 #include "fpucw.h"
 #include "macros.h"
 
-volatile long double x;
-long double y;
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define EXP expl
+#define RANDOM randoml
+#include "test-exp.h"
 
 int
 main ()
@@ -41,5 +47,7 @@
   y = expl (x);
   ASSERT (y >= 1.822118800L && y <= 1.822118801L);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1-ieee.c
@@ -0,0 +1,45 @@
+/* Test of expm1() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define EXPM1 expm1
+#include "test-expm1-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1-ieee.h
@@ -0,0 +1,43 @@
+/* Test of expm1*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Underflow.  */
+  ASSERT (EXPM1 (-100000.0) == - L_(1.0));
+
+  /* NaN.  */
+  ASSERT (ISNAN (EXPM1 (NAN)));
+
+  /* Zero.  */
+  {
+    DOUBLE z = EXPM1 (L_(0.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = EXPM1 (MINUS_ZERO);
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+
+  /* Infinity.  */
+  ASSERT (EXPM1 (- INFINITY) == - L_(1.0));
+  ASSERT (EXPM1 (INFINITY) == INFINITY);
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1.c
@@ -0,0 +1,49 @@
+/* Test of expm1() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (expm1, double, (double));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MIN_EXP DBL_MIN_EXP
+#define EXPM1 expm1
+#define RANDOM randomd
+#include "test-expm1.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6;
+  y = expm1 (x);
+  ASSERT (y >= 0.822118800 && y <= 0.822118801);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1.h
@@ -0,0 +1,115 @@
+/* Test of expm1*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Arguments near zero.  */
+  {
+    DOUBLE x;
+
+    for (i = -1, x = L_(0.5); i >= MIN_EXP; i--, x *= L_(0.5))
+      {
+        DOUBLE y;
+
+        y = EXPM1 (x);
+#ifdef __MINGW32__ /* mingw returns a value that is slightly too small.  */
+        ASSERT (y >= x * (L_(1.0) - L_(1.0) / TWO_MANT_DIG));
+#else
+        ASSERT (y >= x);
+#endif
+        ASSERT (y < L_(1.5) * x);
+
+        y = EXPM1 (- x);
+        ASSERT (y >= - x);
+        ASSERT (y < - L_(0.5) * x);
+      }
+  }
+
+  /* Randomized tests.  */
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in expl.c to
+          53 bits of precision.  */
+       L_(1024.0)
+#else
+       L_(5.0)
+#endif
+       : L_(5.0));
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x = L_(2.0) * RANDOM[i]; /* 0.0 <= x <= 2.0 */
+        DOUBLE y = EXPM1 (x);
+        DOUBLE z = EXPM1 (- x);
+        DOUBLE err = y + (1 + y) * z;
+        ASSERT (y >= L_(0.0));
+        ASSERT (z <= L_(0.0));
+        ASSERT (err > - err_bound / TWO_MANT_DIG
+                && err < err_bound / TWO_MANT_DIG);
+      }
+  }
+
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       L_(1536.0)
+#else
+       L_(11.0)
+#endif
+       : L_(9.0));
+
+    for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+        {
+          DOUBLE x = L_(2.0) * RANDOM[i] - L_(1.0); /* -1.0 <= x <= 1.0 */
+          DOUBLE y = L_(2.0) * RANDOM[j] - L_(1.0); /* -1.0 <= y <= 1.0 */
+          DOUBLE z = - x - y;
+          /* Approximately  x + y + z = 0.  */
+          {
+            DOUBLE a = EXPM1 (x);
+            DOUBLE b = EXPM1 (y);
+            DOUBLE c = EXPM1 (z);
+            DOUBLE err = a + (1 + a) * (b + (1 + b) * c);
+            ASSERT (err > - err_bound / TWO_MANT_DIG
+                    && err < err_bound / TWO_MANT_DIG);
+          }
+        }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1f-ieee.c
@@ -0,0 +1,45 @@
+/* Test of expm1f() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define EXPM1 expm1f
+#include "test-expm1-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1f.c
@@ -0,0 +1,49 @@
+/* Test of expm1f() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010-2011.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (expm1f, float, (float));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MIN_EXP FLT_MIN_EXP
+#define EXPM1 expm1f
+#define RANDOM randomf
+#include "test-expm1.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6f;
+  y = expm1f (x);
+  ASSERT (y >= 0.8221187f && y <= 0.8221189f);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1l-ieee.c
@@ -0,0 +1,45 @@
+/* Test of expm1l() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define EXPM1 expm1l
+#include "test-expm1-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-expm1l.c
@@ -0,0 +1,54 @@
+/* Test of expm1l() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (expm1l, long double, (long double));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MIN_EXP LDBL_MIN_EXP
+#define EXPM1 expm1l
+#define RANDOM randoml
+#include "test-expm1.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 0.6L;
+  y = expm1l (x);
+  ASSERT (y >= 0.822118800L && y <= 0.822118801L);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fabs-ieee.c
@@ -0,0 +1,45 @@
+/* Test of fabs() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define FABS fabs
+#include "test-fabs-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fabs-ieee.h
@@ -0,0 +1,40 @@
+/* Test of ldexp*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (ISNAN (FABS (NAN)));
+
+  /* Signed zero.  */
+  {
+    DOUBLE y = FABS (L_(0.0));
+    ASSERT (y == L_(0.0));
+    ASSERT (!signbit (y));
+  }
+  {
+    DOUBLE y = FABS (MINUS_ZERO);
+    ASSERT (y == L_(0.0));
+    ASSERT (!signbit (y));
+  }
+
+  /* Infinity.  */
+  ASSERT (FABS (INFINITY) == INFINITY);
+  ASSERT (FABS (- INFINITY) == INFINITY);
+}
--- a/tests/test-fabs.c
+++ b/tests/test-fabs.c
@@ -23,10 +23,17 @@
 #include "signature.h"
 SIGNATURE_CHECK (fabs, double, (double));
 
+#include <string.h>
+
 #include "macros.h"
+#include "minus-zero.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define FABS fabs
+#define RANDOM randomd
+#include "test-fabs.h"
 
 int
 main ()
@@ -41,5 +48,7 @@
   y = fabs (x);
   ASSERT (y == 0.6);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-fabs.h
@@ -0,0 +1,48 @@
+/* Test of fabs*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  volatile DOUBLE x;
+  DOUBLE y;
+
+  /* Signed zero.  */
+  x = L_(0.0);
+  y = FABS (x);
+  ASSERT (y == L_(0.0));
+  ASSERT (!signbit (y));
+
+  x = MINUS_ZERO;
+  y = FABS (x);
+  ASSERT (y == L_(0.0));
+  ASSERT (!signbit (y));
+
+  /* Randomized tests.  */
+  {
+    int i;
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        x = L_(10.0) * RANDOM[i]; /* 0.0 <= x <= 10.0 */
+        ASSERT (FABS (x) == x);
+        ASSERT (FABS (- x) == x);
+      }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-fabsf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of fabsf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define FABS fabsf
+#include "test-fabs-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-fabsf.c
+++ b/tests/test-fabsf.c
@@ -23,10 +23,17 @@
 #include "signature.h"
 SIGNATURE_CHECK (fabsf, float, (float));
 
+#include <string.h>
+
 #include "macros.h"
+#include "minus-zero.h"
 
-volatile float x;
-float y;
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define FABS fabsf
+#define RANDOM randomf
+#include "test-fabs.h"
 
 int
 main ()
@@ -41,5 +48,7 @@
   y = fabsf (x);
   ASSERT (y == 0.6f);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-fabsl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of fabsl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define FABS fabsl
+#include "test-fabs-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fabsl.c
@@ -0,0 +1,54 @@
+/* Test of fabsl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010-2012.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fabsl, long double, (long double));
+
+#include <string.h>
+
+#include "macros.h"
+#include "minus-zero.h"
+
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define FABS fabsl
+#define RANDOM randoml
+#include "test-fabs.h"
+
+int
+main ()
+{
+  /* A particular positive value.  */
+  x = 0.6L;
+  y = fabsl (x);
+  ASSERT (y == 0.6L);
+
+  /* A particular negative value.  */
+  x = -0.6L;
+  y = fabsl (x);
+  ASSERT (y == 0.6L);
+
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-fbufmode.c
+++ b/tests/test-fbufmode.c
@@ -26,45 +26,80 @@
 
 #define TESTFILE "t-fbufmode.tmp"
 
-int
-main ()
+/* ISO C99 disallows more than one setvbuf call on a given stream,
+   and HP-UX 11 and musl libc indeed don't support such use of setvbuf.
+   Therefore allocate a new stream for each possible mode value.  */
+static int
+test_mode (int mode)
 {
   FILE *fp;
   char buf[5];
 
-  /* Create a file with some contents.  */
-  fp = fopen (TESTFILE, "w");
-  if (fp == NULL)
-    goto skip;
-  if (fwrite ("foobarsh", 1, 8, fp) < 8)
-    goto skip;
-  if (fclose (fp))
-    goto skip;
-
   /* Open it for reading.  */
   fp = fopen (TESTFILE, "r");
 
-  if (setvbuf (fp, NULL, _IONBF, 0))
-    goto skip;
-  ASSERT (fbufmode (fp) == _IONBF);
+  switch (mode)
+    {
+    case _IONBF:
+      ASSERT (setvbuf (fp, NULL, _IONBF, 0) == 0);
+      ASSERT (fbufmode (fp) == _IONBF);
+      break;
 
-  /* This setvbuf call can fail, e.g. on HP-UX 11.  */
-  if (setvbuf (fp, buf, _IOLBF, 5) == 0)
-    {
+    case _IOLBF:
+      ASSERT (setvbuf (fp, buf, _IOLBF, 5) == 0);
       /* mingw's setvbuf implements _IOLBF the same way as _IOFBF.  */
       ASSERT (fbufmode (fp) == _IOLBF
               || fbufmode (fp) == _IOFBF);
-    }
+      break;
 
-  /* This setvbuf call can fail, e.g. on HP-UX 11.  */
-  if (setvbuf (fp, buf, _IOFBF, 5) == 0)
-    {
+    case _IOFBF:
+      ASSERT (setvbuf (fp, buf, _IOFBF, 5) == 0);
       ASSERT (fbufmode (fp) == _IOFBF);
+      break;
+
+    default:
+      break;
     }
 
   fclose (fp);
 
   return 0;
+}
+
+int
+main ()
+{
+  int ret;
+
+  /* Create a file with some contents.  */
+  {
+    FILE *fp;
+
+    fp = fopen (TESTFILE, "w");
+    if (fp == NULL)
+      goto skip;
+    if (fwrite ("foobarsh", 1, 8, fp) < 8)
+      goto skip;
+    if (fclose (fp))
+      goto skip;
+  }
+
+  ret = test_mode (_IONBF);
+  if (ret != 0)
+    goto fail;
+
+  ret = test_mode (_IOLBF);
+  if (ret != 0)
+    goto fail;
+
+  ret = test_mode (_IOFBF);
+  if (ret != 0)
+    goto fail;
+
+  return 0;
+
+ fail:
+  return ret;
 
  skip:
   fprintf (stderr, "Skipping test: file operations failed.\n");
--- a/tests/test-fclose.c
+++ b/tests/test-fclose.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
--- a/tests/test-fcntl-h.c
+++ b/tests/test-fcntl-h.c
@@ -21,9 +21,9 @@
 #include <fcntl.h>
 
 /* Check that the various O_* macros are defined.  */
-int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK
-        | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT
-        | O_BINARY | O_TEXT;
+int o = (O_DIRECT | O_DIRECTORY | O_DSYNC | O_IGNORE_CTTY | O_NDELAY | O_NOATIME
+	 | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS
+	 | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT);
 
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
@@ -61,7 +61,7 @@
 #if O_SEARCH && O_EXEC != O_SEARCH && O_SEARCH != O_RDONLY
     case O_SEARCH:
 #endif
-      i = O_ACCMODE == (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH);
+      i = ! (~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH));
       break;
 
       /* Everyone should have these */
@@ -84,6 +84,9 @@
 #if O_DSYNC
     case O_DSYNC:
 #endif
+#if O_IGNORE_CTTY
+    case O_IGNORE_CTTY:
+#endif
 #if O_NOATIME
     case O_NOATIME:
 #endif
@@ -96,9 +99,15 @@
 #if O_NOFOLLOW
     case O_NOFOLLOW:
 #endif
+#if O_NOLINK
+    case O_NOLINK:
+#endif
 #if O_NOLINKS
     case O_NOLINKS:
 #endif
+#if O_NOTRANS
+    case O_NOTRANS:
+#endif
 #if O_RSYNC && O_RSYNC != O_DSYNC
     case O_RSYNC:
 #endif
--- a/tests/test-fdatasync.c
+++ b/tests/test-fdatasync.c
@@ -38,7 +38,7 @@
     if (fdatasync (fd) != 0)
       {
         ASSERT (errno == EINVAL /* POSIX */
-                || errno == ENOTSUP /* seen on MacOS X 10.5 */
+                || errno == ENOTSUP /* seen on Mac OS X 10.5 */
                 || errno == EBADF /* seen on AIX 7.1 */
                 || errno == EIO /* seen on mingw */
                 );
--- a/tests/test-fgetc.c
+++ b/tests/test-fgetc.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-file-has-acl.sh
+++ b/tests/test-file-has-acl.sh
@@ -111,7 +111,7 @@
           acl_flavor=aix
         else
           if (fsaclctl -v >/dev/null) 2>/dev/null; then
-            # MacOS X.
+            # Mac OS X.
             acl_flavor=macosx
           else
             if test -f /sbin/chacl; then
--- a/tests/test-filevercmp.c
+++ b/tests/test-filevercmp.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-flock.c
+++ b/tests/test-flock.c
@@ -100,7 +100,7 @@
 
 #if defined __linux__
   /* Invalid operation codes are rejected by the Linux implementation and by
-     the gnulib replacement,  but not by the MacOS X implementation.  */
+     the gnulib replacement,  but not by the Mac OS X implementation.  */
   ASSERT (flock (fd, LOCK_SH | LOCK_EX) == -1);
   ASSERT (errno == EINVAL);
   ASSERT (flock (fd, LOCK_SH | LOCK_UN) == -1);
--- a/tests/test-floor-ieee.c
+++ b/tests/test-floor-ieee.c
@@ -18,7 +18,10 @@
 
 #include <math.h>
 
+#include "isnand-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -39,5 +42,13 @@
   ASSERT (!!signbit (floor (-0.3)) == !!signbit (minus_zerod));
   ASSERT (!!signbit (floor (-0.7)) == !!signbit (minus_zerod));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnand (floor (NaNd ())));
+  /* Infinity.  */
+  ASSERT (floor (Infinityd ()) == Infinityd ());
+  ASSERT (floor (- Infinityd ()) == - Infinityd ());
+
   return 0;
 }
--- a/tests/test-floor2.c
+++ b/tests/test-floor2.c
@@ -31,6 +31,12 @@
 #include "isnand-nolibm.h"
 #include "macros.h"
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 
 /* The reference implementation, taken from lib/floor.c.  */
 
--- a/tests/test-floorf-ieee.c
+++ b/tests/test-floorf-ieee.c
@@ -18,7 +18,10 @@
 
 #include <math.h>
 
+#include "isnanf-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 /* If IEEE compliance was not requested, the ICC compiler inlines its
@@ -52,5 +55,13 @@
   ASSERT (!!signbit (my_floorf (-0.3f)) == !!signbit (minus_zerof));
   ASSERT (!!signbit (my_floorf (-0.7f)) == !!signbit (minus_zerof));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanf (floorf (NaNf ())));
+  /* Infinity.  */
+  ASSERT (floorf (Infinityf ()) == Infinityf ());
+  ASSERT (floorf (- Infinityf ()) == - Infinityf ());
+
   return 0;
 }
--- a/tests/test-floorf2.c
+++ b/tests/test-floorf2.c
@@ -31,6 +31,12 @@
 #include "isnanf-nolibm.h"
 #include "macros.h"
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 
 /* The reference implementation, taken from lib/floor.c.  */
 
--- a/tests/test-floorl-ieee.c
+++ b/tests/test-floorl-ieee.c
@@ -19,7 +19,10 @@
 #include <math.h>
 
 #include "fpucw.h"
+#include "isnanl-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -44,5 +47,13 @@
   ASSERT (!!signbit (floorl (-0.3L)) == !!signbit (minus_zerol));
   ASSERT (!!signbit (floorl (-0.7L)) == !!signbit (minus_zerol));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanl (floorl (NaNl ())));
+  /* Infinity.  */
+  ASSERT (floorl (Infinityl ()) == Infinityl ());
+  ASSERT (floorl (- Infinityl ()) == - Infinityl ());
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-fma-ieee.c
@@ -0,0 +1,43 @@
+/* Test of fma() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define FMA fma
+#include "test-fma-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fma-ieee.h
@@ -0,0 +1,72 @@
+/* Test of ldexp*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (ISNAN (FMA (NAN, L_(3.0), L_(5.0))));
+  ASSERT (ISNAN (FMA (NAN, L_(0.0), L_(5.0))));
+  ASSERT (ISNAN (FMA (L_(2.0), NAN, L_(5.0))));
+  ASSERT (ISNAN (FMA (L_(0.0), NAN, L_(5.0))));
+  ASSERT (ISNAN (FMA (NAN, NAN, L_(5.0))));
+  ASSERT (ISNAN (FMA (NAN, L_(3.0), NAN)));
+  ASSERT (ISNAN (FMA (NAN, L_(0.0), NAN)));
+  ASSERT (ISNAN (FMA (L_(2.0), NAN, NAN)));
+  ASSERT (ISNAN (FMA (L_(0.0), NAN, NAN)));
+  ASSERT (ISNAN (FMA (NAN, NAN, NAN)));
+
+  /* Infinity.  */
+  ASSERT (ISNAN (FMA (INFINITY, L_(2.0), - INFINITY)));
+  ASSERT (ISNAN (FMA (INFINITY, - L_(2.0), INFINITY)));
+  ASSERT (ISNAN (FMA (- INFINITY, L_(2.0), INFINITY)));
+  ASSERT (ISNAN (FMA (- INFINITY, - L_(2.0), - INFINITY)));
+  ASSERT (ISNAN (FMA (L_(2.0), INFINITY, - INFINITY)));
+  ASSERT (ISNAN (FMA (L_(2.0), - INFINITY, INFINITY)));
+  ASSERT (ISNAN (FMA (- L_(2.0), INFINITY, INFINITY)));
+  ASSERT (ISNAN (FMA (- L_(2.0), - INFINITY, - INFINITY)));
+
+  ASSERT (FMA (INFINITY, L_(2.0), INFINITY) == INFINITY);
+  ASSERT (FMA (INFINITY, - L_(2.0), - INFINITY) == - INFINITY);
+  ASSERT (FMA (- INFINITY, L_(2.0), - INFINITY) == - INFINITY);
+  ASSERT (FMA (- INFINITY, - L_(2.0), INFINITY) == INFINITY);
+  ASSERT (FMA (L_(2.0), INFINITY, INFINITY) == INFINITY);
+  ASSERT (FMA (L_(2.0), - INFINITY, - INFINITY) == - INFINITY);
+  ASSERT (FMA (- L_(2.0), INFINITY, - INFINITY) == - INFINITY);
+  ASSERT (FMA (- L_(2.0), - INFINITY, INFINITY) == INFINITY);
+
+  /* Infinity times zero is NaN.  */
+  ASSERT (ISNAN (FMA (INFINITY, L_(0.0), L_(7.0))));
+  ASSERT (ISNAN (FMA (INFINITY, L_(0.0), INFINITY)));
+  ASSERT (ISNAN (FMA (INFINITY, L_(0.0), NAN)));
+  ASSERT (ISNAN (FMA (- INFINITY, L_(0.0), L_(7.0))));
+  ASSERT (ISNAN (FMA (- INFINITY, L_(0.0), INFINITY)));
+  ASSERT (ISNAN (FMA (- INFINITY, L_(0.0), NAN)));
+  ASSERT (ISNAN (FMA (L_(0.0), INFINITY, L_(7.0))));
+  ASSERT (ISNAN (FMA (L_(0.0), INFINITY, INFINITY)));
+  ASSERT (ISNAN (FMA (L_(0.0), INFINITY, NAN)));
+  ASSERT (ISNAN (FMA (L_(0.0), - INFINITY, L_(7.0))));
+  ASSERT (ISNAN (FMA (L_(0.0), - INFINITY, INFINITY)));
+  ASSERT (ISNAN (FMA (L_(0.0), - INFINITY, NAN)));
+
+  /* NaN in the z argument.  */
+  ASSERT (ISNAN (FMA (L_(2.0), L_(3.0), NAN)));
+  ASSERT (ISNAN (FMA (L_(2.0), INFINITY, NAN)));
+  ASSERT (ISNAN (FMA (INFINITY, L_(3.0), NAN)));
+  ASSERT (ISNAN (FMA (INFINITY, INFINITY, NAN)));
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fmaf-ieee.c
@@ -0,0 +1,43 @@
+/* Test of fmaf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define FMA fmaf
+#include "test-fma-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fmal-ieee.c
@@ -0,0 +1,43 @@
+/* Test of fmal() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define FMA fmal
+#include "test-fma-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fmod-ieee.c
@@ -0,0 +1,45 @@
+/* Test of fmod() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define FMOD fmod
+#include "test-fmod-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fmod-ieee.h
@@ -0,0 +1,98 @@
+/* Test of fmod*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (ISNAN (FMOD (NAN, L_(2.0))));
+  ASSERT (ISNAN (FMOD (NAN, L_(0.0))));
+  ASSERT (ISNAN (FMOD (L_(2.0), NAN)));
+  ASSERT (ISNAN (FMOD (L_(0.0), NAN)));
+  ASSERT (ISNAN (FMOD (NAN, NAN)));
+
+  /* y is zero.  */
+  ASSERT (ISNAN (FMOD (L_(2.0), L_(0.0))));
+  ASSERT (ISNAN (FMOD (L_(2.0), MINUS_ZERO)));
+  ASSERT (ISNAN (FMOD (INFINITY, L_(0.0))));
+  ASSERT (ISNAN (FMOD (INFINITY, MINUS_ZERO)));
+
+  /* x is infinite.  */
+  ASSERT (ISNAN (FMOD (INFINITY, L_(2.0))));
+  ASSERT (ISNAN (FMOD (INFINITY, - L_(2.0))));
+
+  /* x is zero.  */
+  {
+    DOUBLE z = FMOD (L_(0.0), L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = FMOD (MINUS_ZERO, L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+  {
+    DOUBLE z = FMOD (L_(0.0), - L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = FMOD (MINUS_ZERO, - L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+  {
+    DOUBLE z = FMOD (L_(0.0), INFINITY);
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = FMOD (MINUS_ZERO, INFINITY);
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+  {
+    DOUBLE z = FMOD (L_(0.0), - INFINITY);
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = FMOD (MINUS_ZERO, - INFINITY);
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+
+  /* y is infinite.  */
+  {
+    DOUBLE z = FMOD (L_(2.5), INFINITY);
+    ASSERT (z == L_(2.5));
+  }
+  {
+    DOUBLE z = FMOD (L_(2.5), - INFINITY);
+    ASSERT (z == L_(2.5));
+  }
+  {
+    DOUBLE z = FMOD (- L_(2.5), INFINITY);
+    ASSERT (z == - L_(2.5));
+  }
+  {
+    DOUBLE z = FMOD (- L_(2.5), - INFINITY);
+    ASSERT (z == - L_(2.5));
+  }
+}
--- a/tests/test-fmod.c
+++ b/tests/test-fmod.c
@@ -23,11 +23,17 @@
 #include "signature.h"
 SIGNATURE_CHECK (fmod, double, (double, double));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-volatile double y;
-double z;
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MAX_EXP DBL_MAX_EXP
+#define FMOD fmod
+#define RANDOM randomd
+#include "test-fmod.h"
 
 int
 main ()
@@ -38,5 +44,7 @@
   z = fmod (x, y);
   ASSERT (z >= 2.962721817 && z <= 2.962721819);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-fmod.h
@@ -0,0 +1,123 @@
+/* Test of fmod*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static DOUBLE
+my_ldexp (DOUBLE x, int d)
+{
+  for (; d > 0; d--)
+    x *= L_(2.0);
+  for (; d < 0; d++)
+    x *= L_(0.5);
+  return x;
+}
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+    for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+        DOUBLE y = RANDOM[j]; /* 0.0 <= y < 1.0 */
+        if (y > L_(0.0))
+          {
+            DOUBLE z = FMOD (x, y);
+            ASSERT (z >= L_(0.0));
+            ASSERT (z < y);
+            z -= x - (int) (x / y) * y;
+            ASSERT (/* The common case.  */
+                    (z > - L_(16.0) / TWO_MANT_DIG
+                     && z < L_(16.0) / TWO_MANT_DIG)
+                    || /* rounding error: x / y computed too large */
+                       (z > y - L_(16.0) / TWO_MANT_DIG
+                        && z < y + L_(16.0) / TWO_MANT_DIG)
+                    || /* rounding error: x / y computed too small */
+                       (z > - y - L_(16.0) / TWO_MANT_DIG
+                        && z < - y + L_(16.0) / TWO_MANT_DIG));
+          }
+      }
+
+  for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+    for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+      {
+        DOUBLE x = L_(1.0e9) * RANDOM[i]; /* 0.0 <= x <= 10^9 */
+        DOUBLE y = RANDOM[j]; /* 0.0 <= y < 1.0 */
+        if (y > L_(0.0))
+          {
+            DOUBLE z = FMOD (x, y);
+            DOUBLE r;
+            ASSERT (z >= L_(0.0));
+            ASSERT (z < y);
+            {
+              /* Determine the quotient x / y in two steps, because it
+                 may be > 2^31.  */
+              int q1 = (int) (x / y / L_(65536.0));
+              int q2 = (int) ((x - q1 * L_(65536.0) * y) / y);
+              DOUBLE q = (DOUBLE) q1 * L_(65536.0) + (DOUBLE) q2;
+              r = x - q * y;
+            }
+            /* The absolute error of z can be up to 1e9/2^MANT_DIG.
+               The absolute error of r can also be up to 1e9/2^MANT_DIG.
+               Therefore the error of z - r can be twice as large.  */
+            z -= r;
+            ASSERT (/* The common case.  */
+                    (z > - L_(2.0) * L_(1.0e9) / TWO_MANT_DIG
+                     && z < L_(2.0) * L_(1.0e9) / TWO_MANT_DIG)
+                    || /* rounding error: x / y computed too large */
+                       (z > y - L_(2.0) * L_(1.0e9) / TWO_MANT_DIG
+                        && z < y + L_(2.0) * L_(1.0e9) / TWO_MANT_DIG)
+                    || /* rounding error: x / y computed too small */
+                       (z > - y - L_(2.0) * L_(1.0e9) / TWO_MANT_DIG
+                        && z < - y + L_(2.0) * L_(1.0e9) / TWO_MANT_DIG));
+          }
+      }
+
+  {
+    int large_exp = (MAX_EXP - 1 < 1000 ? MAX_EXP - 1 : 1000);
+    DOUBLE large = my_ldexp (L_(1.0), large_exp); /* = 2^large_exp */
+    for (i = 0; i < SIZEOF (RANDOM) / 10; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 10; j++)
+        {
+          DOUBLE x = large * RANDOM[i]; /* 0.0 <= x <= 2^large_exp */
+          DOUBLE y = RANDOM[j]; /* 0.0 <= y < 1.0 */
+          if (y > L_(0.0))
+            {
+              DOUBLE z = FMOD (x, y);
+              /* Regardless how large the rounding errors are, the result
+                 must be >= 0, < y.  */
+              ASSERT (z >= L_(0.0));
+              ASSERT (z < y);
+            }
+        }
+  }
+}
+
+volatile DOUBLE x;
+volatile DOUBLE y;
+DOUBLE z;
new file mode 100644
--- /dev/null
+++ b/tests/test-fmodf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of fmodf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define FMOD fmodf
+#include "test-fmod-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-fmodf.c
+++ b/tests/test-fmodf.c
@@ -23,11 +23,17 @@
 #include "signature.h"
 SIGNATURE_CHECK (fmodf, float, (float, float));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile float x;
-volatile float y;
-float z;
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MAX_EXP FLT_MAX_EXP
+#define FMOD fmodf
+#define RANDOM randomf
+#include "test-fmod.h"
 
 int
 main ()
@@ -38,5 +44,7 @@
   z = fmodf (x, y);
   ASSERT (z >= 2.962720f && z <= 2.962722f);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-fmodl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of fmodl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define FMOD fmodl
+#include "test-fmod-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-fmodl.c
@@ -0,0 +1,55 @@
+/* Test of fmodl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fmodl, long double, (long double, long double));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MAX_EXP LDBL_MAX_EXP
+#define FMOD fmodl
+#define RANDOM randoml
+#include "test-fmod.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 9.245907126L;
+  y = 3.141592654L;
+  z = fmodl (x, y);
+  ASSERT (z >= 2.962721817L && z <= 2.962721819L);
+
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-fputc.c
+++ b/tests/test-fputc.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-fread.c
+++ b/tests/test-fread.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
new file mode 100644
--- /dev/null
+++ b/tests/test-frexp-ieee.c
@@ -0,0 +1,45 @@
+/* Test of splitting a double into fraction and mantissa.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define FREXP frexp
+#include "test-frexp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-frexp-ieee.h
@@ -0,0 +1,61 @@
+/* Test of splitting a double into fraction and mantissa.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  {
+    int exp = -9999;
+    DOUBLE mantissa;
+    mantissa = FREXP (NAN, &exp);
+    ASSERT (ISNAN (mantissa));
+  }
+
+  /* Signed zero.  */
+  {
+    int exp = -9999;
+    DOUBLE mantissa;
+    mantissa = FREXP (L_(0.0), &exp);
+    ASSERT (mantissa == L_(0.0));
+    ASSERT (!signbit (mantissa));
+    ASSERT (exp == 0);
+  }
+  {
+    int exp = -9999;
+    DOUBLE mantissa;
+    mantissa = FREXP (MINUS_ZERO, &exp);
+    ASSERT (mantissa == L_(0.0));
+    ASSERT (!!signbit (mantissa) == !!signbit (MINUS_ZERO));
+    ASSERT (exp == 0);
+  }
+
+  /* Infinity.  */
+  {
+    int exp = -9999;
+    DOUBLE mantissa;
+    mantissa = FREXP (INFINITY, &exp);
+    ASSERT (mantissa == INFINITY);
+  }
+  {
+    int exp = -9999;
+    DOUBLE mantissa;
+    mantissa = FREXP (- INFINITY, &exp);
+    ASSERT (mantissa == - INFINITY);
+  }
+}
--- a/tests/test-frexp.c
+++ b/tests/test-frexp.c
@@ -36,162 +36,32 @@
 #undef exp
 #define exp exponent
 
-static double
-my_ldexp (double x, int d)
-{
-  for (; d > 0; d--)
-    x *= 2.0;
-  for (; d < 0; d++)
-    x *= 0.5;
-  return x;
-}
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+/* The use of 'volatile' guarantees that excess precision bits are dropped
+   when dealing with denormalized numbers.  It is necessary on x86 systems
+   where double-floats are not IEEE compliant by default, to avoid that the
+   results become platform and compiler option dependent.  'volatile' is a
+   portable alternative to gcc's -ffloat-store option.  */
+#define VOLATILE volatile
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define MAX_EXP DBL_MAX_EXP
+#define MIN_EXP DBL_MIN_EXP
+#define MIN_NORMAL_EXP DBL_MIN_EXP
+#define FREXP frexp
+#define RANDOM randomd
+#include "test-frexp.h"
 
 int
 main ()
 {
-  int i;
-  /* The use of 'volatile' guarantees that excess precision bits are dropped
-     when dealing with denormalized numbers.  It is necessary on x86 systems
-     where double-floats are not IEEE compliant by default, to avoid that the
-     results become platform and compiler option dependent.  'volatile' is a
-     portable alternative to gcc's -ffloat-store option.  */
-  volatile double x;
-
-  { /* NaN.  */
-    int exp = -9999;
-    double mantissa;
-    x = NaNd ();
-    mantissa = frexp (x, &exp);
-    ASSERT (isnand (mantissa));
-  }
-
-  { /* Positive infinity.  */
-    int exp = -9999;
-    double mantissa;
-    x = Infinityd ();
-    mantissa = frexp (x, &exp);
-    ASSERT (mantissa == x);
-  }
-
-  { /* Negative infinity.  */
-    int exp = -9999;
-    double mantissa;
-    x = - Infinityd ();
-    mantissa = frexp (x, &exp);
-    ASSERT (mantissa == x);
-  }
-
-  { /* Positive zero.  */
-    int exp = -9999;
-    double mantissa;
-    x = 0.0;
-    mantissa = frexp (x, &exp);
-    ASSERT (exp == 0);
-    ASSERT (mantissa == x);
-    ASSERT (!signbit (mantissa));
-  }
-
-  { /* Negative zero.  */
-    int exp = -9999;
-    double mantissa;
-    x = minus_zerod;
-    mantissa = frexp (x, &exp);
-    ASSERT (exp == 0);
-    ASSERT (mantissa == x);
-    ASSERT (signbit (mantissa));
-  }
-
-  for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5);
-    }
-  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5);
-    }
-  for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5);
-    }
-
-  for (i = 1, x = -1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5);
-    }
-  for (i = 1, x = -1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5);
-    }
-  for (; i >= DBL_MIN_EXP - 100 && x < 0.0; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5);
-    }
-
-  for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.505);
-    }
-  for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.505);
-    }
-  for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa >= 0.5);
-      ASSERT (mantissa < 1.0);
-      ASSERT (mantissa == my_ldexp (x, - exp));
-    }
-
-  for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.866025);
-    }
-  for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.866025);
-    }
-  for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
-    {
-      int exp = -9999;
-      double mantissa = frexp (x, &exp);
-      ASSERT (exp == i || exp == i + 1);
-      ASSERT (mantissa >= 0.5);
-      ASSERT (mantissa < 1.0);
-      ASSERT (mantissa == my_ldexp (x, - exp));
-    }
+  test_function ();
 
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-frexp.h
@@ -0,0 +1,179 @@
+/* Test of splitting a double into fraction and mantissa.
+   Copyright (C) 2012 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/>.  */
+
+static DOUBLE
+my_ldexp (DOUBLE x, int d)
+{
+  for (; d > 0; d--)
+    x *= L_(2.0);
+  for (; d < 0; d++)
+    x *= L_(0.5);
+  return x;
+}
+
+static void
+test_function (void)
+{
+  int i;
+  VOLATILE DOUBLE x;
+
+  { /* NaN.  */
+    int exp = -9999;
+    DOUBLE mantissa;
+    x = NAN;
+    mantissa = FREXP (x, &exp);
+    ASSERT (ISNAN (mantissa));
+  }
+
+  { /* Positive infinity.  */
+    int exp = -9999;
+    DOUBLE mantissa;
+    x = INFINITY;
+    mantissa = FREXP (x, &exp);
+    ASSERT (mantissa == x);
+  }
+
+  { /* Negative infinity.  */
+    int exp = -9999;
+    DOUBLE mantissa;
+    x = - INFINITY;
+    mantissa = FREXP (x, &exp);
+    ASSERT (mantissa == x);
+  }
+
+  { /* Positive zero.  */
+    int exp = -9999;
+    DOUBLE mantissa;
+    x = L_(0.0);
+    mantissa = FREXP (x, &exp);
+    ASSERT (exp == 0);
+    ASSERT (mantissa == x);
+    ASSERT (!signbit (mantissa));
+  }
+
+  { /* Negative zero.  */
+    int exp = -9999;
+    DOUBLE mantissa;
+    x = MINUS_ZERO;
+    mantissa = FREXP (x, &exp);
+    ASSERT (exp == 0);
+    ASSERT (mantissa == x);
+    ASSERT (signbit (mantissa));
+  }
+
+  for (i = 1, x = L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == L_(0.5));
+    }
+  for (i = 1, x = L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == L_(0.5));
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == L_(0.5));
+    }
+
+  for (i = 1, x = - L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == - L_(0.5));
+    }
+  for (i = 1, x = - L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == - L_(0.5));
+    }
+  for (; i >= MIN_EXP - 100 && x < L_(0.0); i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == - L_(0.5));
+    }
+
+  for (i = 1, x = L_(1.01); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == L_(0.505));
+    }
+  for (i = 1, x = L_(1.01); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == L_(0.505));
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa >= L_(0.5));
+      ASSERT (mantissa < L_(1.0));
+      ASSERT (mantissa == my_ldexp (x, - exp));
+    }
+
+  for (i = 1, x = L_(1.73205); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == L_(0.866025));
+    }
+  for (i = 1, x = L_(1.73205); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i);
+      ASSERT (mantissa == L_(0.866025));
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      int exp = -9999;
+      DOUBLE mantissa = FREXP (x, &exp);
+      ASSERT (exp == i || exp == i + 1);
+      ASSERT (mantissa >= L_(0.5));
+      ASSERT (mantissa < L_(1.0));
+      ASSERT (mantissa == my_ldexp (x, - exp));
+    }
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM); i++)
+    {
+      x = L_(20.0) * RANDOM[i] - L_(10.0); /* -10.0 <= x <= 10.0 */
+      {
+        int exp = -9999;
+        DOUBLE mantissa = FREXP (x, &exp);
+        ASSERT (x == my_ldexp (mantissa, exp));
+      }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-frexpf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of splitting a double into fraction and mantissa.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define FREXP frexpf
+#include "test-frexp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-frexpf.c
+++ b/tests/test-frexpf.c
@@ -36,157 +36,27 @@
 #undef exp
 #define exp exponent
 
-static float
-my_ldexp (float x, int d)
-{
-  for (; d > 0; d--)
-    x *= 2.0f;
-  for (; d < 0; d++)
-    x *= 0.5f;
-  return x;
-}
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define VOLATILE volatile
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define MAX_EXP FLT_MAX_EXP
+#define MIN_EXP FLT_MIN_EXP
+#define MIN_NORMAL_EXP FLT_MIN_EXP
+#define FREXP frexpf
+#define RANDOM randomf
+#include "test-frexp.h"
 
 int
 main ()
 {
-  int i;
-  volatile float x;
-
-  { /* NaN.  */
-    int exp = -9999;
-    float mantissa;
-    x = NaNf ();
-    mantissa = frexpf (x, &exp);
-    ASSERT (isnanf (mantissa));
-  }
-
-  { /* Positive infinity.  */
-    int exp = -9999;
-    float mantissa;
-    x = Infinityf ();
-    mantissa = frexpf (x, &exp);
-    ASSERT (mantissa == x);
-  }
-
-  { /* Negative infinity.  */
-    int exp = -9999;
-    float mantissa;
-    x = - Infinityf ();
-    mantissa = frexpf (x, &exp);
-    ASSERT (mantissa == x);
-  }
-
-  { /* Positive zero.  */
-    int exp = -9999;
-    float mantissa;
-    x = 0.0f;
-    mantissa = frexpf (x, &exp);
-    ASSERT (exp == 0);
-    ASSERT (mantissa == x);
-    ASSERT (!signbit (mantissa));
-  }
-
-  { /* Negative zero.  */
-    int exp = -9999;
-    float mantissa;
-    x = minus_zerof;
-    mantissa = frexpf (x, &exp);
-    ASSERT (exp == 0);
-    ASSERT (mantissa == x);
-    ASSERT (signbit (mantissa));
-  }
-
-  for (i = 1, x = 1.0f; i <= FLT_MAX_EXP; i++, x *= 2.0f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5f);
-    }
-  for (i = 1, x = 1.0f; i >= FLT_MIN_EXP; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5f);
-    }
-  for (; i >= FLT_MIN_EXP - 100 && x > 0.0f; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5f);
-    }
-
-  for (i = 1, x = -1.0f; i <= FLT_MAX_EXP; i++, x *= 2.0f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5f);
-    }
-  for (i = 1, x = -1.0f; i >= FLT_MIN_EXP; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5f);
-    }
-  for (; i >= FLT_MIN_EXP - 100 && x < 0.0f; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5f);
-    }
-
-  for (i = 1, x = 1.01f; i <= FLT_MAX_EXP; i++, x *= 2.0f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.505f);
-    }
-  for (i = 1, x = 1.01f; i >= FLT_MIN_EXP; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.505f);
-    }
-  for (; i >= FLT_MIN_EXP - 100 && x > 0.0f; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa >= 0.5f);
-      ASSERT (mantissa < 1.0f);
-      ASSERT (mantissa == my_ldexp (x, - exp));
-    }
-
-  for (i = 1, x = 1.73205f; i <= FLT_MAX_EXP; i++, x *= 2.0f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.866025f);
-    }
-  for (i = 1, x = 1.73205f; i >= FLT_MIN_EXP; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.866025f);
-    }
-  for (; i >= FLT_MIN_EXP - 100 && x > 0.0f; i--, x *= 0.5f)
-    {
-      int exp = -9999;
-      float mantissa = frexpf (x, &exp);
-      ASSERT (exp == i || exp == i + 1);
-      ASSERT (mantissa >= 0.5f);
-      ASSERT (mantissa < 1.0f);
-      ASSERT (mantissa == my_ldexp (x, - exp));
-    }
+  test_function ();
 
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-frexpl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of splitting a double into fraction and mantissa.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define FREXP frexpl
+#include "test-frexp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-frexpl.c
+++ b/tests/test-frexpl.c
@@ -37,6 +37,18 @@
 #undef exp
 #define exp exponent
 
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define VOLATILE
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define MAX_EXP LDBL_MAX_EXP
+#define MIN_EXP LDBL_MIN_EXP
 /* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
    exponent for 'long double' is -964.  Similarly, on PowerPC machines,
    LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
@@ -49,161 +61,18 @@
 #else
 # define MIN_NORMAL_EXP LDBL_MIN_EXP
 #endif
-
-static long double
-my_ldexp (long double x, int d)
-{
-  for (; d > 0; d--)
-    x *= 2.0L;
-  for (; d < 0; d++)
-    x *= 0.5L;
-  return x;
-}
+#define FREXP frexpl
+#define RANDOM randoml
+#include "test-frexp.h"
 
 int
 main ()
 {
-  int i;
-  long double x;
   DECL_LONG_DOUBLE_ROUNDING
 
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
-  { /* NaN.  */
-    int exp = -9999;
-    long double mantissa;
-    x = NaNl ();
-    mantissa = frexpl (x, &exp);
-    ASSERT (isnanl (mantissa));
-  }
-
-  { /* Positive infinity.  */
-    int exp = -9999;
-    long double mantissa;
-    x = Infinityl ();
-    mantissa = frexpl (x, &exp);
-    ASSERT (mantissa == x);
-  }
-
-  { /* Negative infinity.  */
-    int exp = -9999;
-    long double mantissa;
-    x = - Infinityl ();
-    mantissa = frexpl (x, &exp);
-    ASSERT (mantissa == x);
-  }
-
-  { /* Positive zero.  */
-    int exp = -9999;
-    long double mantissa;
-    x = 0.0L;
-    mantissa = frexpl (x, &exp);
-    ASSERT (exp == 0);
-    ASSERT (mantissa == x);
-    ASSERT (!signbit (mantissa));
-  }
-
-  { /* Negative zero.  */
-    int exp = -9999;
-    long double mantissa;
-    x = minus_zerol;
-    mantissa = frexpl (x, &exp);
-    ASSERT (exp == 0);
-    ASSERT (mantissa == x);
-    ASSERT (signbit (mantissa));
-  }
-
-  for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5L);
-    }
-  for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5L);
-    }
-  for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.5L);
-    }
-
-  for (i = 1, x = -1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5L);
-    }
-  for (i = 1, x = -1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5L);
-    }
-  for (; i >= LDBL_MIN_EXP - 100 && x < 0.0L; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == -0.5L);
-    }
-
-  for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.505L);
-    }
-  for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.505L);
-    }
-  for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa >= 0.5L);
-      ASSERT (mantissa < 1.0L);
-      ASSERT (mantissa == my_ldexp (x, - exp));
-    }
-
-  for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.866025L);
-    }
-  for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i);
-      ASSERT (mantissa == 0.866025L);
-    }
-  for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
-    {
-      int exp = -9999;
-      long double mantissa = frexpl (x, &exp);
-      ASSERT (exp == i || exp == i + 1);
-      ASSERT (mantissa >= 0.5L);
-      ASSERT (mantissa < 1.0L);
-      ASSERT (mantissa == my_ldexp (x, - exp));
-    }
+  test_function ();
 
   return 0;
 }
--- a/tests/test-fsync.c
+++ b/tests/test-fsync.c
@@ -38,7 +38,7 @@
     if (fsync (fd) != 0)
       {
         ASSERT (errno == EINVAL /* POSIX */
-                || errno == ENOTSUP /* seen on MacOS X 10.5 */
+                || errno == ENOTSUP /* seen on Mac OS X 10.5 */
                 || errno == EBADF /* seen on AIX 7.1 */
                 || errno == EIO /* seen on mingw */
                 );
--- a/tests/test-fwrite.c
+++ b/tests/test-fwrite.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-arcfour.c
+++ b/tests/test-gc-arcfour.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-arctwo.c
+++ b/tests/test-gc-arctwo.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-des.c
+++ b/tests/test-gc-des.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-hmac-md5.c
+++ b/tests/test-gc-hmac-md5.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-hmac-sha1.c
+++ b/tests/test-gc-hmac-sha1.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-md2.c
+++ b/tests/test-gc-md2.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-md4.c
+++ b/tests/test-gc-md4.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-md5.c
+++ b/tests/test-gc-md5.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-pbkdf2-sha1.c
+++ b/tests/test-gc-pbkdf2-sha1.c
@@ -12,9 +12,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson.  */
 
--- a/tests/test-gc-rijndael.c
+++ b/tests/test-gc-rijndael.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc-sha1.c
+++ b/tests/test-gc-sha1.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-gc.c
+++ b/tests/test-gc.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-get-rusage-as.c
+++ b/tests/test-get-rusage-as.c
@@ -23,6 +23,9 @@
 
 #include "macros.h"
 
+void *memchunk1;
+void *memchunk2;
+
 int
 main ()
 {
@@ -30,11 +33,11 @@
 
   value1 = get_rusage_as ();
 
-  malloc (0x88);
+  memchunk1 = malloc (0x88);
 
   value2 = get_rusage_as ();
 
-  malloc (0x281237);
+  memchunk2 = malloc (0x281237);
 
   value3 = get_rusage_as ();
 
--- a/tests/test-get-rusage-data.c
+++ b/tests/test-get-rusage-data.c
@@ -23,6 +23,9 @@
 
 #include "macros.h"
 
+void *memchunk1;
+void *memchunk2;
+
 int
 main ()
 {
@@ -30,11 +33,11 @@
 
   value1 = get_rusage_data ();
 
-  malloc (0x88);
+  memchunk1 = malloc (0x88);
 
   value2 = get_rusage_data ();
 
-  malloc (0x281237);
+  memchunk2 = malloc (0x281237);
 
   value3 = get_rusage_data ();
 
--- a/tests/test-getdelim.c
+++ b/tests/test-getdelim.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2007.  */
 
--- a/tests/test-getline.c
+++ b/tests/test-getline.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2007.  */
 
--- a/tests/test-getloadavg.c
+++ b/tests/test-getloadavg.c
@@ -60,7 +60,7 @@
       int loads = getloadavg (avg, 3);
       if (loads == -1)
         {
-          if (! (errno == ENOSYS || errno == ENOTSUP))
+          if (! (errno == ENOSYS || errno == ENOTSUP || errno == ENOENT))
             return 1;
           perror ("Skipping test; load average not supported");
           return 77;
--- a/tests/test-getlogin.c
+++ b/tests/test-getlogin.c
@@ -39,9 +39,17 @@
   buf = getlogin ();
   if (buf == NULL)
     {
+      if (errno == ENOENT)
+        {
+          /* This can happen on GNU/Linux.  */
+          fprintf (stderr, "Skipping test: no entry in utmp file.\n");
+          return 77;
+        }
+
       /* getlogin() fails when stdin is not connected to a tty.  */
       ASSERT (errno == ENOTTY
               || errno == EINVAL /* seen on Linux/SPARC */
+              || errno == ENXIO
              );
 #if !defined __hpux /* On HP-UX 11.11 it fails anyway.  */
       ASSERT (! isatty (0));
--- a/tests/test-getlogin_r.c
+++ b/tests/test-getlogin_r.c
@@ -40,9 +40,17 @@
   err = getlogin_r (buf, sizeof (buf));
   if (err != 0)
     {
+      if (errno == ENOENT)
+        {
+          /* This can happen on GNU/Linux.  */
+          fprintf (stderr, "Skipping test: no entry in utmp file.\n");
+          return 77;
+        }
+
       /* getlogin_r() fails when stdin is not connected to a tty.  */
       ASSERT (err == ENOTTY
               || errno == EINVAL /* seen on Linux/SPARC */
+              || errno == ENXIO
              );
 #if !defined __hpux /* On HP-UX 11.11 it fails anyway.  */
       ASSERT (! isatty (0));
--- a/tests/test-getndelim2.c
+++ b/tests/test-getndelim2.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2008.  */
 
--- a/tests/test-getpeername.c
+++ b/tests/test-getpeername.c
@@ -30,7 +30,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
new file mode 100644
--- /dev/null
+++ b/tests/test-getrusage.c
@@ -0,0 +1,86 @@
+/* Test of getting resource utilization.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <sys/resource.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getrusage, int, (int, struct rusage *));
+
+#include <sys/time.h>
+
+#include "macros.h"
+
+volatile unsigned int counter;
+
+int
+main (void)
+{
+  struct rusage before;
+  struct rusage after;
+  int ret;
+
+  ret = getrusage (RUSAGE_SELF, &before);
+  ASSERT (ret == 0);
+
+  /* Busy-loop for one second.  */
+  {
+    struct timeval t0;
+    ASSERT (gettimeofday (&t0, NULL) == 0);
+
+    for (;;)
+      {
+        struct timeval t;
+        int i;
+
+        for (i = 0; i < 1000000; i++)
+          counter++;
+
+        ASSERT (gettimeofday (&t, NULL) == 0);
+        if (t.tv_sec - t0.tv_sec > 1
+            || (t.tv_sec - t0.tv_sec == 1 && t.tv_usec >= t0.tv_usec))
+          break;
+      }
+  }
+
+  ret = getrusage (RUSAGE_SELF, &after);
+  ASSERT (ret == 0);
+
+  ASSERT (after.ru_utime.tv_sec >= before.ru_utime.tv_sec);
+  ASSERT (after.ru_stime.tv_sec >= before.ru_stime.tv_sec);
+  {
+    /* Compute time spent during busy-looping (in usec).  */
+    unsigned int spent_utime =
+      (after.ru_utime.tv_sec > before.ru_utime.tv_sec
+       ? (after.ru_utime.tv_sec - before.ru_utime.tv_sec - 1) * 1000000U
+         + after.ru_utime.tv_usec + (1000000U - before.ru_utime.tv_usec)
+       : after.ru_utime.tv_usec - before.ru_utime.tv_usec);
+    unsigned int spent_stime =
+      (after.ru_stime.tv_sec > before.ru_stime.tv_sec
+       ? (after.ru_stime.tv_sec - before.ru_stime.tv_sec - 1) * 1000000U
+         + after.ru_stime.tv_usec + (1000000U - before.ru_stime.tv_usec)
+       : after.ru_stime.tv_usec - before.ru_stime.tv_usec);
+
+    ASSERT (spent_utime + spent_stime <= 2 * 1000000U);
+    /* Assume that the load during this busy-looping was less than 100.  */
+    ASSERT (spent_utime + spent_stime > 10000U);
+  }
+
+  return 0;
+}
--- a/tests/test-getsockname.c
+++ b/tests/test-getsockname.c
@@ -30,7 +30,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-getsockopt.c
+++ b/tests/test-getsockopt.c
@@ -29,7 +29,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-grantpt.c
+++ b/tests/test-grantpt.c
@@ -28,22 +28,36 @@
 int
 main (void)
 {
-  /* Test behaviour for invalid file descriptors.  */
+  /* Test behaviour for invalid file descriptors.
+     These calls don't fail on OpenBSD (with gnulib's replacement) and on
+     musl libc.  */
   {
+    int ret;
+
     errno = 0;
-    ASSERT (grantpt (-1) == -1);
-    ASSERT (errno == EBADF
-            || errno == EINVAL /* seen on FreeBSD 6.4 */
-            || errno == 0 /* seen on Solaris 8 */
-           );
+    ret = grantpt (-1);
+    if (ret != 0)
+      {
+        ASSERT (ret == -1);
+        ASSERT (errno == EBADF
+                || errno == EINVAL /* seen on FreeBSD 6.4 */
+                || errno == 0 /* seen on Solaris 8 */
+               );
+      }
   }
   {
+    int ret;
+
     errno = 0;
-    ASSERT (grantpt (99) == -1);
-    ASSERT (errno == EBADF
-            || errno == EINVAL /* seen on FreeBSD 6.4 */
-            || errno == 0 /* seen on Solaris 8 */
-           );
+    ret = grantpt (99);
+    if (ret != 0)
+      {
+        ASSERT (ret == -1);
+        ASSERT (errno == EBADF
+                || errno == EINVAL /* seen on FreeBSD 6.4 */
+                || errno == 0 /* seen on Solaris 8 */
+               );
+      }
   }
 
   return 0;
new file mode 100644
--- /dev/null
+++ b/tests/test-hypot-ieee.c
@@ -0,0 +1,45 @@
+/* Test of hypot() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define HYPOT hypot
+#include "test-hypot-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-hypot-ieee.h
@@ -0,0 +1,43 @@
+/* Test of hypot*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Infinity.  */
+  ASSERT (HYPOT (INFINITY, L_(2.0)) == INFINITY);
+  ASSERT (HYPOT (- INFINITY, L_(2.0)) == INFINITY);
+  ASSERT (HYPOT (INFINITY, - L_(2.0)) == INFINITY);
+  ASSERT (HYPOT (- INFINITY, - L_(2.0)) == INFINITY);
+  ASSERT (HYPOT (L_(2.0), INFINITY) == INFINITY);
+  ASSERT (HYPOT (L_(2.0), - INFINITY) == INFINITY);
+  ASSERT (HYPOT (- L_(2.0), INFINITY) == INFINITY);
+  ASSERT (HYPOT (- L_(2.0), - INFINITY) == INFINITY);
+
+  /* Mixed Infinity and NaN.  */
+  ASSERT (HYPOT (INFINITY, NAN) == INFINITY);
+  ASSERT (HYPOT (- INFINITY, NAN) == INFINITY);
+  ASSERT (HYPOT (NAN, INFINITY) == INFINITY);
+  ASSERT (HYPOT (NAN, - INFINITY) == INFINITY);
+
+  /* NaN.  */
+  ASSERT (ISNAN (HYPOT (NAN, L_(2.0))));
+  ASSERT (ISNAN (HYPOT (NAN, - L_(2.0))));
+  ASSERT (ISNAN (HYPOT (L_(2.0), NAN)));
+  ASSERT (ISNAN (HYPOT (- L_(2.0), NAN)));
+}
--- a/tests/test-hypot.c
+++ b/tests/test-hypot.c
@@ -23,11 +23,22 @@
 #include "signature.h"
 SIGNATURE_CHECK (hypot, double, (double, double));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-volatile double y;
-double z;
+#undef MIN
+#undef MAX
+
+#define DOUBLE double
+#define HUGEVAL HUGE_VAL
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MIN DBL_MIN
+#define MAX DBL_MAX
+#define HYPOT hypot
+#define RANDOM randomd
+#include "test-hypot.h"
 
 int
 main ()
@@ -38,5 +49,7 @@
   z = hypot (x, y);
   ASSERT (z >= 0.7211102550 && z <= 0.7211102551);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-hypot.h
@@ -0,0 +1,72 @@
+/* Test of hypot*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  {
+    volatile DOUBLE x;
+    volatile DOUBLE y;
+    DOUBLE z;
+
+    /* Overflow.  */
+    x = MAX;
+    y = MAX * L_(0.5);
+    z = HYPOT (x, y);
+    ASSERT (z == HUGEVAL);
+
+    /* No underflow.  */
+    x = MIN;
+    y = L_(0.0);
+    z = HYPOT (x, y);
+    ASSERT (z == MIN);
+
+    /* No underflow.  */
+    x = MIN * L_(2.0);
+    y = MIN * L_(3.0);
+    z = HYPOT (x, y);
+    ASSERT (z >= MIN * L_(2.0) && z <= MIN * L_(4.0));
+  }
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+    for (j = 0; j < SIZEOF (RANDOM) / 5;j++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+        DOUBLE y = L_(16.0) * RANDOM[j]; /* 0.0 <= y <= 16.0 */
+        DOUBLE z = HYPOT (x, y);
+        DOUBLE err = z * z - (x * x + y * y);
+        ASSERT (z >= L_(0.0));
+        ASSERT (err >= - L_(4.0) * L_(16.0) * L_(16.0) / TWO_MANT_DIG
+                && err <= L_(4.0) * L_(16.0) * L_(16.0) / TWO_MANT_DIG);
+      }
+}
+
+volatile DOUBLE x;
+volatile DOUBLE y;
+DOUBLE z;
new file mode 100644
--- /dev/null
+++ b/tests/test-hypotf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of hypotf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define HYPOT hypotf
+#include "test-hypot-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-hypotf.c
@@ -0,0 +1,55 @@
+/* Test of hypotf() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (hypotf, float, (float, float));
+
+#include <float.h>
+
+#include "macros.h"
+
+#undef MIN
+#undef MAX
+
+#define DOUBLE float
+#define HUGEVAL HUGE_VALF
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MIN FLT_MIN
+#define MAX FLT_MAX
+#define HYPOT hypotf
+#define RANDOM randomf
+#include "test-hypot.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.4f;
+  y = 0.6f;
+  z = hypot (x, y);
+  ASSERT (z >= 0.7211102f && z <= 0.7211103f);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-hypotl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of hypotl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define HYPOT hypotl
+#include "test-hypot-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-hypotl.c
@@ -0,0 +1,60 @@
+/* Test of hypotl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (hypotl, long double, (long double, long double));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+#undef MIN
+#undef MAX
+
+#define DOUBLE long double
+#define HUGEVAL HUGE_VALL
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MIN LDBL_MIN
+#define MAX LDBL_MAX
+#define HYPOT hypotl
+#define RANDOM randoml
+#include "test-hypot.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 0.4L;
+  y = 0.6L;
+  z = hypotl (x, y);
+  ASSERT (z >= 0.7211102550L && z <= 0.7211102551L);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-ilogb.c
@@ -0,0 +1,61 @@
+/* Test of ilogb() function.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ilogb, int, (double));
+
+#include <float.h>
+#include <limits.h>
+
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+/* The use of 'volatile' guarantees that excess precision bits are dropped
+   when dealing with denormalized numbers.  It is necessary on x86 systems
+   where double-floats are not IEEE compliant by default, to avoid that the
+   results become platform and compiler option dependent.  'volatile' is a
+   portable alternative to gcc's -ffloat-store option.  */
+#define VOLATILE volatile
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define MAX_EXP DBL_MAX_EXP
+#define MIN_EXP DBL_MIN_EXP
+#define MIN_NORMAL_EXP DBL_MIN_EXP
+#define ILOGB ilogb
+#define RANDOM randomd
+#include "test-ilogb.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-ilogb.h
@@ -0,0 +1,151 @@
+/* Test of ilogb*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static DOUBLE
+my_ldexp (DOUBLE x, int d)
+{
+  for (; d > 0; d--)
+    x *= L_(2.0);
+  for (; d < 0; d++)
+    x *= L_(0.5);
+  return x;
+}
+
+static void
+test_function (void)
+{
+  int i;
+  VOLATILE DOUBLE x;
+  int y;
+
+  /* Some particular values.  */
+  x = L_(0.6);
+  y = ILOGB (x);
+  ASSERT (y == -1);
+
+  x = L_(1.2);
+  y = ILOGB (x);
+  ASSERT (y == 0);
+
+  x = L_(2.1);
+  y = ILOGB (x);
+  ASSERT (y == 1);
+
+  x = L_(3.9);
+  y = ILOGB (x);
+  ASSERT (y == 1);
+
+  x = L_(4.0);
+  y = ILOGB (x);
+  ASSERT (y == (FLT_RADIX == 2 ? 2 : 1));
+
+  x = L_(0.25);
+  y = ILOGB (x);
+  ASSERT (y == (FLT_RADIX == 2 ? -2 : -1));
+
+  /* Zero.  */
+  ASSERT (ILOGB (L_(0.0)) == FP_ILOGB0);
+  ASSERT (ILOGB (MINUS_ZERO) == FP_ILOGB0);
+
+  /* Infinity.  */
+  ASSERT (ILOGB (INFINITY) == INT_MAX);
+  ASSERT (ILOGB (- INFINITY) == INT_MAX);
+
+  /* NaN.  */
+  ASSERT (ILOGB (NAN) == FP_ILOGBNAN);
+
+  /* From here on, this test assumes FLT_RADIX == 2.  */
+
+  for (i = 1, x = L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (i = 1, x = L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+
+  for (i = 1, x = - L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (i = 1, x = - L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (; i >= MIN_EXP - 100 && x < L_(0.0); i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+
+  for (i = 1, x = L_(1.01); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (i = 1, x = L_(1.01); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+
+  for (i = 1, x = L_(1.73205); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (i = 1, x = L_(1.73205); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1);
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      y = ILOGB (x);
+      ASSERT (y == i - 1 || y == i);
+    }
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM); i++)
+    {
+      x = L_(20.0) * RANDOM[i] - L_(10.0); /* -10.0 <= x <= 10.0 */
+      if (x != L_(0.0))
+        {
+          DOUBLE abs_x = (x < L_(0.0) ? - x : x);
+          y = ILOGB (x);
+          ASSERT (abs_x >= my_ldexp (L_(1.0), y));
+          ASSERT (abs_x < my_ldexp (L_(1.0), y + 1));
+        }
+    }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-ilogbf.c
@@ -0,0 +1,56 @@
+/* Test of ilogbf() function.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ilogbf, int, (float));
+
+#include <float.h>
+#include <limits.h>
+
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define VOLATILE volatile
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define MAX_EXP FLT_MAX_EXP
+#define MIN_EXP FLT_MIN_EXP
+#define MIN_NORMAL_EXP FLT_MIN_EXP
+#define ILOGB ilogbf
+#define RANDOM randomf
+#include "test-ilogb.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-ilogbl.c
@@ -0,0 +1,67 @@
+/* Test of ilogbl() function.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ilogbl, int, (long double));
+
+#include <float.h>
+#include <limits.h>
+
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define VOLATILE
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define MAX_EXP LDBL_MAX_EXP
+#define MIN_EXP LDBL_MIN_EXP
+/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
+   exponent for 'long double' is -964.  Similarly, on PowerPC machines,
+   LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+   is -968.  For exponents below that, the precision may be truncated to the
+   precision used for 'double'.  */
+#ifdef __sgi
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
+#else
+# define MIN_NORMAL_EXP LDBL_MIN_EXP
+#endif
+#define ILOGB ilogbl
+#define RANDOM randoml
+#include "test-ilogb.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-init.sh
+++ b/tests/test-init.sh
@@ -50,20 +50,19 @@
   case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
 
   compare empty in >out 2>err && fail=1
-  # Remove the TAB-date suffix on each --- and +++ line,
-  # for both the expected and the actual output files.
-  # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ:
-  # -@@ -0,0 +1 @@
-  # +@@ -1,0 +1,1 @@
-  cat <<\EOF > exp
+  # Compare against expected output only if compare is using diff -u.
+  if grep @ out >/dev/null; then
+    # Remove the TAB-date suffix on each --- and +++ line,
+    # for both the expected and the actual output files.
+    # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ:
+    # -@@ -0,0 +1 @@
+    # +@@ -1,0 +1,1 @@
+    sed 's/	.*//;/^@@/d' out > k && mv k out
+    cat <<\EOF > exp
 --- empty
 +++ in
 +xyz
 EOF
-  sed 's/	.*//;/^@@/d' out > k && mv k out
-
-  # Compare against expected output only if compare is using diff -u.
-  if diff -u out out < /dev/null > /dev/null 2>&1; then
     compare exp out || fail=1
   fi
   case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
--- a/tests/test-isatty.c
+++ b/tests/test-isatty.c
@@ -45,14 +45,14 @@
     errno = 0;
     ASSERT (isatty (-1) == 0);
     ASSERT (errno == EBADF
-            || errno == 0 /* seen on Solaris 10 */
+            || errno == 0 /* seen on IRIX 6.5, Solaris 10 */
            );
   }
   {
     errno = 0;
     ASSERT (isatty (99) == 0);
     ASSERT (errno == EBADF
-            || errno == 0 /* seen on Solaris 10 */
+            || errno == 0 /* seen on IRIX 6.5, Solaris 10 */
            );
   }
 
--- a/tests/test-isnand-nolibm.c
+++ b/tests/test-isnand-nolibm.c
@@ -19,4 +19,3 @@
 #include "isnand-nolibm.h"
 
 #include "test-isnand.h"
-
--- a/tests/test-isnand.c
+++ b/tests/test-isnand.c
@@ -19,4 +19,3 @@
 #include <math.h>
 
 #include "test-isnand.h"
-
new file mode 100644
--- /dev/null
+++ b/tests/test-ldexp-ieee.c
@@ -0,0 +1,45 @@
+/* Test of ldexp() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define LDEXP ldexp
+#include "test-ldexp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-ldexp-ieee.h
@@ -0,0 +1,47 @@
+/* Test of ldexp*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int exp;
+
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  for (exp = -100000; exp <= 100000; exp += 100000)
+    ASSERT (ISNAN (LDEXP (NAN, exp)));
+
+  /* Signed zero.  */
+  for (exp = -100000; exp <= 100000; exp += 100000)
+    {
+      DOUBLE z = LDEXP (L_(0.0), exp);
+      ASSERT (z == L_(0.0));
+      ASSERT (!signbit (z));
+    }
+  for (exp = -100000; exp <= 100000; exp += 100000)
+    {
+      DOUBLE z = LDEXP (MINUS_ZERO, exp);
+      ASSERT (z == L_(0.0));
+      ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+    }
+
+  /* Infinity.  */
+  for (exp = -100000; exp <= 100000; exp += 100000)
+    ASSERT (LDEXP (INFINITY, exp) == INFINITY);
+  for (exp = -100000; exp <= 100000; exp += 100000)
+    ASSERT (LDEXP (- INFINITY, exp) == - INFINITY);
+}
--- a/tests/test-ldexp.c
+++ b/tests/test-ldexp.c
@@ -40,9 +40,10 @@
 #define NAN NaNd ()
 #define L_(literal) literal
 #define MINUS_ZERO minus_zerod
-#define LDEXP ldexp
 #define MIN_EXP DBL_MIN_EXP
 #define MAX_EXP DBL_MAX_EXP
+#define LDEXP ldexp
+#define RANDOM randomd
 #include "test-ldexp.h"
 
 int
--- a/tests/test-ldexp.h
+++ b/tests/test-ldexp.h
@@ -114,4 +114,17 @@
       y = LDEXP (x, 0); ASSERT (y == x);
       y = LDEXP (x, 5); ASSERT (y == x * L_(32.0));
     }
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM); i++)
+    {
+      int u, v;
+
+      x = L_(20.0) * RANDOM[i] - L_(10.0); /* -10.0 <= x <= 10.0 */
+      /* LDEXP only does rounding when it returns a denormalized number
+         or there is underflow.  It doesn't happen here.  */
+      for (u = -10; u <= 10; u++)
+        for (v = -10; v <= 10; v++)
+          ASSERT (LDEXP (x, u + v) == LDEXP (LDEXP (x, u), v));
+    }
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-ldexpf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of ldexpf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define LDEXP ldexpf
+#include "test-ldexp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-ldexpf.c
+++ b/tests/test-ldexpf.c
@@ -40,9 +40,10 @@
 #define NAN NaNf ()
 #define L_(literal) literal##f
 #define MINUS_ZERO minus_zerof
-#define LDEXP ldexpf
 #define MIN_EXP FLT_MIN_EXP
 #define MAX_EXP FLT_MAX_EXP
+#define LDEXP ldexpf
+#define RANDOM randomf
 #include "test-ldexp.h"
 
 int
new file mode 100644
--- /dev/null
+++ b/tests/test-ldexpl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of ldexpl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define LDEXP ldexpl
+#include "test-ldexp-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-ldexpl.c
+++ b/tests/test-ldexpl.c
@@ -41,9 +41,10 @@
 #define NAN NaNl ()
 #define L_(literal) literal##L
 #define MINUS_ZERO minus_zerol
-#define LDEXP ldexpl
 #define MIN_EXP LDBL_MIN_EXP
 #define MAX_EXP LDBL_MAX_EXP
+#define LDEXP ldexpl
+#define RANDOM randoml
 #include "test-ldexp.h"
 
 int
--- a/tests/test-listen.c
+++ b/tests/test-listen.c
@@ -29,7 +29,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-locale.c
+++ b/tests/test-locale.c
@@ -38,6 +38,10 @@
 locale_t b = LC_GLOBAL_LOCALE;
 #endif
 
+/* Check that the 'struct lconv' type is defined.  */
+struct lconv l;
+int ls;
+
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
 verify (sizeof NULL == sizeof (void *));
@@ -45,5 +49,31 @@
 int
 main ()
 {
+  /* Check that 'struct lconv' has the ISO C and POSIX specified members.  */
+  ls += sizeof (*l.decimal_point);
+  ls += sizeof (*l.thousands_sep);
+  ls += sizeof (*l.grouping);
+  ls += sizeof (*l.mon_decimal_point);
+  ls += sizeof (*l.mon_thousands_sep);
+  ls += sizeof (*l.mon_grouping);
+  ls += sizeof (*l.positive_sign);
+  ls += sizeof (*l.negative_sign);
+  ls += sizeof (*l.currency_symbol);
+  ls += sizeof (l.frac_digits);
+  ls += sizeof (l.p_cs_precedes);
+  ls += sizeof (l.p_sign_posn);
+  ls += sizeof (l.p_sep_by_space);
+  ls += sizeof (l.n_cs_precedes);
+  ls += sizeof (l.n_sign_posn);
+  ls += sizeof (l.n_sep_by_space);
+  ls += sizeof (*l.int_curr_symbol);
+  ls += sizeof (l.int_frac_digits);
+  ls += sizeof (l.int_p_cs_precedes);
+  ls += sizeof (l.int_p_sign_posn);
+  ls += sizeof (l.int_p_sep_by_space);
+  ls += sizeof (l.int_n_cs_precedes);
+  ls += sizeof (l.int_n_sign_posn);
+  ls += sizeof (l.int_n_sep_by_space);
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-localeconv.c
@@ -0,0 +1,72 @@
+/* Test of localeconv() function.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <locale.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (localeconv, struct lconv *, (void));
+
+#include <limits.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* Test localeconv() result in the "C" locale.  */
+  {
+    struct lconv *l = localeconv ();
+
+    ASSERT (STREQ (l->decimal_point, "."));
+    ASSERT (STREQ (l->thousands_sep, ""));
+#if !(defined __FreeBSD__ || defined __sun)
+    ASSERT (STREQ (l->grouping, ""));
+#endif
+
+    ASSERT (STREQ (l->mon_decimal_point, ""));
+    ASSERT (STREQ (l->mon_thousands_sep, ""));
+#if !(defined __FreeBSD__ || defined __sun)
+    ASSERT (STREQ (l->mon_grouping, ""));
+#endif
+    ASSERT (STREQ (l->positive_sign, ""));
+    ASSERT (STREQ (l->negative_sign, ""));
+
+    ASSERT (STREQ (l->currency_symbol, ""));
+    ASSERT (l->frac_digits == CHAR_MAX);
+    ASSERT (l->p_cs_precedes == CHAR_MAX);
+    ASSERT (l->p_sign_posn == CHAR_MAX);
+    ASSERT (l->p_sep_by_space == CHAR_MAX);
+    ASSERT (l->n_cs_precedes == CHAR_MAX);
+    ASSERT (l->n_sign_posn == CHAR_MAX);
+    ASSERT (l->n_sep_by_space == CHAR_MAX);
+
+    ASSERT (STREQ (l->int_curr_symbol, ""));
+    ASSERT (l->int_frac_digits == CHAR_MAX);
+    ASSERT (l->int_p_cs_precedes == CHAR_MAX);
+    ASSERT (l->int_p_sign_posn == CHAR_MAX);
+    ASSERT (l->int_p_sep_by_space == CHAR_MAX);
+    ASSERT (l->int_n_cs_precedes == CHAR_MAX);
+    ASSERT (l->int_n_sign_posn == CHAR_MAX);
+    ASSERT (l->int_n_sep_by_space == CHAR_MAX);
+  }
+
+  return 0;
+}
--- a/tests/test-localename.c
+++ b/tests/test-localename.c
@@ -715,7 +715,7 @@
 
   ASSERT (name != NULL);
 
-  /* Only MacOS X and Windows have a facility for the user to set the default
+  /* Only Mac OS X and Windows have a facility for the user to set the default
      locale.  */
 #if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__))
   ASSERT (strcmp (name, "C") == 0);
--- a/tests/test-lock.c
+++ b/tests/test-lock.c
@@ -495,7 +495,7 @@
   for (repeat = 0; repeat <= REPEAT_COUNT; repeat++)
     {
       /* Wait until every thread is ready.  */
-      dbgprintf ("Main thread before synchonizing for round %d\n", repeat);
+      dbgprintf ("Main thread before synchronizing for round %d\n", repeat);
       for (;;)
         {
           int ready_count = 0;
@@ -509,7 +509,7 @@
             break;
           yield ();
         }
-      dbgprintf ("Main thread after  synchonizing for round %d\n", repeat);
+      dbgprintf ("Main thread after  synchronizing for round %d\n", repeat);
 
       if (repeat > 0)
         {
new file mode 100644
--- /dev/null
+++ b/tests/test-log-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define LOG log
+#include "test-log-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log-ieee.h
@@ -0,0 +1,40 @@
+/* Test of log*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Negative arguments.  */
+  ASSERT (ISNAN (LOG (- L_(0.00001))));
+  ASSERT (ISNAN (LOG (- L_(1.0))));
+  ASSERT (ISNAN (LOG (- L_(1000000.0))));
+  ASSERT (ISNAN (LOG (- INFINITY)));
+
+  /* NaN.  */
+  ASSERT (ISNAN (LOG (NAN)));
+
+  /* Only rational value.  */
+  {
+    DOUBLE z = LOG (L_(1.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+
+  /* Infinity.  */
+  ASSERT (LOG (INFINITY) == INFINITY);
+}
--- a/tests/test-log.c
+++ b/tests/test-log.c
@@ -23,10 +23,19 @@
 #include "signature.h"
 SIGNATURE_CHECK (log, double, (double));
 
+#include <float.h>
+
+#include "minus-zero.h"
 #include "macros.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+#define HUGEVAL HUGE_VAL
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MINUS_ZERO minus_zerod
+#define LOG log
+#define RANDOM randomd
+#include "test-log.h"
 
 int
 main ()
@@ -36,5 +45,7 @@
   y = log (x);
   ASSERT (y >= -0.5108256238 && y <= -0.5108256237);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-log.h
@@ -0,0 +1,104 @@
+/* Test of log*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Pole.  */
+  {
+    DOUBLE z = LOG (L_(0.0));
+    ASSERT (z == - HUGEVAL);
+  }
+  {
+    DOUBLE z = LOG (MINUS_ZERO);
+    ASSERT (z == - HUGEVAL);
+  }
+
+  /* Randomized tests.  */
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in logl.c to
+          53 bits of precision.  */
+       L_(40.0)
+#else
+       L_(3.0)
+#endif
+       : L_(3.0));
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i] + L_(1.0); /* 1.0 <= x <= 17.0 */
+        DOUBLE y = LOG (x);
+        DOUBLE z = LOG (L_(1.0) / x);
+        DOUBLE err = y + z;
+        ASSERT (y >= L_(0.0));
+        ASSERT (z <= L_(0.0));
+        ASSERT (err > - err_bound / TWO_MANT_DIG
+                && err < err_bound / TWO_MANT_DIG);
+      }
+  }
+
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in logl.c to
+          53 bits of precision.  */
+       L_(85.0)
+#else
+       L_(7.0)
+#endif
+       : L_(7.0));
+
+    for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+        {
+          DOUBLE x = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[i]) - L_(1.0);
+          DOUBLE y = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[j]) - L_(1.0);
+          /* 1/16 <= x,y <= 16 */
+          DOUBLE z = L_(1.0) / (x * y);
+          /* Approximately  x * y * z = 1.  */
+          DOUBLE err = LOG (x) + LOG (y) + LOG (z);
+          ASSERT (err > - err_bound / TWO_MANT_DIG
+                  && err < err_bound / TWO_MANT_DIG);
+        }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-log10-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log10() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define LOG10 log10
+#include "test-log10-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log10-ieee.h
@@ -0,0 +1,40 @@
+/* Test of log10*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Negative arguments.  */
+  ASSERT (ISNAN (LOG10 (- L_(0.00001))));
+  ASSERT (ISNAN (LOG10 (- L_(1.0))));
+  ASSERT (ISNAN (LOG10 (- L_(1000000.0))));
+  ASSERT (ISNAN (LOG10 (- INFINITY)));
+
+  /* NaN.  */
+  ASSERT (ISNAN (LOG10 (NAN)));
+
+  /* Only rational value.  */
+  {
+    DOUBLE z = LOG10 (L_(1.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+
+  /* Infinity.  */
+  ASSERT (LOG10 (INFINITY) == INFINITY);
+}
--- a/tests/test-log10.c
+++ b/tests/test-log10.c
@@ -23,10 +23,19 @@
 #include "signature.h"
 SIGNATURE_CHECK (log10, double, (double));
 
+#include <float.h>
+
+#include "minus-zero.h"
 #include "macros.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+#define HUGEVAL HUGE_VAL
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MINUS_ZERO minus_zerod
+#define LOG10 log10
+#define RANDOM randomd
+#include "test-log10.h"
 
 int
 main ()
@@ -36,5 +45,7 @@
   y = log10 (x);
   ASSERT (y >= -0.2218487497 && y <= -0.2218487496);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-log10.h
@@ -0,0 +1,104 @@
+/* Test of log10*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Pole.  */
+  {
+    DOUBLE z = LOG10 (L_(0.0));
+    ASSERT (z == - HUGEVAL);
+  }
+  {
+    DOUBLE z = LOG10 (MINUS_ZERO);
+    ASSERT (z == - HUGEVAL);
+  }
+
+  /* Randomized tests.  */
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in log10l.c to
+          53 bits of precision.  */
+       L_(18.0)
+#else
+       L_(3.0)
+#endif
+       : L_(3.0));
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i] + L_(1.0); /* 1.0 <= x <= 17.0 */
+        DOUBLE y = LOG10 (x);
+        DOUBLE z = LOG10 (L_(1.0) / x);
+        DOUBLE err = y + z;
+        ASSERT (y >= L_(0.0));
+        ASSERT (z <= L_(0.0));
+        ASSERT (err > - err_bound / TWO_MANT_DIG
+                && err < err_bound / TWO_MANT_DIG);
+      }
+  }
+
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in log10l.c to
+          53 bits of precision.  */
+       L_(38.0)
+#else
+       L_(5.0)
+#endif
+       : L_(5.0));
+
+    for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+        {
+          DOUBLE x = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[i]) - L_(1.0);
+          DOUBLE y = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[j]) - L_(1.0);
+          /* 1/16 <= x,y <= 16 */
+          DOUBLE z = L_(1.0) / (x * y);
+          /* Approximately  x * y * z = 1.  */
+          DOUBLE err = LOG10 (x) + LOG10 (y) + LOG10 (z);
+          ASSERT (err > - err_bound / TWO_MANT_DIG
+                  && err < err_bound / TWO_MANT_DIG);
+        }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-log10f-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log10f() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define LOG10 log10f
+#include "test-log10-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-log10f.c
+++ b/tests/test-log10f.c
@@ -23,10 +23,19 @@
 #include "signature.h"
 SIGNATURE_CHECK (log10f, float, (float));
 
+#include <float.h>
+
+#include "minus-zero.h"
 #include "macros.h"
 
-volatile float x;
-float y;
+#define DOUBLE float
+#define HUGEVAL HUGE_VALF
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MINUS_ZERO minus_zerof
+#define LOG10 log10f
+#define RANDOM randomf
+#include "test-log10.h"
 
 int
 main ()
@@ -36,5 +45,7 @@
   y = log10f (x);
   ASSERT (y >= -0.2218488f && y <= -0.2218487f);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-log10l-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log10l() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define LOG10 log10l
+#include "test-log10-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log10l.c
@@ -0,0 +1,56 @@
+/* Test of log10l() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (log10l, long double, (long double));
+
+#include <float.h>
+
+#include "minus-zero.h"
+#include "fpucw.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define HUGEVAL HUGE_VALL
+#define MANT_DIG LDBL_MANT_DIG
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define LOG10 log10l
+#define RANDOM randoml
+#include "test-log10.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 0.6L;
+  y = log10l (x);
+  ASSERT (y >= -0.2218487497L && y <= -0.2218487496L);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log1p-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log1p() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define LOG1P log1p
+#include "test-log1p-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log1p-ieee.h
@@ -0,0 +1,45 @@
+/* Test of log1p*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Negative arguments.  */
+  ASSERT (ISNAN (LOG1P (- L_(1.00001))));
+  ASSERT (ISNAN (LOG1P (- L_(2.0))));
+  ASSERT (ISNAN (LOG1P (- L_(1000000.0))));
+  ASSERT (ISNAN (LOG1P (- INFINITY)));
+
+  /* NaN.  */
+  ASSERT (ISNAN (LOG1P (NAN)));
+
+  /* Only rational value.  */
+  {
+    DOUBLE z = LOG1P (L_(0.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = LOG1P (MINUS_ZERO);
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+
+  /* Infinity.  */
+  ASSERT (LOG1P (INFINITY) == INFINITY);
+}
--- a/tests/test-log1p.c
+++ b/tests/test-log1p.c
@@ -23,10 +23,17 @@
 #include "signature.h"
 SIGNATURE_CHECK (log1p, double, (double));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+#define HUGEVAL HUGE_VAL
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define LOG1P log1p
+#define RANDOM randomd
+#include "test-log1p.h"
 
 int
 main ()
@@ -36,5 +43,7 @@
   y = log1p (x);
   ASSERT (y >= 0.4700036292 && y <= 0.4700036293);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-log1p.h
@@ -0,0 +1,100 @@
+/* Test of log1p*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Pole.  */
+  {
+    DOUBLE z = LOG1P (L_(-1.0));
+    ASSERT (z == - HUGEVAL);
+  }
+
+  /* Randomized tests.  */
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in log1pl.c to
+          53 bits of precision.  */
+       L_(900.0)
+#else
+       L_(26.0)
+#endif
+       : L_(13.0));
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+        DOUBLE y = LOG1P (x);
+        DOUBLE z = LOG1P (- x / (L_(1.0) + x));
+        DOUBLE err = y + z;
+        ASSERT (y >= L_(0.0));
+        ASSERT (z <= L_(0.0));
+        ASSERT (err > - err_bound / TWO_MANT_DIG
+                && err < err_bound / TWO_MANT_DIG);
+      }
+  }
+
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in log1pl.c to
+          53 bits of precision.  */
+       L_(1020.0)
+#else
+       L_(65.0)
+#endif
+       : L_(61.0));
+
+    for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+        {
+          DOUBLE x = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[i]) - L_(2.0);
+          DOUBLE y = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[j]) - L_(2.0);
+          /* -15/16 <= x,y <= 15 */
+          DOUBLE z = L_(1.0) / ((L_(1.0) + x) * (L_(1.0) + y)) - L_(1.0);
+          /* Approximately  (1+x) * (1+y) * (1+z) = 1.  */
+          DOUBLE err = LOG1P (x) + LOG1P (y) + LOG1P (z);
+          ASSERT (err > - err_bound / TWO_MANT_DIG
+                  && err < err_bound / TWO_MANT_DIG);
+        }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-log1pf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log1pf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define LOG1P log1pf
+#include "test-log1p-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log1pf.c
@@ -0,0 +1,49 @@
+/* Test of log1pf() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (log1pf, float, (float));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE float
+#define HUGEVAL HUGE_VALF
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define LOG1P log1pf
+#define RANDOM randomf
+#include "test-log1p.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6f;
+  y = log1pf (x);
+  ASSERT (y >= 0.4700036f && y <= 0.4700037f);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log1pl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log1pl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define LOG1P log1pl
+#include "test-log1p-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log1pl.c
@@ -0,0 +1,54 @@
+/* Test of log1pl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (log1pl, long double, (long double));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define HUGEVAL HUGE_VALL
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define LOG1P log1pl
+#define RANDOM randoml
+#include "test-log1p.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 0.6L;
+  y = log1pl (x);
+  ASSERT (y >= 0.4700036292L && y <= 0.4700036293L);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log2-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log2() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define LOG2 log2
+#include "test-log2-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log2-ieee.h
@@ -0,0 +1,40 @@
+/* Test of log2*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Negative arguments.  */
+  ASSERT (ISNAN (LOG2 (- L_(0.00001))));
+  ASSERT (ISNAN (LOG2 (- L_(1.0))));
+  ASSERT (ISNAN (LOG2 (- L_(1000000.0))));
+  ASSERT (ISNAN (LOG2 (- INFINITY)));
+
+  /* NaN.  */
+  ASSERT (ISNAN (LOG2 (NAN)));
+
+  /* Only rational value.  */
+  {
+    DOUBLE z = LOG2 (L_(1.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+
+  /* Infinity.  */
+  ASSERT (LOG2 (INFINITY) == INFINITY);
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log2.c
@@ -0,0 +1,53 @@
+/* Test of log2() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (log2, double, (double));
+
+#include <float.h>
+
+#include "minus-zero.h"
+#include "macros.h"
+
+#define DOUBLE double
+#define HUGEVAL HUGE_VAL
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MAX_EXP DBL_MAX_EXP
+#define MIN_EXP DBL_MIN_EXP
+#define MINUS_ZERO minus_zerod
+#define LOG2 log2
+#define RANDOM randomd
+#include "test-log2.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6;
+  y = log2 (x);
+  ASSERT (y >= -0.7369655942 && y <= -0.7369655941);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log2.h
@@ -0,0 +1,131 @@
+/* Test of log2*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Pole.  */
+  ASSERT (LOG2 (L_(0.0)) == - HUGEVAL);
+  ASSERT (LOG2 (MINUS_ZERO) == - HUGEVAL);
+
+  /* Integral values.  */
+  {
+    DOUBLE x = L_(1.0);
+    DOUBLE y = LOG2 (x);
+    ASSERT (y == L_(0.0));
+  }
+  {
+    int e;
+    DOUBLE x;
+    DOUBLE y;
+    for (e = 0, x = L_(0.0), y = L_(1.0);
+         e <= MAX_EXP - 1;
+         e++, x = x + L_(1.0), y = y * L_(2.0))
+      {
+        /* Invariant: x = e, y = 2^e.  */
+        DOUBLE z = LOG2 (y);
+        ASSERT (z == x);
+      }
+  }
+  {
+    int e;
+    DOUBLE x;
+    DOUBLE y;
+    for (e = 0, x = L_(0.0), y = L_(1.0);
+         e >= MIN_EXP - 1;
+         e--, x = x - L_(1.0), y = y * L_(0.5))
+      {
+        /* Invariant: x = e, y = 2^e.  */
+        DOUBLE z = LOG2 (y);
+        ASSERT (z == x);
+      }
+  }
+
+  /* Randomized tests.  */
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in log2l.c to
+          53 bits of precision.  */
+       L_(8193.0)
+#else
+       L_(5.0)
+#endif
+       : L_(5.0));
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i] + L_(1.0); /* 1.0 <= x <= 17.0 */
+        DOUBLE y = LOG2 (x);
+        DOUBLE z = LOG2 (L_(1.0) / x);
+        DOUBLE err = y + z;
+        ASSERT (y >= L_(0.0));
+        ASSERT (z <= L_(0.0));
+        ASSERT (err > - err_bound / TWO_MANT_DIG
+                && err < err_bound / TWO_MANT_DIG);
+      }
+  }
+
+  {
+    /* Error bound, in ulps.  */
+    const DOUBLE err_bound =
+      (sizeof (DOUBLE) > sizeof (double) ?
+#if defined __i386__ && defined __FreeBSD__
+       /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+          precision in the compiler but 64 bits of precision at runtime.  See
+          <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.
+          The compiler has truncated all 'long double' literals in log2l.c to
+          53 bits of precision.  */
+       L_(8193.0)
+#else
+       L_(9.0)
+#endif
+       : L_(9.0));
+
+    for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+        {
+          DOUBLE x = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[i]) - L_(1.0);
+          DOUBLE y = L_(17.0) / (L_(16.0) - L_(15.0) * RANDOM[j]) - L_(1.0);
+          /* 1/16 <= x,y <= 16 */
+          DOUBLE z = L_(1.0) / (x * y);
+          /* Approximately  x * y * z = 1.  */
+          DOUBLE err = LOG2 (x) + LOG2 (y) + LOG2 (z);
+          ASSERT (err > - err_bound / TWO_MANT_DIG
+                  && err < err_bound / TWO_MANT_DIG);
+        }
+  }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-log2f-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log2f() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define LOG2 log2f
+#include "test-log2-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log2f.c
@@ -0,0 +1,53 @@
+/* Test of log2f() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (log2f, float, (float));
+
+#include <float.h>
+
+#include "minus-zero.h"
+#include "macros.h"
+
+#define DOUBLE float
+#define HUGEVAL HUGE_VALF
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MAX_EXP FLT_MAX_EXP
+#define MIN_EXP FLT_MIN_EXP
+#define MINUS_ZERO minus_zerof
+#define LOG2 log2f
+#define RANDOM randomf
+#include "test-log2.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 0.6f;
+  y = log2f (x);
+  ASSERT (y >= -0.73697f && y <= -0.73696f);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log2l-ieee.c
@@ -0,0 +1,45 @@
+/* Test of log2l() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define LOG2 log2l
+#include "test-log2-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-log2l.c
@@ -0,0 +1,58 @@
+/* Test of log2l() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (log2l, long double, (long double));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "minus-zero.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define HUGEVAL HUGE_VALL
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MAX_EXP LDBL_MAX_EXP
+#define MIN_EXP LDBL_MIN_EXP
+#define MINUS_ZERO minus_zerol
+#define LOG2 log2l
+#define RANDOM randoml
+#include "test-log2.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 0.6L;
+  y = log2l (x);
+  ASSERT (y >= -0.7369655942L && y <= -0.7369655941L);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-logb-ieee.c
@@ -0,0 +1,45 @@
+/* Test of logb() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define LOGB logb
+#include "test-logb-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-logb-ieee.h
@@ -0,0 +1,28 @@
+/* Test of log1b*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (ISNAN (LOGB (NAN)));
+
+  /* Infinity.  */
+  ASSERT (LOGB (INFINITY) == INFINITY);
+  ASSERT (LOGB (- INFINITY) == INFINITY);
+}
--- a/tests/test-logb.c
+++ b/tests/test-logb.c
@@ -25,38 +25,30 @@
 
 #include <float.h>
 
+#include "minus-zero.h"
 #include "macros.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+/* The use of 'volatile' guarantees that excess precision bits are dropped
+   when dealing with denormalized numbers.  It is necessary on x86 systems
+   where double-floats are not IEEE compliant by default, to avoid that the
+   results become platform and compiler option dependent.  'volatile' is a
+   portable alternative to gcc's -ffloat-store option.  */
+#define VOLATILE volatile
+#define HUGEVAL HUGE_VAL
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define MAX_EXP DBL_MAX_EXP
+#define MIN_EXP DBL_MIN_EXP
+#define MIN_NORMAL_EXP DBL_MIN_EXP
+#define LOGB logb
+#define RANDOM randomd
+#include "test-logb.h"
 
 int
 main ()
 {
-  /* Some particular values.  */
-  x = 0.6;
-  y = logb (x);
-  ASSERT (y == -1.0);
-
-  x = 1.2;
-  y = logb (x);
-  ASSERT (y == 0.0);
-
-  x = 2.1;
-  y = logb (x);
-  ASSERT (y == 1.0);
-
-  x = 3.9;
-  y = logb (x);
-  ASSERT (y == 1.0);
-
-  x = 4.0;
-  y = logb (x);
-  ASSERT (y == (FLT_RADIX == 2 ? 2.0 : 1.0));
-
-  x = 0.25;
-  y = logb (x);
-  ASSERT (y == (FLT_RADIX == 2 ? -2.0 : -1.0));
+  test_function ();
 
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-logb.h
@@ -0,0 +1,145 @@
+/* Test of logb*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static DOUBLE
+my_ldexp (DOUBLE x, int d)
+{
+  for (; d > 0; d--)
+    x *= L_(2.0);
+  for (; d < 0; d++)
+    x *= L_(0.5);
+  return x;
+}
+
+static void
+test_function (void)
+{
+  int i;
+  VOLATILE DOUBLE x;
+  DOUBLE y;
+
+  /* Some particular values.  */
+  x = L_(0.6);
+  y = LOGB (x);
+  ASSERT (y == - L_(1.0));
+
+  x = L_(1.2);
+  y = LOGB (x);
+  ASSERT (y == L_(0.0));
+
+  x = L_(2.1);
+  y = LOGB (x);
+  ASSERT (y == L_(1.0));
+
+  x = L_(3.9);
+  y = LOGB (x);
+  ASSERT (y == L_(1.0));
+
+  x = L_(4.0);
+  y = LOGB (x);
+  ASSERT (y == (FLT_RADIX == 2 ? L_(2.0) : L_(1.0)));
+
+  x = L_(0.25);
+  y = LOGB (x);
+  ASSERT (y == (FLT_RADIX == 2 ? - L_(2.0) : - L_(1.0)));
+
+  /* Zero.  */
+  ASSERT (LOGB (L_(0.0)) == - HUGEVAL);
+  ASSERT (LOGB (MINUS_ZERO) == - HUGEVAL);
+
+  /* From here on, this test assumes FLT_RADIX == 2.  */
+
+  for (i = 1, x = L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (i = 1, x = L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+
+  for (i = 1, x = - L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (i = 1, x = - L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (; i >= MIN_EXP - 100 && x < L_(0.0); i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+
+  for (i = 1, x = L_(1.01); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (i = 1, x = L_(1.01); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+
+  for (i = 1, x = L_(1.73205); i <= MAX_EXP; i++, x *= L_(2.0))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (i = 1, x = L_(1.73205); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1));
+    }
+  for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+    {
+      y = LOGB (x);
+      ASSERT (y == (DOUBLE)(i - 1) || y == (DOUBLE)i);
+    }
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM); i++)
+    {
+      x = L_(20.0) * RANDOM[i] - L_(10.0); /* -10.0 <= x <= 10.0 */
+      if (x != L_(0.0))
+        {
+          DOUBLE abs_x = (x < L_(0.0) ? - x : x);
+          y = LOGB (x);
+          ASSERT (y == (DOUBLE) (int) y);
+          ASSERT (abs_x >= my_ldexp (L_(1.0), (int) y));
+          ASSERT (abs_x < my_ldexp (L_(1.0), (int) y + 1));
+        }
+    }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-logbf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of logbf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define LOGB logbf
+#include "test-logb-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-logbf.c
@@ -0,0 +1,49 @@
+/* Test of logbf() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (logbf, float, (float));
+
+#include <float.h>
+
+#include "minus-zero.h"
+#include "macros.h"
+
+#define DOUBLE float
+#define VOLATILE volatile
+#define HUGEVAL HUGE_VALF
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define MAX_EXP FLT_MAX_EXP
+#define MIN_EXP FLT_MIN_EXP
+#define MIN_NORMAL_EXP FLT_MIN_EXP
+#define LOGB logbf
+#define RANDOM randomf
+#include "test-logb.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-logbl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of logbl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define LOGB logbl
+#include "test-logb-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-logbl.c
@@ -0,0 +1,60 @@
+/* Test of logbl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (logbl, long double, (long double));
+
+#include <float.h>
+
+#include "minus-zero.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define VOLATILE
+#define HUGEVAL HUGE_VALL
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define MAX_EXP LDBL_MAX_EXP
+#define MIN_EXP LDBL_MIN_EXP
+/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
+   exponent for 'long double' is -964.  Similarly, on PowerPC machines,
+   LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+   is -968.  For exponents below that, the precision may be truncated to the
+   precision used for 'double'.  */
+#ifdef __sgi
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
+#else
+# define MIN_NORMAL_EXP LDBL_MIN_EXP
+#endif
+#define LOGB logbl
+#define RANDOM randoml
+#include "test-logb.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-logf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of logf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define LOG logf
+#include "test-log-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-logf.c
+++ b/tests/test-logf.c
@@ -23,10 +23,19 @@
 #include "signature.h"
 SIGNATURE_CHECK (logf, float, (float));
 
+#include <float.h>
+
+#include "minus-zero.h"
 #include "macros.h"
 
-volatile float x;
-float y;
+#define DOUBLE float
+#define HUGEVAL HUGE_VALF
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MINUS_ZERO minus_zerof
+#define LOG logf
+#define RANDOM randomf
+#include "test-log.h"
 
 int
 main ()
@@ -36,5 +45,7 @@
   y = logf (x);
   ASSERT (y >= -0.5108257f && y <= -0.5108256f);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-logl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of logl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define LOG logl
+#include "test-log-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-logl.c
+++ b/tests/test-logl.c
@@ -23,11 +23,20 @@
 #include "signature.h"
 SIGNATURE_CHECK (logl, long double, (long double));
 
+#include <float.h>
+
 #include "fpucw.h"
+#include "minus-zero.h"
 #include "macros.h"
 
-volatile long double x;
-long double y;
+#define DOUBLE long double
+#define HUGEVAL HUGE_VALL
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MINUS_ZERO minus_zerol
+#define LOG logl
+#define RANDOM randoml
+#include "test-log.h"
 
 int
 main ()
@@ -41,5 +50,7 @@
   y = logl (x);
   ASSERT (y >= -0.5108256238L && y <= -0.5108256237L);
 
+  test_function ();
+
   return 0;
 }
--- a/tests/test-malloca.c
+++ b/tests/test-malloca.c
@@ -45,7 +45,7 @@
     {
       /* Try various values.
          n = 0 gave a crash on Alpha with gcc-2.5.8.
-         Some versions of MacOS X have a stack size limit of 512 KB.  */
+         Some versions of Mac OS X have a stack size limit of 512 KB.  */
       func (34);
       func (134);
       func (399);
--- a/tests/test-math-c++.cc
+++ b/tests/test-math-c++.cc
@@ -68,7 +68,15 @@
 #endif
 //SIGNATURE_CHECK (GNULIB_NAMESPACE::atan2, double, (double, double));
 
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrt, double, (double));
+#if GNULIB_TEST_CBRTF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrtf, float, (float));
+#endif
+#if GNULIB_TEST_CBRT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrt, double, (double));
+#endif
+#if GNULIB_TEST_CBRTL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrtl, long double, (long double));
+#endif
 
 #if GNULIB_TEST_CEILF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::ceilf, float, (float));
@@ -116,10 +124,33 @@
 SIGNATURE_CHECK (GNULIB_NAMESPACE::expl, long double, (long double));
 #endif
 
+#if GNULIB_TEST_EXP2F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::exp2f, float, (float));
+#endif
+#if GNULIB_TEST_EXP2
+SIGNATURE_CHECK (GNULIB_NAMESPACE::exp2, double, (double));
+#endif
+#if GNULIB_TEST_EXP2L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::exp2l, long double, (long double));
+#endif
+
+#if GNULIB_TEST_EXPM1F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::expm1f, float, (float));
+#endif
+#if GNULIB_TEST_EXPM1
+SIGNATURE_CHECK (GNULIB_NAMESPACE::expm1, double, (double));
+#endif
+#if GNULIB_TEST_EXPM1L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::expm1l, long double, (long double));
+#endif
+
 #if GNULIB_TEST_FABSF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::fabsf, float, (float));
 #endif
 //SIGNATURE_CHECK (GNULIB_NAMESPACE::fabs, double, (double));
+#if GNULIB_TEST_FABSL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fabsl, long double, (long double));
+#endif
 
 #if GNULIB_TEST_FLOORF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::floorf, float, (float));
@@ -134,7 +165,13 @@
 #if GNULIB_TEST_FMODF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::fmodf, float, (float, float));
 #endif
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::fmod, double, (double, double));
+#if GNULIB_TEST_FMOD
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fmod, double, (double, double));
+#endif
+#if GNULIB_TEST_FMODL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fmodl, long double,
+                 (long double, long double));
+#endif
 
 #if GNULIB_TEST_FREXPF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::frexpf, float, (float, int *));
@@ -146,7 +183,26 @@
 SIGNATURE_CHECK (GNULIB_NAMESPACE::frexpl, long double, (long double, int *));
 #endif
 
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::hypot, double, (double, double));
+#if GNULIB_TEST_HYPOTF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::hypotf, float, (float, float));
+#endif
+#if GNULIB_TEST_HYPOT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::hypot, double, (double, double));
+#endif
+#if GNULIB_TEST_HYPOTL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::hypotl, long double,
+                 (long double, long double));
+#endif
+
+#if GNULIB_TEST_ILOGBF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ilogbf, int, (float));
+#endif
+#if GNULIB_TEST_ILOGB
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ilogb, int, (double));
+#endif
+#if GNULIB_TEST_ILOGBL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ilogbl, int, (long double));
+#endif
 
 //SIGNATURE_CHECK (GNULIB_NAMESPACE::j0, double, (double));
 
@@ -164,16 +220,29 @@
 
 //SIGNATURE_CHECK (GNULIB_NAMESPACE::lgamma, double, (double));
 
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::log10, double, (double));
+#if GNULIB_TEST_LOG10
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log10, double, (double));
+#endif
+#if GNULIB_TEST_LOG10L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log10l, long double, (long double));
+#endif
 
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::log1p, double, (double));
-
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::logb, double, (double));
+#if GNULIB_TEST_LOG1PF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log1pf, float, (float));
+#endif
+#if GNULIB_TEST_LOG1P
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log1p, double, (double));
+#endif
+#if GNULIB_TEST_LOG1PL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log1pl, long double, (long double));
+#endif
 
 #if GNULIB_TEST_LOGF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::logf, float, (float));
 #endif
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::log, double, (double));
+#if GNULIB_TEST_LOG
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log, double, (double));
+#endif
 #if GNULIB_TEST_LOGL
 SIGNATURE_CHECK (GNULIB_NAMESPACE::logl, long double, (long double));
 #endif
@@ -182,10 +251,36 @@
 SIGNATURE_CHECK (GNULIB_NAMESPACE::log10f, float, (float));
 #endif
 
+#if GNULIB_TEST_LOG2F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log2f, float, (float));
+#endif
+#if GNULIB_TEST_LOG2
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log2, double, (double));
+#endif
+#if GNULIB_TEST_LOG2L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log2l, long double, (long double));
+#endif
+
+#if GNULIB_TEST_LOGBF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logbf, float, (float));
+#endif
+#if GNULIB_TEST_LOGB
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logb, double, (double));
+#endif
+#if GNULIB_TEST_LOGBL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logbl, long double, (long double));
+#endif
+
 #if GNULIB_TEST_MODFF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::modff, float, (float, float *));
 #endif
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::modf, double, (double, double *));
+#if GNULIB_TEST_MODF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::modf, double, (double, double *));
+#endif
+#if GNULIB_TEST_MODFL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::modfl, long double,
+                 (long double, long double *));
+#endif
 
 //SIGNATURE_CHECK (GNULIB_NAMESPACE::nextafter, double, (double, double));
 
@@ -194,7 +289,16 @@
 #endif
 //SIGNATURE_CHECK (GNULIB_NAMESPACE::pow, double, (double, double));
 
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::remainder, double, (double, double));
+#if GNULIB_TEST_REMAINDERF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::remainderf, float, (float, float));
+#endif
+#if GNULIB_TEST_REMAINDER
+SIGNATURE_CHECK (GNULIB_NAMESPACE::remainder, double, (double, double));
+#endif
+#if GNULIB_TEST_REMAINDERL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::remainderl, long double,
+                 (long double, long double));
+#endif
 
 #if GNULIB_TEST_RINTF
 SIGNATURE_CHECK (GNULIB_NAMESPACE::rintf, float, (float));
--- a/tests/test-math.c
+++ b/tests/test-math.c
@@ -25,6 +25,35 @@
 choke me
 #endif
 
+#ifndef HUGE_VALF
+# error HUGE_VALF should be defined
+choke me
+#endif
+
+#ifndef HUGE_VAL
+# error HUGE_VAL should be defined
+choke me
+#endif
+
+#ifndef HUGE_VALL
+# error HUGE_VALL should be defined
+choke me
+#endif
+
+#ifndef FP_ILOGB0
+# error FP_ILOGB0 should be defined
+choke me
+#endif
+
+#ifndef FP_ILOGBNAN
+# error FP_ILOGBNAN should be defined
+choke me
+#endif
+
+#include <limits.h>
+
+#include "macros.h"
+
 #if 0
 /* Check that NAN expands into a constant expression.  */
 static float n = NAN;
@@ -34,7 +63,17 @@
    This is a separate function because IRIX 6.5 "cc -O" miscompiles an
    'x == x' test.  */
 static int
-numeric_equal (double x, double y)
+numeric_equalf (float x, float y)
+{
+  return x == y;
+}
+static int
+numeric_equald (double x, double y)
+{
+  return x == y;
+}
+static int
+numeric_equall (long double x, long double y)
 {
   return x == y;
 }
@@ -44,10 +83,22 @@
 {
   double d = NAN;
   double zero = 0.0;
-  if (numeric_equal (d, d))
-    return 1;
+  ASSERT (!numeric_equald (d, d));
+
   d = HUGE_VAL;
-  if (!numeric_equal (d, 1.0 / zero))
-    return 1;
+  ASSERT (numeric_equald (d, 1.0 / zero));
+
+  ASSERT (numeric_equalf (HUGE_VALF, HUGE_VALF + HUGE_VALF));
+
+  ASSERT (numeric_equald (HUGE_VAL, HUGE_VAL + HUGE_VAL));
+
+  ASSERT (numeric_equall (HUGE_VALL, HUGE_VALL + HUGE_VALL));
+
+  /* Check the value of FP_ILOGB0.  */
+  ASSERT (FP_ILOGB0 == INT_MIN || FP_ILOGB0 == - INT_MAX);
+
+  /* Check the value of FP_ILOGBNAN.  */
+  ASSERT (FP_ILOGBNAN == INT_MIN || FP_ILOGBNAN == INT_MAX);
+
   return 0;
 }
--- a/tests/test-md2.c
+++ b/tests/test-md2.c
@@ -12,9 +12,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson. */
 
--- a/tests/test-md4.c
+++ b/tests/test-md4.c
@@ -13,9 +13,7 @@
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.  */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson. */
 
new file mode 100644
--- /dev/null
+++ b/tests/test-modf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of modf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define MODF modf
+#include "test-modf-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-modf-ieee.h
@@ -0,0 +1,45 @@
+/* Test of modf*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  {
+    DOUBLE integer_part = -9999;
+    DOUBLE fractional_part = MODF (NAN, &integer_part);
+    ASSERT (ISNAN (integer_part));
+    ASSERT (ISNAN (fractional_part));
+  }
+
+  /* Infinity.  */
+  {
+    DOUBLE integer_part = -9999;
+    DOUBLE fractional_part = MODF (INFINITY, &integer_part);
+    ASSERT (integer_part == INFINITY);
+    ASSERT (fractional_part == L_(0.0));
+    ASSERT (!signbit (fractional_part));
+  }
+  {
+    DOUBLE integer_part = -9999;
+    DOUBLE fractional_part = MODF (- INFINITY, &integer_part);
+    ASSERT (integer_part == - INFINITY);
+    ASSERT (fractional_part == L_(0.0));
+    ASSERT (!!signbit (fractional_part) == !!signbit (MINUS_ZERO));
+  }
+}
--- a/tests/test-modf.c
+++ b/tests/test-modf.c
@@ -23,11 +23,16 @@
 #include "signature.h"
 SIGNATURE_CHECK (modf, double, (double, double *));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-double y;
-double z;
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MODF modf
+#define RANDOM randomd
+#include "test-modf.h"
 
 int
 main ()
@@ -44,5 +49,7 @@
   ASSERT (y >= -0.972406761 && y <= -0.972406759);
   ASSERT (z == -5.0);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-modf.h
@@ -0,0 +1,62 @@
+/* Test of modf*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM); i++)
+    {
+      DOUBLE x = RANDOM[i]; /* 0.0 <= x < 1.0 */
+      DOUBLE y;
+      DOUBLE z;
+
+      y = MODF (x, &z);
+      ASSERT (z == L_(0.0));
+      ASSERT (y == x);
+
+      y = MODF (- x, &z);
+      ASSERT (z == L_(0.0));
+      ASSERT (y == - x);
+
+      y = MODF (L_(1.0) + x, &z);
+      ASSERT (z == L_(1.0));
+      y -= x;
+      ASSERT (y >= - L_(1.0) / TWO_MANT_DIG);
+      ASSERT (y <= L_(1.0) / TWO_MANT_DIG);
+
+      y = MODF (- L_(1.0) - x, &z);
+      ASSERT (z == - L_(1.0));
+      y -= - x;
+      ASSERT (y >= - L_(1.0) / TWO_MANT_DIG);
+      ASSERT (y <= L_(1.0) / TWO_MANT_DIG);
+    }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
+DOUBLE z;
new file mode 100644
--- /dev/null
+++ b/tests/test-modff-ieee.c
@@ -0,0 +1,45 @@
+/* Test of modff() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define MODF modff
+#include "test-modf-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-modff.c
+++ b/tests/test-modff.c
@@ -23,11 +23,16 @@
 #include "signature.h"
 SIGNATURE_CHECK (modff, float, (float, float *));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile float x;
-float y;
-float z;
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MODF modff
+#define RANDOM randomf
+#include "test-modf.h"
 
 int
 main ()
@@ -44,5 +49,7 @@
   ASSERT (y >= -0.972408f && y <= -0.972406f);
   ASSERT (z == -5.0f);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-modfl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of modfl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define MODF modfl
+#include "test-modf-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-modfl.c
@@ -0,0 +1,60 @@
+/* Test of modfl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (modfl, long double, (long double, long double *));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MODF modfl
+#define RANDOM randoml
+#include "test-modf.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular positive value.  */
+  x = 5.972406760L;
+  y = modfl (x, &z);
+  ASSERT (y >= 0.972406759L && y <= 0.972406761L);
+  ASSERT (z == 5.0);
+
+  /* A particular negative value.  */
+  x = -5.972406760L;
+  y = modfl (x, &z);
+  ASSERT (y >= -0.972406761L && y <= -0.972406759L);
+  ASSERT (z == -5.0L);
+
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-nanosleep.c
+++ b/tests/test-nanosleep.c
@@ -27,7 +27,6 @@
 #include <signal.h>
 #include <unistd.h>
 
-#include "intprops.h"
 #include "macros.h"
 
 #if HAVE_DECL_ALARM
--- a/tests/test-net_if.c
+++ b/tests/test-net_if.c
@@ -20,11 +20,17 @@
 
 #include <net/if.h>
 
-#include "signature.h"
+static struct if_nameindex ni;
+
+/* We do not yet have replacements for if_* functions on systems that
+   lack a native <net/if.h>.  */
+#if HAVE_NET_IF_H
+# include "signature.h"
 SIGNATURE_CHECK (if_freenameindex, void, (struct if_nameindex *));
 SIGNATURE_CHECK (if_indextoname, char *, (unsigned int, char *));
 SIGNATURE_CHECK (if_nameindex, struct if_nameindex *, (void));
 SIGNATURE_CHECK (if_nametoindex, unsigned int, (const char *));
+#endif
 
 #include <stddef.h> /* NULL */
 #include <stdio.h> /* fprintf */
@@ -32,6 +38,7 @@
 int
 main (int argc, char *argv[])
 {
+#if HAVE_NET_IF_H
   struct if_nameindex *ifnp, *p;
 
   p = ifnp = if_nameindex ();
@@ -80,6 +87,7 @@
     }
 
   if_freenameindex (ifnp);
+#endif /* HAVE_NET_IF_H */
 
-  return 0;
+  return !IF_NAMESIZE + ni.if_index + !!ni.if_name;
 }
--- a/tests/test-nonblocking-pipe-main.c
+++ b/tests/test-nonblocking-pipe-main.c
@@ -32,6 +32,7 @@
 
 #include "nonblocking.h"
 #include "wait-process.h"
+#include "progname.h"
 
 #include "macros.h"
 #include "test-nonblocking-pipe.h"
@@ -41,12 +42,17 @@
 int
 main (int argc, char *argv[])
 {
-  const char *child_path = argv[1];
-  int test = atoi (argv[2]);
+  const char *child_path;
+  int test;
   int fd[2];
   int child;
   int exitcode;
 
+  set_program_name (argv[0]);
+
+  child_path = argv[1];
+  test = atoi (argv[2]);
+
   /* Create a pipe.  */
   ASSERT (pipe (fd) >= 0);
 
--- a/tests/test-nonblocking-pipe.h
+++ b/tests/test-nonblocking-pipe.h
@@ -24,7 +24,7 @@
      Linux/SPARC                     >= 126977
      Linux/IA-64, Linux/MIPS         >= 253953
      Linux/PPC64                     >= 1048576
-     FreeBSD, OpenBSD, MacOS X       >= 65537
+     FreeBSD, OpenBSD, Mac OS X      >= 65537
      AIX                             >= 32769
      HP-UX                           >= 8193
      IRIX                            >= 10241
--- a/tests/test-nonblocking-socket-main.c
+++ b/tests/test-nonblocking-socket-main.c
@@ -33,6 +33,7 @@
 
 #include "nonblocking.h"
 #include "wait-process.h"
+#include "progname.h"
 
 #include "macros.h"
 #include "socket-server.h"
@@ -43,14 +44,19 @@
 int
 main (int argc, char *argv[])
 {
-  const char *child_path = argv[1];
-  int test = atoi (argv[2]);
+  const char *child_path;
+  int test;
   int server;
   int port;
   int child;
   int server_socket;
   int exitcode;
 
+  set_program_name (argv[0]);
+
+  child_path = argv[1];
+  test = atoi (argv[2]);
+
   /* Create a server socket.  */
   server = create_server (0, 1, &port);
 
--- a/tests/test-nonblocking-socket.h
+++ b/tests/test-nonblocking-socket.h
@@ -23,7 +23,7 @@
      Linux                           >= 7350000 (depends on circumstances)
      FreeBSD                         >= 107521
      OpenBSD                         >= 28673
-     MacOS X                         >= 680000 (depends on circumstances)
+     Mac OS X                        >= 680000 (depends on circumstances)
      AIX 5.1                         >= 125713
      AIX 7.1                         >= 200000 (depends on circumstances)
      HP-UX                           >= 114689
@@ -44,7 +44,7 @@
 # define SOCKET_DATA_BLOCK_SIZE 1000000
 #endif
 
-/* On Linux, MacOS X, Cygwin 1.5.x, native Windows,
+/* On Linux, Mac OS X, Cygwin 1.5.x, native Windows,
    sockets have very large buffers in the kernel, so that write() calls
    succeed before the reader has started reading, even if fd is blocking
    and the amount of data is larger than 1 MB.  */
--- a/tests/test-openpty.c
+++ b/tests/test-openpty.c
@@ -48,7 +48,7 @@
     }
 
     /* Set the terminal characteristics.
-       On Linux or MacOS X, they can be set on either the master or the slave;
+       On Linux or Mac OS X, they can be set on either the master or the slave;
        the effect is the same.  But on Solaris, they have to be set on the
        master; tcgetattr on the slave fails.  */
     {
@@ -101,7 +101,7 @@
     }
 
     /* Close the master side before the slave side gets closed.
-       This is necessary on MacOS X 10.4.11.  */
+       This is necessary on Mac OS X 10.4.11.  */
     close (master);
   }
 
--- a/tests/test-parse-datetime.c
+++ b/tests/test-parse-datetime.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson <simon@josefsson.org>, 2008.  */
 
@@ -124,6 +123,12 @@
 
   set_program_name (argv[0]);
 
+  /* Set the time zone to US Eastern time with the 2012 rules.  This
+     should disable any leap second support.  Otherwise, there will be
+     a problem with glibc on sites that default to leap seconds; see
+     <http://bugs.gnu.org/12206>.  */
+  setenv ("TZ", "EST5EDT,M3.2.0,M11.1.0", 1);
+
   gmtoff = gmt_offset (ref_time);
 
 
@@ -410,5 +415,9 @@
   ASSERT (result.tv_sec == 24 * 3600
           && result.tv_nsec == now.tv_nsec);
 
+  /* Exercise a sign-extension bug.  Before July 2012, an input
+     starting with a high-bit-set byte would be treated like "0".  */
+  ASSERT ( ! parse_datetime (&result, "\xb0", &now));
+
   return 0;
 }
--- a/tests/test-parse-duration.sh
+++ b/tests/test-parse-duration.sh
@@ -50,14 +50,14 @@
 tmpf="${tmp}/tests.txt"
 
 cat > "${tmpf}" <<- _EOF_
-  1 Y 2 M 3 W 4 d 5 h 6 m 7 s
-  P 00010225 T 05:06:07
-  P 1Y2M3W4D T 5H6M7S
-  1 Y 2 M 25 D 5:6:7
-  1 Y 2 M 25 d 5h 6:7
-  1 Y 2 M 25 d 5h 6m 7
-  P 1-2-25 T 5:6:7
-  _EOF_
+	1 Y 2 M 3 W 4 d 5 h 6 m 7 s
+	P 00010225 T 05:06:07
+	P 1Y2M3W4D T 5H6M7S
+	1 Y 2 M 25 D 5:6:7
+	1 Y 2 M 25 d 5h 6:7
+	1 Y 2 M 25 d 5h 6m 7
+	P 1-2-25 T 5:6:7
+	_EOF_
 
 exec 3< "${tmpf}"
 while read line <&3
--- a/tests/test-perror.c
+++ b/tests/test-perror.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-perror2.c
+++ b/tests/test-perror2.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-pipe-filter-gi1.c
+++ b/tests/test-pipe-filter-gi1.c
@@ -26,8 +26,9 @@
 #include "macros.h"
 
 
-/* Pipe a text file through 'tr "[a-z]" "[A-Z]"', which converts ASCII
-   characters from lower case to upper case.  */
+/* Pipe a text file through 'LC_ALL=C tr "[a-z]" "[A-Z]"', or equivalently,
+   'tr "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"', which
+   converts ASCII characters from lower case to upper case.  */
 
 struct locals
 {
@@ -96,8 +97,8 @@
     l.nread = 0;
 
     argv[0] = tr_program;
-    argv[1] = "[a-z]";
-    argv[2] = "[A-Z]";
+    argv[1] = "abcdefghijklmnopqrstuvwxyz";
+    argv[2] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     argv[3] = NULL;
 
     f = pipe_filter_gi_create ("tr", tr_program, argv, false, true,
--- a/tests/test-pipe-filter-ii1.c
+++ b/tests/test-pipe-filter-ii1.c
@@ -26,8 +26,9 @@
 #include "macros.h"
 
 
-/* Pipe a text file through 'tr "[a-z]" "[A-Z]"', which converts ASCII
-   characters from lower case to upper case.  */
+/* Pipe a text file through 'LC_ALL=C tr "[a-z]" "[A-Z]"', or equivalently,
+   'tr "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"', which
+   converts ASCII characters from lower case to upper case.  */
 
 struct locals
 {
@@ -119,8 +120,8 @@
     l.nread = 0;
 
     argv[0] = tr_program;
-    argv[1] = "[a-z]";
-    argv[2] = "[A-Z]";
+    argv[1] = "abcdefghijklmnopqrstuvwxyz";
+    argv[2] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     argv[3] = NULL;
 
     result = pipe_filter_ii_execute ("tr", tr_program, argv, false, true,
--- a/tests/test-pipe.c
+++ b/tests/test-pipe.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-pipe2.c
+++ b/tests/test-pipe2.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-poll.c
+++ b/tests/test-poll.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini.  */
 
@@ -36,6 +35,8 @@
 #include <sys/ioctl.h>
 #include <errno.h>
 
+#include "macros.h"
+
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 # define WINDOWS_NATIVE
 #endif
@@ -95,6 +96,9 @@
 
   s = socket (AF_INET, SOCK_STREAM, 0);
 
+  x = 1;
+  setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
+
   memset (&ia, 0, sizeof (ia));
   ia.sin_family = AF_INET;
   inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr);
@@ -105,9 +109,6 @@
       exit (77);
     }
 
-  x = 1;
-  setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
-
   if (listen (s, 1) < 0)
     {
       perror ("listen");
@@ -261,9 +262,10 @@
     {
       addrlen = sizeof (ia);
       c = accept (s, (struct sockaddr *) &ia, &addrlen);
+      ASSERT (c >= 0);
       close (s);
-      write (c, "foo", 3);
-      read (c, buf, 3);
+      ASSERT (write (c, "foo", 3) == 3);
+      ASSERT (read (c, buf, 3) == 3);
       shutdown (c, SHUT_RD);
       close (c);
       exit (0);
@@ -272,15 +274,16 @@
     {
       close (s);
       c = connect_to_socket (true);
+      ASSERT (c >= 0);
       if (poll1_nowait (c, POLLOUT | POLLWRNORM | POLLRDBAND)
           != (POLLOUT | POLLWRNORM))
         failed ("cannot write after blocking connect");
-      write (c, "foo", 3);
+      ASSERT (write (c, "foo", 3) == 3);
       wait (&pid);
       if (poll1_wait (c, POLLIN) != POLLIN)
         failed ("cannot read data left in the socket by closed process");
-      read (c, buf, 3);
-      write (c, "foo", 3);
+      ASSERT (read (c, buf, 3) == 3);
+      ASSERT (write (c, "foo", 3) == 3);
       if ((poll1_wait (c, POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0)
         failed ("expecting POLLHUP after shutdown");
       close (c);
@@ -304,7 +307,7 @@
       != POLLWRNORM)
     failed ("expecting POLLWRNORM before writing");
 
-  write (wd, "foo", 3);
+  ASSERT (write (wd, "foo", 3) == 3);
   if (poll1_wait (rd, POLLIN | POLLRDNORM) != (POLLIN | POLLRDNORM))
     failed ("expecting POLLIN | POLLRDNORM after writing");
   if (poll1_nowait (rd, POLLIN) != POLLIN)
@@ -312,7 +315,7 @@
   if (poll1_nowait (rd, POLLRDNORM) != POLLRDNORM)
     failed ("expecting POLLRDNORM after writing");
 
-  read (rd, buf, 3);
+  ASSERT (read (rd, buf, 3) == 3);
 }
 
 
@@ -327,12 +330,15 @@
   int s = open_server_socket ();
   int c1 = connect_to_socket (false);
   int c2 = accept (s, (struct sockaddr *) &ia, &addrlen);
+  ASSERT (s >= 0);
+  ASSERT (c1 >= 0);
+  ASSERT (c2 >= 0);
 
   close (s);
 
   test_pair (c1, c2);
   close (c1);
-  write (c2, "foo", 3);
+  ASSERT (write (c2, "foo", 3) == 3);
   if ((poll1_nowait (c2, POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0)
     failed ("expecting POLLHUP after shutdown");
 
@@ -347,7 +353,7 @@
 {
   int fd[2];
 
-  pipe (fd);
+  ASSERT (pipe (fd) >= 0);
   test_pair (fd[0], fd[1]);
   close (fd[0]);
   if ((poll1_wait (fd[1], POLLIN | POLLOUT) & (POLLHUP | POLLERR)) == 0)
--- a/tests/test-posix_openpt.c
+++ b/tests/test-posix_openpt.c
@@ -68,7 +68,7 @@
   ASSERT (isatty (slave));
 
   /* Close the master side before the slave side gets closed.
-     This is necessary on MacOS X 10.4.11.  */
+     This is necessary on Mac OS X 10.4.11.  */
   ASSERT (close (master) == 0);
   ASSERT (close (slave) == 0);
 
--- a/tests/test-posix_spawn1.c
+++ b/tests/test-posix_spawn1.c
@@ -75,7 +75,7 @@
 int
 main ()
 {
-  char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+  char *argv[3] = { (char *) "/bin/sh", (char *) CHILD_PROGRAM_FILENAME, NULL };
   int ifd[2];
   sigset_t blocked_signals;
   sigset_t fatal_signal_set;
--- a/tests/test-posix_spawn2.c
+++ b/tests/test-posix_spawn2.c
@@ -53,7 +53,7 @@
 int
 main ()
 {
-  char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+  char *argv[3] = { (char *) "/bin/sh", (char *) CHILD_PROGRAM_FILENAME, NULL };
   int ofd[2];
   sigset_t blocked_signals;
   sigset_t fatal_signal_set;
--- a/tests/test-posixtm.c
+++ b/tests/test-posixtm.c
@@ -34,7 +34,7 @@
   char const *in;
   unsigned int syntax_bits;
   bool valid;
-  int64_t t_expected;
+  int_least64_t t_expected;
 };
 
 /* Test mainly with syntax_bits == 13
@@ -49,12 +49,17 @@
     /* These two tests fail on 64-bit Solaris up through at least
        Solaris 10, which is off by one day for time stamps before
        0001-01-01 00:00:00 UTC.  */
-    { "000001010000.00", 13, 1, -62167219200}, /* Sat Jan  1 00:00:00 0    */
-    { "000012312359.59", 13, 1, -62135596801}, /* Fri Dec 31 23:59:59 0    */
+    { "000001010000.00", 13, 1,
+                      - INT64_C (62167219200)},/* Sat Jan  1 00:00:00 0    */
+    { "000012312359.59", 13, 1,
+                      - INT64_C (62135596801)},/* Fri Dec 31 23:59:59 0    */
 
-    { "000101010000.00", 13, 1, -62135596800}, /* Sat Jan  1 00:00:00 1    */
-    { "190112132045.51", 13, 1,  -2147483649}, /* Fri Dec 13 20:45:51 1901 */
-    { "190112132045.52", 13, 1,  -2147483648}, /* Fri Dec 13 20:45:52 1901 */
+    { "000101010000.00", 13, 1,
+                      - INT64_C (62135596800)},/* Sat Jan  1 00:00:00 1    */
+    { "190112132045.51", 13, 1,
+                       - INT64_C (2147483649)},/* Fri Dec 13 20:45:51 1901 */
+    { "190112132045.52", 13, 1,
+                       - INT64_C (2147483648)},/* Fri Dec 13 20:45:52 1901 */
     { "190112132045.53", 13, 1,  -2147483647}, /* Fri Dec 13 20:45:53 1901 */
     { "190112132046.52", 13, 1,  -2147483588}, /* Fri Dec 13 20:46:52 1901 */
     { "190112132145.52", 13, 1,  -2147480048}, /* Fri Dec 13 21:45:52 1901 */
@@ -77,15 +82,18 @@
     { "197013010000.00", 13, 0,            0}, /* -- */
     { "203801190314.06", 13, 1,   2147483646}, /* Tue Jan 19 03:14:06 2038 */
     { "203801190314.07", 13, 1,   2147483647}, /* Tue Jan 19 03:14:07 2038 */
-    { "203801190314.08", 13, 1,   2147483648}, /* Tue Jan 19 03:14:08 2038 */
-    { "999912312359.59", 13, 1, 253402300799}, /* Fri Dec 31 23:59:59 9999 */
+    { "203801190314.08", 13, 1,
+                       INT64_C (  2147483648)},/* Tue Jan 19 03:14:08 2038 */
+    { "999912312359.59", 13, 1,
+                       INT64_C (253402300799)},/* Fri Dec 31 23:59:59 9999 */
     { "1112131415",      13, 1,   1323785700}, /* Tue Dec 13 14:15:00 2011 */
     { "1112131415.16",   13, 1,   1323785716}, /* Tue Dec 13 14:15:16 2011 */
     { "201112131415.16", 13, 1,   1323785716}, /* Tue Dec 13 14:15:16 2011 */
     { "191112131415.16", 13, 1,  -1831974284}, /* Wed Dec 13 14:15:16 1911 */
     { "203712131415.16", 13, 1,   2144326516}, /* Sun Dec 13 14:15:16 2037 */
     { "3712131415.16",   13, 1,   2144326516}, /* Sun Dec 13 14:15:16 2037 */
-    { "6812131415.16",   13, 1,   3122633716}, /* Thu Dec 13 14:15:16 2068 */
+    { "6812131415.16",   13, 1,
+                       INT64_C (  3122633716)},/* Thu Dec 13 14:15:16 2068 */
     { "6912131415.16",   13, 1,     -1590284}, /* Sat Dec 13 14:15:16 1969 */
     { "7012131415.16",   13, 1,     29945716}, /* Sun Dec 13 14:15:16 1970 */
     { "1213141599",       2, 1,    945094500}, /* Mon Dec 13 14:15:00 1999 */
--- a/tests/test-ptsname.c
+++ b/tests/test-ptsname.c
@@ -21,6 +21,7 @@
 #include "signature.h"
 SIGNATURE_CHECK (ptsname, char *, (int));
 
+#include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <stdio.h>
@@ -63,6 +64,17 @@
 #endif
 
   {
+    char *result;
+
+    errno = 0;
+    result = ptsname (-1);
+    ASSERT (result == NULL);
+    ASSERT (errno == EBADF
+            || errno == ENOTTY /* seen on glibc */
+           );
+  }
+
+  {
     int fd;
     char *result;
 
@@ -109,7 +121,7 @@
 
 #else
 
-  /* Try various master names of MacOS X: /dev/pty[p-w][0-9a-f]  */
+  /* Try various master names of Mac OS X: /dev/pty[p-w][0-9a-f]  */
   {
     int char1;
     int char2;
--- a/tests/test-ptsname_r.c
+++ b/tests/test-ptsname_r.c
@@ -151,7 +151,7 @@
     char buffer[256];
     int result;
 
-    /* Open the controlling tty of the current process.  */
+    /* Open a pty master.  */
     fd = open ("/dev/ptmx", O_RDWR | O_NOCTTY);
     if (fd < 0)
       {
@@ -168,9 +168,35 @@
     close (fd);
   }
 
+#elif defined _AIX
+  /* AIX has BSD-style /dev/ptyp[0-9a-f] files, but the modern way to open
+     a pty is to go through /dev/ptc.  */
+  {
+    int fd;
+    char buffer[256];
+    int result;
+
+    /* Open a pty master.  */
+    fd = open ("/dev/ptc", O_RDWR | O_NOCTTY);
+    if (fd < 0)
+      {
+        fprintf (stderr, "Skipping test: cannot open pseudo-terminal\n");
+        return 77;
+      }
+
+    result = ptsname_r (fd, buffer, sizeof buffer);
+    ASSERT (result == 0);
+    ASSERT (memcmp (buffer, "/dev/pts/", 9) == 0);
+
+    test_errors (fd, buffer);
+
+    /* This call hangs on AIX.  */
+    close (fd);
+  }
+
 #else
 
-  /* Try various master names of MacOS X: /dev/pty[p-w][0-9a-f]  */
+  /* Try various master names of Mac OS X: /dev/pty[p-w][0-9a-f]  */
   {
     int char1;
     int char2;
@@ -196,6 +222,7 @@
 
               test_errors (fd, buffer);
 
+              /* This call hangs on AIX.  */
               close (fd);
             }
         }
--- a/tests/test-quotearg-simple.c
+++ b/tests/test-quotearg-simple.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2008.  */
 
@@ -27,6 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "localcharset.h"
 #include "progname.h"
 #include "macros.h"
 
@@ -245,12 +245,20 @@
   for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
     {
       set_quoting_style (NULL, (enum quoting_style) i);
-      compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only);
-      compare_strings (use_quotearg, &results_g[i].group2, ascii_only);
-      if (i == c_quoting_style)
-        compare_strings (use_quote_double_quotes, &results_g[i].group2,
-                         ascii_only);
-      compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only);
+      if (!(i == locale_quoting_style || i == clocale_quoting_style)
+          || (strcmp (locale_charset (), "ASCII") == 0
+              || strcmp (locale_charset (), "ANSI_X3.4-1968") == 0))
+        {
+          compare_strings (use_quotearg_buffer, &results_g[i].group1,
+                           ascii_only);
+          compare_strings (use_quotearg, &results_g[i].group2,
+                           ascii_only);
+          if (i == c_quoting_style)
+            compare_strings (use_quote_double_quotes, &results_g[i].group2,
+                             ascii_only);
+          compare_strings (use_quotearg_colon, &results_g[i].group3,
+                           ascii_only);
+        }
     }
 
   set_quoting_style (NULL, literal_quoting_style);
--- a/tests/test-quotearg.c
+++ b/tests/test-quotearg.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2008.  */
 
--- a/tests/test-quotearg.h
+++ b/tests/test-quotearg.h
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2008.  */
 
--- a/tests/test-raise.c
+++ b/tests/test-raise.c
@@ -39,7 +39,6 @@
 {
   /* Test behaviour for invalid argument.  */
   ASSERT (raise (-1) != 0);
-  ASSERT (raise (199) != 0);
 
   /* Test behaviour for SIGINT.  */
   ASSERT (signal (SIGINT, handler) != SIG_ERR);
new file mode 100644
--- /dev/null
+++ b/tests/test-random.c
@@ -0,0 +1,49 @@
+/* Test random.
+   Copyright (C) 2008-2012 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/>.  */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (srandom, void, (unsigned int));
+SIGNATURE_CHECK (initstate, char *, (unsigned int, char *, size_t));
+SIGNATURE_CHECK (setstate, char *, (char *));
+SIGNATURE_CHECK (random, long, (void));
+
+#include <time.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+  char buf[128];
+  unsigned int i;
+  unsigned int n_big = 0;
+
+  initstate (time (NULL), buf, sizeof buf);
+  for (i = 0; i < 1000; i++)
+    {
+      long r = random ();
+      ASSERT (0 <= r);
+      if (RAND_MAX / 2 < r)
+        ++n_big;
+    }
+
+  /* Fail if none of the numbers were larger than RAND_MAX / 2.  */
+  return !n_big;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-readtokens.c
@@ -0,0 +1,98 @@
+/* Test the readtokens module.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+#include <stdbool.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "readtokens.h"
+#include "closeout.h"
+#include "macros.h"
+
+static void
+basic (void)
+{
+  char const *filename = "in.827";
+  int fd = open (filename, O_CREAT | O_WRONLY, 0600);
+  ASSERT (fd >= 0);
+  ASSERT (write (fd, "a|b;c+d", 7) == 7);
+  ASSERT (close (fd) == 0);
+
+  {
+    token_buffer tb;
+    FILE *fp = fopen (filename, "r");
+    ASSERT (fp);
+
+    init_tokenbuffer (&tb);
+    ASSERT (readtoken (fp, "|;", 2, &tb)  == 1 && tb.buffer[0] == 'a');
+    ASSERT (readtoken (fp, "|;", 2, &tb) == 1 && tb.buffer[0] == 'b');
+    ASSERT (readtoken (fp, "+", 1, &tb)  == 1 && tb.buffer[0] == 'c');
+    ASSERT (readtoken (fp, "-", 1, &tb) == 1 && tb.buffer[0] == 'd');
+    ASSERT (readtoken (fp, "%", 0, &tb) == (size_t) -1);
+    ASSERT ( ! ferror (fp));
+    ASSERT (fclose (fp) == 0);
+  }
+}
+
+int
+main (int argc, char **argv)
+{
+  token_buffer tb;
+  char const *delim;
+  size_t delim_len;
+
+  atexit (close_stdout);
+
+  if (argc == 1)
+    {
+      basic ();
+      return 0;
+    }
+
+  init_tokenbuffer (&tb);
+
+  if (argc != 2)
+    return 99;
+
+  delim = argv[1];
+  delim_len = strlen (delim);
+
+  if (STREQ (delim, "\\0"))
+    {
+      delim = "";
+      delim_len = 1;
+    }
+
+  while (1)
+    {
+      size_t token_length = readtoken (stdin, delim, delim_len, &tb);
+      if (token_length == (size_t) -1)
+        break;
+      fwrite (tb.buffer, 1, token_length, stdout);
+      putchar (':');
+    }
+  putchar ('\n');
+  free (tb.buffer);
+
+  ASSERT ( ! ferror (stdin));
+
+  return 0;
+}
new file mode 100755
--- /dev/null
+++ b/tests/test-readtokens.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ .
+
+fail=0
+
+test-readtokens || fail=1
+
+# Simplest case.
+echo a:b:c: > exp || fail=1
+printf a:b:c | test-readtokens : > out 2>&1 || fail=1
+compare exp out || fail=1
+
+# Use NUL as the delimiter.
+echo a:b:c: > exp || fail=1
+printf 'a\0b\0c' | test-readtokens '\0' > out 2>&1 || fail=1
+compare exp out || fail=1
+
+# Two delimiter bytes, and adjacent delimiters in the input.
+echo a:b:c: > exp || fail=1
+printf a:-:b-:c:: | test-readtokens :- > out 2>&1 || fail=1
+compare exp out || fail=1
+
+Exit $fail
--- a/tests/test-recv.c
+++ b/tests/test-recv.c
@@ -29,7 +29,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-recvfrom.c
+++ b/tests/test-recvfrom.c
@@ -32,7 +32,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
new file mode 100644
--- /dev/null
+++ b/tests/test-remainder-ieee.c
@@ -0,0 +1,45 @@
+/* Test of remainder() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define REMAINDER remainder
+#include "test-remainder-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-remainder-ieee.h
@@ -0,0 +1,63 @@
+/* Test of remainder*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (ISNAN (REMAINDER (NAN, L_(2.0))));
+  ASSERT (ISNAN (REMAINDER (NAN, L_(0.0))));
+  ASSERT (ISNAN (REMAINDER (L_(2.0), NAN)));
+  ASSERT (ISNAN (REMAINDER (L_(0.0), NAN)));
+  ASSERT (ISNAN (REMAINDER (NAN, NAN)));
+
+  /* y is zero.  */
+  ASSERT (ISNAN (REMAINDER (L_(2.0), L_(0.0))));
+  ASSERT (ISNAN (REMAINDER (L_(2.0), MINUS_ZERO)));
+  ASSERT (ISNAN (REMAINDER (INFINITY, L_(0.0))));
+  ASSERT (ISNAN (REMAINDER (INFINITY, MINUS_ZERO)));
+
+  /* x is infinite.  */
+  ASSERT (ISNAN (REMAINDER (INFINITY, L_(2.0))));
+  ASSERT (ISNAN (REMAINDER (INFINITY, - L_(2.0))));
+
+  /* The following tests originally applied to the FMOD function.
+     They are not specified for the REMAINDER function by POSIX.  */
+
+  /* x is zero.  */
+  {
+    DOUBLE z = REMAINDER (L_(0.0), L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = REMAINDER (MINUS_ZERO, L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+  {
+    DOUBLE z = REMAINDER (L_(0.0), - L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!signbit (z));
+  }
+  {
+    DOUBLE z = REMAINDER (MINUS_ZERO, - L_(2.0));
+    ASSERT (z == L_(0.0));
+    ASSERT (!!signbit (z) == !!signbit (MINUS_ZERO));
+  }
+}
--- a/tests/test-remainder.c
+++ b/tests/test-remainder.c
@@ -23,11 +23,17 @@
 #include "signature.h"
 SIGNATURE_CHECK (remainder, double, (double, double));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-volatile double y;
-double z;
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define MAX_EXP DBL_MAX_EXP
+#define REMAINDER remainder
+#define RANDOM randomd
+#include "test-remainder.h"
 
 int
 main ()
@@ -38,5 +44,7 @@
   z = remainder (x, y);
   ASSERT (z >= -0.178870837 && z <= -0.178870835);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-remainder.h
@@ -0,0 +1,124 @@
+/* Test of remainder*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static DOUBLE
+my_ldexp (DOUBLE x, int d)
+{
+  for (; d > 0; d--)
+    x *= L_(2.0);
+  for (; d < 0; d++)
+    x *= L_(0.5);
+  return x;
+}
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+    for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+        DOUBLE y = RANDOM[j]; /* 0.0 <= y < 1.0 */
+        if (y > L_(0.0))
+          {
+            DOUBLE z = REMAINDER (x, y);
+            ASSERT (z >= - L_(0.5) * y);
+            ASSERT (z <= L_(0.5) * y);
+            z -= x - (int) ((L_(2.0) * x + y) / (L_(2.0) * y)) * y;
+            ASSERT (/* The common case.  */
+                    (z > - L_(2.0) * L_(16.0) / TWO_MANT_DIG
+                     && z < L_(2.0) * L_(16.0) / TWO_MANT_DIG)
+                    || /* rounding error: 2x+y / 2y computed too large */
+                       (z > y - L_(2.0) * L_(16.0) / TWO_MANT_DIG
+                        && z < y + L_(2.0) * L_(16.0) / TWO_MANT_DIG)
+                    || /* rounding error: 2x+y / 2y computed too small */
+                       (z > - y - L_(2.0) * L_(16.0) / TWO_MANT_DIG
+                        && z < - y + L_(2.0) * L_(16.0) / TWO_MANT_DIG));
+          }
+      }
+
+  for (i = 0; i < SIZEOF (RANDOM) / 5; i++)
+    for (j = 0; j < SIZEOF (RANDOM) / 5; j++)
+      {
+        DOUBLE x = L_(1.0e9) * RANDOM[i]; /* 0.0 <= x <= 10^9 */
+        DOUBLE y = RANDOM[j]; /* 0.0 <= y < 1.0 */
+        if (y > L_(0.0))
+          {
+            DOUBLE z = REMAINDER (x, y);
+            DOUBLE r;
+            ASSERT (z >= - L_(0.5) * y);
+            ASSERT (z <= L_(0.5) * y);
+            {
+              /* Determine the quotient 2x+y / 2y in two steps, because it
+                 may be > 2^31.  */
+              int q1 = (int) (x / y / L_(65536.0));
+              int q2 = (int) ((L_(2.0) * (x - q1 * L_(65536.0) * y) + y)
+                              / (L_(2.0) * y));
+              DOUBLE q = (DOUBLE) q1 * L_(65536.0) + (DOUBLE) q2;
+              r = x - q * y;
+            }
+            /* The absolute error of z can be up to 1e9/2^MANT_DIG.
+               The absolute error of r can also be up to 1e9/2^MANT_DIG.
+               Therefore the error of z - r can be twice as large.  */
+            z -= r;
+            ASSERT (/* The common case.  */
+                    (z > - L_(2.0) * L_(1.0e9) / TWO_MANT_DIG
+                     && z < L_(2.0) * L_(1.0e9) / TWO_MANT_DIG)
+                    || /* rounding error: 2x+y / 2y computed too large */
+                       (z > y - L_(2.0) * L_(1.0e9) / TWO_MANT_DIG
+                        && z < y + L_(2.0) * L_(1.0e9) / TWO_MANT_DIG)
+                    || /* rounding error: 2x+y / 2y computed too small */
+                       (z > - y - L_(2.0) * L_(1.0e9) / TWO_MANT_DIG
+                        && z < - y + L_(2.0) * L_(1.0e9) / TWO_MANT_DIG));
+          }
+      }
+
+  {
+    int large_exp = (MAX_EXP - 1 < 1000 ? MAX_EXP - 1 : 1000);
+    DOUBLE large = my_ldexp (L_(1.0), large_exp); /* = 2^large_exp */
+    for (i = 0; i < SIZEOF (RANDOM) / 10; i++)
+      for (j = 0; j < SIZEOF (RANDOM) / 10; j++)
+        {
+          DOUBLE x = large * RANDOM[i]; /* 0.0 <= x <= 2^large_exp */
+          DOUBLE y = RANDOM[j]; /* 0.0 <= y < 1.0 */
+          if (y > L_(0.0))
+            {
+              DOUBLE z = REMAINDER (x, y);
+              /* Regardless how large the rounding errors are, the result
+                 must be >= -y/2, <= y/2.  */
+              ASSERT (z >= - L_(0.5) * y);
+              ASSERT (z <= L_(0.5) * y);
+            }
+        }
+  }
+}
+
+volatile DOUBLE x;
+volatile DOUBLE y;
+DOUBLE z;
new file mode 100644
--- /dev/null
+++ b/tests/test-remainderf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of remainderf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define REMAINDER remainderf
+#include "test-remainder-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-remainderf.c
@@ -0,0 +1,50 @@
+/* Test of remainderf() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (remainderf, float, (float, float));
+
+#include <float.h>
+
+#include "macros.h"
+
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define MAX_EXP FLT_MAX_EXP
+#define REMAINDER remainderf
+#define RANDOM randomf
+#include "test-remainder.h"
+
+int
+main ()
+{
+  /* A particular value.  */
+  x = 9.245907126f;
+  y = 3.141592654f;
+  z = remainderf (x, y);
+  ASSERT (z >= -0.1788714f && z <= -0.1788708f);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-remainderl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of remainderl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define REMAINDER remainderl
+#include "test-remainder-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-remainderl.c
@@ -0,0 +1,55 @@
+/* Test of remainderl() function.
+   Copyright (C) 2010-2012 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 Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (remainderl, long double, (long double, long double));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG LDBL_MANT_DIG
+#define MAX_EXP LDBL_MAX_EXP
+#define REMAINDER remainderl
+#define RANDOM randoml
+#include "test-remainder.h"
+
+int
+main ()
+{
+  DECL_LONG_DOUBLE_ROUNDING
+
+  BEGIN_LONG_DOUBLE_ROUNDING ();
+
+  /* A particular value.  */
+  x = 9.245907126L;
+  y = 3.141592654L;
+  z = remainderl (x, y);
+  ASSERT (z >= -0.178870837L && z <= -0.178870835L);
+
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-rint-ieee.c
@@ -0,0 +1,45 @@
+/* Test of rint() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define RINT rint
+#include "test-rint-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-rint-ieee.h
@@ -0,0 +1,40 @@
+/* Test of rint*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (ISNAN (RINT (NAN)));
+
+  /* Signed zero.  */
+  {
+    DOUBLE y = RINT (L_(0.0));
+    ASSERT (y == L_(0.0));
+    ASSERT (!signbit (y));
+  }
+  {
+    DOUBLE y = RINT (MINUS_ZERO);
+    ASSERT (y == L_(0.0));
+    ASSERT (!!signbit (y) == !!signbit (MINUS_ZERO));
+  }
+
+  /* Infinity.  */
+  ASSERT (RINT (INFINITY) == INFINITY);
+  ASSERT (RINT (- INFINITY) == - INFINITY);
+}
--- a/tests/test-rint.c
+++ b/tests/test-rint.c
@@ -32,6 +32,18 @@
 #include "nan.h"
 #include "macros.h"
 
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define RINT rint
+#define RANDOM randomd
+#include "test-rint.h"
+
 int
 main ()
 {
@@ -75,11 +87,8 @@
       ASSERT (rint (-65536.0) == -65536.0);
       ASSERT (rint (-65536.001) == -65536.0);
       ASSERT (rint (-2.341e31) == -2.341e31);
-      /* Infinite numbers.  */
-      ASSERT (rint (Infinityd ()) == Infinityd ());
-      ASSERT (rint (- Infinityd ()) == - Infinityd ());
-      /* NaNs.  */
-      ASSERT (isnand (rint (NaNd ())));
+
+      test_function ();
 
       return 0;
     }
new file mode 100644
--- /dev/null
+++ b/tests/test-rint.h
@@ -0,0 +1,55 @@
+/* Test of rint*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* Infinite numbers.  */
+  ASSERT (RINT (INFINITY) == INFINITY);
+  ASSERT (RINT (- INFINITY) == - INFINITY);
+  /* NaNs.  */
+  ASSERT (ISNAN (RINT (NAN)));
+
+  /* Randomized tests.  */
+  {
+    int i;
+
+    for (i = 0; i < SIZEOF (RANDOM); i++)
+      {
+        DOUBLE x;
+
+        x = L_(0.5) * RANDOM[i];
+        ASSERT (RINT (x) == L_(0.0));
+        x = - x;
+        ASSERT (RINT (x) == L_(0.0));
+
+        x = L_(1.0) - L_(0.5) * RANDOM[i];
+        ASSERT (RINT (x) == L_(1.0));
+        x = - x;
+        ASSERT (RINT (x) == - L_(1.0));
+
+        x = L_(1.0) + L_(0.5) * RANDOM[i];
+        ASSERT (RINT (x) == L_(1.0));
+        x = - x;
+        ASSERT (RINT (x) == - L_(1.0));
+
+        x = L_(2.0) - L_(0.5) * RANDOM[i];
+        ASSERT (RINT (x) == L_(2.0));
+        x = - x;
+        ASSERT (RINT (x) == - L_(2.0));
+      }
+  }
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-rintf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of rintf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define RINT rintf
+#include "test-rint-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-rintf.c
+++ b/tests/test-rintf.c
@@ -32,6 +32,18 @@
 #include "nan.h"
 #include "macros.h"
 
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define RINT rintf
+#define RANDOM randomf
+#include "test-rint.h"
+
 int
 main ()
 {
@@ -75,11 +87,8 @@
       ASSERT (rintf (-65536.0f) == -65536.0f);
       ASSERT (rintf (-65536.01f) == -65536.0f);
       ASSERT (rintf (-2.341e31f) == -2.341e31f);
-      /* Infinite numbers.  */
-      ASSERT (rintf (Infinityf ()) == Infinityf ());
-      ASSERT (rintf (- Infinityf ()) == - Infinityf ());
-      /* NaNs.  */
-      ASSERT (isnanf (rintf (NaNf ())));
+
+      test_function ();
 
       return 0;
     }
new file mode 100644
--- /dev/null
+++ b/tests/test-rintl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of rintl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define RINT rintl
+#include "test-rint-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-rintl.c
+++ b/tests/test-rintl.c
@@ -33,6 +33,18 @@
 #include "nan.h"
 #include "macros.h"
 
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define RINT rintl
+#define RANDOM randoml
+#include "test-rint.h"
+
 int
 main ()
 {
@@ -80,11 +92,8 @@
       ASSERT (rintl (-65536.0L) == -65536.0L);
       ASSERT (rintl (-65536.001L) == -65536.0L);
       ASSERT (rintl (-2.341e31L) == -2.341e31L);
-      /* Infinite numbers.  */
-      ASSERT (rintl (Infinityl ()) == Infinityl ());
-      ASSERT (rintl (- Infinityl ()) == - Infinityl ());
-      /* NaNs.  */
-      ASSERT (isnanl (rintl (NaNl ())));
+
+      test_function ();
 
       return 0;
     }
--- a/tests/test-round-ieee.c
+++ b/tests/test-round-ieee.c
@@ -12,14 +12,16 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
 #include <math.h>
 
+#include "isnand-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -40,5 +42,13 @@
   ASSERT (!!signbit (round (-0.3)) == !!signbit (minus_zerod));
   ASSERT (!!signbit (round (-0.7)) == !!signbit (minus_zerod));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnand (round (NaNd ())));
+  /* Infinity.  */
+  ASSERT (round (Infinityd ()) == Infinityd ());
+  ASSERT (round (- Infinityd ()) == - Infinityd ());
+
   return 0;
 }
--- a/tests/test-round1.c
+++ b/tests/test-round1.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ben Pfaff <blp@gnu.org>, 2007.
    Based heavily on Bruno Haible's test-trunc.c. */
--- a/tests/test-roundf-ieee.c
+++ b/tests/test-roundf-ieee.c
@@ -12,14 +12,16 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
 #include <math.h>
 
+#include "isnanf-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -40,5 +42,13 @@
   ASSERT (!!signbit (roundf (-0.3f)) == !!signbit (minus_zerof));
   ASSERT (!!signbit (roundf (-0.7f)) == !!signbit (minus_zerof));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanf (roundf (NaNf ())));
+  /* Infinity.  */
+  ASSERT (roundf (Infinityf ()) == Infinityf ());
+  ASSERT (roundf (- Infinityf ()) == - Infinityf ());
+
   return 0;
 }
--- a/tests/test-roundf1.c
+++ b/tests/test-roundf1.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ben Pfaff <blp@gnu.org>, 2007.
    Based heavily on Bruno Haible's test-truncf.c. */
--- a/tests/test-roundl-ieee.c
+++ b/tests/test-roundl-ieee.c
@@ -12,15 +12,17 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
 #include <math.h>
 
 #include "fpucw.h"
+#include "isnanl-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -45,5 +47,13 @@
   ASSERT (!!signbit (roundl (-0.3L)) == !!signbit (minus_zerol));
   ASSERT (!!signbit (roundl (-0.7L)) == !!signbit (minus_zerol));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanl (roundl (NaNl ())));
+  /* Infinity.  */
+  ASSERT (roundl (Infinityl ()) == Infinityl ());
+  ASSERT (roundl (- Infinityl ()) == - Infinityl ());
+
   return 0;
 }
--- a/tests/test-roundl.c
+++ b/tests/test-roundl.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ben Pfaff <blp@gnu.org>, 2007.
    Based heavily on Bruno Haible's test-truncl.c. */
--- a/tests/test-safe-alloc.c
+++ b/tests/test-safe-alloc.c
@@ -14,8 +14,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Author: David Lutterkort <lutter@redhat.com>
  */
--- a/tests/test-sameacls.c
+++ b/tests/test-sameacls.c
@@ -115,11 +115,11 @@
       }
   }
   {
-#if HAVE_ACL_GET_FILE /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+#if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
     static const int types[] =
       {
         ACL_TYPE_ACCESS
-# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
+# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
         , ACL_TYPE_EXTENDED
 # endif
       };
@@ -310,58 +310,66 @@
       fflush (stderr);
       abort ();
     }
-  if (count1 != count2)
-    {
-      fprintf (stderr, "files %s and %s have different number of ACE-ACLs: %d and %d\n",
-               file1, file2, count1, count2);
-      return 1;
-    }
-  else if (count1 > 0)
-    {
-      ace_t *entries1 = XNMALLOC (count1, ace_t);
-      ace_t *entries2 = XNMALLOC (count2, ace_t);
-      int i;
+  {
+    ace_t *entries1 = XNMALLOC (count1, ace_t);
+    ace_t *entries2 = XNMALLOC (count2, ace_t);
+    int ret;
+    int i;
+
+    ret = acl (file1, ACE_GETACL, count1, entries1);
+    if (ret < 0 && errno == EINVAL)
+      count1 = 0;
+    else if (ret < count1)
+      {
+        fprintf (stderr, "error retrieving the ACE-ACLs of file %s\n", file1);
+        fflush (stderr);
+        abort ();
+      }
+    ret = acl (file2, ACE_GETACL, count2, entries2);
+    if (ret < 0 && errno == EINVAL)
+      count2 = 0;
+    else if (ret < count2)
+      {
+        fprintf (stderr, "error retrieving the ACE-ACLs of file %s\n", file2);
+        fflush (stderr);
+        abort ();
+      }
 
-      if (acl (file1, ACE_GETACL, count1, entries1) < count1)
-        {
-          fprintf (stderr, "error retrieving the ACE-ACLs of file %s\n", file1);
-          fflush (stderr);
-          abort ();
-        }
-      if (acl (file2, ACE_GETACL, count2, entries2) < count1)
-        {
-          fprintf (stderr, "error retrieving the ACE-ACLs of file %s\n", file2);
-          fflush (stderr);
-          abort ();
-        }
-      for (i = 0; i < count1; i++)
-        {
-          if (entries1[i].a_type != entries2[i].a_type)
-            {
-              fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different types %d and %d\n",
-                       file1, file2, i, entries1[i].a_type, entries2[i].a_type);
-              return 1;
-            }
-          if (entries1[i].a_who != entries2[i].a_who)
-            {
-              fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different ids %d and %d\n",
-                       file1, file2, i, (int)entries1[i].a_who, (int)entries2[i].a_who);
-              return 1;
-            }
-          if (entries1[i].a_access_mask != entries2[i].a_access_mask)
-            {
-              fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different access masks %03o and %03o\n",
-                       file1, file2, i, (unsigned int) entries1[i].a_access_mask, (unsigned int) entries2[i].a_access_mask);
-              return 1;
-            }
-          if (entries1[i].a_flags != entries2[i].a_flags)
-            {
-              fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different flags 0x%x and 0x%x\n",
-                       file1, file2, i, (unsigned int) entries1[i].a_flags, (unsigned int) entries2[i].a_flags);
-              return 1;
-            }
-        }
-    }
+    if (count1 != count2)
+      {
+        fprintf (stderr, "files %s and %s have different number of ACE-ACLs: %d and %d\n",
+                 file1, file2, count1, count2);
+        return 1;
+      }
+
+    for (i = 0; i < count1; i++)
+      {
+        if (entries1[i].a_type != entries2[i].a_type)
+          {
+            fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different types %d and %d\n",
+                     file1, file2, i, entries1[i].a_type, entries2[i].a_type);
+            return 1;
+          }
+        if (entries1[i].a_who != entries2[i].a_who)
+          {
+            fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different ids %d and %d\n",
+                     file1, file2, i, (int)entries1[i].a_who, (int)entries2[i].a_who);
+            return 1;
+          }
+        if (entries1[i].a_access_mask != entries2[i].a_access_mask)
+          {
+            fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different access masks %03o and %03o\n",
+                     file1, file2, i, (unsigned int) entries1[i].a_access_mask, (unsigned int) entries2[i].a_access_mask);
+            return 1;
+          }
+        if (entries1[i].a_flags != entries2[i].a_flags)
+          {
+            fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different flags 0x%x and 0x%x\n",
+                     file1, file2, i, (unsigned int) entries1[i].a_flags, (unsigned int) entries2[i].a_flags);
+            return 1;
+          }
+      }
+  }
 # endif
 #elif HAVE_GETACL /* HP-UX */
   int count1;
--- a/tests/test-select.h
+++ b/tests/test-select.h
@@ -84,6 +84,9 @@
 
   s = socket (AF_INET, SOCK_STREAM, 0);
 
+  x = 1;
+  setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
+
   memset (&ia, 0, sizeof (ia));
   ia.sin_family = AF_INET;
   inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr);
@@ -94,9 +97,6 @@
       exit (77);
     }
 
-  x = 1;
-  setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
-
   if (listen (s, 1) < 0)
     {
       perror ("listen");
@@ -227,6 +227,29 @@
 #endif
 
 
+static int
+do_select_bad_nfd_nowait (int nfd, select_fn my_select)
+{
+  struct timeval tv0;
+  tv0.tv_sec = 0;
+  tv0.tv_usec = 0;
+  errno = 0;
+  return my_select (nfd, NULL, NULL, NULL, &tv0);
+}
+
+static void
+test_bad_nfd (select_fn my_select)
+{
+  if (do_select_bad_nfd_nowait (-1, my_select) != -1 || errno != EINVAL)
+    failed ("invalid errno after negative nfds");
+  /* Can't test FD_SETSIZE + 1 for EINVAL, since some systems allow
+     dynamically larger set size by redefining FD_SETSIZE anywhere up
+     to the actual maximum fd.  */
+  /* if (do_select_bad_nfd_nowait (FD_SETSIZE + 1, my_select) != -1 */
+  /*     || errno != EINVAL) */
+  /*   failed ("invalid errno after bogus nfds"); */
+}
+
 /* Test select(2) on invalid file descriptors.  */
 
 static int
@@ -243,6 +266,7 @@
     FD_SET (fd, &wfds);
   if (ev & SEL_EXC)
     FD_SET (fd, &xfds);
+  errno = 0;
   return my_select (fd + 1, &rfds, &wfds, &xfds, timeout);
   /* In this case, when fd is invalid, on some platforms, the bit for fd
      is left alone in the fd_set, whereas on other platforms it is cleared.
@@ -265,7 +289,7 @@
 #if !(defined __osf__ || defined WINDOWS_NATIVE)
   int fd;
 
-  /* On Linux, MacOS X, *BSD, values of fd like 99 or 399 are discarded
+  /* On Linux, Mac OS X, *BSD, values of fd like 99 or 399 are discarded
      by the kernel early and therefore do *not* lead to EBADF, as required
      by POSIX.  */
 # if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__
@@ -426,6 +450,7 @@
   test (test_tty, "TTY", my_select);
 #endif
 
+  result += test (test_bad_nfd, my_select, "Invalid nfd test");
   result += test (test_bad_fd, my_select, "Invalid fd test");
   result += test (test_connect_first, my_select, "Unconnected socket test");
   result += test (test_socket_pair, my_select, "Connected sockets test");
--- a/tests/test-send.c
+++ b/tests/test-send.c
@@ -29,7 +29,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-sendto.c
+++ b/tests/test-sendto.c
@@ -33,7 +33,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-set-mode-acl.sh
+++ b/tests/test-set-mode-acl.sh
@@ -111,7 +111,7 @@
           acl_flavor=aix
         else
           if (fsaclctl -v >/dev/null) 2>/dev/null; then
-            # MacOS X.
+            # Mac OS X.
             acl_flavor=macosx
           else
             if test -f /sbin/chacl; then
--- a/tests/test-sethostname2.c
+++ b/tests/test-sethostname2.c
@@ -27,6 +27,8 @@
 #include <errno.h>
 #include <stdio.h>
 
+#include "root-uid.h"
+
 #include "macros.h"
 
 #define TESTHOSTNAME "gnulib-hostname"
@@ -35,7 +37,7 @@
    On Cygwin, geteuid() may return non-zero even for user accounts with
    administrator privileges, so use a dummy value as well.  */
 #if !HAVE_GETEUID || defined __CYGWIN__
-# define geteuid() 0
+# define geteuid() ROOT_UID
 #endif
 
 int
@@ -50,7 +52,7 @@
      consider things like CAP_SYS_ADMIN (linux) or PRIV_SYS_ADMIN
      (solaris), etc.  systems without a working geteuid (mingw, MSVC
      9) will always skip this test. */
-  if (geteuid () != 0)
+  if (geteuid () != ROOT_UID)
     {
       fprintf (stderr, "Skipping test: insufficient permissions.\n");
       return 77;
--- a/tests/test-setsockopt.c
+++ b/tests/test-setsockopt.c
@@ -29,7 +29,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
new file mode 100644
--- /dev/null
+++ b/tests/test-sh-quote.c
@@ -0,0 +1,203 @@
+/* Test of sh-quote module.
+   Copyright (C) 2012 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "sh-quote.h"
+
+#include <limits.h>
+#include <string.h>
+
+#include "macros.h"
+
+static void
+check_one (const char *input, const char *expected)
+{
+  char buf[1000];
+  size_t output_len;
+  char *output;
+  char *bufend;
+
+  output_len = shell_quote_length (input);
+
+  output = shell_quote (input);
+  ASSERT (strlen (output) == output_len);
+
+  ASSERT (output_len <= sizeof (buf) - 2);
+  memset (buf, '\0', output_len + 1);
+  buf[output_len + 1] = '%';
+  bufend = shell_quote_copy (buf, input);
+  ASSERT (bufend == buf + output_len);
+  ASSERT (memcmp (buf, output, output_len + 1) == 0);
+  ASSERT (buf[output_len + 1] == '%');
+
+  ASSERT (strcmp (output, expected) == 0);
+
+  free (output);
+}
+
+int
+main (void)
+{
+  /* Check the shell_quote_length, shell_quote_copy, shell_quote functions.  */
+  {
+    int c;
+
+    /* Empty argument.  */
+    check_one ("", "''");
+
+    /* Identifier or number.  */
+    check_one ("foo", "foo");
+    check_one ("phr0ck", "phr0ck");
+
+    /* Whitespace would be interpreted as argument separator by the shell.  */
+    check_one ("foo\tbar", "'foo\tbar'");
+    check_one ("foo\nbar", "'foo\nbar'");
+    check_one ("foo\rbar", "'foo\rbar'");
+    check_one ("foo bar", "'foo bar'");
+
+    /* '!' at the beginning of argv[0] would introduce a negated command.  */
+    check_one ("!foo", "'!foo'");
+
+    /* '"' would be interpreted as the start of a string.  */
+    check_one ("\"foo\"bar", "'\"foo\"bar'");
+
+    /* '#' at the beginning of an argument would be interpreted as the start
+       of a comment.  */
+    check_one ("#foo", "'#foo'");
+
+    /* '$' at the beginning of an argument would be interpreted as a variable
+       reference.  */
+    check_one ("$foo", "'$foo'");
+
+    /* '&' at the beginning of an argument would be interpreted as a background
+       task indicator.  */
+    check_one ("&", "'&'");
+
+    /* "'" would be interpreted as the start of a string.  */
+    check_one ("'foo'bar", "''\\''foo'\\''bar'"); /* or "\"'foo'bar\"" */
+
+    /* '(' at the beginning of argv[0] would introduce a subshell command.  */
+    check_one ("(", "'('");
+
+    /* ')' at the beginning of an argument would be interpreted as the end of
+       the command.  */
+    check_one (")", "')'");
+
+    /* '*' would be interpreted as a wildcard character.  */
+    check_one ("*", "'*'");
+    check_one ("*foo", "'*foo'");
+
+    /* ';' at the beginning of an argument would be interpreted as an empty
+       statement in argv[0] and as the end of the command otherwise.  */
+    check_one (";", "';'");
+    check_one ("foo;", "'foo;'");
+
+    /* '<' would be interpreted as a redirection of stdin.  */
+    check_one ("<", "'<'");
+
+    /* '=' inside argv[0] would be interpreted as an environment variable
+       assignment.  */
+    check_one ("foo=bar", "'foo=bar'");
+
+    /* '>' would be interpreted as a redirection of stdout.  */
+    check_one (">", "'>'");
+
+    /* '?' would be interpreted as a wildcard character.  */
+    check_one ("?", "'?'");
+    check_one ("foo?bar", "'foo?bar'");
+
+    /* '^' would be interpreted in old /bin/sh, e.g. SunOS 4.1.4.  */
+    check_one ("^", "'^'");
+
+    /* "[...]" would be interpreted as a wildcard pattern.  */
+    check_one ("[", "'['");
+    check_one ("]", "]"); /* or "']'" */
+
+    /* '\' would be interpreted as an escape character.  */
+    check_one ("\\foo", "'\\foo'");
+
+    /* '`' would be interpreted as the start of a command substitution.  */
+    check_one ("`foo", "'`foo'");
+
+    /* '{' at the beginning of argv[0] would introduce a complex command.  */
+    check_one ("{", "'{'");
+
+    /* '|' at the beginning of an argument would be interpreted as a pipe
+       between commands.  */
+    check_one ("|", "'|'");
+
+    /* '}' at the beginning of an argument would be interpreted as the end of
+       the command.  */
+    check_one ("}", "'}'");
+
+    /* '~' at the beginning of an argument would be interpreted as a reference
+       to a user's home directory.  */
+    check_one ("~", "'~'");
+    check_one ("~foo", "'~foo'");
+
+    /* A string that contains both ' and ".  */
+    check_one ("foo'bar\"baz", "'foo'\\''bar\"baz'"); /* or "\"foo'bar\\\"baz\"" */
+
+    /* All other characters don't need quoting.  */
+    for (c = 1; c <= UCHAR_MAX; c++)
+      if (strchr ("\t\n\r !\"#$&'()*;<=>?^[\\]`{|}~", c) == NULL)
+        {
+          char s[5];
+          s[0] = 'a';
+          s[1] = (char) c;
+          s[2] = 'z';
+          s[3] = (char) c;
+          s[4] = '\0';
+
+          check_one (s, s);
+        }
+  }
+
+  /* Check the shell_quote_argv function.  */
+  {
+    char *argv[1];
+    char *result;
+    argv[0] = NULL;
+    result = shell_quote_argv (argv);
+    ASSERT (strcmp (result, "") == 0);
+    free (result);
+  }
+  {
+    char *argv[2];
+    char *result;
+    argv[0] = (char *) "foo bar/baz";
+    argv[1] = NULL;
+    result = shell_quote_argv (argv);
+    ASSERT (strcmp (result, "'foo bar/baz'") == 0); /* or "\"foo bar/baz\"" */
+    free (result);
+  }
+  {
+    char *argv[3];
+    char *result;
+    argv[0] = (char *) "foo bar/baz";
+    argv[1] = (char *) "$";
+    argv[2] = NULL;
+    result = shell_quote_argv (argv);
+    ASSERT (strcmp (result, "'foo bar/baz' '$'") == 0); /* or "\"foo bar/baz\" \"\\$\"" */
+    free (result);
+  }
+
+  return 0;
+}
--- a/tests/test-shutdown.c
+++ b/tests/test-shutdown.c
@@ -29,7 +29,7 @@
 int
 main (void)
 {
-  gl_sockets_startup (SOCKETS_1_1);
+  (void) gl_sockets_startup (SOCKETS_1_1);
 
   /* Test behaviour for invalid file descriptors.  */
   {
--- a/tests/test-sigpipe.c
+++ b/tests/test-sigpipe.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-snprintf-posix.h
+++ b/tests/test-snprintf-posix.h
@@ -273,7 +273,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug.  */
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
     char result[100];
     int retval =
       my_snprintf (result, sizeof (result), "%.1a %d", 1.999, 33, 44, 55);
@@ -624,7 +624,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a
        glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
     char result[100];
     int retval =
--- a/tests/test-spawn-pipe-child.c
+++ b/tests/test-spawn-pipe-child.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-spawn-pipe-main.c
+++ b/tests/test-spawn-pipe-main.c
@@ -12,13 +12,13 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
 #include "spawn-pipe.h"
 #include "wait-process.h"
+#include "progname.h"
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -80,6 +80,8 @@
   int test;
   int fd;
 
+  set_program_name (argv[0]);
+
   if (argc != 3)
     {
       fprintf (stderr, "%s: need 2 arguments\n", argv[0]);
--- a/tests/test-sprintf-posix.h
+++ b/tests/test-sprintf-posix.h
@@ -259,7 +259,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug.  */
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
     char result[1000];
     int retval =
       my_sprintf (result, "%.1a %d", 1.999, 33, 44, 55);
@@ -610,7 +610,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a
        glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
     char result[1000];
     int retval =
new file mode 100644
--- /dev/null
+++ b/tests/test-sqrt-ieee.c
@@ -0,0 +1,45 @@
+/* Test of sqrt() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnand-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define SQRT sqrt
+#include "test-sqrt-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-sqrt-ieee.h
@@ -0,0 +1,43 @@
+/* Test of sqrt*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  /* [MX] shaded specification in POSIX.  */
+
+  /* Negative values.  */
+  ASSERT (ISNAN (SQRT (- L_(0.3))));
+
+  /* NaN.  */
+  ASSERT (ISNAN (SQRT (NAN)));
+
+  /* Signed zero.  */
+  {
+    DOUBLE y = SQRT (L_(0.0));
+    ASSERT (y == L_(0.0));
+    ASSERT (!signbit (y));
+  }
+  {
+    DOUBLE y = SQRT (MINUS_ZERO);
+    ASSERT (y == L_(0.0));
+    ASSERT (!!signbit (y) == !!signbit (MINUS_ZERO));
+  }
+
+  /* Infinity.  */
+  ASSERT (SQRT (INFINITY) == INFINITY);
+  ASSERT (ISNAN (SQRT (- INFINITY)));
+}
--- a/tests/test-sqrt.c
+++ b/tests/test-sqrt.c
@@ -23,10 +23,16 @@
 #include "signature.h"
 SIGNATURE_CHECK (sqrt, double, (double));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile double x;
-double y;
+#define DOUBLE double
+#define L_(literal) literal
+#define MANT_DIG DBL_MANT_DIG
+#define SQRT sqrt
+#define RANDOM randomd
+#include "test-sqrt.h"
 
 int
 main ()
@@ -36,5 +42,7 @@
   y = sqrt (x);
   ASSERT (y >= 0.7745966692 && y <= 0.7745966693);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-sqrt.h
@@ -0,0 +1,60 @@
+/* Test of sqrt*() function family.
+   Copyright (C) 2012 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/>.  */
+
+static void
+test_function (void)
+{
+  int i;
+  int j;
+  const DOUBLE TWO_MANT_DIG =
+    /* Assume MANT_DIG <= 5 * 31.
+       Use the identity
+         n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5).  */
+    (DOUBLE) (1U << ((MANT_DIG - 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5))
+    * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5));
+
+  /* Randomized tests.  */
+  for (i = 0; i < SIZEOF (RANDOM); i++)
+    {
+      DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+      DOUBLE y = SQRT (x);
+      DOUBLE err = y * y - x;
+      ASSERT (y >= L_(0.0));
+      ASSERT (err > - L_(16.0) / TWO_MANT_DIG
+              && err < L_(16.0) / TWO_MANT_DIG);
+    }
+
+  for (i = 0; i < SIZEOF (RANDOM) / 4; i++)
+    for (j = 0; j < SIZEOF (RANDOM) / 4; j++)
+      {
+        DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
+        DOUBLE y = L_(16.0) * RANDOM[j]; /* 0.0 <= y <= 16.0 */
+        if (x > L_(0.0) && y > L_(0.0))
+          {
+            DOUBLE z = L_(1.0) / (x * y);
+            /* Approximately  x * y * z = 1.  */
+            DOUBLE p = SQRT (x) * SQRT (y) * SQRT (z);
+            ASSERT (p > L_(1.0) - L_(4.0) / TWO_MANT_DIG
+                    && p < L_(1.0) + L_(4.0) / TWO_MANT_DIG);
+          }
+      }
+}
+
+volatile DOUBLE x;
+DOUBLE y;
new file mode 100644
--- /dev/null
+++ b/tests/test-sqrtf-ieee.c
@@ -0,0 +1,45 @@
+/* Test of sqrtf() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define SQRT sqrtf
+#include "test-sqrt-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-sqrtf.c
+++ b/tests/test-sqrtf.c
@@ -23,10 +23,16 @@
 #include "signature.h"
 SIGNATURE_CHECK (sqrtf, float, (float));
 
+#include <float.h>
+
 #include "macros.h"
 
-volatile float x;
-float y;
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MANT_DIG FLT_MANT_DIG
+#define SQRT sqrtf
+#define RANDOM randomf
+#include "test-sqrt.h"
 
 int
 main ()
@@ -36,5 +42,7 @@
   y = sqrtf (x);
   ASSERT (y >= 0.7745966f && y <= 0.7745967f);
 
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-sqrtl-ieee.c
@@ -0,0 +1,45 @@
+/* Test of sqrtl() function.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "isnanl-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
+#include "macros.h"
+
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define SQRT sqrtl
+#include "test-sqrt-ieee.h"
+
+int
+main ()
+{
+  test_function ();
+
+  return 0;
+}
--- a/tests/test-sqrtl.c
+++ b/tests/test-sqrtl.c
@@ -23,11 +23,27 @@
 #include "signature.h"
 SIGNATURE_CHECK (sqrtl, long double, (long double));
 
+#include <float.h>
+
 #include "fpucw.h"
 #include "macros.h"
 
-volatile long double x;
-long double y;
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG DBL_MANT_DIG
+#define SQRT sqrtl
+#define RANDOM randoml
+#include "test-sqrt.h"
+
+static long double
+my_ldexpl (long double x, int d)
+{
+  for (; d > 0; d--)
+    x *= 2.0L;
+  for (; d < 0; d++)
+    x *= 0.5L;
+  return x;
+}
 
 int
 main ()
@@ -41,5 +57,21 @@
   y = sqrtl (x);
   ASSERT (y >= 0.7745966692L && y <= 0.7745966693L);
 
+  /* Another particular value.  */
+  {
+    long double z;
+    long double err;
+
+    x = 8.1974099812331540680810141969554806865L;
+    y = sqrtl (x);
+    z = y * y - x;
+    err = my_ldexpl (z, LDBL_MANT_DIG);
+    if (err < 0)
+      err = - err;
+    ASSERT (err <= 100.0L);
+  }
+
+  test_function ();
+
   return 0;
 }
new file mode 100644
--- /dev/null
+++ b/tests/test-stdnoreturn.c
@@ -0,0 +1,35 @@
+/* Test of <stdnoreturn.h>.
+   Copyright 2012 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.  */
+
+#include <config.h>
+
+#include <stdnoreturn.h>
+
+#include <stdlib.h>
+
+noreturn void
+does_not_return (void)
+{
+  exit (0);
+}
+
+int
+main (void)
+{
+  does_not_return ();
+}
--- a/tests/test-strerror.c
+++ b/tests/test-strerror.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2007.  */
 
@@ -64,7 +63,7 @@
   ASSERT (strstr (str, "ndefined") == NULL);
 
   /* POSIX requires strerror to produce a non-NULL result for all
-     inputs; as an extension, we also guarantee a non-empty reseult.
+     inputs; as an extension, we also guarantee a non-empty result.
      Reporting EINVAL is optional.  */
   errno = 0;
   str = strerror (-3);
--- a/tests/test-strerror_r.c
+++ b/tests/test-strerror_r.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
--- a/tests/test-strsignal.c
+++ b/tests/test-strsignal.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Colin Watson <cjwatson@debian.org>, 2008.  */
 
--- a/tests/test-strtod.c
+++ b/tests/test-strtod.c
@@ -383,7 +383,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -404,8 +404,8 @@
     errno = 0;
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
-    ASSERT (!!signbit (result) == !!signbit (minus_zerod)); /* MacOS X 10.3, FreeBSD 6.2, IRIX 6.5, OSF/1 4.0 */
-    ASSERT (ptr == input + 2);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (!!signbit (result) == !!signbit (minus_zerod)); /* Mac OS X 10.3, FreeBSD 6.2, IRIX 6.5, OSF/1 4.0 */
+    ASSERT (ptr == input + 2);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -416,7 +416,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -427,7 +427,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -438,7 +438,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -449,7 +449,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -460,7 +460,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -471,7 +471,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -482,7 +482,7 @@
     result = strtod (input, &ptr);
     ASSERT (result == 0.0);
     ASSERT (!signbit (result));
-    ASSERT (ptr == input + 1);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+    ASSERT (ptr == input + 1);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
     ASSERT (errno == 0);
   }
   {
@@ -703,8 +703,8 @@
        worrying about.  */
     ASSERT (!!signbit (result1) != !!signbit (result2)); /* glibc-2.3.6, IRIX 6.5, OSF/1 5.1, mingw */
 # endif
-    ASSERT (ptr1 == input + 6);         /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
-    ASSERT (ptr2 == input + 6);         /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+    ASSERT (ptr1 == input + 6);         /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+    ASSERT (ptr2 == input + 6);         /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
     ASSERT (errno == 0);
 #else
     ASSERT (result1 == 0.0);
@@ -724,7 +724,7 @@
     result = strtod (input, &ptr);
 #if 1 /* All known CPUs support NaNs.  */
     ASSERT (isnand (result));           /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
-    ASSERT (ptr == input + 6);          /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+    ASSERT (ptr == input + 6);          /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
     ASSERT (errno == 0);
 #else
     ASSERT (result == 0.0);
@@ -920,9 +920,9 @@
         input[m] = '\0';
         errno = 0;
         result = strtod (input, &ptr);
-        ASSERT (result == 1.0);         /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+        ASSERT (result == 1.0);         /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
         ASSERT (ptr == input + m);      /* OSF/1 5.1 */
-        ASSERT (errno == 0);            /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+        ASSERT (errno == 0);            /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
       }
     free (input);
   }
@@ -946,9 +946,9 @@
         input[m] = '\0';
         errno = 0;
         result = strtod (input, &ptr);
-        ASSERT (result == 1.0);         /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+        ASSERT (result == 1.0);         /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
         ASSERT (ptr == input + m);
-        ASSERT (errno == 0);            /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+        ASSERT (errno == 0);            /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
       }
     free (input);
   }
--- a/tests/test-strverscmp.c
+++ b/tests/test-strverscmp.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2008.  */
 
new file mode 100644
--- /dev/null
+++ b/tests/test-sys_resource.c
@@ -0,0 +1,72 @@
+/* Test of <sys/resource.h> substitute.
+   Copyright (C) 2012 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/>.  */
+
+#include <config.h>
+
+#include <sys/resource.h>
+
+/* Check that necessary types are defined.  */
+#ifdef TODO /* Not implemented in gnulib yet */
+rlim_t t1;
+struct rlimit t2;
+#endif
+struct rusage t3;
+#ifdef TODO
+struct timeval t4;
+id_t t5;
+time_t t10;
+suseconds_t t11;
+fd_set t12;
+#endif
+
+/* Check that the necessary constants are defined.  */
+#ifdef TODO /* Not implemented in gnulib yet */
+int prios[] =
+  {
+    PRIO_PROCESS,
+    PRIO_PGRP,
+    PRIO_USER
+  };
+int rlims[] =
+  {
+    RLIM_INFINITY,
+    RLIM_SAVED_MAX,
+    RLIM_SAVED_CUR
+  };
+#endif
+int rusages[] =
+  {
+    RUSAGE_SELF,
+    RUSAGE_CHILDREN
+  };
+#ifdef TODO
+int rlimits[] =
+  {
+    RLIMIT_CORE,
+    RLIMIT_CPU,
+    RLIMIT_DATA,
+    RLIMIT_FSIZE,
+    RLIMIT_NOFILE,
+    RLIMIT_STACK,
+    RLIMIT_AS
+  };
+#endif
+
+int
+main (void)
+{
+  return 0;
+}
--- a/tests/test-sys_select.c
+++ b/tests/test-sys_select.c
@@ -38,7 +38,10 @@
 #endif
 
 /* Check that the 'struct timeval' type is defined.  */
-struct timeval t1;
+struct timeval a;
+
+/* Check that &a.tv_sec is a 'time_t *', ignoring signedness issues.  */
+typedef int verify_tv_sec_type[sizeof (a.tv_sec) == sizeof (time_t) ? 1 : -1];
 
 /* Check that sigset_t is defined.  */
 sigset_t t2;
--- a/tests/test-sys_time.c
+++ b/tests/test-sys_time.c
@@ -20,8 +20,12 @@
 
 #include <sys/time.h>
 
+/* Check that the 'struct timeval' type is defined.  */
 struct timeval a;
 
+/* Check that &a.tv_sec is a 'time_t *', ignoring signedness issues.  */
+typedef int verify_tv_sec_type[sizeof (a.tv_sec) == sizeof (time_t) ? 1 : -1];
+
 int
 main (void)
 {
new file mode 100644
--- /dev/null
+++ b/tests/test-system-quote-child.c
@@ -0,0 +1,64 @@
+/* Child program invoked by test-system-quote-main.
+   Copyright (C) 2012 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, 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/>.  */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+
+/* Do not use any gnulib replacements, since this program should
+   link against as few libraries as possible.  */
+#undef fclose
+#undef fprintf
+
+#define EXPECTED_DATA_FILE "t-sq-data.tmp"
+
+int
+main (int argc, char *argv[])
+{
+  const char *arg;
+  char expected_data[1000];
+  size_t expected_data_len;
+
+  if (argc < 2)
+    /* Expected one data argument, received none.  */
+    return 2;
+  if (argc > 2)
+    /* Expected one data argument, received more than one.  */
+    return 3;
+  arg = argv[1];
+
+  /* Read the contents of EXPECTED_DATA_FILE.  */
+  {
+    FILE *fp = fopen (EXPECTED_DATA_FILE, "rb");
+    if (fp == NULL)
+      return 4;
+    expected_data_len = fread (expected_data, 1, sizeof (expected_data), fp);
+    if (fclose (fp))
+      return 5;
+  }
+
+  if (!(strlen (arg) == expected_data_len
+        && memcmp (arg, expected_data, expected_data_len) == 0))
+    {
+      /* arg is not as expected.  */
+      fprintf (stderr, "expected: %.*s\nreceived: %s\n",
+               (int)expected_data_len, expected_data, arg);
+      return 1;
+    }
+  else
+    return 0;
+}
new file mode 100644
--- /dev/null
+++ b/tests/test-system-quote-main.c
@@ -0,0 +1,353 @@
+/* Test of system-quote module.
+   Copyright (C) 2012 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, 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 Bruno Haible <bruno@clisp.org>, 2012.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "system-quote.h"
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# define WINDOWS_NATIVE
+#endif
+
+#include <limits.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#ifdef WINDOWS_NATIVE
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "progname.h"
+#include "macros.h"
+
+#define EXPECTED_DATA_FILE "t-sq-data.tmp"
+
+static int failed;
+
+static void
+check_one (enum system_command_interpreter interpreter, const char *prog,
+           const char *input)
+{
+  char buf[1000];
+  size_t output_len;
+  char *output;
+  char *bufend;
+
+  output_len = system_quote_length (interpreter, input);
+
+  output = system_quote (interpreter, input);
+  ASSERT (strlen (output) == output_len);
+
+  ASSERT (output_len <= sizeof (buf) - 2);
+  memset (buf, '\0', output_len + 1);
+  buf[output_len + 1] = '%';
+  bufend = system_quote_copy (buf, interpreter, input);
+  ASSERT (bufend == buf + output_len);
+  ASSERT (memcmp (buf, output, output_len + 1) == 0);
+  ASSERT (buf[output_len + 1] == '%');
+
+  /* Store INPUT in EXPECTED_DATA_FILE, for verification by the child
+     process.  */
+  {
+    FILE *fp = fopen (EXPECTED_DATA_FILE, "wb");
+    if (fp == NULL)
+      exit (3);
+    if (fwrite (input, 1, strlen (input), fp) != strlen (input))
+      exit (4);
+    if (fclose (fp))
+      exit (5);
+  }
+
+  /* Invoke the child process through system() and popen().  */
+  {
+    char command[1000];
+
+    sprintf (command, "%s %s", prog, output);
+
+    switch (interpreter)
+      {
+      case SCI_SYSTEM:
+#ifdef WINDOWS_NATIVE
+      case SCI_WINDOWS_CMD:
+#endif
+        {
+          int exitcode = system (command);
+          if (exitcode != 0)
+            {
+              fprintf (stderr, "for input = |%s|: system() command failed with status %d: %s\n",
+                       input, exitcode, command);
+              failed = 1;
+            }
+        }
+        {
+          FILE *fp = popen (command, "r");
+          int exitcode = pclose (fp);
+          if (exitcode != 0)
+            {
+              fprintf (stderr, "for input = |%s|: popen() command failed with status %d: %s\n",
+                       input, exitcode, command);
+              failed = 1;
+            }
+        }
+        break;
+#ifdef WINDOWS_NATIVE
+      case SCI_WINDOWS_CREATEPROCESS:
+        {
+          PROCESS_INFORMATION pinfo;
+          STARTUPINFO sinfo;
+          sinfo.cb = sizeof (STARTUPINFO);
+          sinfo.lpReserved = NULL;
+          sinfo.lpDesktop = NULL;
+          sinfo.lpTitle = NULL;
+          sinfo.cbReserved2 = 0;
+          sinfo.lpReserved2 = NULL;
+          sinfo.dwFlags = STARTF_USESTDHANDLES;
+          sinfo.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
+          sinfo.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
+          sinfo.hStdError = GetStdHandle (STD_ERROR_HANDLE);
+
+          if (CreateProcess (NULL, command, NULL, NULL, TRUE, 0, NULL, NULL,
+                             &sinfo, &pinfo))
+            {
+              DWORD exitcode;
+              CloseHandle (pinfo.hThread);
+              if (WaitForSingleObject (pinfo.hProcess, INFINITE) == WAIT_OBJECT_0)
+                {
+                  if (GetExitCodeProcess (pinfo.hProcess, &exitcode))
+                    {
+                      if (exitcode != 0)
+                        {
+                          fprintf (stderr, "for input = |%s|: CreateProcess() command failed with status %d: %s\n",
+                                   input, exitcode, command);
+                          failed = 1;
+                        }
+                    }
+                  else
+                    {
+                      fprintf (stderr, "for input = |%s|: GetExitCodeProcess failed, GetLastError() = %u\n",
+                               input, GetLastError ());
+                      failed = 1;
+                    }
+                }
+              else
+                {
+                  fprintf (stderr, "for input = |%s|: WaitForSingleObject failed\n",
+                           input);
+                  failed = 1;
+                }
+              CloseHandle (pinfo.hProcess);
+            }
+          else
+            {
+              fprintf (stderr, "for input = |%s|: CreateProcess failed, GetLastError() = %u\n",
+                       input, GetLastError ());
+              failed = 1;
+            }
+        }
+        break;
+#endif
+      default:
+        break;
+      }
+  }
+
+  free (output);
+}
+
+static void
+check_all (enum system_command_interpreter interpreter,
+           bool windows_cmd_limitations,
+           const char *prog)
+{
+  /* Check the system_quote_length, system_quote_copy, system_quote
+     functions.  */
+  {
+    int c;
+
+    /* Empty argument.  */
+    check_one (interpreter, prog, "");
+
+    /* Identifier or number.  */
+    check_one (interpreter, prog, "foo");
+    check_one (interpreter, prog, "phr0ck");
+
+    /* Whitespace would be interpreted as argument separator by the shell.  */
+    check_one (interpreter, prog, "foo\tbar");
+    if (!windows_cmd_limitations)
+      {
+        check_one (interpreter, prog, "foo\nbar");
+        check_one (interpreter, prog, "foo\rbar");
+      }
+    check_one (interpreter, prog, "foo bar");
+
+    /* '!' at the beginning of argv[0] would introduce a negated command.  */
+    check_one (interpreter, prog, "!foo");
+
+    /* '"' would be interpreted as the start of a string.  */
+    check_one (interpreter, prog, "\"foo\"bar");
+
+    /* '#' at the beginning of an argument would be interpreted as the start
+       of a comment.  */
+    check_one (interpreter, prog, "#foo");
+
+    /* '$' at the beginning of an argument would be interpreted as a variable
+       reference.  */
+    check_one (interpreter, prog, "$foo");
+
+    /* '&' at the beginning of an argument would be interpreted as a background
+       task indicator.  */
+    check_one (interpreter, prog, "&");
+
+    /* "'" would be interpreted as the start of a string.  */
+    check_one (interpreter, prog, "'foo'bar");
+
+    /* '(' at the beginning of argv[0] would introduce a subshell command.  */
+    check_one (interpreter, prog, "(");
+
+    /* ')' at the beginning of an argument would be interpreted as the end of
+       the command.  */
+    check_one (interpreter, prog, ")");
+
+    /* '*' would be interpreted as a wildcard character.  */
+    check_one (interpreter, prog, "*");
+    check_one (interpreter, prog, "*foo");
+
+    /* ';' at the beginning of an argument would be interpreted as an empty
+       statement in argv[0] and as the end of the command otherwise.  */
+    check_one (interpreter, prog, ";");
+    check_one (interpreter, prog, "foo;");
+
+    /* '<' would be interpreted as a redirection of stdin.  */
+    check_one (interpreter, prog, "<");
+
+    /* '=' inside argv[0] would be interpreted as an environment variable
+       assignment.  */
+    check_one (interpreter, prog, "foo=bar");
+
+    /* '>' would be interpreted as a redirection of stdout.  */
+    check_one (interpreter, prog, ">");
+
+    /* '?' would be interpreted as a wildcard character.  */
+    check_one (interpreter, prog, "?");
+    check_one (interpreter, prog, "??");
+    check_one (interpreter, prog, "???");
+    check_one (interpreter, prog, "????");
+    check_one (interpreter, prog, "?????");
+    check_one (interpreter, prog, "??????");
+    check_one (interpreter, prog, "???????");
+    check_one (interpreter, prog, "????????");
+    check_one (interpreter, prog, "?????????");
+    check_one (interpreter, prog, "??????????");
+    check_one (interpreter, prog, "foo?bar");
+
+    /* '^' would be interpreted in old /bin/sh, e.g. SunOS 4.1.4.  */
+    check_one (interpreter, prog, "^");
+
+    /* "[...]" would be interpreted as a wildcard pattern.  */
+    check_one (interpreter, prog, "[");
+    check_one (interpreter, prog, "]");
+
+    /* '\' would be interpreted as an escape character.  */
+    check_one (interpreter, prog, "\\foo");
+
+    /* '`' would be interpreted as the start of a command substitution.  */
+    check_one (interpreter, prog, "`foo");
+
+    /* '{' at the beginning of argv[0] would introduce a complex command.  */
+    check_one (interpreter, prog, "{");
+
+    /* '|' at the beginning of an argument would be interpreted as a pipe
+       between commands.  */
+    check_one (interpreter, prog, "|");
+
+    /* '}' at the beginning of an argument would be interpreted as the end of
+       the command.  */
+    check_one (interpreter, prog, "}");
+
+    /* '~' at the beginning of an argument would be interpreted as a reference
+       to a user's home directory.  */
+    check_one (interpreter, prog, "~");
+    check_one (interpreter, prog, "~foo");
+
+    /* A string that contains both ' and ".  */
+    check_one (interpreter, prog, "foo'bar\"baz");
+
+    /* '%' is used for environment variable references in Windows cmd.exe.  */
+    check_one (interpreter, prog, "%");
+    check_one (interpreter, prog, "%%");
+    check_one (interpreter, prog, "%foo%");
+    check_one (interpreter, prog, "%PATH%");
+
+    /* All other characters don't need quoting.  */
+    for (c = 1; c <= UCHAR_MAX; c++)
+      if (strchr ("\t\n\r !\"#$&'()*;<=>?^[\\]`{|}~", c) == NULL)
+        {
+          char s[5];
+          s[0] = 'a';
+          s[1] = (char) c;
+          s[2] = 'z';
+          s[3] = (char) c;
+          s[4] = '\0';
+
+          check_one (interpreter, prog, s);
+        }
+  }
+}
+
+int
+main (int argc, char *argv[])
+{
+  char *prog;
+
+  set_program_name (argv[0]);
+
+  if (argc != 2)
+    {
+      fprintf (stderr, "%s: need 1 argument\n", argv[0]);
+      return 2;
+    }
+  prog = argv[1];
+
+#ifdef WINDOWS_NATIVE
+  /* Make PROG suitable for native Windows system calls and cmd.exe:
+     Replace '/' with '\\'.  */
+  {
+    char *p;
+    for (p = prog; *p != '\0'; p++)
+      if (*p == '/')
+        *p = '\\';
+  }
+#endif
+
+#ifdef WINDOWS_NATIVE
+  check_all (SCI_SYSTEM, true, prog); /* equivalent to SCI_WINDOWS_CMD */
+  check_all (SCI_WINDOWS_CREATEPROCESS, false, prog);
+  check_all (SCI_WINDOWS_CMD, true, prog);
+#else
+  check_all (SCI_SYSTEM, false, prog); /* equivalent to SCI_POSIX_SH */
+#endif
+
+  /* Clean up.  */
+  unlink (EXPECTED_DATA_FILE);
+
+  return failed;
+}
new file mode 100755
--- /dev/null
+++ b/tests/test-system-quote.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./test-system-quote-main${EXEEXT} ./test-system-quote-child${EXEEXT}
--- a/tests/test-time.c
+++ b/tests/test-time.c
@@ -26,7 +26,7 @@
 struct timespec t1;
 #if 0
 /* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
-   it's missing on MacOS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw.  */
+   it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw.  */
 pid_t t2;
 #endif
 
--- a/tests/test-tls.c
+++ b/tests/test-tls.c
@@ -66,7 +66,7 @@
 # define yield()
 #endif
 
-static inline void
+static void
 perhaps_yield (void)
 {
   /* Call yield () only with a certain probability, otherwise with GNU Pth
--- a/tests/test-trunc-ieee.c
+++ b/tests/test-trunc-ieee.c
@@ -18,7 +18,10 @@
 
 #include <math.h>
 
+#include "isnand-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -39,5 +42,13 @@
   ASSERT (!!signbit (trunc (-0.3)) == !!signbit (minus_zerod));
   ASSERT (!!signbit (trunc (-0.7)) == !!signbit (minus_zerod));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnand (trunc (NaNd ())));
+  /* Infinity.  */
+  ASSERT (trunc (Infinityd ()) == Infinityd ());
+  ASSERT (trunc (- Infinityd ()) == - Infinityd ());
+
   return 0;
 }
--- a/tests/test-trunc2.c
+++ b/tests/test-trunc2.c
@@ -32,6 +32,12 @@
 #include "minus-zero.h"
 #include "macros.h"
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 
 /* The reference implementation, taken from lib/trunc.c.  */
 
--- a/tests/test-truncf-ieee.c
+++ b/tests/test-truncf-ieee.c
@@ -18,7 +18,10 @@
 
 #include <math.h>
 
+#include "isnanf-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -39,5 +42,13 @@
   ASSERT (!!signbit (truncf (-0.3f)) == !!signbit (minus_zerof));
   ASSERT (!!signbit (truncf (-0.7f)) == !!signbit (minus_zerof));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanf (truncf (NaNf ())));
+  /* Infinity.  */
+  ASSERT (truncf (Infinityf ()) == Infinityf ());
+  ASSERT (truncf (- Infinityf ()) == - Infinityf ());
+
   return 0;
 }
--- a/tests/test-truncf2.c
+++ b/tests/test-truncf2.c
@@ -32,6 +32,12 @@
 #include "minus-zero.h"
 #include "macros.h"
 
+/* MSVC with option -fp:strict refuses to compile constant initializers that
+   contain floating-point operations.  Pacify this compiler.  */
+#ifdef _MSC_VER
+# pragma fenv_access (off)
+#endif
+
 
 /* The reference implementation, taken from lib/trunc.c.  */
 
--- a/tests/test-truncl-ieee.c
+++ b/tests/test-truncl-ieee.c
@@ -19,7 +19,10 @@
 #include <math.h>
 
 #include "fpucw.h"
+#include "isnanl-nolibm.h"
 #include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
 #include "macros.h"
 
 int
@@ -44,5 +47,13 @@
   ASSERT (!!signbit (truncl (-0.3L)) == !!signbit (minus_zerol));
   ASSERT (!!signbit (truncl (-0.7L)) == !!signbit (minus_zerol));
 
+  /* [MX] shaded specification in POSIX.  */
+
+  /* NaN.  */
+  ASSERT (isnanl (truncl (NaNl ())));
+  /* Infinity.  */
+  ASSERT (truncl (Infinityl ()) == Infinityl ());
+  ASSERT (truncl (- Infinityl ()) == - Infinityl ());
+
   return 0;
 }
--- a/tests/test-tsearch.c
+++ b/tests/test-tsearch.c
@@ -75,7 +75,7 @@
 /* The keys we add to the tree.  */
 static int x[SIZE];
 
-/* Pointers into the key array, possibly permutated, to define an order
+/* Pointers into the key array, possibly permuted, to define an order
    for insertion/removal.  */
 static int y[SIZE];
 
--- a/tests/test-update-copyright.sh
+++ b/tests/test-update-copyright.sh
@@ -424,6 +424,13 @@
 		# Copyright (C) 1987-1988, 1991-2011 Free Software
 		# Foundation, Inc.
 EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \
+  UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+		# Copyright (C) 1987-2011 Free Software Foundation, Inc.
+EOF
 rm $TMP*
 
 ## --------- ##
--- a/tests/test-utimens-common.h
+++ b/tests/test-utimens-common.h
@@ -59,7 +59,7 @@
 
 /* Compare two st_ctime values.  Return -1, 0 or 1, respectively
    when A's st_ctime is smaller than, equal to or greater than B's.  */
-static inline int
+static int
 ctime_compare (struct stat const *a, struct stat const *b)
 {
   if (a->st_ctime < b->st_ctime)
--- a/tests/test-vasnprintf-posix.c
+++ b/tests/test-vasnprintf-posix.c
@@ -326,7 +326,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug.  */
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
     size_t length;
     char *result =
       my_asnprintf (NULL, &length, "%.1a %d", 1.999, 33, 44, 55);
@@ -741,7 +741,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a
        glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
     size_t length;
     char *result =
--- a/tests/test-vasprintf-posix.c
+++ b/tests/test-vasprintf-posix.c
@@ -306,7 +306,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug.  */
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
     char *result;
     int retval =
       my_asprintf (&result, "%.1a %d", 1.999, 33, 44, 55);
@@ -721,7 +721,7 @@
   }
 
   { /* Rounding can turn a ...FFF into a ...000.
-       This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+       This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a
        glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
     char *result;
     int retval =
--- a/tests/test-xmemdup0.c
+++ b/tests/test-xmemdup0.c
@@ -12,8 +12,7 @@
    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, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>, 2008.  */
 
--- a/tests/test-yesno.sh
+++ b/tests/test-yesno.sh
@@ -14,7 +14,7 @@
   cr='\r'
 fi
 
-# Test with seekable stdin; the followon process must see remaining data.
+# Test with seekable stdin; the follow-on process must see remaining data.
 tr @ '\177' <<EOF > in.tmp
 nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn - entire line consumed
 y@n - backspace does not change result
--- a/tests/uninorm/NormalizationTest.txt
+++ b/tests/uninorm/NormalizationTest.txt
@@ -18179,5 +18179,3 @@
 D638 0334 11BC;D638 0334 11BC;1112 1169 0334 11BC;D638 0334 11BC;1112 1169 0334 11BC;
 D6FC 0334 11AE;D6FC 0334 11AE;1112 1170 0334 11AE;D6FC 0334 11AE;1112 1170 0334 11AE;
 D750 0334 11B5;D750 0334 11B5;1112 1173 0334 11B5;D750 0334 11B5;1112 1173 0334 11B5;
-
-
--- a/top/GNUmakefile
+++ b/top/GNUmakefile
@@ -20,20 +20,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Systems where /bin/sh is not the default shell need this.  The $(shell)
-# command below won't work with e.g. stock DOS/Windows shells.
-ifeq ($(wildcard /bin/s[h]),/bin/sh)
-SHELL = /bin/sh
-else
-# will be used only with the next shell-test line, then overwritten
-# by a configured-in value
-SHELL = sh
-endif
-
 # If the user runs GNU make but has not yet run ./configure,
 # give them a diagnostic.
-_have-Makefile := $(shell test -f Makefile && echo yes)
-ifeq ($(_have-Makefile),yes)
+_gl-Makefile := $(wildcard [M]akefile)
+ifneq ($(_gl-Makefile),)
 
 # Make tar archive easier to reproduce.
 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
--- a/top/README-release
+++ b/top/README-release
@@ -1,42 +1,48 @@
 Here are most of the steps we (maintainers) follow when making a release.
 
-* start from a clean, up-to-date git directory.
+* Start from a clean, up-to-date git directory on "master":
 
     make -k maintainer-clean || { ./configure && make maintainer-clean; }
     git checkout master
     git pull origin master
 
-* Ensure that the desired versions of autoconf, automake, etc.
+* Ensure that the latest stable versions of autoconf, automake, etc.
   are in your PATH.  See the buildreq list in bootstrap.conf for
-  the complete list.
+  the complete list of tools.
+
+* Ensure that you have no uncommitted diffs.  This should produce no
+  output:
 
-* Ensure that you're on "master" with no uncommitted diffs.
-  This should produce no output: git checkout master; git diff
+    git diff
+
+* Ensure that you've pushed all changes that belong in the release:
 
-* Ensure that you've pushed all changes that belong in the release
-  and that the NixOS/Hydra autobuilder is reporting all is well:
+    git push origin master
+
+* Check that the NixOS/Hydra autobuilder is reporting all is well:
 
     http://hydra.nixos.org/jobset/gnu/@PACKAGE@-master
 
-* Run "./bootstrap && ./configure".  This downloads any new translations.
+* Run the following command to download any new translations:
 
-* Pre-release testing:
-  Ensure that "make check syntax-check" succeeds.
+    ./bootstrap && ./configure
+
+* Pre-release testing: ensure that the following command succeeds:
 
-* Run "make distcheck"
+    make check syntax-check distcheck
 
-* Set the date, version number, and release type [stable/alpha/beta] on
-  line 3 of NEWS, commit that, and tag the release by running e.g.,
+* To (i) set the date, version number, and release TYPE on line 3 of
+  NEWS, (ii) commit that, and (iii) tag the release, run
 
-    build-aux/do-release-commit-and-tag X.Y stable
+    # "TYPE" must be stable, beta or alpha
+    make release-commit RELEASE='X.Y TYPE'
 
 * Run the following to create release tarballs.  Your choice selects the
   corresponding upload-to destination in the emitted gnupload command.
   The different destinations are specified in cfg.mk.  See the definitions
   of gnu_ftp_host-{alpha,beta,stable}.
 
-    # "TYPE" must be stable, beta or alpha
-    make TYPE
+    make release RELEASE='X.Y TYPE'
 
 * Test the tarball.  Copy it to a few odd-ball systems and ensure that
   it builds and passes all tests.
@@ -47,7 +53,10 @@
 
 Once all the builds and tests have passed,
 
-* Run the gnupload command that was suggested by your "make stable" run above.
+* Run the gnupload command that was suggested by your "make release"
+  run above, or run
+
+    make upload RELEASE='X.Y TYPE'
 
 * Wait a few minutes (maybe up to 30?) and then use the release URLs to
   download all tarball/signature pairs and use gpg --verify to ensure
@@ -58,15 +67,18 @@
     v=$(cat .prev-version)
     git push origin master tag v$v
 
-* Announce it on Savannah first, so you can include the preferable
-  savannah.org announcement link in the email message.
+* Announce it on Savannah first, so you can include the savannah.org
+  announcement link in the email message.
+
+  Go to the news-submission form:
 
-  From here:
-    https://savannah.gnu.org/projects/@PACKAGE@/
-  click on the "submit news", then write something like the following:
-  (If there is no such button, then enable "News" for the project via
-   the Main -> "Select Features" menu item, or via this link:
-   https://savannah.gnu.org/project/admin/editgroupfeatures.php?group=@PACKAGE@)
+    https://savannah.gnu.org/news/submit.php?group=@PACKAGE@
+
+  If it does not work, then enable "News" for the project via this link:
+
+    https://savannah.gnu.org/project/admin/editgroupfeatures.php?group=@PACKAGE@
+
+  Write something like the following:
 
     Subject: @PACKAGE@-X.Y released [stable]
     +verbatim+
@@ -74,14 +86,15 @@
     -verbatim-
 
   Then go here to approve it:
+
     https://savannah.gnu.org/news/approve.php?group=@PACKAGE@
 
 * Send the announcement email message.
 
-* After each non-alpha release, update the on-line manual accessible via
+* After each non-alpha release, run
+
+    make web-manual-update
+
+  to update the on-line manual accessible at
 
     http://www.gnu.org/software/@PACKAGE@/manual/
-
-  by running this:
-
-    build-aux/gnu-web-doc-update
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -28,6 +28,28 @@
 set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)")
 endif
 
+# Helper variables.
+_empty =
+_sp = $(_empty) $(_empty)
+
+# _equal,S1,S2
+# ------------
+# If S1 == S2, return S1, otherwise the empty string.
+_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+
+# member-check,VARIABLE,VALID-VALUES
+# ----------------------------------
+# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and
+# return it.  Die otherwise.
+member-check =								\
+  $(strip								\
+    $(if $($(1)),							\
+      $(if $(findstring $(_sp),$($(1))),				\
+          $(error invalid $(1): '$($(1))', expected $(2)),		\
+          $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)),	\
+            $(error invalid $(1): '$($(1))', expected $(2)))),		\
+      $(error $(1) undefined)))
+
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
 gzip_rsyncable := \
@@ -52,16 +74,16 @@
 # Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
 # when $(srcdir) is not ".".
 ifeq ($(srcdir),.)
-_prepend_srcdir_prefix =
+  _prepend_srcdir_prefix =
 else
-_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+  _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
 endif
 
 # In order to be able to consistently filter "."-relative names,
 # (i.e., with no $(srcdir) prefix), this definition is careful to
 # remove any $(srcdir) prefix, and to restore what it removes.
 _sc_excl = \
-  $(if $(exclude_file_name_regexp--$@),$(exclude_file_name_regexp--$@),^$$)
+  $(or $(exclude_file_name_regexp--$@),^$$)
 VC_LIST_EXCEPT = \
   $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
 	| if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
@@ -78,32 +100,41 @@
 PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
 
 ifeq ($(VC),$(GIT))
-this-vc-tag = v$(VERSION)
-this-vc-tag-regexp = v$(VERSION_REGEXP)
+  this-vc-tag = v$(VERSION)
+  this-vc-tag-regexp = v$(VERSION_REGEXP)
 else
-tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
-tag-this-version = $(subst .,_,$(VERSION))
-this-vc-tag = $(tag-package)-$(tag-this-version)
-this-vc-tag-regexp = $(this-vc-tag)
+  tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+  tag-this-version = $(subst .,_,$(VERSION))
+  this-vc-tag = $(tag-package)-$(tag-this-version)
+  this-vc-tag-regexp = $(this-vc-tag)
 endif
 my_distdir = $(PACKAGE)-$(VERSION)
 
 # Old releases are stored here.
 release_archive_dir ?= ../release
 
+# If RELEASE_TYPE is undefined, but RELEASE is, use its second word.
+# But overwrite VERSION.
+ifdef RELEASE
+  VERSION := $(word 1, $(RELEASE))
+  RELEASE_TYPE ?= $(word 2, $(RELEASE))
+endif
+
+# Validate and return $(RELEASE_TYPE), or die.
+RELEASE_TYPES = alpha beta stable
+release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES))
+
 # Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
 # Use alpha.gnu.org for alpha and beta releases.
 # Use ftp.gnu.org for stable releases.
 gnu_ftp_host-alpha = alpha.gnu.org
 gnu_ftp_host-beta = alpha.gnu.org
 gnu_ftp_host-stable = ftp.gnu.org
-gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
 
-ifeq ($(gnu_rel_host),ftp.gnu.org)
-url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
-else
-url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
-endif
+url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org),	\
+                     http://ftpmirror.gnu.org/$(PACKAGE),		\
+                     ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
 
 # Override this in cfg.mk if you are using a different format in your
 # NEWS file.
@@ -132,9 +163,9 @@
 .PHONY: $(syntax-check-rules)
 
 ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
-local-checks-available += $(syntax-check-rules)
+  local-checks-available += $(syntax-check-rules)
 else
-local-checks-available += no-vc-detected
+  local-checks-available += no-vc-detected
 no-vc-detected:
 	@echo "No version control files detected; skipping syntax check"
 endif
@@ -178,11 +209,20 @@
 #     Regular expression (ERE) denoting either a forbidden construct
 #     or a required construct.  Those arguments are exclusive.
 #
+#  exclude
+#
+#     Regular expression (ERE) denoting lines to ignore that matched
+#     a prohibit construct.  For example, this can be used to exclude
+#     comments that mention why the nearby code uses an alternative
+#     construct instead of the simpler prohibited construct.
+#
 #  in_vc_files | in_files
 #
-#     grep-E-style regexp denoting the files to check.  If no files
-#     are specified the default are all the files that are under
-#     version control.
+#     grep-E-style regexp selecting the files to check.  For in_vc_files,
+#     the regexp is used to select matching files from the list of all
+#     version-controlled files; for in_files, it's from the names printed
+#     by "find $(srcdir)".  When neither is specified, use all files that
+#     are under version control.
 #
 #  containing | non_containing
 #
@@ -212,6 +252,17 @@
 # when filtering by name via in_files, we explicitly filter out matching
 # names here as well.
 
+# Initialize each, so that envvar settings cannot interfere.
+export require =
+export prohibit =
+export exclude =
+export in_vc_files =
+export in_files =
+export containing =
+export non_containing =
+export halt =
+export with_grep_options =
+
 # By default, _sc_search_regexp does not ignore case.
 export ignore_case =
 _ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :)
@@ -231,6 +282,9 @@
    test -z "$$prohibit" && test -z "$$require"				\
      && { msg='Should specify either prohibit or require'		\
           $(_sc_say_and_exit) } || :;					\
+   test -z "$$prohibit" && test -n "$$exclude"				\
+     && { msg='Use of exclude requires a prohibit pattern'		\
+          $(_sc_say_and_exit) } || :;					\
    test -n "$$in_vc_files" && test -n "$$in_files"			\
      && { msg='Cannot specify both in_vc_files and in_files'		\
           $(_sc_say_and_exit) } || :;					\
@@ -240,7 +294,7 @@
    : Filter by file name;						\
    if test -n "$$in_files"; then					\
      files=$$(find $(srcdir) | grep -E "$$in_files"			\
-              | grep -Ev '$(exclude_file_name_regexp--$@)');		\
+              | grep -Ev '$(_sc_excl)');				\
    else									\
      files=$$($(VC_LIST_EXCEPT));					\
      if test -n "$$in_vc_files"; then					\
@@ -258,6 +312,7 @@
    if test -n "$$files"; then						\
      if test -n "$$prohibit"; then					\
        grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
+         | grep -vE "$${exclude:-^$$}"					\
          && { msg="$$halt" $(_sc_say_and_exit) } || :;			\
      else								\
        grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
@@ -276,17 +331,17 @@
 	    exit 1; } || :
 
 sc_cast_of_argument_to_free:
-	@prohibit='\<free *\( *\(' halt='don'\''t cast free argument'	\
+	@prohibit='\<free *\( *\(' halt="don't cast free argument"	\
 	  $(_sc_search_regexp)
 
 sc_cast_of_x_alloc_return_value:
 	@prohibit='\*\) *x(m|c|re)alloc\>'				\
-	halt='don'\''t cast x*alloc return value'			\
+	halt="don't cast x*alloc return value"				\
 	  $(_sc_search_regexp)
 
 sc_cast_of_alloca_return_value:
 	@prohibit='\*\) *alloca\>'					\
-	halt='don'\''t cast alloca return value'			\
+	halt="don't cast alloca return value"				\
 	  $(_sc_search_regexp)
 
 sc_space_tab:
@@ -303,12 +358,20 @@
 	  $(_sc_search_regexp)
 
 # Use STREQ rather than comparing strcmp == 0, or != 0.
+sp_ = strcmp *\(.+\)
 sc_prohibit_strcmp:
-	@grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]='	\
-	    $$($(VC_LIST_EXCEPT))					\
-	  | grep -vE ':# *define STRN?EQ\(' &&				\
-	  { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
-		1>&2; exit 1; } || :
+	@prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)'		\
+	exclude='# *define STRN?EQ\('					\
+	halt='replace strcmp calls above with STREQ/STRNEQ'		\
+	  $(_sc_search_regexp)
+
+# Really.  You don't want to use this function.
+# It may fail to NUL-terminate the destination,
+# and always NUL-pads out to the specified length.
+sc_prohibit_strncpy:
+	@prohibit='\<strncpy *\('					\
+	halt='do not use strncpy, period'				\
+	  $(_sc_search_regexp)
 
 # Pass EXIT_*, not number, to usage, exit, and error (when exiting)
 # Convert all uses automatically, via these two commands:
@@ -321,8 +384,9 @@
 #  | xargs --no-run-if-empty \
 #      perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
 sc_prohibit_magic_number_exit:
-	@prohibit='(^|[^.])\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,'	\
-	halt='use EXIT_* values rather than magic number'			\
+	@prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]'	\
+	exclude='exit \(77\)|error ?\(((0|77),|[^,]*)'			\
+	halt='use EXIT_* values rather than magic number'		\
 	  $(_sc_search_regexp)
 
 # Using EXIT_SUCCESS as the first argument to error is misleading,
@@ -433,7 +497,8 @@
 
 # Don't include quote.h unless you use one of its functions.
 sc_prohibit_quote_without_use:
-	@h='quote.h' re='\<quote(_n)? *\(' $(_sc_header_without_use)
+	@h='quote.h' re='\<quote((_n)? *\(|_quoting_options\>)' \
+	  $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_long_options_without_use:
@@ -502,7 +567,7 @@
 
 sc_prohibit_hash_pjw_without_use:
 	@h='hash-pjw.h' \
-	re='\<hash_pjw *\(' \
+	re='\<hash_pjw\>' \
 	  $(_sc_header_without_use)
 
 sc_prohibit_safe_read_without_use:
@@ -516,7 +581,7 @@
 
 sc_prohibit_canonicalize_without_use:
 	@h='canonicalize.h' \
-	re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
+	re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode|file_name)' \
 	  $(_sc_header_without_use)
 
 sc_prohibit_root_dev_ino_without_use:
@@ -536,8 +601,6 @@
 	@h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
 	  $(_sc_header_without_use)
 
-_empty =
-_sp = $(_empty) $(_empty)
 # The following list was generated by running:
 # man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
 #   | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
@@ -690,6 +753,7 @@
 sc_trailing_blank:
 	@prohibit='[	 ]$$'						\
 	halt='found trailing blank(s)'					\
+	exclude='^Binary file .* matches$$'				\
 	  $(_sc_search_regexp)
 
 # Match lines like the following, but where there is only one space
@@ -708,12 +772,10 @@
 # Look for diagnostics that aren't marked for translation.
 # This won't find any for which error's format string is on a separate line.
 sc_unmarked_diagnostics:
-	@grep -nE							\
-	    '\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
-		$$($(VC_LIST_EXCEPT))					\
-	  | grep -Ev '(_|ngettext ?)\(' &&				\
-	  { echo '$(ME): found unmarked diagnostic(s)' 1>&2;		\
-	    exit 1; } || :
+	@prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+	exclude='(_|ngettext ?)\('					\
+	halt='found unmarked diagnostic(s)'				\
+	  $(_sc_search_regexp)
 
 # Avoid useless parentheses like those in this example:
 # #if defined (SYMBOL) || defined (SYM2)
@@ -746,6 +808,11 @@
 	'  with the corresponding gnulib module, they are always true')	\
 	  $(_sc_search_regexp)
 
+sc_prohibit_defined_have_decl_tests:
+	@prohibit='#[	 ]*if(n?def|.*\<defined)\>[	 (]+HAVE_DECL_'	\
+	halt='HAVE_DECL macros are always defined'			\
+	  $(_sc_search_regexp)
+
 # ==================================================================
 gl_other_headers_ ?= \
   intprops.h	\
@@ -911,8 +978,15 @@
 # A regular expression matching undesirable combinations of words like
 # "can not"; this matches them even when the two words appear on different
 # lines, but not when there is an intervening delimiter like "#" or "*".
+# Similarly undesirable, "See @xref{...}", since an @xref should start
+# a sentence.  Explicitly prohibit any prefix of "see" or "also".
+# Also prohibit a prefix matching "\w+ +".
+# @pxref gets the same see/also treatment and should be parenthesized;
+# presume it must *not* start a sentence.
+bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{
+bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{
 prohibit_undesirable_word_seq_RE_ ?=					\
-  /\bcan\s+not\b/gims
+  /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
 prohibit_undesirable_word_seq_ =					\
     -e 'while ($(prohibit_undesirable_word_seq_RE_))'			\
     $(perl_filename_lineno_text_)
@@ -974,10 +1048,10 @@
 	  $(_sc_search_regexp)
 
 sc_const_long_option:
-	@grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT))		\
-	  | grep -Ev 'const struct option|struct option const' && {	\
-	      echo 1>&2 '$(ME): add "const" to the above declarations'; \
-	      exit 1; } || :
+	@prohibit='^ *static.*struct option '				\
+	exclude='const struct option|struct option const'		\
+	halt='add "const" to the above declarations'			\
+	  $(_sc_search_regexp)
 
 NEWS_hash =								\
   $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p'		\
@@ -1015,15 +1089,15 @@
 # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
 _makefile_at_at_check_exceptions ?=
 sc_makefile_at_at_check:
-	@perl -ne '/\@[A-Z_0-9]+\@/'					\
-          -e ' && !/([A-Z_0-9]+)\s+=.*\@\1\@$$/'			\
+	@perl -ne '/\@\w+\@/'						\
+          -e ' && !/(\w+)\s+=.*\@\1\@$$/'				\
           -e ''$(_makefile_at_at_check_exceptions)			\
 	  -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}'	\
 	    $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
 	  && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
 
 news-check: NEWS
-	if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS		\
+	$(AM_V_GEN)if sed -n $(news-check-lines-spec)p $<		\
 	    | grep -E $(news-check-regexp) >/dev/null; then		\
 	  :;								\
 	else								\
@@ -1047,9 +1121,11 @@
 'you have changed the set of files with translatable diagnostics;\n\
 apply the above patch\n'
 
-# Verify that all source files using _() are listed in po/POTFILES.in.
+# Verify that all source files using _() (more specifically, files that
+# match $(_gl_translatable_string_re)) are listed in po/POTFILES.in.
 po_file ?= $(srcdir)/po/POTFILES.in
 generated_files ?= $(srcdir)/lib/*.[ch]
+_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
 sc_po_check:
 	@if test -f $(po_file); then					\
 	  grep -E -v '^(#|$$)' $(po_file)				\
@@ -1069,7 +1145,7 @@
 	    esac;							\
 	    files="$$files $$file";					\
 	  done;								\
-	  grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files		\
+	  grep -E -l '$(_gl_translatable_string_re)' $$files		\
 	    | sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2;	\
 	  diff -u -L $(po_file) -L $(po_file) $@-1 $@-2			\
 	    || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; };	\
@@ -1079,7 +1155,7 @@
 # Sometimes it is useful to change the PATH environment variable
 # in Makefiles.  When doing so, it's better not to use the Unix-centric
 # path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use '\'':'\'' above; use $$(PATH_SEPARATOR) instead'
+msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead'
 sc_makefile_path_separator_check:
 	@prohibit='PATH[=].*:'						\
 	in_vc_files='akefile|\.mk$$'					\
@@ -1090,7 +1166,7 @@
 # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
 # and is read-only.
 writable-files:
-	if test -d $(release_archive_dir); then				\
+	$(AM_V_GEN)if test -d $(release_archive_dir); then		\
 	  for file in $(DIST_ARCHIVES); do				\
 	    for p in ./ $(release_archive_dir)/; do			\
 	      test -e $$p$$file || continue;				\
@@ -1172,22 +1248,31 @@
 # not be constant, or might overflow a stack.  In general, use PATH_MAX as
 # a limit, not an array or alloca size.
 sc_prohibit_path_max_allocation:
-	@prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX'			\
+	@prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX'		\
 	halt='Avoid stack allocations of size PATH_MAX'			\
 	  $(_sc_search_regexp)
 
 sc_vulnerable_makefile_CVE-2009-4029:
 	@prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
-	in_files=$$(find $(srcdir) -name Makefile.in)			\
+	in_files='(^|/)Makefile\.in$$'					\
 	halt=$$(printf '%s\n'						\
 	  'the above files are vulnerable; beware of running'		\
 	  '  "make dist*" rules, and upgrade to fixed automake'		\
 	  '  see http://bugzilla.redhat.com/542609 for details')	\
 	  $(_sc_search_regexp)
 
+sc_vulnerable_makefile_CVE-2012-3386:
+	@prohibit='chmod a\+w \$$\(distdir\)'				\
+	in_files='(^|/)Makefile\.in$$'					\
+	halt=$$(printf '%s\n'						\
+	  'the above files are vulnerable; beware of running'		\
+	  '  "make distcheck", and upgrade to fixed automake'		\
+	  '  see http://bugzilla.redhat.com/CVE-2012-3386 for details')	\
+	  $(_sc_search_regexp)
+
 vc-diff-check:
-	(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
-	if test -s vc-diffs; then				\
+	$(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
+	$(AM_V_at)if test -s vc-diffs; then			\
 	  cat vc-diffs;						\
 	  echo "Some files are locally modified:" 1>&2;		\
 	  exit 1;						\
@@ -1203,41 +1288,55 @@
 
 # If it's not already specified, derive the GPG key ID from
 # the signed tag we've just applied to mark this release.
-gpg_key_ID ?= \
-  $$(git cat-file tag v$(VERSION) \
-     | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \
-     | sed -n '/^\[GNUPG:\] ERRSIG /{s///;s/ .*//p;q}')
+gpg_key_ID ?=								\
+  $$(cd $(srcdir)							\
+     && git cat-file tag v$(VERSION)					\
+        | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null	\
+        | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
 
 translation_project_ ?= coordinator@translationproject.org
 
 # Make info-gnu the default only for a stable release.
-ifeq ($(RELEASE_TYPE),stable)
-  announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
-  announcement_mail_headers_ ?=						\
-    To: info-gnu@gnu.org						\
-    Cc: $(announcement_Cc_)						\
-    Mail-Followup-To: $(PACKAGE_BUGREPORT)
-else
-  announcement_Cc_ ?= $(translation_project_)
-  announcement_mail_headers_ ?=						\
-    To: $(PACKAGE_BUGREPORT)						\
-    Cc: $(announcement_Cc_)
-endif
+announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_stable =		\
+  To: info-gnu@gnu.org				\
+  Cc: $(announcement_Cc_)			\
+  Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement_Cc_alpha = $(translation_project_)
+announcement_mail_headers_alpha =		\
+  To: $(PACKAGE_BUGREPORT)			\
+  Cc: $(announcement_Cc_)
 
+announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
+announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
+
+announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
 announcement: NEWS ChangeLog $(rel-files)
-	@$(srcdir)/$(_build-aux)/announce-gen				\
+# Not $(AM_V_GEN) since the output of this command serves as
+# annoucement message: it would start with " GEN announcement".
+	$(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen			\
 	    --mail-headers='$(announcement_mail_headers_)'		\
-	    --release-type=$(RELEASE_TYPE)				\
+	    --release-type=$(release-type)				\
 	    --package=$(PACKAGE)					\
 	    --prev=$(PREV_VERSION)					\
 	    --curr=$(VERSION)						\
 	    --gpg-key-id=$(gpg_key_ID)					\
+	    --srcdir=$(srcdir)						\
 	    --news=$(srcdir)/NEWS					\
 	    --bootstrap-tools=$(bootstrap-tools)			\
-	    --gnulib-version=$(gnulib-version)				\
+	    $$(case ,$(bootstrap-tools), in (*,gnulib,*)		\
+	       echo --gnulib-version=$(gnulib-version);; esac)		\
 	    --no-print-checksums					\
 	    $(addprefix --url-dir=, $(url_dir_list))
 
+.PHONY: release-commit
+release-commit:
+	$(AM_V_GEN)cd $(srcdir)				\
+	  && $(_build-aux)/do-release-commit-and-tag	\
+	       -C $(abs_builddir) $(RELEASE)
+
 ## ---------------- ##
 ## Updating files.  ##
 ## ---------------- ##
@@ -1246,16 +1345,22 @@
 www-gnu = http://www.gnu.org
 
 upload_dest_dir_ ?= $(PACKAGE)
+upload_command =						\
+  $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS)		\
+  --to $(gnu_rel_host):$(upload_dest_dir_)			\
+  $(rel-files)
 emit_upload_commands:
 	@echo =====================================
 	@echo =====================================
-	@echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\"
-	@echo "    --to $(gnu_rel_host):$(upload_dest_dir_) \\"
-	@echo "  $(rel-files)"
+	@echo '$(upload_command)'
 	@echo '# send the ~/announce-$(my_distdir) e-mail'
 	@echo =====================================
 	@echo =====================================
 
+.PHONY: upload
+upload:
+	$(AM_V_GEN)$(upload_command)
+
 define emit-commit-log
   printf '%s\n' 'maint: post-release administrivia' ''			\
     '* NEWS: Add header line for next release.'				\
@@ -1265,7 +1370,7 @@
 
 .PHONY: no-submodule-changes
 no-submodule-changes:
-	if test -d $(srcdir)/.git; then					\
+	$(AM_V_GEN)if test -d $(srcdir)/.git; then			\
 	  diff=$$(cd $(srcdir) && git submodule -q foreach		\
 		  git diff-index --name-only HEAD)			\
 	    || exit 1;							\
@@ -1285,8 +1390,9 @@
 public-submodule-commit:
 	$(AM_V_GEN)if test -d $(srcdir)/.git; then			\
 	  cd $(srcdir) &&						\
-	  git submodule --quiet foreach test '$$(git rev-parse $$sha1)'	\
-	      = '$$(git merge-base origin $$sha1)'			\
+	  git submodule --quiet foreach					\
+	      test '"$$(git rev-parse "$$sha1")"'			\
+	      = '"$$(git merge-base origin "$$sha1")"'			\
 	    || { echo '$(ME): found non-public submodule commit' >&2;	\
 		 exit 1; };						\
 	else								\
@@ -1301,19 +1407,22 @@
 gl_public_submodule_commit ?= public-submodule-commit
 check: $(gl_public_submodule_commit)
 
-.PHONY: alpha beta stable
+.PHONY: alpha beta stable release
 ALL_RECURSIVE_TARGETS += alpha beta stable
 alpha beta stable: $(local-check) writable-files $(submodule-checks)
-	test $@ = stable						\
+	$(AM_V_GEN)test $@ = stable					\
 	  && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$'		\
 	       || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
 	  || :
-	$(MAKE) vc-diff-check
-	$(MAKE) news-check
-	$(MAKE) distcheck
-	$(MAKE) dist XZ_OPT=-9ev
-	$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
-	$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+	$(AM_V_at)$(MAKE) vc-diff-check
+	$(AM_V_at)$(MAKE) news-check
+	$(AM_V_at)$(MAKE) distcheck
+	$(AM_V_at)$(MAKE) dist
+	$(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+	$(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+release:
+	$(AM_V_GEN)$(MAKE) $(release-type)
 
 # Override this in cfg.mk if you follow different procedures.
 release-prep-hook ?= release-prep
@@ -1321,19 +1430,19 @@
 gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
 .PHONY: release-prep
 release-prep:
-	case $$RELEASE_TYPE in alpha|beta|stable) ;; \
-	  *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
-	$(MAKE) --no-print-directory -s announcement > ~/announce-$(my_distdir)
-	if test -d $(release_archive_dir); then			\
+	$(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \
+	  > ~/announce-$(my_distdir)
+	$(AM_V_at)if test -d $(release_archive_dir); then	\
 	  ln $(rel-files) $(release_archive_dir);		\
 	  chmod a-w $(rel-files);				\
 	fi
-	echo $(VERSION) > $(prev_version_file)
-	$(MAKE) update-NEWS-hash
-	perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS
-	$(emit-commit-log) > .ci-msg
-	$(VC) commit -F .ci-msg -a
-	rm .ci-msg
+	$(AM_V_at)echo $(VERSION) > $(prev_version_file)
+	$(AM_V_at)$(MAKE) update-NEWS-hash
+	$(AM_V_at)perl -pi						\
+	  -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"'	\
+	  $(srcdir)/NEWS
+	$(AM_V_at)msg=$$($(emit-commit-log)) || exit 1;		\
+	cd $(srcdir) && $(VC) commit -m "$$msg" -a
 
 # Override this with e.g., -s $(srcdir)/some_other_name.texi
 # if the default $(PACKAGE)-derived name doesn't apply.
@@ -1341,14 +1450,20 @@
 
 .PHONY: web-manual
 web-manual:
-	@test -z "$(manual_title)" \
+	$(AM_V_GEN)test -z "$(manual_title)" \
 	  && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
-	@cd '$(srcdir)/doc'; \
+	$(AM_V_at)cd '$(srcdir)/doc'; \
 	  $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
 	     -o '$(abs_builddir)/doc/manual' \
 	     --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
 	    "$(PACKAGE_NAME) - $(manual_title)"
-	@echo " *** Upload the doc/manual directory to web-cvs."
+	$(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs."
+
+.PHONY: web-manual-update
+web-manual-update:
+	$(AM_V_GEN)cd $(srcdir) \
+	  && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir)
+
 
 # Code Coverage
 
@@ -1374,6 +1489,31 @@
 
 coverage: init-coverage build-coverage gen-coverage
 
+# Some projects carry local adjustments for gnulib modules via patches in
+# a gnulib patch directory whose default name is gl/ (defined in bootstrap
+# via local_gl_dir=gl).  Those patches become stale as the originals evolve
+# in gnulib.  Use this rule to refresh any stale patches.  It applies each
+# patch to the original in $(gnulib_dir) and uses the temporary result to
+# generate a fuzz-free .diff file.  If you customize the name of your local
+# gnulib patch directory via bootstrap.conf, this rule detects that name.
+# Run this from a non-VPATH (i.e., srcdir) build directory.
+.PHONY: refresh-gnulib-patches
+refresh-gnulib-patches:
+	gl=gl;								\
+	if test -f bootstrap.conf; then					\
+	  t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;'	\
+	       -e 'END{defined $$d and print $$d}' bootstrap.conf);	\
+	  test -n "$$t" && gl=$$t;					\
+	fi;								\
+	for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do	\
+	  b=$$(printf %s "$$diff"|sed 's/\.diff$$//');			\
+	  VERSION_CONTROL=none						\
+	    patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1;		\
+	  ( cd $(gnulib_dir) || exit 1;					\
+	    git diff "$$b" > "../$$gl/$$diff";				\
+	    git checkout $$b ) || exit 1;				\
+	done
+
 # Update gettext files.
 PACKAGE ?= $(shell basename $(PWD))
 PO_DOMAIN ?= $(PACKAGE)
@@ -1385,7 +1525,7 @@
 	wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
 	echo 'en@boldquot' > $(PODIR)/LINGUAS && \
 	echo 'en@quot' >> $(PODIR)/LINGUAS && \
-	ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
+	ls $(PODIR)/*.po | sed 's/\.po//;s,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
 
  # Running indent once is not idempotent, but running it twice is.
 INDENT_SOURCES ?= $(C_SOURCES)
@@ -1407,7 +1547,7 @@
 # in the file .x-update-copyright.
 .PHONY: update-copyright
 update-copyright:
-	grep -l -w Copyright                                             \
+	$(AM_V_GEN)grep -l -w Copyright                                  \
 	  $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
 	  | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
 
@@ -1480,6 +1620,7 @@
 # Files in which to search for the one-line style extern declarations.
 # $(_gl_TS_dir)-relative.
 _gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
 
 .PHONY: _gl_tight_scope
 _gl_tight_scope: $(bin_PROGRAMS)
@@ -1502,7 +1643,8 @@
 	  && { echo the above functions should have static scope >&2;	\
 	       exit 1; } || : ;						\
 	( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars);	\
-	  perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h	\
+	  perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"'		\
+		$$hdr $(_gl_TS_other_headers)				\
 	) | sort -u > $$t;						\
 	nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p'		\
             | sort -u | grep -Ev -f $$t					\
--- a/users.txt
+++ b/users.txt
@@ -1,25 +1,24 @@
 The following packages appear to be using gnulib and gnulib-tool:
 
-  CSSC            http://git.savannah.gnu.org/cgit/cssc.git
-  Net::CDP        http://search.cpan.org/src/MCHAPMAN/Net-CDP-0.09/libcdp/
-  OPeNDAP         http://scm.opendap.org:8090/svn/trunk/
-  acct            http://cvs.sv.gnu.org/viewcvs/acct/acct/
-  anubis          http://cvs.sv.gnu.org/viewcvs/anubis/anubis/
+  acct            http://svn.sv.gnu.org/viewvc/trunk/?root=acct
+  anubis          http://git.sv.gnu.org/gitweb/?p=anubis.git
   augeas          http://augeas.net/
   autobuild       http://josefsson.org/autobuild/
   barcode         http://git.sv.gnu.org/cgit/barcode.git/
   bison           http://git.sv.gnu.org/gitweb/?p=bison.git
   clisp           http://clisp.cvs.sourceforge.net/clisp/clisp/
   coreutils       http://git.sv.gnu.org/gitweb/?p=coreutils.git
-  cpio            http://cvs.sv.gnu.org/viewcvs/cpio/cpio/
+  cpio            http://git.sv.gnu.org/gitweb/?p=cpio.git
+  CSSC            http://git.savannah.gnu.org/cgit/cssc.git
   cvs             http://cvs.sv.gnu.org/viewcvs/cvs/ccvs/
   cvsps           http://sourceforge.net/projects/cvsps/
   diffutils       http://git.sv.gnu.org/cgit/diffutils.git/
   febootstrap     http://people.redhat.com/~rjones/febootstrap/
-  findutils       http://cvs.sv.gnu.org/viewcvs/findutils/findutils/
+  findutils       http://git.sv.gnu.org/gitweb/?p=findutils.git
+  freedink        http://git.sv.gnu.org/gitweb/?p=freedink.git
   gcal            http://git.savannah.gnu.org/gitweb/?p=gcal.git
   gdb             http://sourceware.org/git/?p=gdb.git;a=summary
-  gettext         http://cvs.sv.gnu.org/viewcvs/gettext/gettext/
+  gettext         http://git.sv.gnu.org/gitweb/?p=gettext.git
   gengetopt       http://git.sv.gnu.org/gitweb/?p=gengetopt.git
   gmediaserver    http://cvs.sv.gnu.org/viewvc/gmediaserver/gmediaserver/
   gnuit           http://www.gnu.org/software/gnuit/
@@ -33,20 +32,20 @@
   gtkreindeer     http://git.sv.gnu.org/gitweb/?p=gtkreindeer.git
   gtk-vnc         http://gtk-vnc.codemonkey.ws/hg/outgoing.hg
   grep            http://git.sv.gnu.org/cgit/grep.git/
-  guile           http://cvs.sv.gnu.org/viewvc/guile/guile/guile-core/
+  guile           http://git.sv.gnu.org/gitweb/?p=guile.git
   gzip            http://git.sv.gnu.org/cgit/gzip.git/
-  hello           http://cvs.sv.gnu.org/viewcvs/hello/hello/
+  hello           http://git.sv.gnu.org/gitweb/?p=hello.git
   hivex           http://git.annexia.org/?p=hivex.git
   icoutils        http://riva.ucam.org/svn/cjwatson/src/debian/icoutils/trunk/icoutils/
-  inetutils       http://cvs.sv.gnu.org/viewcvs/inetutils/inetutils/
+  inetutils       http://git.sv.gnu.org/gitweb/?p=inetutils.git
   iwhd            http://git.fedorahosted.org/git/?p=iwhd.git
   jugtail         http://cvs.savannah.gnu.org/viewvc/?root=jugtail
   jwhois          http://cvs.sv.gnu.org/viewvc/jwhois/jwhois/
   libdap          http://scm.opendap.org:8090/svn/trunk/libdap/
   libffcall       http://savannah.gnu.org/projects/libffcall/
-  libgnupdf       http://cvs.savannah.gnu.org/viewvc/libgnupdf/?root=pdf
+  libgnupdf       http://bzr.sv.gnu.org/lh/pdf/libgnupdf/trunk/files
   libguestfs      http://libguestfs.org/
-  libiconv        http://libiconv.cvs.sourceforge.net/libiconv/libiconv/
+  libiconv        http://git.sv.gnu.org/gitweb/?p=libiconv.git
   libidn          http://git.sv.gnu.org/gitweb/?p=libidn.git
   libidn2         http://josefsson.org/libidn2/
   libksba         http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/?root=KSBA
@@ -59,33 +58,36 @@
                   http://git.et.redhat.com/?p=libvirt.git;a=summary
   m4              http://git.sv.gnu.org/gitweb/?p=m4.git;a=summary
   mailfromd       http://svn.gnu.org.ua/viewvc/mailfromd/trunk/
-  mailutils       http://cvs.sv.gnu.org/viewcvs/mailutils/mailutils/
+  mailutils       http://git.sv.gnu.org/gitweb/?p=mailutils.git
   man-db          http://www.chiark.greenend.org.uk/~cjwatson/bzr/man-db/trunk/
   miktex          https://svn.sourceforge.net/svnroot/miktex/miktex/trunk
   mini-httpd      http://git.sv.gnu.org/gitweb/?p=mini-httpd.git
   msmtp           http://msmtp.cvs.sourceforge.net/msmtp/msmtp/
   myserver        http://git.sv.gnu.org/gitweb/?p=myserver.git;a=summary
   nagios-plugins  http://nagiosplug.git.sourceforge.net/
+  Net::CDP        http://search.cpan.org/src/MCHAPMAN/Net-CDP-0.09/libcdp/
   netcf           http://fedorahosted.org/netcf/
   newts           http://svn.arete.cc/newts/trunk/
   OATH Toolkit    http://www.nongnu.org/oath-toolkit/
   octave          http://hg.savannah.gnu.org/hgweb/octave/
+  OPeNDAP         http://scm.opendap.org:8090/svn/trunk/
   parted          http://git.debian.org/?p=parted/parted.git;a=summary
   patch           http://git.sv.gnu.org/gitweb/?p=patch.git
   prelude-lml     https://trac.prelude-ids.org/browser/trunk/prelude-lml/
   prelude-manager https://trac.prelude-ids.org/browser/trunk/prelude-manager/
   pspp            http://git.sv.gnu.org/gitweb/?p=pspp.git
-  radius          http://cvs.sv.gnu.org/viewcvs/radius/radius/
+  radius          http://git.sv.gnu.org/gitweb/?p=radius.git
   recutils        http://git.savannah.gnu.org/gitweb/?p=recutils.git
   reindeer        http://git.sv.gnu.org/gitweb/?p=reindeer.git
   rcs             http://git.savannah.gnu.org/cgit/rcs.git
-  sed             http://cvs.savannah.gnu.org/viewcvs/sed/?root=sed
-  sharutils       http://cvs.savannah.gnu.org/viewvc/sharutils/sharutils/
+  sed             http://git.sv.gnu.org/gitweb/?p=sed.git
+  sharutils       http://git.sv.gnu.org/gitweb/?p=sharutils.git
   shishi          http://git.sv.gnu.org/gitweb/?p=shishi.git
-  tar             http://cvs.sv.gnu.org/viewcvs/tar/tar/
+  tar             http://git.sv.gnu.org/gitweb/?p=tar.git
   texinfo         http://cvs.sv.gnu.org/viewcvs/texinfo/texinfo/
   tmpwatch        https://fedorahosted.org/tmpwatch/
   vc-dwim         http://git.sv.gnu.org/gitweb/?p=vc-dwim.git
+  wdiff           http://bzr.savannah.gnu.org/lh/wdiff/trunk/files
   wget            http://hg.addictivecode.org/wget/mainline/
   wydawca         http://svn.gnu.org.ua/viewvc/wydawca/trunk/
   wyslij-po       http://svn.gnu.org.ua/viewvc/wyslij-po/trunk/
@@ -93,7 +95,7 @@
 
 The following packages are using gnulib without gnulib-tool:
 
-  libtool         http://cvs.sv.gnu.org/viewcvs/libtool/libtool/
+  libtool         http://git.sv.gnu.org/gitweb/?p=libtool.git
   libgcrypt       http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/?root=Libgcrypt
 
 Articles: