gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_0_11-10-g2d6fbf5


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_11-10-g2d6fbf5
Date: Sun, 08 Jan 2012 10:38:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=2d6fbf53e588681ed0dcca2aef4efc168cc0f64c

The branch, master has been updated
       via  2d6fbf53e588681ed0dcca2aef4efc168cc0f64c (commit)
       via  52400b5ae463c90f83538ad43a76d61ced97f71d (commit)
       via  3dc1f4ad374c3e986fb3ab3c78442e9adfcce018 (commit)
       via  c21d24edeced2ff0b06418c25c4fdfa77b6e4e97 (commit)
       via  003bc980af051bbf2b88b4309ebea377a09192a6 (commit)
       via  9763f6735821f0df9da5d1996584f30741108130 (commit)
       via  f935f4fec2b7aae9f3b5fa3308dd6fb9483a5845 (commit)
       via  a7a6495414befe9b69578aa06cfe6c203c2d4289 (commit)
       via  f2dbc308adb7ce9523122c5e57bd93f872dc01bd (commit)
       via  54152a2f22626619575a0df9cd15027990d79529 (commit)
      from  c7f54f41d0aef87776d8c816e2e841cb94e2fc4a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2d6fbf53e588681ed0dcca2aef4efc168cc0f64c
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Jan 8 11:34:01 2012 +0100

    remove trailing slash.

commit 52400b5ae463c90f83538ad43a76d61ced97f71d
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Jan 8 11:29:59 2012 +0100

    Updated gnulib and added usleep and getaddrinfo modules.

commit 3dc1f4ad374c3e986fb3ab3c78442e9adfcce018
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Jan 8 11:02:49 2012 +0100

    Authority information access information -> Authority information access

commit c21d24edeced2ff0b06418c25c4fdfa77b6e4e97
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat Jan 7 10:29:19 2012 +0100

    _gnutls_proc_cert_client_certificate and 
_gnutls_proc_cert_server_certificate renamed to _gnutls_proc_certificate.

commit 003bc980af051bbf2b88b4309ebea377a09192a6
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat Jan 7 10:20:06 2012 +0100

    updated news

commit 9763f6735821f0df9da5d1996584f30741108130
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Jan 6 21:38:58 2012 +0100

    gnutls_dh_params_cpy() copies the src->q_bits.

commit f935f4fec2b7aae9f3b5fa3308dd6fb9483a5845
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Jan 6 21:38:44 2012 +0100

    properly deinitialize.

commit a7a6495414befe9b69578aa06cfe6c203c2d4289
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Jan 6 21:38:17 2012 +0100

    corrected leak in DH parameter generation.

commit f2dbc308adb7ce9523122c5e57bd93f872dc01bd
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Jan 6 21:24:01 2012 +0100

    updated changelog

commit 54152a2f22626619575a0df9cd15027990d79529
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Jan 6 21:23:48 2012 +0100

    removed old comment

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                    |    8 +
 GNUmakefile                                  |    6 +-
 NEWS                                         |    9 +
 build-aux/config.rpath                       |    2 +-
 build-aux/pmccabe2html                       |    2 +-
 build-aux/snippet/arg-nonnull.h              |    2 +-
 build-aux/snippet/c++defs.h                  |    2 +-
 build-aux/snippet/warn-on-use.h              |    2 +-
 build-aux/useless-if-before-free             |   10 +-
 build-aux/vc-list-files                      |    2 +-
 gl/Makefile.am                               |   35 +-
 gl/accept.c                                  |    2 +-
 gl/alloca.c                                  |    2 +-
 gl/alloca.in.h                               |    2 +-
 gl/alphasort.c                               |    2 +-
 gl/argp-ba.c                                 |    6 +-
 gl/argp-eexst.c                              |    2 +-
 gl/argp-fmtstream.c                          |    4 +-
 gl/argp-fmtstream.h                          |    4 +-
 gl/argp-fs-xinl.c                            |    2 +-
 gl/argp-help.c                               |   39 +-
 gl/argp-namefrob.h                           |    2 +-
 gl/argp-parse.c                              |   10 +-
 gl/argp-pin.c                                |    2 +-
 gl/argp-pv.c                                 |    2 +-
 gl/argp-pvh.c                                |    2 +-
 gl/argp-xinl.c                               |    2 +-
 gl/argp.h                                    |   36 +-
 gl/arpa_inet.in.h                            |    2 +-
 gl/asnprintf.c                               |    2 +-
 gl/asprintf.c                                |    2 +-
 gl/basename-lgpl.c                           |    2 +-
 gl/bind.c                                    |    2 +-
 gl/byteswap.in.h                             |    2 +-
 gl/c-ctype.c                                 |    2 +-
 gl/c-ctype.h                                 |   36 +-
 gl/close.c                                   |    2 +-
 gl/closedir.c                                |    2 +-
 gl/connect.c                                 |    2 +-
 gl/dirent-private.h                          |    2 +-
 gl/dirent.in.h                               |    2 +-
 gl/dirname-lgpl.c                            |    8 +-
 gl/dirname.h                                 |    8 +-
 gl/dosname.h                                 |    2 +-
 gl/errno.in.h                                |    2 +-
 gl/error.c                                   |   15 +-
 gl/error.h                                   |    8 +-
 gl/fd-hook.c                                 |    2 +-
 gl/fd-hook.h                                 |    2 +-
 gl/filename.h                                |    4 +-
 gl/float+.h                                  |    2 +-
 gl/float.c                                   |    2 +-
 gl/float.in.h                                |    2 +-
 gl/fpucw.h                                   |    2 +-
 gl/frexp.c                                   |    2 +-
 gl/frexpl.c                                  |    2 +-
 gl/fseek.c                                   |    2 +-
 gl/fseeko.c                                  |    2 +-
 gl/fseterr.c                                 |    2 +-
 gl/fseterr.h                                 |    2 +-
 gl/fstat.c                                   |    2 +-
 gl/ftell.c                                   |    2 +-
 gl/ftello.c                                  |    2 +-
 gl/gai_strerror.c                            |   93 ++
 gl/getaddrinfo.c                             |  444 +++++++
 gl/getdelim.c                                |    2 +-
 gl/getline.c                                 |    2 +-
 gl/getopt.c                                  |   66 +-
 gl/getopt.in.h                               |   54 +-
 gl/getopt1.c                                 |    6 +-
 gl/getopt_int.h                              |   16 +-
 gl/getpass.c                                 |    2 +-
 gl/getpass.h                                 |    2 +-
 gl/getpeername.c                             |    2 +-
 gl/getsubopt.c                               |    2 +-
 gl/gettext.h                                 |    2 +-
 gl/gettime.c                                 |    2 +-
 gl/gettimeofday.c                            |    2 +-
 gl/inet_ntop.c                               |    6 +-
 gl/inet_pton.c                               |   14 +-
 gl/intprops.h                                |    2 +-
 gl/isnan.c                                   |    4 +-
 gl/isnand-nolibm.h                           |    2 +-
 gl/isnand.c                                  |    2 +-
 gl/isnanf-nolibm.h                           |    2 +-
 gl/isnanf.c                                  |    2 +-
 gl/isnanl-nolibm.h                           |    2 +-
 gl/isnanl.c                                  |    2 +-
 gl/itold.c                                   |    2 +-
 gl/listen.c                                  |    2 +-
 gl/lseek.c                                   |    2 +-
 gl/m4/00gnulib.m4                            |    2 +-
 gl/m4/alloca.m4                              |   18 +-
 gl/m4/alphasort.m4                           |    2 +-
 gl/m4/argp.m4                                |    2 +-
 gl/m4/arpa_inet_h.m4                         |    2 +-
 gl/m4/byteswap.m4                            |    2 +-
 gl/m4/clock_time.m4                          |    2 +-
 gl/m4/close.m4                               |    2 +-
 gl/m4/closedir.m4                            |    8 +-
 gl/m4/codeset.m4                             |    2 +-
 gl/m4/dirent_h.m4                            |    2 +-
 gl/m4/dirname.m4                             |    2 +-
 gl/m4/double-slash-root.m4                   |    2 +-
 gl/m4/dup2.m4                                |    8 +-
 gl/m4/eealloc.m4                             |    2 +-
 gl/m4/environ.m4                             |    2 +-
 gl/m4/errno_h.m4                             |    2 +-
 gl/m4/error.m4                               |    2 +-
 gl/m4/exponentd.m4                           |    2 +-
 gl/m4/exponentf.m4                           |    2 +-
 gl/m4/exponentl.m4                           |    2 +-
 gl/m4/extensions.m4                          |    6 +-
 gl/m4/fcntl-o.m4                             |    2 +-
 gl/m4/fcntl_h.m4                             |    2 +-
 gl/m4/fdopen.m4                              |    2 +-
 gl/m4/float_h.m4                             |    2 +-
 gl/m4/fpieee.m4                              |    2 +-
 gl/m4/frexp.m4                               |    2 +-
 gl/m4/frexpl.m4                              |    2 +-
 gl/m4/fseek.m4                               |    2 +-
 gl/m4/fseeko.m4                              |    2 +-
 gl/m4/fstat.m4                               |    2 +-
 gl/m4/ftell.m4                               |    2 +-
 gl/m4/ftello.m4                              |    2 +-
 gl/m4/ftruncate.m4                           |    2 +-
 gl/m4/func.m4                                |    2 +-
 gl/m4/getaddrinfo.m4                         |  210 +++
 gl/m4/getcwd.m4                              |   51 +-
 gl/m4/getdelim.m4                            |    2 +-
 gl/m4/getline.m4                             |    2 +-
 gl/m4/getopt.m4                              |    6 +-
 gl/m4/getpagesize.m4                         |    2 +-
 gl/m4/getpass.m4                             |    2 +-
 gl/m4/getsubopt.m4                           |    2 +-
 gl/m4/gettext.m4                             |    4 +-
 gl/m4/gettime.m4                             |    2 +-
 gl/m4/gettimeofday.m4                        |    2 +-
 gl/m4/glibc2.m4                              |    2 +-
 gl/m4/glibc21.m4                             |    2 +-
 gl/m4/gnulib-cache.m4                        |    8 +-
 gl/m4/gnulib-common.m4                       |   10 +-
 gl/m4/gnulib-comp.m4                         |   41 +-
 gl/m4/gnulib-tool.m4                         |    2 +-
 gl/m4/hostent.m4                             |   49 +
 gl/m4/iconv.m4                               |    2 +-
 gl/m4/include_next.m4                        |    4 +-
 gl/m4/inet_ntop.m4                           |    2 +-
 gl/m4/inet_pton.m4                           |    2 +-
 gl/m4/intdiv0.m4                             |    2 +-
 gl/m4/intl.m4                                |    6 +-
 gl/m4/intldir.m4                             |    2 +-
 gl/m4/intlmacosx.m4                          |    2 +-
 gl/m4/intmax.m4                              |    2 +-
 gl/m4/intmax_t.m4                            |    2 +-
 gl/m4/inttypes-pri.m4                        |    2 +-
 gl/m4/inttypes.m4                            |   21 +-
 gl/m4/inttypes_h.m4                          |    2 +-
 gl/m4/ioctl.m4                               |    2 +-
 gl/m4/isnand.m4                              |    2 +-
 gl/m4/isnanf.m4                              |    2 +-
 gl/m4/isnanl.m4                              |    2 +-
 gl/m4/largefile.m4                           |    2 +-
 gl/m4/lcmessage.m4                           |    2 +-
 gl/m4/ld-output-def.m4                       |    2 +-
 gl/m4/ld-version-script.m4                   |    2 +-
 gl/m4/ldexpl.m4                              |    2 +-
 gl/m4/lib-ld.m4                              |    2 +-
 gl/m4/lib-link.m4                            |    2 +-
 gl/m4/lib-prefix.m4                          |    2 +-
 gl/m4/lock.m4                                |    2 +-
 gl/m4/longlong.m4                            |    8 +-
 gl/m4/lseek.m4                               |    2 +-
 gl/m4/lstat.m4                               |    6 +-
 gl/m4/malloc.m4                              |    2 +-
 gl/m4/malloca.m4                             |    2 +-
 gl/m4/manywarnings.m4                        |   36 +-
 gl/m4/math_h.m4                              |    2 +-
 gl/m4/memchr.m4                              |    2 +-
 gl/m4/memmem.m4                              |    2 +-
 gl/m4/mempcpy.m4                             |    2 +-
 gl/m4/minmax.m4                              |    2 +-
 gl/m4/mmap-anon.m4                           |    2 +-
 gl/m4/mode_t.m4                              |    2 +-
 gl/m4/msvc-inval.m4                          |    2 +-
 gl/m4/msvc-nothrow.m4                        |    2 +-
 gl/m4/multiarch.m4                           |    2 +-
 gl/m4/netdb_h.m4                             |    2 +-
 gl/m4/netinet_in_h.m4                        |    2 +-
 gl/m4/nls.m4                                 |    2 +-
 gl/m4/nocrash.m4                             |    2 +-
 gl/m4/open.m4                                |    2 +-
 gl/m4/opendir.m4                             |    8 +-
 gl/m4/pathmax.m4                             |    2 +-
 gl/m4/perror.m4                              |    2 +-
 gl/m4/pipe.m4                                |    2 +-
 gl/m4/po.m4                                  |    2 +-
 gl/m4/printf-frexp.m4                        |    2 +-
 gl/m4/printf-frexpl.m4                       |    2 +-
 gl/m4/printf-posix.m4                        |    2 +-
 gl/m4/printf.m4                              |    6 +-
 gl/m4/progtest.m4                            |    2 +-
 gl/m4/putenv.m4                              |    2 +-
 gl/m4/rawmemchr.m4                           |    2 +-
 gl/m4/read-file.m4                           |    2 +-
 gl/m4/readdir.m4                             |    2 +-
 gl/m4/realloc.m4                             |    2 +-
 gl/m4/scandir.m4                             |    2 +-
 gl/m4/select.m4                              |    2 +-
 gl/m4/servent.m4                             |   51 +
 gl/m4/setenv.m4                              |    2 +-
 gl/m4/signal_h.m4                            |    2 +-
 gl/m4/signbit.m4                             |    2 +-
 gl/m4/size_max.m4                            |    2 +-
 gl/m4/sleep.m4                               |    2 +-
 gl/m4/snprintf.m4                            |    2 +-
 gl/m4/socketlib.m4                           |    2 +-
 gl/m4/sockets.m4                             |    2 +-
 gl/m4/socklen.m4                             |    2 +-
 gl/m4/sockpfaf.m4                            |    2 +-
 gl/m4/ssize_t.m4                             |    2 +-
 gl/m4/stat.m4                                |    2 +-
 gl/m4/stdalign.m4                            |   23 +-
 gl/m4/stdarg.m4                              |    2 +-
 gl/m4/stdbool.m4                             |    2 +-
 gl/m4/stddef_h.m4                            |    2 +-
 gl/m4/stdint.m4                              |    8 +-
 gl/m4/stdint_h.m4                            |    2 +-
 gl/m4/stdio_h.m4                             |    2 +-
 gl/m4/stdlib_h.m4                            |   11 +-
 gl/m4/strcase.m4                             |    2 +-
 gl/m4/strchrnul.m4                           |    2 +-
 gl/m4/strdup.m4                              |    2 +-
 gl/m4/strerror.m4                            |    2 +-
 gl/m4/strerror_r.m4                          |    2 +-
 gl/m4/string_h.m4                            |    2 +-
 gl/m4/strings_h.m4                           |    2 +-
 gl/m4/strndup.m4                             |    2 +-
 gl/m4/strnlen.m4                             |    2 +-
 gl/m4/strverscmp.m4                          |    2 +-
 gl/m4/symlink.m4                             |    2 +-
 gl/m4/sys_ioctl_h.m4                         |    2 +-
 gl/m4/sys_select_h.m4                        |    2 +-
 gl/m4/sys_socket_h.m4                        |    2 +-
 gl/m4/sys_stat_h.m4                          |    2 +-
 gl/m4/sys_time_h.m4                          |    2 +-
 gl/m4/sys_types_h.m4                         |    2 +-
 gl/m4/sys_uio_h.m4                           |    2 +-
 gl/m4/sysexits.m4                            |    2 +-
 gl/m4/thread.m4                              |    2 +-
 gl/m4/threadlib.m4                           |   34 +-
 gl/m4/time_h.m4                              |    4 +-
 gl/m4/time_r.m4                              |    2 +-
 gl/m4/timespec.m4                            |    2 +-
 gl/m4/uintmax_t.m4                           |    2 +-
 gl/m4/ungetc.m4                              |    2 +-
 gl/m4/unistd_h.m4                            |   19 +-
 gl/m4/usleep.m4                              |   35 +
 gl/m4/valgrind-tests.m4                      |   11 +-
 gl/m4/vasnprintf.m4                          |    2 +-
 gl/m4/vasprintf.m4                           |    2 +-
 gl/m4/version-etc.m4                         |    2 +-
 gl/m4/vfprintf-posix.m4                      |    2 +-
 gl/m4/visibility.m4                          |    2 +-
 gl/m4/vprintf-posix.m4                       |    2 +-
 gl/m4/vsnprintf.m4                           |    2 +-
 gl/m4/warn-on-use.m4                         |    2 +-
 gl/m4/warnings.m4                            |    2 +-
 gl/m4/wchar_h.m4                             |    2 +-
 gl/m4/wchar_t.m4                             |    2 +-
 gl/m4/wint_t.m4                              |    2 +-
 gl/m4/xsize.m4                               |    2 +-
 gl/m4/yield.m4                               |    2 +-
 gl/malloc.c                                  |    2 +-
 gl/math.in.h                                 |    6 +-
 gl/memchr.c                                  |    2 +-
 gl/memmem.c                                  |    2 +-
 gl/mempcpy.c                                 |    2 +-
 gl/minmax.h                                  |    2 +-
 gl/msvc-inval.c                              |    4 +-
 gl/msvc-inval.h                              |    4 +-
 gl/msvc-nothrow.c                            |    4 +-
 gl/msvc-nothrow.h                            |    2 +-
 gl/netdb.in.h                                |   20 +-
 gl/netinet_in.in.h                           |    2 +-
 gl/opendir.c                                 |    2 +-
 gl/override/m4/valgrind-tests.m4.diff        |   20 +-
 gl/printf-args.c                             |    2 +-
 gl/printf-args.h                             |    2 +-
 gl/printf-frexp.c                            |    2 +-
 gl/printf-frexp.h                            |    2 +-
 gl/printf-frexpl.c                           |    2 +-
 gl/printf-frexpl.h                           |    2 +-
 gl/printf-parse.c                            |    4 +-
 gl/printf-parse.h                            |    2 +-
 gl/progname.c                                |    2 +-
 gl/progname.h                                |    2 +-
 gl/rawmemchr.c                               |    2 +-
 gl/read-file.c                               |    2 +-
 gl/read-file.h                               |    2 +-
 gl/readdir.c                                 |    2 +-
 gl/realloc.c                                 |    2 +-
 gl/recv.c                                    |    2 +-
 gl/recvfrom.c                                |    2 +-
 gl/scandir.c                                 |    2 +-
 gl/select.c                                  |   32 +-
 gl/send.c                                    |    2 +-
 gl/sendto.c                                  |    2 +-
 gl/setsockopt.c                              |    2 +-
 gl/shutdown.c                                |    2 +-
 gl/signal.in.h                               |    2 +-
 gl/signbitd.c                                |    2 +-
 gl/signbitf.c                                |    2 +-
 gl/signbitl.c                                |    2 +-
 gl/size_max.h                                |    2 +-
 gl/sleep.c                                   |    2 +-
 gl/snprintf.c                                |    2 +-
 gl/socket.c                                  |    2 +-
 gl/sockets.c                                 |    2 +-
 gl/sockets.h                                 |   15 +-
 gl/stdalign.in.h                             |   14 +-
 gl/stdarg.in.h                               |    2 +-
 gl/stdbool.in.h                              |    2 +-
 gl/stddef.in.h                               |    2 +-
 gl/stdint.in.h                               |   21 +-
 gl/stdio-impl.h                              |    2 +-
 gl/stdio.in.h                                |    8 +-
 gl/stdlib.in.h                               |   28 +-
 gl/str-two-way.h                             |    2 +-
 gl/strcasecmp.c                              |    2 +-
 gl/strchrnul.c                               |    2 +-
 gl/strdup.c                                  |    2 +-
 gl/strerror-override.c                       |    2 +-
 gl/strerror-override.h                       |    2 +-
 gl/strerror.c                                |    2 +-
 gl/string.in.h                               |    2 +-
 gl/strings.in.h                              |    2 +-
 gl/stripslash.c                              |    4 +-
 gl/strncasecmp.c                             |    2 +-
 gl/strndup.c                                 |    2 +-
 gl/strnlen.c                                 |    2 +-
 gl/strverscmp.c                              |    4 +-
 gl/sys_select.in.h                           |    2 +-
 gl/sys_socket.in.h                           |    2 +-
 gl/sys_stat.in.h                             |    2 +-
 gl/sys_time.in.h                             |    2 +-
 gl/sys_types.in.h                            |    2 +-
 gl/sys_uio.in.h                              |    2 +-
 gl/sysexits.in.h                             |    2 +-
 gl/tests/Makefile.am                         |   37 +-
 gl/tests/binary-io.h                         |    2 +-
 gl/tests/dup2.c                              |    4 +-
 gl/tests/fcntl.in.h                          |    6 +-
 gl/tests/fdopen.c                            |    2 +-
 gl/tests/getcwd-lgpl.c                       |    4 +-
 gl/tests/getpagesize.c                       |    4 +-
 gl/tests/glthread/lock.c                     |    4 +-
 gl/tests/glthread/lock.h                     |   16 +-
 gl/tests/glthread/thread.c                   |    4 +-
 gl/tests/glthread/thread.h                   |    6 +-
 gl/tests/glthread/threadlib.c                |    2 +-
 gl/tests/glthread/yield.h                    |    6 +-
 gl/tests/ignore-value.h                      |    2 +-
 gl/tests/infinity.h                          |    2 +-
 gl/tests/init.sh                             |  106 ++-
 gl/tests/inttypes.in.h                       | 1770 +++++++++++++-------------
 gl/tests/ioctl.c                             |    2 +-
 gl/tests/lstat.c                             |    8 +-
 gl/tests/macros.h                            |    2 +-
 gl/tests/malloca.c                           |    2 +-
 gl/tests/malloca.h                           |    2 +-
 gl/tests/minus-zero.h                        |    2 +-
 gl/tests/nan.h                               |    2 +-
 gl/tests/open.c                              |    2 +-
 gl/tests/pathmax.h                           |    2 +-
 gl/tests/perror.c                            |    2 +-
 gl/tests/pipe.c                              |    2 +-
 gl/tests/putenv.c                            |    6 +-
 gl/tests/same-inode.h                        |   16 +-
 gl/tests/setenv.c                            |   12 +-
 gl/tests/signature.h                         |    2 +-
 gl/tests/stat.c                              |    2 +-
 gl/tests/strerror_r.c                        |   14 +-
 gl/tests/symlink.c                           |    2 +-
 gl/tests/sys_ioctl.in.h                      |    2 +-
 gl/tests/test-accept.c                       |    2 +-
 gl/tests/test-alloca-opt.c                   |    2 +-
 gl/tests/test-argp-2.sh                      |    2 +-
 gl/tests/test-argp.c                         |    2 +-
 gl/tests/test-arpa_inet.c                    |    2 +-
 gl/tests/test-binary-io.c                    |   11 +-
 gl/tests/test-binary-io.sh                   |    1 +
 gl/tests/test-bind.c                         |    2 +-
 gl/tests/test-byteswap.c                     |    2 +-
 gl/tests/test-c-ctype.c                      |    2 +-
 gl/tests/test-close.c                        |    2 +-
 gl/tests/test-connect.c                      |    2 +-
 gl/tests/test-dirent.c                       |    2 +-
 gl/tests/test-dup2.c                         |    8 +-
 gl/tests/test-environ.c                      |    2 +-
 gl/tests/test-errno.c                        |    2 +-
 gl/tests/test-fcntl-h.c                      |    2 +-
 gl/tests/test-fdopen.c                       |    2 +-
 gl/tests/test-fgetc.c                        |    2 +-
 gl/tests/test-float.c                        |   11 +-
 gl/tests/test-fprintf-posix.h                |    2 +-
 gl/tests/test-fputc.c                        |    2 +-
 gl/tests/test-fread.c                        |    2 +-
 gl/tests/test-frexp.c                        |    2 +-
 gl/tests/test-frexpl.c                       |    2 +-
 gl/tests/test-fseek.c                        |    2 +-
 gl/tests/test-fseeko.c                       |    2 +-
 gl/tests/test-fseeko3.c                      |    2 +-
 gl/tests/test-fseeko4.c                      |    2 +-
 gl/tests/test-fseterr.c                      |    2 +-
 gl/tests/test-fstat.c                        |    2 +-
 gl/tests/test-ftell.c                        |    2 +-
 gl/tests/test-ftell3.c                       |    2 +-
 gl/tests/test-ftello.c                       |    2 +-
 gl/tests/test-ftello3.c                      |    2 +-
 gl/tests/test-ftello4.c                      |    2 +-
 gl/tests/test-ftruncate.c                    |    2 +-
 gl/tests/test-func.c                         |    2 +-
 gl/tests/test-fwrite.c                       |    2 +-
 gl/tests/test-getaddrinfo.c                  |  168 +++
 gl/tests/test-getcwd-lgpl.c                  |    2 +-
 gl/tests/test-getdelim.c                     |    2 +-
 gl/tests/test-getline.c                      |    2 +-
 gl/tests/test-getopt.c                       |    2 +-
 gl/tests/test-getopt.h                       |    2 +-
 gl/tests/test-getopt_long.h                  |    2 +-
 gl/tests/test-getpeername.c                  |    2 +-
 gl/tests/test-gettimeofday.c                 |    2 +-
 gl/tests/test-ignore-value.c                 |    2 +-
 gl/tests/test-inet_ntop.c                    |    2 +-
 gl/tests/test-inet_pton.c                    |    2 +-
 gl/tests/test-init.sh                        |   74 ++
 gl/tests/test-intprops.c                     |    2 +-
 gl/tests/test-inttypes.c                     |    5 +-
 gl/tests/test-ioctl.c                        |    2 +-
 gl/tests/test-isnand-nolibm.c                |    2 +-
 gl/tests/test-isnand.h                       |    2 +-
 gl/tests/test-isnanf-nolibm.c                |    2 +-
 gl/tests/test-isnanf.h                       |    2 +-
 gl/tests/test-isnanl-nolibm.c                |    2 +-
 gl/tests/test-isnanl.h                       |    2 +-
 gl/tests/test-listen.c                       |    2 +-
 gl/tests/test-lock.c                         |   14 +-
 gl/tests/test-lstat.c                        |    2 +-
 gl/tests/test-lstat.h                        |    2 +-
 gl/tests/test-malloc-gnu.c                   |    2 +-
 gl/tests/test-malloca.c                      |    2 +-
 gl/tests/test-math.c                         |    2 +-
 gl/tests/test-memchr.c                       |    2 +-
 gl/tests/test-netdb.c                        |    2 +-
 gl/tests/test-netinet_in.c                   |    2 +-
 gl/tests/test-open.c                         |    2 +-
 gl/tests/test-open.h                         |    2 +-
 gl/tests/test-pathmax.c                      |    2 +-
 gl/tests/test-perror.c                       |    2 +-
 gl/tests/test-perror2.c                      |    2 +-
 gl/tests/test-pipe.c                         |    6 +-
 gl/tests/test-printf-frexp.c                 |    2 +-
 gl/tests/test-printf-frexpl.c                |    2 +-
 gl/tests/test-printf-posix.h                 |    2 +-
 gl/tests/test-rawmemchr.c                    |    2 +-
 gl/tests/test-read-file.c                    |    2 +-
 gl/tests/test-recv.c                         |    2 +-
 gl/tests/test-recvfrom.c                     |    2 +-
 gl/tests/test-select-fd.c                    |    2 +-
 gl/tests/test-select-stdin.c                 |    2 +-
 gl/tests/test-select.c                       |    2 +-
 gl/tests/test-select.h                       |   10 +-
 gl/tests/test-send.c                         |    2 +-
 gl/tests/test-sendto.c                       |    2 +-
 gl/tests/test-setenv.c                       |    2 +-
 gl/tests/test-setsockopt.c                   |    2 +-
 gl/tests/test-shutdown.c                     |    2 +-
 gl/tests/test-signal-h.c                     |    2 +-
 gl/tests/test-signbit.c                      |    2 +-
 gl/tests/test-sleep.c                        |    2 +-
 gl/tests/test-snprintf.c                     |    2 +-
 gl/tests/test-sockets.c                      |    2 +-
 gl/tests/test-stat.c                         |    2 +-
 gl/tests/test-stat.h                         |    2 +-
 gl/tests/test-stdalign.c                     |    8 +-
 gl/tests/test-stdbool.c                      |    2 +-
 gl/tests/test-stddef.c                       |    2 +-
 gl/tests/test-stdint.c                       |    4 +-
 gl/tests/test-stdio.c                        |    2 +-
 gl/tests/test-stdlib.c                       |    2 +-
 gl/tests/test-strchrnul.c                    |    2 +-
 gl/tests/test-strerror.c                     |    2 +-
 gl/tests/test-strerror_r.c                   |    2 +-
 gl/tests/test-string.c                       |    2 +-
 gl/tests/test-strings.c                      |    2 +-
 gl/tests/test-strnlen.c                      |    2 +-
 gl/tests/test-strverscmp.c                   |    2 +-
 gl/tests/test-symlink.c                      |    2 +-
 gl/tests/test-symlink.h                      |    2 +-
 gl/tests/test-sys_ioctl.c                    |    2 +-
 gl/tests/test-sys_select.c                   |    2 +-
 gl/tests/test-sys_socket.c                   |    2 +-
 gl/tests/test-sys_stat.c                     |    2 +-
 gl/tests/test-sys_time.c                     |    2 +-
 gl/tests/test-sys_types.c                    |    2 +-
 gl/tests/test-sys_uio.c                      |    2 +-
 gl/tests/test-sys_wait.h                     |    2 +-
 gl/tests/test-sysexits.c                     |    2 +-
 gl/tests/test-thread_create.c                |    4 +-
 gl/tests/test-thread_self.c                  |    2 +-
 gl/tests/test-time.c                         |    2 +-
 gl/tests/test-u64.c                          |    2 +-
 gl/tests/test-unistd.c                       |    2 +-
 gl/tests/test-unsetenv.c                     |    2 +-
 gl/tests/{test-sys_ioctl.c => test-usleep.c} |   19 +-
 gl/tests/test-vasnprintf.c                   |    2 +-
 gl/tests/test-vasprintf.c                    |    2 +-
 gl/tests/test-vc-list-files-cvs.sh           |    3 +-
 gl/tests/test-vc-list-files-git.sh           |    2 +-
 gl/tests/test-verify.c                       |    2 +-
 gl/tests/test-version-etc.c                  |    2 +-
 gl/tests/test-version-etc.sh                 |    2 +-
 gl/tests/test-vfprintf-posix.c               |    2 +-
 gl/tests/test-vprintf-posix.c                |    2 +-
 gl/tests/test-vsnprintf.c                    |    2 +-
 gl/tests/test-wchar.c                        |    2 +-
 gl/tests/unsetenv.c                          |    4 +-
 gl/tests/w32sock.h                           |    2 +-
 gl/tests/zerosize-ptr.h                      |    2 +-
 gl/time.in.h                                 |    2 +-
 gl/time_r.c                                  |    2 +-
 gl/timespec.h                                |    2 +-
 gl/u64.h                                     |    2 +-
 gl/unistd.in.h                               |   50 +-
 gl/usleep.c                                  |   58 +
 gl/vasnprintf.c                              |    6 +-
 gl/vasnprintf.h                              |    2 +-
 gl/vasprintf.c                               |    2 +-
 gl/verify.h                                  |   16 +-
 gl/version-etc-fsf.c                         |    2 +-
 gl/version-etc.c                             |    4 +-
 gl/version-etc.h                             |    6 +-
 gl/vfprintf.c                                |    2 +-
 gl/vprintf.c                                 |    2 +-
 gl/vsnprintf.c                               |    2 +-
 gl/w32sock.h                                 |    2 +-
 gl/wchar.in.h                                |    2 +-
 gl/xsize.h                                   |    2 +-
 lib/auth/cert.c                              |    2 +-
 lib/auth/cert.h                              |    4 +-
 lib/auth/dhe.c                               |   16 +-
 lib/auth/rsa.c                               |    4 +-
 lib/auth/rsa_export.c                        |    4 +-
 lib/auth/srp_rsa.c                           |    4 +-
 lib/gnutls_dh_primes.c                       |    1 +
 lib/nettle/mpi.c                             |    6 -
 lib/x509/output.c                            |    2 +-
 maint.mk                                     |   49 +-
 tests/slow/Makefile.am                       |    3 +-
 tests/slow/gendh.c                           |    6 +-
 561 files changed, 3449 insertions(+), 1892 deletions(-)
 create mode 100644 gl/gai_strerror.c
 create mode 100644 gl/getaddrinfo.c
 create mode 100644 gl/m4/getaddrinfo.m4
 create mode 100644 gl/m4/hostent.m4
 create mode 100644 gl/m4/servent.m4
 create mode 100644 gl/m4/usleep.m4
 create mode 100644 gl/tests/test-getaddrinfo.c
 create mode 100755 gl/tests/test-init.sh
 copy gl/tests/{test-sys_ioctl.c => test-usleep.c} (68%)
 create mode 100644 gl/usleep.c

diff --git a/ChangeLog b/ChangeLog
index a06a672..87146b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-01-06  Nikos Mavrogiannopoulos <address@hidden>
 
+       * ChangeLog, NEWS: updated changelog and news for release
+
+2012-01-06  Nikos Mavrogiannopoulos <address@hidden>
+
+       * lib/gnutls_cipher.c: corrected typo
+
+2012-01-06  Nikos Mavrogiannopoulos <address@hidden>
+
        * NEWS, configure.ac, m4/hooks.m4: bumped version
 
 2012-01-06  Nikos Mavrogiannopoulos <address@hidden>
diff --git a/GNUmakefile b/GNUmakefile
index 86bc60f..d0fd3e8 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,11 +1,11 @@
-# Having a separate GNUmakefile lets me `include' the dynamically
+# Having a separate GNUmakefile lets me 'include' the dynamically
 # generated rules created via cfg.mk (package-local configuration)
 # as well as maint.mk (generic maintainer rules).
 # This makefile is used only if you run GNU Make.
 # It is necessary if you want to build targets usually of interest
 # only to the maintainer.
 
-# Copyright (C) 2001, 2003, 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 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
@@ -114,7 +114,7 @@ endif
 
 abort-due-to-no-makefile:
        @echo There seems to be no Makefile in this directory.   1>&2
-       @echo "You must run ./configure before running \`make'." 1>&2
+       @echo "You must run ./configure before running 'make'." 1>&2
        @exit 1
 
 endif
diff --git a/NEWS b/NEWS
index fb87906..df33d1b 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,15 @@ GnuTLS NEWS -- History of user-visible changes.                
-*- outline -*-
 Copyright (C) 2000-2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
+* Version 3.0.12 (unreleased)
+
+** libgnutls: Corrected memory leak in DH parameter
+generation.
+
+** API and ABI modifications:
+No changes since last version.
+
+
 * Version 3.0.11 (released 2012-01-06)
 
 ** libgnutls: Corrected functionality of 
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 8bd7f5d..c0d31f9 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2011 Free Software Foundation, Inc.
+#   Copyright 1996-2012 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <address@hidden>, 1996
 #
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index c7cf3d0..7cf8df7 100644
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -1,6 +1,6 @@
 # pmccabe2html - AWK script to convert pmccabe output to html       -*- awk -*-
 
-# Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# 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
diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h
index 6c2f1e8..3a9dd26 100644
--- a/build-aux/snippet/arg-nonnull.h
+++ b/build-aux/snippet/arg-nonnull.h
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h
index b6821a6..96da94b 100644
--- a/build-aux/snippet/c++defs.h
+++ b/build-aux/snippet/c++defs.h
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h
index 2cdeec3..d4cb94f 100644
--- a/build-aux/snippet/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index b8f5a26..2b64630 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -4,13 +4,13 @@ eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
 # Detect instances of "if (p) free (p);".
 # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
 
-my $VERSION = '2011-04-20 13:43'; # UTC
+my $VERSION = '2012-01-06 07:23'; # 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
 # do its job.  Otherwise, update this string manually.
 
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# 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
@@ -47,7 +47,7 @@ sub usage ($)
   my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
   if ($exit_code != 0)
     {
-      print $STREAM "Try `$ME --help' for more information.\n";
+      print $STREAM "Try '$ME --help' for more information.\n";
     }
   else
     {
@@ -62,7 +62,7 @@ detect free-like functions named FOO and BAR.
 OPTIONS:
 
    --list       print only the name of each matching FILE (\\0-terminated)
-   --name=N     add name N to the list of \`free\'-like functions to detect;
+   --name=N     add name N to the list of \'free\'-like functions to detect;
                   may be repeated
 
    --help       display this help and exit
@@ -125,7 +125,7 @@ sub is_NULL ($)
   foreach my $file (@ARGV)
     {
       open FH, '<', $file
-        or (warn "$ME: can't open `$file' for reading: $!\n"),
+        or (warn "$ME: can't open '$file' for reading: $!\n"),
           $err = EXIT_ERROR, next;
       while (defined (my $line = <FH>))
         {
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 405e458..d477da8 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -4,7 +4,7 @@
 # Print a version string.
 scriptversion=2011-05-16.22; # UTC
 
-# Copyright (C) 2006-2011 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
diff --git a/gl/Makefile.am b/gl/Makefile.am
index e5e0b6a..ed4c9fd 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
 # 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
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests 
--avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl 
--no-vc-files accept alloca alphasort argp bind byteswap c-ctype close connect 
error extensions func getpass getsubopt gettext gettime havelib inet_ntop 
inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile 
manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname 
read-file recv recvfrom scandir select send sendto setsockopt shutdown snprintf 
socket sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r 
timespec u64 unistd valgrind-tests vasprintf version-etc version-etc-fsf 
vfprintf-posix vprintf-posix vsnprintf warnings
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests 
--avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl 
--no-vc-files accept alloca alphasort argp bind byteswap c-ctype close connect 
error extensions freeaddrinfo func getaddrinfo getnameinfo getpass getsubopt 
gettext gettime havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions 
listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in 
pmccabe2html progname read-file recv recvfrom scandir select send sendto 
setsockopt shutdown snprintf socket sockets socklen stdint strcase strverscmp 
sys_socket sys_stat time_r timespec u64 unistd usleep valgrind-tests vasprintf 
version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -51,12 +51,15 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
 EXTRA_libgnu_la_SOURCES =
 libgnu_la_LDFLAGS = $(AM_LDFLAGS)
 libgnu_la_LDFLAGS += -no-undefined
+libgnu_la_LDFLAGS += $(GETADDRINFO_LIB)
+libgnu_la_LDFLAGS += $(HOSTENT_LIB)
 libgnu_la_LDFLAGS += $(INET_NTOP_LIB)
 libgnu_la_LDFLAGS += $(INET_PTON_LIB)
 libgnu_la_LDFLAGS += $(LIBSOCKET)
 libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME)
 libgnu_la_LDFLAGS += $(LIB_SELECT)
 libgnu_la_LDFLAGS += $(LTLIBINTL)
+libgnu_la_LDFLAGS += $(SERVENT_LIB)
 
 ## begin gnulib module accept
 
@@ -450,6 +453,15 @@ EXTRA_libgnu_la_SOURCES += ftello.c
 
 ## end   gnulib module ftello
 
+## begin gnulib module getaddrinfo
+
+
+EXTRA_DIST += gai_strerror.c getaddrinfo.c
+
+EXTRA_libgnu_la_SOURCES += gai_strerror.c getaddrinfo.c
+
+## end   gnulib module getaddrinfo
+
 ## begin gnulib module getdelim
 
 
@@ -1598,6 +1610,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) \
              -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
              -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
              -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_R''@/$(GNULIB_RANDOM_R)/g' \
              -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
@@ -1625,6 +1638,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) \
              -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
              -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_H''@|$(HAVE_RANDOM_H)|g' \
              -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
              -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
@@ -1642,6 +1656,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) \
              -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_R''@|$(REPLACE_PTSNAME_R)|g' \
              -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
              -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
              -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
@@ -2226,6 +2241,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
              -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
              -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+             -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
              -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
              -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
              -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
@@ -2238,11 +2254,12 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
              -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
              -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+             -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
              -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
              -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
              -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
              -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
+             -e 
's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
              -e 
's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
              -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' 
\
              -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
@@ -2275,6 +2292,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
              -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
              -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+             -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
              -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
              -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
              -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
@@ -2287,6 +2305,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
              -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
              -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+             -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
              -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
              -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
              -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
@@ -2301,6 +2320,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
              -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
              -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+             -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
              -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
              -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
              -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
@@ -2337,6 +2357,15 @@ EXTRA_DIST += 
$(top_srcdir)/build-aux/useless-if-before-free
 
 ## end   gnulib module useless-if-before-free
 
+## begin gnulib module usleep
+
+
+EXTRA_DIST += usleep.c
+
+EXTRA_libgnu_la_SOURCES += usleep.c
+
+## end   gnulib module usleep
+
 ## begin gnulib module vasnprintf
 
 
diff --git a/gl/accept.c b/gl/accept.c
index 01faf54..8775aae 100644
--- a/gl/accept.c
+++ b/gl/accept.c
@@ -1,6 +1,6 @@
 /* accept.c --- wrappers for Windows accept function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/alloca.c b/gl/alloca.c
index 06b12a7..ee0f018 100644
--- a/gl/alloca.c
+++ b/gl/alloca.c
@@ -475,4 +475,4 @@ i00afunc (long address)
 #  endif /* CRAY */
 
 # endif /* no alloca */
-#endif /* not GCC version 3 */
+#endif /* not GCC 2 */
diff --git a/gl/alloca.in.h b/gl/alloca.in.h
index 5b69c6c..ca9e7fe 100644
--- a/gl/alloca.in.h
+++ b/gl/alloca.in.h
@@ -1,6 +1,6 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation,
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify it
diff --git a/gl/alphasort.c b/gl/alphasort.c
index 25319dc..636c74a 100644
--- a/gl/alphasort.c
+++ b/gl/alphasort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997-1998, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997-1998, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify it
diff --git a/gl/argp-ba.c b/gl/argp-ba.c
index a03b134..0b3d0bd 100644
--- a/gl/argp-ba.c
+++ b/gl/argp-ba.c
@@ -1,5 +1,5 @@
 /* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
-   Copyright (C) 1996-1997, 1999, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1996-1997, 1999, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
@@ -19,8 +19,8 @@
 /* If set by the user program, it should point to string that is the
    bug-reporting address for the program.  It will be printed by argp_help if
    the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
-   messages), embedded in a sentence that says something like `Report bugs to
-   ADDR.'.  */
+   messages), embedded in a sentence that says something like "Report bugs to
+   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
diff --git a/gl/argp-eexst.c b/gl/argp-eexst.c
index 1082a39..dcb10a6 100644
--- a/gl/argp-eexst.c
+++ b/gl/argp-eexst.c
@@ -1,5 +1,5 @@
 /* Default definition for ARGP_ERR_EXIT_STATUS
-   Copyright (C) 1997, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
diff --git a/gl/argp-fmtstream.c b/gl/argp-fmtstream.c
index c308eb6..70e3eb8 100644
--- a/gl/argp-fmtstream.c
+++ b/gl/argp-fmtstream.c
@@ -1,5 +1,5 @@
 /* Word-wrapping and line-truncating streams
-   Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2011 Free Software
+   Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
@@ -17,7 +17,7 @@
    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 package emulates glibc `line_wrap_stream' semantics for systems that
+/* This package emulates glibc 'line_wrap_stream' semantics for systems that
    don't have that.  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/gl/argp-fmtstream.h b/gl/argp-fmtstream.h
index f664254..a891c3d 100644
--- a/gl/argp-fmtstream.h
+++ b/gl/argp-fmtstream.h
@@ -1,5 +1,5 @@
 /* Word-wrapping and line-truncating streams.
-   Copyright (C) 1997, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2006-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
@@ -16,7 +16,7 @@
    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 package emulates glibc `line_wrap_stream' semantics for systems that
+/* This package emulates glibc 'line_wrap_stream' semantics for systems that
    don't have that.  If the system does have it, it is just a wrapper for
    that.  This header file is only used internally while compiling argp, and
    shouldn't be installed.  */
diff --git a/gl/argp-fs-xinl.c b/gl/argp-fs-xinl.c
index 8dd679c..b030e58 100644
--- a/gl/argp-fs-xinl.c
+++ b/gl/argp-fs-xinl.c
@@ -1,5 +1,5 @@
 /* Real definitions for extern inline functions in argp-fmtstream.h
-   Copyright (C) 1997, 2003-2004, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003-2004, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
diff --git a/gl/argp-help.c b/gl/argp-help.c
index 0cc5838..6d2903e 100644
--- a/gl/argp-help.c
+++ b/gl/argp-help.c
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing help output
-   Copyright (C) 1995-2005, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1995-2005, 2007, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
@@ -56,7 +56,7 @@
 
 /* User-selectable (using an environment variable) formatting parameters.
 
-   These may be specified in an environment variable called `ARGP_HELP_FMT',
+   These may be specified in an environment variable called 'ARGP_HELP_FMT',
    with a contents like:  VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2
    Where VALn must be a positive integer.  The list of variables is in the
    UPARAM_NAMES vector, below.  */
@@ -73,13 +73,13 @@
 #define RMARGIN      79         /* right margin used for wrapping */
 
 /* User-selectable (using an environment variable) formatting parameters.
-   They must all be of type `int' for the parsing code to work.  */
+   They must all be of type 'int' for the parsing code to work.  */
 struct uparams
 {
   /* If true, arguments for an option are shown with both short and long
-     options, even when a given option has both, e.g. `-x ARG, --longx=ARG'.
+     options, even when a given option has both, e.g. '-x ARG, --longx=ARG'.
      If false, then if an option has both, the argument is only shown with
-     the long one, e.g., `-x, --longx=ARG', and a message indicating that
+     the long one, e.g., '-x, --longx=ARG', and a message indicating that
      this really means both is printed below the options.  */
   int dup_args;
 
@@ -111,7 +111,7 @@ static struct uparams uparams = {
 struct uparam_name
 {
   const char *name;             /* User name.  */
-  int is_bool;                  /* Whether it's `boolean'.  */
+  int is_bool;                  /* Whether it's 'boolean'.  */
   size_t uparams_offs;          /* Location of the (int) field in UPARAMS.  */
 };
 
@@ -728,7 +728,7 @@ canon_doc_option (const char **name)
       /* Skip initial whitespace.  */
       while (isspace ((unsigned char) **name))
         (*name)++;
-      /* Decide whether this looks like an option (leading `-') or not.  */
+      /* Decide whether this looks like an option (leading '-') or not.  */
       non_opt = (**name != '-');
       /* Skip until part of name used for sorting.  */
       while (**name && !isalnum ((unsigned char) **name))
@@ -755,7 +755,7 @@ hol_entry_cmp (const struct hol_entry *entry1,
       /* The entries are not within the same cluster, so we can't compare them
          directly, we have to use the appropiate clustering level too.  */
       if (! entry1->cluster)
-        /* ENTRY1 is at the `base level', not in a cluster, so we have to
+        /* 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
            ENTRY2 resides.  Note that if they're in the same group, the
            clustered option always comes laster.  */
@@ -785,7 +785,7 @@ hol_entry_cmp (const struct hol_entry *entry1,
         doc2 = canon_doc_option (&long2);
 
       if (doc1 != doc2)
-        /* `documentation' options always follow normal options (or
+        /* "documentation" options always follow normal options (or
            documentation options that *look* like normal options).  */
         return doc1 - doc2;
       else if (!short1 && !short2 && long1 && long2)
@@ -891,7 +891,8 @@ hol_append (struct hol *hol, struct hol *more)
 
           /* Fix up the short options pointers from HOL.  */
           for (e = entries, left = hol->num_entries; left > 0; e++, left--)
-            e->short_options += (short_options - hol->short_options);
+            e->short_options =
+              short_options + (e->short_options - hol->short_options);
 
           /* Now add the short options from MORE, fixing up its entries
              too.  */
@@ -1144,7 +1145,7 @@ hol_entry_help (struct hol_entry *entry, const struct 
argp_state *state,
 
   /* Now, long options.  */
   if (odoc (real))
-    /* A `documentation' option.  */
+    /* A "documentation" option.  */
     {
       __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col);
       for (opt = real, num = entry->num; num > 0; opt++, num--)
@@ -1438,7 +1439,7 @@ argp_args_usage (const struct argp *argp, const struct 
argp_state *state,
       const char *cp = fdoc;
       nl = __strchrnul (cp, '\n');
       if (*nl != '\0')
-        /* This is a `multi-level' args doc; advance to the correct position
+        /* This is a "multi-level" args doc; advance to the correct position
            as determined by our state in LEVELS, and update LEVELS.  */
         {
           int i;
@@ -1479,9 +1480,9 @@ argp_args_usage (const struct argp *argp, const struct 
argp_state *state,
 }
 
 /* Print the documentation for ARGP to STREAM; if POST is false, then
-   everything preceeding a `\v' character in the documentation strings (or
+   everything preceeding 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
+   following the '\v' character (nothing for strings without).  Each separate
    bit of documentation is separated a blank line, and if PRE_BLANK is true,
    then the first is as well.  If FIRST_ONLY is true, only the first
    occurrence is output.  Returns true if anything was output.  */
@@ -1579,7 +1580,7 @@ argp_doc (const struct argp *argp, const struct 
argp_state *state,
 
 /* Output a usage message for ARGP to STREAM.  If called from
    argp_state_help, STATE is the relevent parsing state.  FLAGS are from the
-   set ARGP_HELP_*.  NAME is what to use wherever a `program name' is
+   set ARGP_HELP_*.  NAME is what to use wherever a "program name" is
    needed. */
 static void
 _help (const struct argp *argp, const struct argp_state *state, FILE *stream,
@@ -1620,7 +1621,7 @@ _help (const struct argp *argp, const struct argp_state 
*state, FILE *stream,
     }
 
   if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE))
-    /* Print a short `Usage:' message.  */
+    /* Print a short "Usage:" message.  */
     {
       int first_pattern = 1, more_patterns;
       size_t num_pattern_levels = argp_args_levels (argp);
@@ -1680,7 +1681,7 @@ _help (const struct argp *argp, const struct argp_state 
*state, FILE *stream,
   if (flags & ARGP_HELP_SEE)
     {
       __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\
-Try `%s --help' or `%s --usage' for more information.\n"),
+Try '%s --help' or '%s --usage' for more information.\n"),
                                name, name);
       anything = 1;
     }
@@ -1723,7 +1724,7 @@ Try `%s --help' or `%s --usage' for more information.\n"),
 }
 
 /* Output a usage message for ARGP to STREAM.  FLAGS are from the set
-   ARGP_HELP_*.  NAME is what to use wherever a `program name' is needed. */
+   ARGP_HELP_*.  NAME is what to use wherever a "program name" is needed. */
 void __argp_help (const struct argp *argp, FILE *stream,
                   unsigned flags, char *name)
 {
@@ -1781,7 +1782,7 @@ weak_alias (__argp_state_help, argp_state_help)
 #endif
 
 /* If appropriate, print the printf string FMT and following args, preceded
-   by the program name and `:', to stderr, and followed by a `Try ... --help'
+   by the program name and ':', to stderr, and followed by a "Try ... --help"
    message, then exit (1).  */
 void
 __argp_error (const struct argp_state *state, const char *fmt, ...)
diff --git a/gl/argp-namefrob.h b/gl/argp-namefrob.h
index 5f6b020..a6df978 100644
--- a/gl/argp-namefrob.h
+++ b/gl/argp-namefrob.h
@@ -1,5 +1,5 @@
 /* Name frobnication for compiling argp outside of glibc
-   Copyright (C) 1997, 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003, 2007, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
diff --git a/gl/argp-parse.c b/gl/argp-parse.c
index 64360be..39b8336 100644
--- a/gl/argp-parse.c
+++ b/gl/argp-parse.c
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing, layered over getopt
-   Copyright (C) 1995-2000, 2002-2004, 2009-2011 Free Software Foundation, Inc.
+   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 <address@hidden>.
 
@@ -187,7 +187,7 @@ find_long_option (struct option *long_options, const char 
*name)
 }
 
 
-/* The state of a `group' during parsing.  Each group corresponds to a
+/* The state of a "group" during parsing.  Each group corresponds to a
    particular argp structure from the tree of such descending from the top
    level argp passed to argp_parse.  */
 struct group
@@ -439,7 +439,7 @@ calc_sizes (const struct argp *argp,  struct parser_sizes 
*szs)
           int num_opts = 0;
           while (!__option_is_end (opt++))
             num_opts++;
-          szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */
+          szs->short_len += num_opts * 3; /* opt + up to 2 ':'s */
           szs->long_len += num_opts;
         }
     }
@@ -781,7 +781,7 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey)
 
   if (parser->state.quoted && parser->state.next < parser->state.quoted)
     /* The next argument pointer has been moved to before the quoted
-       region, so pretend we never saw the quoting `--', and give getopt
+       region, so pretend we never saw the quoting "--", and give getopt
        another chance.  If the user hasn't removed it, getopt will just
        process it again.  */
     parser->state.quoted = 0;
@@ -813,7 +813,7 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey)
               && strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
                    == 0)
             /* Not only is this the end of the options, but it's a
-               `quoted' region, which may have args that *look* like
+               "quoted" region, which may have args that *look* like
                options, so we definitely shouldn't try to use getopt past
                here, whatever happens.  */
             parser->state.quoted = parser->state.next;
diff --git a/gl/argp-pin.c b/gl/argp-pin.c
index c966756..e50dad8 100644
--- a/gl/argp-pin.c
+++ b/gl/argp-pin.c
@@ -1,5 +1,5 @@
 /* Full and short program names for argp module
-   Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
diff --git a/gl/argp-pv.c b/gl/argp-pv.c
index 7a8cba7..1d5a010 100644
--- a/gl/argp-pv.c
+++ b/gl/argp-pv.c
@@ -1,5 +1,5 @@
 /* Default definition for ARGP_PROGRAM_VERSION.
-   Copyright (C) 1996-1997, 1999, 2006, 2009-2011 Free Software Foundation,
+   Copyright (C) 1996-1997, 1999, 2006, 2009-2012 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
diff --git a/gl/argp-pvh.c b/gl/argp-pvh.c
index 04f6603..5c858b3 100644
--- a/gl/argp-pvh.c
+++ b/gl/argp-pvh.c
@@ -1,5 +1,5 @@
 /* Default definition for ARGP_PROGRAM_VERSION_HOOK.
-   Copyright (C) 1996-1997, 1999, 2004, 2009-2011 Free Software Foundation,
+   Copyright (C) 1996-1997, 1999, 2004, 2009-2012 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
diff --git a/gl/argp-xinl.c b/gl/argp-xinl.c
index 5b1f6fb..7d45fcb 100644
--- a/gl/argp-xinl.c
+++ b/gl/argp-xinl.c
@@ -1,5 +1,5 @@
 /* Real definitions for extern inline functions in argp.h
-   Copyright (C) 1997-1998, 2004, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2004, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
diff --git a/gl/argp.h b/gl/argp.h
index c0483ab..f9f266e 100644
--- a/gl/argp.h
+++ b/gl/argp.h
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing, layered over getopt.
-   Copyright (C) 1995-1999, 2003-2011 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2003-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <address@hidden>.
 
@@ -94,7 +94,7 @@ struct argp_option
   /* The doc string for this option.  If both NAME and KEY are 0, This string
      will be printed outdented from the normal option column, making it
      useful as a group header (it will be the first thing printed in its
-     group); in this usage, it's conventional to end the string with a `:'.
+     group); in this usage, it's conventional to end the string with a ':'.
 
      Write the initial value as N_("TEXT") if you want xgettext to collect
      it into a POT file.  */
@@ -124,21 +124,21 @@ struct argp_option
 /* This option isn't actually an option (and so should be ignored by the
    actual option parser), but rather an arbitrary piece of documentation that
    should be displayed in much the same manner as the options.  If this flag
-   is set, then the option NAME field is displayed unmodified (e.g., no `--'
+   is set, then the option NAME field is displayed unmodified (e.g., no '--'
    prefix is added) at the left-margin (where a *short* option would normally
    be displayed), and the documentation string in the normal place. The NAME
    field will be translated using gettext, unless OPTION_NO_TRANS is set (see
    below). For purposes of sorting, any leading whitespace and punctuation is
-   ignored, except that if the first non-whitespace character is not `-', this
+   ignored, except that if the first non-whitespace character is not '-', this
    entry is displayed after all options (and OPTION_DOC entries with a leading
-   `-') in the same group.  */
+   '-') in the same group.  */
 #define OPTION_DOC              0x8
 
-/* This option shouldn't be included in `long' usage messages (but is still
+/* This option shouldn't be included in "long" usage messages (but is still
    included in help messages).  This is mainly intended for options that are
    completely documented in an argp's ARGS_DOC field, in which case including
    the option in the generic usage list would be redundant.  For instance,
-   if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
+   if ARGS_DOC is "FOO BAR\n-x BLAH", and the '-x' option's purpose is to
    distinguish these two cases, -x should probably be marked
    OPTION_NO_USAGE.  */
 #define OPTION_NO_USAGE         0x10
@@ -167,7 +167,7 @@ typedef error_t (*argp_parser_t) (int key, char *arg,
    ARGP_ERR_UNKNOWN should be returned if they aren't understood.
 
    The sequence of keys to a parsing function is either (where each
-   uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
+   uppercased word should be prefixed by 'ARGP_KEY_' and opt is a user key):
 
        INIT opt... NO_ARGS END SUCCESS  -- No non-option arguments at all
    or  INIT (opt | ARG)... END SUCCESS  -- All non-option args parsed
@@ -238,15 +238,15 @@ struct argp
   argp_parser_t parser;
 
   /* A string describing what other arguments are wanted by this program.  It
-     is only used by argp_usage to print the `Usage:' message.  If it
+     is only used by argp_usage to print the "Usage:" message.  If it
      contains newlines, the strings separated by them are considered
      alternative usage patterns, and printed on separate lines (lines after
-     the first are prefix by `  or: ' instead of `Usage:').  */
+     the first are prefix by "  or: " instead of "Usage:").  */
   const char *args_doc;
 
   /* If non-NULL, a string containing extra text to be printed before and
      after the options in a long help message (separated by a vertical tab
-     `\v' character).
+     '\v' character).
      Write the initial value as N_("BEFORE-TEXT") "\v" N_("AFTER-TEXT") if
      you want xgettext to collect the two pieces of text into a POT file.  */
   const char *doc;
@@ -265,7 +265,7 @@ struct argp
      defines, below, describing which other help text TEXT is.  The function
      should return either TEXT, if it should be used as-is, a replacement
      string, which should be malloced, and will be freed by argp, or NULL,
-     meaning `print nothing'.  The value for TEXT is *after* any translation
+     meaning "print nothing".  The value for TEXT is *after* any translation
      has been done, so if any of the replacement text also needs translation,
      that should be done by the filter function.  INPUT is either the input
      supplied to argp_parse, or NULL, if argp_help was called directly.  */
@@ -304,7 +304,7 @@ struct argp_child
      printing a header string, use a value of "".  */
   const char *header;
 
-  /* Where to group the child options relative to the other (`consolidated')
+  /* Where to group the child options relative to the other ("consolidated")
      options in the parent argp; the values are the same as the GROUP field
      in argp_option structs, but all child-groupings follow parent options at
      a particular group level.  If both this field and HEADER are zero, then
@@ -337,7 +337,7 @@ struct argp_state
   unsigned arg_num;
 
   /* If non-zero, the index in ARGV of the first argument following a special
-     `--' argument (which prevents anything following being interpreted as an
+     '--' argument (which prevents anything following being interpreted as an
      option).  Only set once argument parsing has proceeded past this point. */
   int quoted;
 
@@ -399,7 +399,7 @@ struct argp_state
 /* Don't exit on errors (they may still result in error messages).  */
 #define ARGP_NO_EXIT    0x20
 
-/* Use the gnu getopt `long-only' rules for parsing arguments.  */
+/* Use the gnu getopt "long-only" rules for parsing arguments.  */
 #define ARGP_LONG_ONLY  0x40
 
 /* Turns off any message-printing/exiting options.  */
@@ -456,7 +456,7 @@ extern void (*argp_program_version_hook) (FILE *__restrict 
__stream,
    the bug-reporting address for the program.  It will be printed by
    argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
    standard help messages), embedded in a sentence that says something like
-   `Report bugs to ADDR.'.  */
+   "Report bugs to ADDR."  */
 extern const char *argp_program_bug_address;
 
 /* The exit status that argp will use when exiting due to a parsing error.
@@ -467,7 +467,7 @@ extern error_t argp_err_exit_status;
 /* Flags for argp_help.  */
 #define ARGP_HELP_USAGE         0x01 /* a Usage: message. */
 #define ARGP_HELP_SHORT_USAGE   0x02 /*  " but don't actually print options. */
-#define ARGP_HELP_SEE           0x04 /* a `Try ... for more help' message. */
+#define ARGP_HELP_SEE           0x04 /* a "Try ... for more help" message. */
 #define ARGP_HELP_LONG          0x08 /* a long help message. */
 #define ARGP_HELP_PRE_DOC       0x10 /* doc string preceding long help.  */
 #define ARGP_HELP_POST_DOC      0x20 /* doc string following long help.  */
@@ -526,7 +526,7 @@ extern void __argp_usage (const struct argp_state *__state);
 #endif
 
 /* If appropriate, print the printf string FMT and following args, preceded
-   by the program name and `:', to stderr, and followed by a `Try ... --help'
+   by the program name and ':', to stderr, and followed by a "Try ... --help"
    message, then exit (1).  */
 extern void argp_error (const struct argp_state *__restrict __state,
                         const char *__restrict __fmt, ...)
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h
index 5264853..91b1008 100644
--- a/gl/arpa_inet.in.h
+++ b/gl/arpa_inet.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <arpa/inet.h>.
 
-   Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 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
diff --git a/gl/asnprintf.c b/gl/asnprintf.c
index e4fd95c..416a586 100644
--- a/gl/asnprintf.c
+++ b/gl/asnprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 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
diff --git a/gl/asprintf.c b/gl/asprintf.c
index 2f13126..b8b405f 100644
--- a/gl/asprintf.c
+++ b/gl/asprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006-2007, 2009-2011 Free Software Foundation,
+   Copyright (C) 1999, 2002, 2006-2007, 2009-2012 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/basename-lgpl.c b/gl/basename-lgpl.c
index 529bc35..43ef8c2 100644
--- a/gl/basename-lgpl.c
+++ b/gl/basename-lgpl.c
@@ -1,6 +1,6 @@
 /* basename.c -- return the last element in a file name
 
-   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/bind.c b/gl/bind.c
index baaea59..0045c9d 100644
--- a/gl/bind.c
+++ b/gl/bind.c
@@ -1,6 +1,6 @@
 /* bind.c --- wrappers for Windows bind function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h
index 6114916..e356699 100644
--- a/gl/byteswap.in.h
+++ b/gl/byteswap.in.h
@@ -1,5 +1,5 @@
 /* byteswap.h - Byte swapping
-   Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
    Written by Oskar Liljeblad <address@hidden>, 2005.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/c-ctype.c b/gl/c-ctype.c
index 0fb4295..6ca7992 100644
--- a/gl/c-ctype.c
+++ b/gl/c-ctype.c
@@ -1,6 +1,6 @@
 /* Character handling in C locale.
 
-   Copyright 2000-2003, 2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright 2000-2003, 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
diff --git a/gl/c-ctype.h b/gl/c-ctype.h
index 57e71ee..a857748 100644
--- a/gl/c-ctype.h
+++ b/gl/c-ctype.h
@@ -5,7 +5,7 @@
    <ctype.h> functions' behaviour depends on the current locale set via
    setlocale.
 
-   Copyright (C) 2000-2003, 2006, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2006, 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
@@ -118,23 +118,23 @@ extern "C" {
          if (c_isalpha (*s)) ...
  */
 
-extern bool c_isascii (int c); /* not locale dependent */
-
-extern bool c_isalnum (int c);
-extern bool c_isalpha (int c);
-extern bool c_isblank (int c);
-extern bool c_iscntrl (int c);
-extern bool c_isdigit (int c);
-extern bool c_islower (int c);
-extern bool c_isgraph (int c);
-extern bool c_isprint (int c);
-extern bool c_ispunct (int c);
-extern bool c_isspace (int c);
-extern bool c_isupper (int c);
-extern bool c_isxdigit (int c);
-
-extern int c_tolower (int c);
-extern int c_toupper (int c);
+extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */
+
+extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_islower (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST;
+extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST;
+
+extern int c_tolower (int c) _GL_ATTRIBUTE_CONST;
+extern int c_toupper (int c) _GL_ATTRIBUTE_CONST;
 
 
 #if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && 
!defined NO_C_CTYPE_MACROS
diff --git a/gl/close.c b/gl/close.c
index c2197fe..4b7accb 100644
--- a/gl/close.c
+++ b/gl/close.c
@@ -1,5 +1,5 @@
 /* close replacement.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/closedir.c b/gl/closedir.c
index 0fdce18..df31e86 100644
--- a/gl/closedir.c
+++ b/gl/closedir.c
@@ -1,5 +1,5 @@
 /* Stop reading the entries of a directory.
-   Copyright (C) 2006-2011 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
diff --git a/gl/connect.c b/gl/connect.c
index afd13b9..939b399 100644
--- a/gl/connect.c
+++ b/gl/connect.c
@@ -1,6 +1,6 @@
 /* connect.c --- wrappers for Windows connect function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/dirent-private.h b/gl/dirent-private.h
index 74632ff..b60203c 100644
--- a/gl/dirent-private.h
+++ b/gl/dirent-private.h
@@ -1,5 +1,5 @@
 /* Private details of the DIR type.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/dirent.in.h b/gl/dirent.in.h
index cbcf841..808b360 100644
--- a/gl/dirent.in.h
+++ b/gl/dirent.in.h
@@ -1,5 +1,5 @@
 /* A GNU-like <dirent.h>.
-   Copyright (C) 2006-2011 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
diff --git a/gl/dirname-lgpl.c b/gl/dirname-lgpl.c
index f5b0c0f..2895cbc 100644
--- a/gl/dirname-lgpl.c
+++ b/gl/dirname-lgpl.c
@@ -1,6 +1,6 @@
 /* dirname.c -- return all but the last element in a file name
 
-   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,7 @@
 
 /* Return the length of the prefix of FILE that will be used by
    dir_name.  If FILE is in the working directory, this returns zero
-   even though `dir_name (FILE)' will return ".".  Works properly even
+   even though 'dir_name (FILE)' will return ".".  Works properly even
    if there are trailing slashes (by effectively ignoring them).  */
 
 size_t
@@ -53,9 +53,9 @@ dir_len (char const *file)
 }
 
 
-/* In general, we can't use the builtin `dirname' function if available,
+/* In general, we can't use the builtin 'dirname' function if available,
    since it has different meanings in different environments.
-   In some environments the builtin `dirname' modifies its argument.
+   In some environments the builtin 'dirname' modifies its argument.
 
    Return the leading directories part of FILE, allocated with malloc.
    Works properly even if there are trailing slashes (by effectively
diff --git a/gl/dirname.h b/gl/dirname.h
index 2ef9882..51a685c 100644
--- a/gl/dirname.h
+++ b/gl/dirname.h
@@ -1,6 +1,6 @@
 /*  Take file names apart into directory and base names.
 
-    Copyright (C) 1998, 2001, 2003-2006, 2009-2011 Free Software Foundation,
+    Copyright (C) 1998, 2001, 2003-2006, 2009-2012 Free Software Foundation,
     Inc.
 
     This program is free software: you can redistribute it and/or modify
@@ -37,9 +37,9 @@ char *dir_name (char const *file);
 # endif
 
 char *mdir_name (char const *file);
-size_t base_len (char const *file);
-size_t dir_len (char const *file);
-char *last_component (char const *file);
+size_t base_len (char const *file) _GL_ATTRIBUTE_PURE;
+size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE;
+char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
 
 bool strip_trailing_slashes (char *file);
 
diff --git a/gl/dosname.h b/gl/dosname.h
index acdd03b..0468ce4 100644
--- a/gl/dosname.h
+++ b/gl/dosname.h
@@ -1,6 +1,6 @@
 /* File names on MS-DOS/Windows systems.
 
-   Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2000-2001, 2004-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
diff --git a/gl/errno.in.h b/gl/errno.in.h
index b6014b4..5271bcd 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -1,6 +1,6 @@
 /* A POSIX-like <errno.h>.
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/error.c b/gl/error.c
index 5ebe8bf..dc8c65f 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -1,5 +1,5 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000-2007, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -54,7 +54,7 @@
    function without parameters instead.  */
 void (*error_print_progname) (void);
 
-/* This variable is incremented each time `error' is called.  */
+/* This variable is incremented each time 'error' is called.  */
 unsigned int error_message_count;
 
 #ifdef _LIBC
@@ -65,7 +65,7 @@ unsigned int error_message_count;
 # include <limits.h>
 # include <libio/libioP.h>
 
-/* In GNU libc we want do not want to use the common name `error' directly.
+/* In GNU libc we want do not want to use the common name 'error' directly.
    Instead make it a weak alias.  */
 extern void __error (int status, int errnum, const char *message, ...)
      __attribute__ ((__format__ (__printf__, 3, 4)));
@@ -89,7 +89,7 @@ extern void __error_at_line (int status, int errnum, const 
char *file_name,
 # include <unistd.h>
 
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #  define WIN32_LEAN_AND_MEAN
 #  include <windows.h>
 /* Get _get_osfhandle.  */
@@ -125,9 +125,10 @@ static inline int
 is_open (int fd)
 {
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-  /* On Win32: The initial state of unassigned standard file descriptors is
-     that they are open but point to an INVALID_HANDLE_VALUE.  There is no
-     fcntl, and the gnulib replacement fcntl does not support F_GETFL.  */
+  /* On native Windows: The initial state of unassigned standard file
+     descriptors is that they are open but point to an INVALID_HANDLE_VALUE.
+     There is no fcntl, and the gnulib replacement fcntl does not support
+     F_GETFL.  */
   return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
 # else
 #  ifndef F_GETFL
diff --git a/gl/error.h b/gl/error.h
index 80f81bc..9c2cb8b 100644
--- a/gl/error.h
+++ b/gl/error.h
@@ -1,5 +1,5 @@
 /* Declaration for error-reporting function
-   Copyright (C) 1995-1997, 2003, 2006, 2008-2011 Free Software Foundation,
+   Copyright (C) 1995-1997, 2003, 2006, 2008-2012 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
 
@@ -35,9 +35,9 @@
 extern "C" {
 #endif
 
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
+/* Print a message with 'fprintf (stderr, FORMAT, ...)';
    if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
-   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
+   If STATUS is nonzero, terminate the program with 'exit (STATUS)'.  */
 
 extern void error (int __status, int __errnum, const char *__format, ...)
      _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
@@ -51,7 +51,7 @@ extern void error_at_line (int __status, int __errnum, const 
char *__fname,
    function without parameters instead.  */
 extern void (*error_print_progname) (void);
 
-/* This variable is incremented each time `error' is called.  */
+/* This variable is incremented each time 'error' is called.  */
 extern unsigned int error_message_count;
 
 /* Sometimes we want to have at most one error per line.  This
diff --git a/gl/fd-hook.c b/gl/fd-hook.c
index b58300d..8f4ffe2 100644
--- a/gl/fd-hook.c
+++ b/gl/fd-hook.c
@@ -1,5 +1,5 @@
 /* Hook for making making file descriptor functions close(), ioctl() 
extensible.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2009.
 
    This program is free software: you can redistribute it and/or modify it
diff --git a/gl/fd-hook.h b/gl/fd-hook.h
index ada4c87..721e9ad 100644
--- a/gl/fd-hook.h
+++ b/gl/fd-hook.h
@@ -1,5 +1,5 @@
 /* Hook for making making file descriptor functions close(), ioctl() 
extensible.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/filename.h b/gl/filename.h
index 7827c11..7b89d0d 100644
--- a/gl/filename.h
+++ b/gl/filename.h
@@ -1,5 +1,5 @@
 /* Basic filename support macros.
-   Copyright (C) 2001-2004, 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 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
@@ -29,7 +29,7 @@ extern "C" {
    IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
  */
 #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined 
__EMX__ || defined __DJGPP__
-  /* Win32, Cygwin, OS/2, DOS */
+  /* Native Windows, Cygwin, OS/2, DOS */
 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
 # define HAS_DEVICE(P) \
     ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
diff --git a/gl/float+.h b/gl/float+.h
index 2e84489..c294350 100644
--- a/gl/float+.h
+++ b/gl/float+.h
@@ -1,5 +1,5 @@
 /* Supplemental information about the floating-point formats.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2007.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/float.c b/gl/float.c
index b05b40c..ea31866 100644
--- a/gl/float.c
+++ b/gl/float.c
@@ -1,5 +1,5 @@
 /* Auxiliary definitions for <float.h>.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   Copyright (C) 2011-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2011.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/float.in.h b/gl/float.in.h
index d5b2258..b420510 100644
--- a/gl/float.in.h
+++ b/gl/float.in.h
@@ -1,6 +1,6 @@
 /* A correct <float.h>.
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/fpucw.h b/gl/fpucw.h
index 07403bf..a62c51d 100644
--- a/gl/fpucw.h
+++ b/gl/fpucw.h
@@ -1,5 +1,5 @@
 /* Manipulating the FPU control word.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2007.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/frexp.c b/gl/frexp.c
index 26bdec9..4f5d0c0 100644
--- a/gl/frexp.c
+++ b/gl/frexp.c
@@ -1,5 +1,5 @@
 /* Split a double into fraction and mantissa.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/frexpl.c b/gl/frexpl.c
index c468937..b74ceeb 100644
--- a/gl/frexpl.c
+++ b/gl/frexpl.c
@@ -1,5 +1,5 @@
 /* Split a 'long double' into fraction and mantissa.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/fseek.c b/gl/fseek.c
index bcb76d8..20f5e2c 100644
--- a/gl/fseek.c
+++ b/gl/fseek.c
@@ -1,5 +1,5 @@
 /* An fseek() function that, together with fflush(), is POSIX compliant.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/fseeko.c b/gl/fseeko.c
index 87d6638..eae1b72 100644
--- a/gl/fseeko.c
+++ b/gl/fseeko.c
@@ -1,5 +1,5 @@
 /* An fseeko() function that, together with fflush(), is POSIX compliant.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/fseterr.c b/gl/fseterr.c
index eaad702..30b41e1 100644
--- a/gl/fseterr.c
+++ b/gl/fseterr.c
@@ -1,5 +1,5 @@
 /* Set the error indicator of a stream.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/fseterr.h b/gl/fseterr.h
index e4b061b..b3930c5 100644
--- a/gl/fseterr.h
+++ b/gl/fseterr.h
@@ -1,5 +1,5 @@
 /* Set the error indicator of a stream.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/fstat.c b/gl/fstat.c
index db5b17c..4918495 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -1,5 +1,5 @@
 /* fstat() replacement.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/ftell.c b/gl/ftell.c
index 74ec986..817e9ff 100644
--- a/gl/ftell.c
+++ b/gl/ftell.c
@@ -1,5 +1,5 @@
 /* An ftell() function that works around platform bugs.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/ftello.c b/gl/ftello.c
index fbdc44f..1beb202 100644
--- a/gl/ftello.c
+++ b/gl/ftello.c
@@ -1,5 +1,5 @@
 /* An ftello() function that works around platform bugs.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c
new file mode 100644
index 0000000..b846e48
--- /dev/null
+++ b/gl/gai_strerror.c
@@ -0,0 +1,93 @@
+/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2012 Free Software
+   Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Philip Blundell <address@hidden>, 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, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <netdb.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "gettext.h"
+# define _(String) gettext (String)
+# define N_(String) String
+#endif
+
+#if HAVE_DECL_GAI_STRERROR
+
+# include <sys/socket.h>
+# undef gai_strerror
+# if HAVE_DECL_GAI_STRERRORA
+#  define gai_strerror gai_strerrorA
+# endif
+
+const char *
+rpl_gai_strerror (int code)
+{
+  return gai_strerror (code);
+}
+
+#else /* !HAVE_DECL_GAI_STRERROR */
+
+static struct
+  {
+    int code;
+    const char *msg;
+  }
+values[] =
+  {
+    { EAI_ADDRFAMILY, N_("Address family for hostname not supported") },
+    { EAI_AGAIN, N_("Temporary failure in name resolution") },
+    { EAI_BADFLAGS, N_("Bad value for ai_flags") },
+    { EAI_FAIL, N_("Non-recoverable failure in name resolution") },
+    { EAI_FAMILY, N_("ai_family not supported") },
+    { EAI_MEMORY, N_("Memory allocation failure") },
+    { EAI_NODATA, N_("No address associated with hostname") },
+    { EAI_NONAME, N_("Name or service not known") },
+    { EAI_SERVICE, N_("Servname not supported for ai_socktype") },
+    { EAI_SOCKTYPE, N_("ai_socktype not supported") },
+    { EAI_SYSTEM, N_("System error") },
+    { EAI_OVERFLOW, N_("Argument buffer too small") },
+#ifdef EAI_INPROGRESS
+    { EAI_INPROGRESS, N_("Processing request in progress") },
+    { EAI_CANCELED, N_("Request canceled") },
+    { EAI_NOTCANCELED, N_("Request not canceled") },
+    { EAI_ALLDONE, N_("All requests done") },
+    { EAI_INTR, N_("Interrupted by a signal") },
+    { EAI_IDN_ENCODE, N_("Parameter string not correctly encoded") }
+#endif
+  };
+
+const char *
+gai_strerror (int code)
+{
+  size_t i;
+  for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i)
+    if (values[i].code == code)
+      return _(values[i].msg);
+
+  return _("Unknown error");
+}
+# ifdef _LIBC
+libc_hidden_def (gai_strerror)
+# endif
+#endif /* !HAVE_DECL_GAI_STRERROR */
diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c
new file mode 100644
index 0000000..c538967
--- /dev/null
+++ b/gl/getaddrinfo.c
@@ -0,0 +1,444 @@
+/* Get address information (partial implementation).
+   Copyright (C) 1997, 2001-2002, 2004-2012 Free Software Foundation, Inc.
+   Contributed by Simon Josefsson <address@hidden>.
+
+   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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
+   optimizes away the sa == NULL test below.  */
+#define _GL_ARG_NONNULL(params)
+
+#include <netdb.h>
+
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+
+/* Get inet_ntop.  */
+#include <arpa/inet.h>
+
+/* Get calloc. */
+#include <stdlib.h>
+
+/* Get memcpy, strdup. */
+#include <string.h>
+
+/* Get snprintf. */
+#include <stdio.h>
+
+#include <stdbool.h>
+
+#include "gettext.h"
+#define _(String) gettext (String)
+#define N_(String) String
+
+/* BeOS has AF_INET, but not PF_INET.  */
+#ifndef PF_INET
+# define PF_INET AF_INET
+#endif
+/* BeOS also lacks PF_UNSPEC.  */
+#ifndef PF_UNSPEC
+# define PF_UNSPEC 0
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WINDOWS_NATIVE
+#endif
+
+/* gl_sockets_startup */
+#include "sockets.h"
+
+#ifdef WINDOWS_NATIVE
+typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*,
+                                        const struct addrinfo*,
+                                        struct addrinfo**);
+typedef void (WSAAPI *freeaddrinfo_func) (struct addrinfo*);
+typedef int (WSAAPI *getnameinfo_func) (const struct sockaddr*,
+                                        socklen_t, char*, DWORD,
+                                        char*, DWORD, int);
+
+static getaddrinfo_func getaddrinfo_ptr = NULL;
+static freeaddrinfo_func freeaddrinfo_ptr = NULL;
+static getnameinfo_func getnameinfo_ptr = NULL;
+
+static int
+use_win32_p (void)
+{
+  static int done = 0;
+  HMODULE h;
+
+  if (done)
+    return getaddrinfo_ptr ? 1 : 0;
+
+  done = 1;
+
+  h = GetModuleHandle ("ws2_32.dll");
+
+  if (h)
+    {
+      getaddrinfo_ptr = (getaddrinfo_func) GetProcAddress (h, "getaddrinfo");
+      freeaddrinfo_ptr = (freeaddrinfo_func) GetProcAddress (h, 
"freeaddrinfo");
+      getnameinfo_ptr = (getnameinfo_func) GetProcAddress (h, "getnameinfo");
+    }
+
+  /* If either is missing, something is odd. */
+  if (!getaddrinfo_ptr || !freeaddrinfo_ptr || !getnameinfo_ptr)
+    {
+      getaddrinfo_ptr = NULL;
+      freeaddrinfo_ptr = NULL;
+      getnameinfo_ptr = NULL;
+      return 0;
+    }
+
+  gl_sockets_startup (SOCKETS_1_1);
+
+  return 1;
+}
+#endif
+
+static inline bool
+validate_family (int family)
+{
+  /* FIXME: Support more families. */
+#if HAVE_IPV4
+     if (family == PF_INET)
+       return true;
+#endif
+#if HAVE_IPV6
+     if (family == PF_INET6)
+       return true;
+#endif
+     if (family == PF_UNSPEC)
+       return true;
+     return false;
+}
+
+/* Translate name of a service location and/or a service name to set of
+   socket addresses. */
+int
+getaddrinfo (const char *restrict nodename,
+             const char *restrict servname,
+             const struct addrinfo *restrict hints,
+             struct addrinfo **restrict res)
+{
+  struct addrinfo *tmp;
+  int port = 0;
+  struct hostent *he;
+  void *storage;
+  size_t size;
+#if HAVE_IPV6
+  struct v6_pair {
+    struct addrinfo addrinfo;
+    struct sockaddr_in6 sockaddr_in6;
+  };
+#endif
+#if HAVE_IPV4
+  struct v4_pair {
+    struct addrinfo addrinfo;
+    struct sockaddr_in sockaddr_in;
+  };
+#endif
+
+#ifdef WINDOWS_NATIVE
+  if (use_win32_p ())
+    return getaddrinfo_ptr (nodename, servname, hints, res);
+#endif
+
+  if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE)))
+    /* FIXME: Support more flags. */
+    return EAI_BADFLAGS;
+
+  if (hints && !validate_family (hints->ai_family))
+    return EAI_FAMILY;
+
+  if (hints &&
+      hints->ai_socktype != SOCK_STREAM && hints->ai_socktype != SOCK_DGRAM)
+    /* FIXME: Support other socktype. */
+    return EAI_SOCKTYPE; /* FIXME: Better return code? */
+
+  if (!nodename)
+    {
+      if (!(hints->ai_flags & AI_PASSIVE))
+        return EAI_NONAME;
+
+#ifdef HAVE_IPV6
+      nodename = (hints->ai_family == AF_INET6) ? "::" : "0.0.0.0";
+#else
+      nodename = "0.0.0.0";
+#endif
+    }
+
+  if (servname)
+    {
+      struct servent *se = NULL;
+      const char *proto =
+        (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp";
+
+      if (hints == NULL || !(hints->ai_flags & AI_NUMERICSERV))
+        /* FIXME: Use getservbyname_r if available. */
+        se = getservbyname (servname, proto);
+
+      if (!se)
+        {
+          char *c;
+          if (!(*servname >= '0' && *servname <= '9'))
+            return EAI_NONAME;
+          port = strtoul (servname, &c, 10);
+          if (*c || port > 0xffff)
+            return EAI_NONAME;
+          port = htons (port);
+        }
+      else
+        port = se->s_port;
+    }
+
+  /* FIXME: Use gethostbyname_r if available. */
+  he = gethostbyname (nodename);
+  if (!he || he->h_addr_list[0] == NULL)
+    return EAI_NONAME;
+
+  switch (he->h_addrtype)
+    {
+#if HAVE_IPV6
+    case PF_INET6:
+      size = sizeof (struct v6_pair);
+      break;
+#endif
+
+#if HAVE_IPV4
+    case PF_INET:
+      size = sizeof (struct v4_pair);
+      break;
+#endif
+
+    default:
+      return EAI_NODATA;
+    }
+
+  storage = calloc (1, size);
+  if (!storage)
+    return EAI_MEMORY;
+
+  switch (he->h_addrtype)
+    {
+#if HAVE_IPV6
+    case PF_INET6:
+      {
+        struct v6_pair *p = storage;
+        struct sockaddr_in6 *sinp = &p->sockaddr_in6;
+        tmp = &p->addrinfo;
+
+        if (port)
+          sinp->sin6_port = port;
+
+        if (he->h_length != sizeof (sinp->sin6_addr))
+          {
+            free (storage);
+            return EAI_SYSTEM; /* FIXME: Better return code?  Set errno? */
+          }
+
+        memcpy (&sinp->sin6_addr, he->h_addr_list[0], sizeof sinp->sin6_addr);
+
+        tmp->ai_addr = (struct sockaddr *) sinp;
+        tmp->ai_addrlen = sizeof *sinp;
+      }
+      break;
+#endif
+
+#if HAVE_IPV4
+    case PF_INET:
+      {
+        struct v4_pair *p = storage;
+        struct sockaddr_in *sinp = &p->sockaddr_in;
+        tmp = &p->addrinfo;
+
+        if (port)
+          sinp->sin_port = port;
+
+        if (he->h_length != sizeof (sinp->sin_addr))
+          {
+            free (storage);
+            return EAI_SYSTEM; /* FIXME: Better return code?  Set errno? */
+          }
+
+        memcpy (&sinp->sin_addr, he->h_addr_list[0], sizeof sinp->sin_addr);
+
+        tmp->ai_addr = (struct sockaddr *) sinp;
+        tmp->ai_addrlen = sizeof *sinp;
+      }
+      break;
+#endif
+
+    default:
+      free (storage);
+      return EAI_NODATA;
+    }
+
+  if (hints && hints->ai_flags & AI_CANONNAME)
+    {
+      const char *cn;
+      if (he->h_name)
+        cn = he->h_name;
+      else
+        cn = nodename;
+
+      tmp->ai_canonname = strdup (cn);
+      if (!tmp->ai_canonname)
+        {
+          free (storage);
+          return EAI_MEMORY;
+        }
+    }
+
+  tmp->ai_protocol = (hints) ? hints->ai_protocol : 0;
+  tmp->ai_socktype = (hints) ? hints->ai_socktype : 0;
+  tmp->ai_addr->sa_family = he->h_addrtype;
+  tmp->ai_family = he->h_addrtype;
+
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+  switch (he->h_addrtype)
+    {
+#if HAVE_IPV4
+    case AF_INET:
+      tmp->ai_addr->sa_len = sizeof (struct sockaddr_in);
+      break;
+#endif
+#if HAVE_IPV6
+    case AF_INET6:
+      tmp->ai_addr->sa_len = sizeof (struct sockaddr_in6);
+      break;
+#endif
+    }
+#endif
+
+  /* FIXME: If more than one address, create linked list of addrinfo's. */
+
+  *res = tmp;
+
+  return 0;
+}
+
+/* Free 'addrinfo' structure AI including associated storage.  */
+void
+freeaddrinfo (struct addrinfo *ai)
+{
+#ifdef WINDOWS_NATIVE
+  if (use_win32_p ())
+    {
+      freeaddrinfo_ptr (ai);
+      return;
+    }
+#endif
+
+  while (ai)
+    {
+      struct addrinfo *cur;
+
+      cur = ai;
+      ai = ai->ai_next;
+
+      free (cur->ai_canonname);
+      free (cur);
+    }
+}
+
+int
+getnameinfo (const struct sockaddr *restrict sa, socklen_t salen,
+             char *restrict node, socklen_t nodelen,
+             char *restrict service, socklen_t servicelen,
+             int flags)
+{
+#ifdef WINDOWS_NATIVE
+  if (use_win32_p ())
+    return getnameinfo_ptr (sa, salen, node, nodelen,
+                            service, servicelen, flags);
+#endif
+
+  /* FIXME: Support other flags. */
+  if ((node && nodelen > 0 && !(flags & NI_NUMERICHOST)) ||
+      (service && servicelen > 0 && !(flags & NI_NUMERICHOST)) ||
+      (flags & ~(NI_NUMERICHOST|NI_NUMERICSERV)))
+    return EAI_BADFLAGS;
+
+  if (sa == NULL || salen < sizeof (sa->sa_family))
+    return EAI_FAMILY;
+
+  switch (sa->sa_family)
+    {
+#if HAVE_IPV4
+    case AF_INET:
+      if (salen < sizeof (struct sockaddr_in))
+        return EAI_FAMILY;
+      break;
+#endif
+#if HAVE_IPV6
+    case AF_INET6:
+      if (salen < sizeof (struct sockaddr_in6))
+        return EAI_FAMILY;
+      break;
+#endif
+    default:
+      return EAI_FAMILY;
+    }
+
+  if (node && nodelen > 0 && flags & NI_NUMERICHOST)
+    {
+      switch (sa->sa_family)
+        {
+#if HAVE_IPV4
+        case AF_INET:
+          if (!inet_ntop (AF_INET,
+                          &(((const struct sockaddr_in *) sa)->sin_addr),
+                          node, nodelen))
+            return EAI_SYSTEM;
+          break;
+#endif
+
+#if HAVE_IPV6
+        case AF_INET6:
+          if (!inet_ntop (AF_INET6,
+                          &(((const struct sockaddr_in6 *) sa)->sin6_addr),
+                          node, nodelen))
+            return EAI_SYSTEM;
+          break;
+#endif
+
+        default:
+          return EAI_FAMILY;
+        }
+    }
+
+  if (service && servicelen > 0 && flags & NI_NUMERICSERV)
+    switch (sa->sa_family)
+      {
+#if HAVE_IPV4
+      case AF_INET:
+#endif
+#if HAVE_IPV6
+      case AF_INET6:
+#endif
+        {
+          unsigned short int port
+            = ntohs (((const struct sockaddr_in *) sa)->sin_port);
+          if (servicelen <= snprintf (service, servicelen, "%u", port))
+            return EAI_OVERFLOW;
+        }
+        break;
+      }
+
+  return 0;
+}
diff --git a/gl/getdelim.c b/gl/getdelim.c
index 14a8bce..d80c583 100644
--- a/gl/getdelim.c
+++ b/gl/getdelim.c
@@ -1,5 +1,5 @@
 /* getdelim.c --- Implementation of replacement getdelim function.
-   Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2011 Free Software
+   Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
diff --git a/gl/getline.c b/gl/getline.c
index e6e9187..ab64d80 100644
--- a/gl/getline.c
+++ b/gl/getline.c
@@ -1,5 +1,5 @@
 /* getline.c --- Implementation of replacement getline function.
-   Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 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
diff --git a/gl/getopt.c b/gl/getopt.c
index 7c9f704..4342a34 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -2,7 +2,7 @@
    NOTE: getopt is part of the C library, so if you don't know what
    "Keep this file name-space clean" means, talk to address@hidden
    before changing it!
-   Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software
+   Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -41,15 +41,15 @@
 # include <wchar.h>
 #endif
 
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
+/* This version of 'getopt' appears to the caller like standard Unix 'getopt'
    but it behaves differently for the user, since it allows the user
    to intersperse the options with the other arguments.
 
-   As `getopt_long' works, it permutes the elements of ARGV so that,
+   As 'getopt_long' works, it permutes the elements of ARGV so that,
    when it is done, all the options precede everything else.  Thus
    all application programs are extended to handle flexible argument order.
 
-   Using `getopt' or setting the environment variable POSIXLY_CORRECT
+   Using 'getopt' or setting the environment variable POSIXLY_CORRECT
    disables permutation.
    Then the behavior is completely standard.
 
@@ -58,24 +58,24 @@
 
 #include "getopt_int.h"
 
-/* For communication from `getopt' to the caller.
-   When `getopt' finds an option that takes an argument,
+/* For communication from 'getopt' to the caller.
+   When 'getopt' finds an option that takes an argument,
    the argument value is returned here.
-   Also, when `ordering' is RETURN_IN_ORDER,
+   Also, when 'ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
 char *optarg;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
-   and for communication between successive calls to `getopt'.
+   and for communication between successive calls to 'getopt'.
 
-   On entry to `getopt', zero means this is the first call; initialize.
+   On entry to 'getopt', zero means this is the first call; initialize.
 
-   When `getopt' returns -1, this is the index of the first of the
+   When 'getopt' returns -1, this is the index of the first of the
    non-option elements that the caller should itself scan.
 
-   Otherwise, `optind' communicates from one call to the next
+   Otherwise, 'optind' communicates from one call to the next
    how much of ARGV has been scanned so far.  */
 
 /* 1003.2 says this must be 1 before any call.  */
@@ -137,7 +137,7 @@ extern char *__getopt_nonoption_flags;
    The other is elements [last_nonopt,optind), which contains all
    the options processed since those non-options were skipped.
 
-   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   'first_nonopt' and 'last_nonopt' are relocated so that they describe
    the new indices of the non-options in ARGV after they are moved.  */
 
 static void
@@ -154,7 +154,7 @@ exchange (char **argv, struct _getopt_data *d)
      but it consists of two parts that need to be swapped next.  */
 
 #if defined _LIBC && defined USE_NONOPTION_FLAGS
-  /* First make sure the handling of the `__getopt_nonoption_flags'
+  /* First make sure the handling of the '__getopt_nonoption_flags'
      string can work normally.  Our top argument must be in the range
      of the string.  */
   if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
@@ -291,48 +291,48 @@ _getopt_initialize (int argc _GL_UNUSED,
 
    If an element of ARGV starts with '-', and is not exactly "-" or "--",
    then it is an option element.  The characters of this element
-   (aside from the initial '-') are option characters.  If `getopt'
+   (aside from the initial '-') are option characters.  If 'getopt'
    is called repeatedly, it returns successively each of the option characters
    from each of the option elements.
 
-   If `getopt' finds another option character, it returns that character,
-   updating `optind' and `nextchar' so that the next call to `getopt' can
+   If 'getopt' finds another option character, it returns that character,
+   updating 'optind' and 'nextchar' so that the next call to 'getopt' can
    resume the scan with the following option character or ARGV-element.
 
-   If there are no more option characters, `getopt' returns -1.
-   Then `optind' is the index in ARGV of the first ARGV-element
+   If there are no more option characters, 'getopt' returns -1.
+   Then 'optind' is the index in ARGV of the first ARGV-element
    that is not an option.  (The ARGV-elements have been permuted
    so that those that are not options now come last.)
 
    OPTSTRING is a string containing the legitimate option characters.
    If an option character is seen that is not listed in OPTSTRING,
-   return '?' after printing an error message.  If you set `opterr' to
+   return '?' after printing an error message.  If you set 'opterr' to
    zero, the error message is suppressed but we still return '?'.
 
    If a char in OPTSTRING is followed by a colon, that means it wants an arg,
    so the following text in the same ARGV-element, or the text of the following
-   ARGV-element, is returned in `optarg'.  Two colons mean an option that
+   ARGV-element, is returned in 'optarg'.  Two colons mean an option that
    wants an optional arg; if there is text in the current ARGV-element,
-   it is returned in `optarg', otherwise `optarg' is set to zero.
+   it is returned in 'optarg', otherwise 'optarg' is set to zero.
 
-   If OPTSTRING starts with `-' or `+', it requests different methods of
+   If OPTSTRING starts with '-' or '+', it requests different methods of
    handling the non-option ARGV-elements.
    See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
 
-   Long-named options begin with `--' instead of `-'.
+   Long-named options begin with '--' instead of '-'.
    Their names may be abbreviated as long as the abbreviation is unique
    or is an exact match for some defined option.  If they have an
    argument, it follows the option name in the same ARGV-element, separated
-   from the option name by a `=', or else the in next ARGV-element.
-   When `getopt' finds a long-named option, it returns 0 if that option's
-   `flag' field is nonzero, the value of the option's `val' field
-   if the `flag' field is zero.
+   from the option name by a '=', or else the in next ARGV-element.
+   When 'getopt' finds a long-named option, it returns 0 if that option's
+   'flag' field is nonzero, the value of the option's 'val' field
+   if the 'flag' field is zero.
 
    The elements of ARGV aren't really const, because we permute them.
    But we pretend they're const in the prototype to be compatible
    with other systems.
 
-   LONGOPTS is a vector of `struct option' terminated by an
+   LONGOPTS is a vector of 'struct option' terminated by an
    element containing a name which is zero.
 
    LONGIND returns the index in LONGOPT of the long-named option found.
@@ -409,7 +409,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
           d->__last_nonopt = d->optind;
         }
 
-      /* The special ARGV-element `--' means premature end of options.
+      /* The special ARGV-element '--' means premature end of options.
          Skip it like a null option,
          then exchange with previous non-options as if it were an option,
          then skip everything else like a non-option.  */
@@ -788,7 +788,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
     char c = *d->__nextchar++;
     const char *temp = strchr (optstring, c);
 
-    /* Increment `optind' when we start to process its last character.  */
+    /* Increment 'optind' when we start to process its last character.  */
     if (*d->__nextchar == '\0')
       ++d->optind;
 
@@ -887,7 +887,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
             return c;
           }
         else
-          /* We already incremented `d->optind' once;
+          /* We already incremented 'd->optind' once;
              increment it again when taking next ARGV-elt as argument.  */
           d->optarg = argv[d->optind++];
 
@@ -1114,7 +1114,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
                   c = '?';
               }
             else
-              /* We already incremented `optind' once;
+              /* We already incremented 'optind' once;
                  increment it again when taking next ARGV-elt as argument.  */
               d->optarg = argv[d->optind++];
             d->__nextchar = NULL;
@@ -1177,7 +1177,7 @@ __posix_getopt (int argc, char *const *argv, const char 
*optstring)
 #ifdef TEST
 
 /* Compile with -DTEST to make an executable for use in testing
-   the above definition of `getopt'.  */
+   the above definition of 'getopt'.  */
 
 int
 main (int argc, char **argv)
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 0f3918a..06b6dfc 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software
+   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -82,7 +82,7 @@
    getopt_long_only can permute argv; this is required for backward
    compatibility (e.g., for LSB 2.0.1).
 
-   This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+   This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt',
    but it caused redefinition warnings if both unistd.h and getopt.h were
    included, since unistd.h includes getopt.h having previously defined
    __need_getopt.
@@ -128,29 +128,29 @@
 extern "C" {
 #endif
 
-/* For communication from `getopt' to the caller.
-   When `getopt' finds an option that takes an argument,
+/* For communication from 'getopt' to the caller.
+   When 'getopt' finds an option that takes an argument,
    the argument value is returned here.
-   Also, when `ordering' is RETURN_IN_ORDER,
+   Also, when 'ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
 extern char *optarg;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
-   and for communication between successive calls to `getopt'.
+   and for communication between successive calls to 'getopt'.
 
-   On entry to `getopt', zero means this is the first call; initialize.
+   On entry to 'getopt', zero means this is the first call; initialize.
 
-   When `getopt' returns -1, this is the index of the first of the
+   When 'getopt' returns -1, this is the index of the first of the
    non-option elements that the caller should itself scan.
 
-   Otherwise, `optind' communicates from one call to the next
+   Otherwise, 'optind' communicates from one call to the next
    how much of ARGV has been scanned so far.  */
 
 extern int optind;
 
-/* Callers store zero here to inhibit the error message `getopt' prints
+/* Callers store zero here to inhibit the error message 'getopt' prints
    for unrecognized options.  */
 
 extern int opterr;
@@ -162,24 +162,24 @@ extern int optopt;
 #ifndef __need_getopt
 /* Describe the long-named options requested by the application.
    The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
-   of `struct option' terminated by an element containing a name which is
+   of 'struct option' terminated by an element containing a name which is
    zero.
 
-   The field `has_arg' is:
+   The field 'has_arg' is:
    no_argument          (or 0) if the option does not take an argument,
    required_argument    (or 1) if the option requires an argument,
    optional_argument    (or 2) if the option takes an optional argument.
 
-   If the field `flag' is not NULL, it points to a variable that is set
-   to the value given in the field `val' when the option is found, but
+   If the field 'flag' is not NULL, it points to a variable that is set
+   to the value given in the field 'val' when the option is found, but
    left unchanged if the option is not found.
 
-   To have a long-named option do something other than set an `int' to
-   a compiled-in constant, such as set a value from `optarg', set the
-   option's `flag' field to zero and its `val' field to a nonzero
+   To have a long-named option do something other than set an 'int' to
+   a compiled-in constant, such as set a value from 'optarg', set the
+   option's 'flag' field to zero and its 'val' field to a nonzero
    value (the equivalent single-letter option character, if there is
-   one).  For long options that have a zero `flag' field, `getopt'
-   returns the contents of the `val' field.  */
+   one).  For long options that have a zero 'flag' field, 'getopt'
+   returns the contents of the 'val' field.  */
 
 # if !GNULIB_defined_struct_option
 struct option
@@ -194,7 +194,7 @@ struct option
 #  define GNULIB_defined_struct_option 1
 # endif
 
-/* Names for the values of the `has_arg' field of `struct option'.  */
+/* Names for the values of the 'has_arg' field of 'struct option'.  */
 
 # define no_argument            0
 # define required_argument      1
@@ -208,23 +208,23 @@ struct option
 
    Return the option character from OPTS just read.  Return -1 when
    there are no more options.  For unrecognized options, or options
-   missing arguments, `optopt' is set to the option letter, and '?' is
+   missing arguments, 'optopt' is set to the option letter, and '?' is
    returned.
 
    The OPTS string is a list of characters which are recognized option
    letters, optionally followed by colons, specifying that that letter
-   takes an argument, to be placed in `optarg'.
+   takes an argument, to be placed in 'optarg'.
 
    If a letter in OPTS is followed by two colons, its argument is
-   optional.  This behavior is specific to the GNU `getopt'.
+   optional.  This behavior is specific to the GNU 'getopt'.
 
-   The argument `--' causes premature termination of argument
-   scanning, explicitly telling `getopt' that there are no more
+   The argument '--' causes premature termination of argument
+   scanning, explicitly telling 'getopt' that there are no more
    options.
 
-   If OPTS begins with `-', then non-option arguments are treated as
+   If OPTS begins with '-', then non-option arguments are treated as
    arguments to the option '\1'.  This behavior is specific to the GNU
-   `getopt'.  If OPTS begins with `+', or POSIXLY_CORRECT is set in
+   'getopt'.  If OPTS begins with '+', or POSIXLY_CORRECT is set in
    the environment, then do not permute arguments.  */
 
 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
diff --git a/gl/getopt1.c b/gl/getopt1.c
index 3656802..fb2a8f5 100644
--- a/gl/getopt1.c
+++ b/gl/getopt1.c
@@ -1,5 +1,5 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
-   Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software
+   Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -141,11 +141,11 @@ main (int argc, char **argv)
           break;
 
         case 'c':
-          printf ("option c with value `%s'\n", optarg);
+          printf ("option c with value '%s'\n", optarg);
           break;
 
         case 'd':
-          printf ("option d with value `%s'\n", optarg);
+          printf ("option d with value '%s'\n", optarg);
           break;
 
         case '?':
diff --git a/gl/getopt_int.h b/gl/getopt_int.h
index 9f0c713..2da020c 100644
--- a/gl/getopt_int.h
+++ b/gl/getopt_int.h
@@ -1,5 +1,5 @@
 /* Internal declarations for getopt.
-   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software
+   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -40,7 +40,7 @@ extern int _getopt_internal (int ___argc, char **___argv,
    stop option processing when the first non-option is seen.
    This is what Unix does.
    This mode of operation is selected by either setting the environment
-   variable POSIXLY_CORRECT, or using `+' as the first character
+   variable POSIXLY_CORRECT, or using '+' as the first character
    of the list of option characters, or by calling getopt.
 
    PERMUTE is the default.  We permute the contents of ARGV as we
@@ -52,12 +52,12 @@ extern int _getopt_internal (int ___argc, char **___argv,
    written to expect options and other ARGV-elements in any order
    and that care about the ordering of the two.  We describe each
    non-option ARGV-element as if it were the argument of an option
-   with character code 1.  Using `-' as the first character of the
+   with character code 1.  Using '-' as the first character of the
    list of option characters selects this mode of operation.
 
-   The special argument `--' forces an end of option-scanning regardless
-   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
-   `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
+   The special argument '--' forces an end of option-scanning regardless
+   of the value of 'ordering'.  In the case of RETURN_IN_ORDER, only
+   '--' can cause 'getopt' to return -1 with 'optind' != ARGC.  */
 
 enum __ord
   {
@@ -99,8 +99,8 @@ struct _getopt_data
   /* Handle permutation of arguments.  */
 
   /* Describe the part of ARGV that contains non-options that have
-     been skipped.  `first_nonopt' is the index in ARGV of the first
-     of them; `last_nonopt' is the index after the last of them.  */
+     been skipped.  'first_nonopt' is the index in ARGV of the first
+     of them; 'last_nonopt' is the index after the last of them.  */
 
   int __first_nonopt;
   int __last_nonopt;
diff --git a/gl/getpass.c b/gl/getpass.c
index 90392f9..25f1e18 100644
--- a/gl/getpass.c
+++ b/gl/getpass.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
 
diff --git a/gl/getpass.h b/gl/getpass.h
index f1e67b5..0d923c6 100644
--- a/gl/getpass.h
+++ b/gl/getpass.h
@@ -1,5 +1,5 @@
 /* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin.
-   Copyright (C) 2004, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2009-2012 Free Software Foundation, Inc.
    Contributed by Simon Josefsson <address@hidden>, 2004.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/getpeername.c b/gl/getpeername.c
index abe5a40..01493aa 100644
--- a/gl/getpeername.c
+++ b/gl/getpeername.c
@@ -1,6 +1,6 @@
 /* getpeername.c --- wrappers for Windows getpeername function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/getsubopt.c b/gl/getsubopt.c
index ab74d03..105ceed 100644
--- a/gl/getsubopt.c
+++ b/gl/getsubopt.c
@@ -1,5 +1,5 @@
 /* Parse comma separated list into words.
-   Copyright (C) 1996-1997, 1999, 2004, 2007, 2009-2011 Free Software
+   Copyright (C) 1996-1997, 1999, 2004, 2007, 2009-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <address@hidden>, 1996.
diff --git a/gl/gettext.h b/gl/gettext.h
index 792e506..050134a 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/gettime.c b/gl/gettime.c
index 6dbb457..8075bfa 100644
--- a/gl/gettime.c
+++ b/gl/gettime.c
@@ -1,6 +1,6 @@
 /* gettime -- get the system clock
 
-   Copyright (C) 2002, 2004-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004-2007, 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
diff --git a/gl/gettimeofday.c b/gl/gettimeofday.c
index adfb51f..3c0fdd9 100644
--- a/gl/gettimeofday.c
+++ b/gl/gettimeofday.c
@@ -1,6 +1,6 @@
 /* Provide gettimeofday for systems that don't have it or for which it's 
broken.
 
-   Copyright (C) 2001-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2007, 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
diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c
index c11b1e0..eeffcbe 100644
--- a/gl/inet_ntop.c
+++ b/gl/inet_ntop.c
@@ -1,6 +1,6 @@
 /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
 
-   Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 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
@@ -74,7 +74,7 @@ static const char *inet_ntop6 (const unsigned char *src, char 
*dst, socklen_t si
  * inet_ntop(af, src, dst, size)
  *      convert a network format address to presentation format.
  * return:
- *      pointer to presentation format address (`dst'), or NULL (see errno).
+ *      pointer to presentation format address ('dst'), or NULL (see errno).
  * author:
  *      Paul Vixie, 1996.
  */
@@ -105,7 +105,7 @@ inet_ntop (int af, const void *restrict src,
  * inet_ntop4(src, dst, size)
  *      format an IPv4 address
  * return:
- *      `dst' (as a const)
+ *      'dst' (as a const)
  * notes:
  *      (1) uses no statics
  *      (2) takes a u_char* not an in_addr as input
diff --git a/gl/inet_pton.c b/gl/inet_pton.c
index cb1a872..4096365 100644
--- a/gl/inet_pton.c
+++ b/gl/inet_pton.c
@@ -1,6 +1,6 @@
 /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
 
-   Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2006, 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
@@ -73,8 +73,8 @@ static int inet_pton6 (const char *src, unsigned char *dst);
  *      to network format (which is usually some kind of binary format).
  * return:
  *      1 if the address was valid for the specified address family
- *      0 if the address wasn't valid (`dst' is untouched in this case)
- *      -1 if some other error occurred (`dst' is untouched in this case, too)
+ *      0 if the address wasn't valid ('dst' is untouched in this case)
+ *      -1 if some other error occurred ('dst' is untouched in this case, too)
  * author:
  *      Paul Vixie, 1996.
  */
@@ -103,9 +103,9 @@ inet_pton (int af, const char *restrict src, void *restrict 
dst)
  *      like inet_aton() but without all the hexadecimal, octal (with the
  *      exception of 0) and shorthand.
  * return:
- *      1 if `src' is a valid dotted quad, else 0.
+ *      1 if 'src' is a valid dotted quad, else 0.
  * notice:
- *      does not touch `dst' unless it's returning 1.
+ *      does not touch 'dst' unless it's returning 1.
  * author:
  *      Paul Vixie, 1996.
  */
@@ -159,9 +159,9 @@ inet_pton4 (const char *restrict src, unsigned char 
*restrict dst)
  * inet_pton6(src, dst)
  *      convert presentation level address to network order binary form.
  * return:
- *      1 if `src' is a valid [RFC1884 2.2] address, else 0.
+ *      1 if 'src' is a valid [RFC1884 2.2] address, else 0.
  * notice:
- *      (1) does not touch `dst' unless it's returning 1.
+ *      (1) does not touch 'dst' unless it's returning 1.
  *      (2) :: in a full address is silently ignored.
  * credit:
  *      inspired by Mark Andrews.
diff --git a/gl/intprops.h b/gl/intprops.h
index 1f6a539..2485c78 100644
--- a/gl/intprops.h
+++ b/gl/intprops.h
@@ -1,6 +1,6 @@
 /* intprops.h -- properties of integer types
 
-   Copyright (C) 2001-2005, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2001-2005, 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
diff --git a/gl/isnan.c b/gl/isnan.c
index 1d0754c..a5a7d92 100644
--- a/gl/isnan.c
+++ b/gl/isnan.c
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
@@ -21,7 +21,7 @@
 /* Specification.  */
 #ifdef USE_LONG_DOUBLE
 /* Specification found in math.h or isnanl-nolibm.h.  */
-extern int rpl_isnanl (long double x);
+extern int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
 #elif ! defined USE_FLOAT
 /* Specification found in math.h or isnand-nolibm.h.  */
 extern int rpl_isnand (double x);
diff --git a/gl/isnand-nolibm.h b/gl/isnand-nolibm.h
index 4c49c32..56fb270 100644
--- a/gl/isnand-nolibm.h
+++ b/gl/isnand-nolibm.h
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/isnand.c b/gl/isnand.c
index c47ff25..ef815f3 100644
--- a/gl/isnand.c
+++ b/gl/isnand.c
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/isnanf-nolibm.h b/gl/isnanf-nolibm.h
index 1a1cbf9..5270387 100644
--- a/gl/isnanf-nolibm.h
+++ b/gl/isnanf-nolibm.h
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/isnanf.c b/gl/isnanf.c
index adb7059..0816704 100644
--- a/gl/isnanf.c
+++ b/gl/isnanf.c
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/isnanl-nolibm.h b/gl/isnanl-nolibm.h
index bf14228..58d963d 100644
--- a/gl/isnanl-nolibm.h
+++ b/gl/isnanl-nolibm.h
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/isnanl.c b/gl/isnanl.c
index 1482fb2..597ac2a 100644
--- a/gl/isnanl.c
+++ b/gl/isnanl.c
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/itold.c b/gl/itold.c
index 0236f33..95ff7e1 100644
--- a/gl/itold.c
+++ b/gl/itold.c
@@ -1,5 +1,5 @@
 /* Replacement for 'int' to 'long double' conversion routine.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   Copyright (C) 2011-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2011.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/listen.c b/gl/listen.c
index b7d070e..a1b2ab7 100644
--- a/gl/listen.c
+++ b/gl/listen.c
@@ -1,6 +1,6 @@
 /* listen.c --- wrappers for Windows listen function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/lseek.c b/gl/lseek.c
index 8c9834f..5433678 100644
--- a/gl/lseek.c
+++ b/gl/lseek.c
@@ -1,5 +1,5 @@
 /* An lseek() function that detects pipes.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index 7feed46..d978cb8 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
 # 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index a8744a8..656924b 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,5 +1,5 @@
-# alloca.m4 serial 13
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
+# alloca.m4 serial 14
+dnl Copyright (C) 2002-2004, 2006-2007, 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,
@@ -53,8 +53,8 @@ m4_version_prereq([2.69], [] ,[
 
 # _AC_LIBOBJ_ALLOCA
 # -----------------
-# Set up the LIBOBJ replacement of `alloca'.  Well, not exactly
-# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
+# Set up the LIBOBJ replacement of 'alloca'.  Well, not exactly
+# AC_LIBOBJ since we actually set the output variable 'ALLOCA'.
 # Nevertheless, for Automake, AC_LIBSOURCES it.
 m4_define([_AC_LIBOBJ_ALLOCA],
 [# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -63,9 +63,9 @@ m4_define([_AC_LIBOBJ_ALLOCA],
 # use ar to extract alloca.o from them instead of compiling alloca.c.
 AC_LIBSOURCES(alloca.c)
 AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
-AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.])
+AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
 
-AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray,
+AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
 [AC_EGREP_CPP(webecray,
 [#if defined CRAY && ! defined CRAY2
 webecray
@@ -77,10 +77,10 @@ if test $ac_cv_os_cray = yes; then
   for ac_func in _getb67 GETB67 getb67; do
     AC_CHECK_FUNC($ac_func,
                   [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
-                                      [Define to one of `_getb67', `GETB67',
-                                       `getb67' for Cray-2 and Cray-YMP
+                                      [Define to one of '_getb67', 'GETB67',
+                                       'getb67' for Cray-2 and Cray-YMP
                                        systems. This function is required for
-                                       `alloca.c' support on those systems.])
+                                       'alloca.c' support on those systems.])
     break])
   done
 fi
diff --git a/gl/m4/alphasort.m4 b/gl/m4/alphasort.m4
index e59aa74..6ca985e 100644
--- a/gl/m4/alphasort.m4
+++ b/gl/m4/alphasort.m4
@@ -1,5 +1,5 @@
 # alphasort.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/argp.m4 b/gl/m4/argp.m4
index a9963ee..87c7da6 100644
--- a/gl/m4/argp.m4
+++ b/gl/m4/argp.m4
@@ -1,5 +1,5 @@
 # argp.m4 serial 13
-dnl Copyright (C) 2003-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index 1df7401..36915d1 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,5 +1,5 @@
 # arpa_inet_h.m4 serial 13
-dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4
index 2d4de46..f3b7ec9 100644
--- a/gl/m4/byteswap.m4
+++ b/gl/m4/byteswap.m4
@@ -1,5 +1,5 @@
 # byteswap.m4 serial 4
-dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4
index 3c08512..0bec0ef 100644
--- a/gl/m4/clock_time.m4
+++ b/gl/m4/clock_time.m4
@@ -1,5 +1,5 @@
 # clock_time.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4
index f860a32..379e70d 100644
--- a/gl/m4/close.m4
+++ b/gl/m4/close.m4
@@ -1,5 +1,5 @@
 # close.m4 serial 8
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/closedir.m4 b/gl/m4/closedir.m4
index 1b7912a..8a2fba4 100644
--- a/gl/m4/closedir.m4
+++ b/gl/m4/closedir.m4
@@ -1,5 +1,5 @@
-# closedir.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+# closedir.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.
@@ -17,7 +17,9 @@ AC_DEFUN([gl_FUNC_CLOSEDIR],
   m4_ifdef([gl_FUNC_FCHDIR], [
     gl_TEST_FCHDIR
     if test $HAVE_FCHDIR = 0; then
-      REPLACE_CLOSEDIR=1
+      if test $HAVE_CLOSEDIR = 1; then
+        REPLACE_CLOSEDIR=1
+      fi
     fi
   ])
 ])
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4
index da73552..cf53d24 100644
--- a/gl/m4/codeset.m4
+++ b/gl/m4/codeset.m4
@@ -1,5 +1,5 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/dirent_h.m4 b/gl/m4/dirent_h.m4
index ab45170..f6c0fa7 100644
--- a/gl/m4/dirent_h.m4
+++ b/gl/m4/dirent_h.m4
@@ -1,5 +1,5 @@
 # dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/dirname.m4 b/gl/m4/dirname.m4
index dcec7e4..65639ec 100644
--- a/gl/m4/dirname.m4
+++ b/gl/m4/dirname.m4
@@ -1,5 +1,5 @@
 #serial 10   -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4
index 16a4e3e..1e03751 100644
--- a/gl/m4/double-slash-root.m4
+++ b/gl/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
 # double-slash-root.m4 serial 4   -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index cd9d254..dec27fa 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,5 +1,5 @@
-#serial 16
-dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+#serial 17
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -67,7 +67,9 @@ AC_DEFUN([gl_FUNC_DUP2],
   m4_ifdef([gl_FUNC_FCHDIR], [
     gl_TEST_FCHDIR
     if test $HAVE_FCHDIR = 0; then
-      REPLACE_DUP2=1
+      if test $HAVE_DUP2 = 1; then
+        REPLACE_DUP2=1
+      fi
     fi
   ])
 ])
diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
index 3006c48..75f17e2 100644
--- a/gl/m4/eealloc.m4
+++ b/gl/m4/eealloc.m4
@@ -1,5 +1,5 @@
 # eealloc.m4 serial 2
-dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4
index 6c7982f..8eb57c9 100644
--- a/gl/m4/environ.m4
+++ b/gl/m4/environ.m4
@@ -1,5 +1,5 @@
 # environ.m4 serial 6
-dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 560adba..4f0bb83 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,5 +1,5 @@
 # errno_h.m4 serial 10
-dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index e7022fe..5d9c70a 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,6 +1,6 @@
 #serial 14
 
-# Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4
index 7e91924..48df999 100644
--- a/gl/m4/exponentd.m4
+++ b/gl/m4/exponentd.m4
@@ -1,5 +1,5 @@
 # exponentd.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/exponentf.m4 b/gl/m4/exponentf.m4
index 3a00840..94d1167 100644
--- a/gl/m4/exponentf.m4
+++ b/gl/m4/exponentf.m4
@@ -1,5 +1,5 @@
 # exponentf.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/exponentl.m4 b/gl/m4/exponentl.m4
index 2e706b2..a7cd13b 100644
--- a/gl/m4/exponentl.m4
+++ b/gl/m4/exponentl.m4
@@ -1,5 +1,5 @@
 # exponentl.m4 serial 3
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 22156e0..0bfaef6 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 10  -*- Autoconf -*-
+# serial 11  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -43,7 +43,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
   if test "$MINIX" = yes; then
     AC_DEFINE([_POSIX_SOURCE], [1],
-      [Define to 1 if you need to in order for `stat' and other
+      [Define to 1 if you need to in order for 'stat' and other
        things to work.])
     AC_DEFINE([_POSIX_1_SOURCE], [2],
       [Define to 2 if the system does not provide POSIX.1 features
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index bee6edc..9862741 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
 # fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4
index 03a41e6..cac28ae 100644
--- a/gl/m4/fcntl_h.m4
+++ b/gl/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
 # serial 15
 # Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-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.
diff --git a/gl/m4/fdopen.m4 b/gl/m4/fdopen.m4
index 8cae2fc..9ca9d2a 100644
--- a/gl/m4/fdopen.m4
+++ b/gl/m4/fdopen.m4
@@ -1,5 +1,5 @@
 # fdopen.m4 serial 2
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index 0420e06..51c9c7b 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,5 +1,5 @@
 # float_h.m4 serial 9
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/fpieee.m4 b/gl/m4/fpieee.m4
index 7872876..93b8d90 100644
--- a/gl/m4/fpieee.m4
+++ b/gl/m4/fpieee.m4
@@ -1,5 +1,5 @@
 # fpieee.m4 serial 1
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/frexp.m4 b/gl/m4/frexp.m4
index b0bdd10..4162195 100644
--- a/gl/m4/frexp.m4
+++ b/gl/m4/frexp.m4
@@ -1,5 +1,5 @@
 # frexp.m4 serial 13
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/frexpl.m4 b/gl/m4/frexpl.m4
index 91f2a35..8e71420 100644
--- a/gl/m4/frexpl.m4
+++ b/gl/m4/frexpl.m4
@@ -1,5 +1,5 @@
 # frexpl.m4 serial 18
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4
index 135a22b..d9cd70a 100644
--- a/gl/m4/fseek.m4
+++ b/gl/m4/fseek.m4
@@ -1,5 +1,5 @@
 # fseek.m4 serial 4
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index 391948d..be5bb35 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,5 +1,5 @@
 # fseeko.m4 serial 15
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index 0daea88..e3f8f3e 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,5 +1,5 @@
 # fstat.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4
index c529c50..ed8d014 100644
--- a/gl/m4/ftell.m4
+++ b/gl/m4/ftell.m4
@@ -1,5 +1,5 @@
 # ftell.m4 serial 3
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4
index 10cf429..42be83e 100644
--- a/gl/m4/ftello.m4
+++ b/gl/m4/ftello.m4
@@ -1,5 +1,5 @@
 # ftello.m4 serial 10
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ftruncate.m4 b/gl/m4/ftruncate.m4
index 4a47ba4..1007f34 100644
--- a/gl/m4/ftruncate.m4
+++ b/gl/m4/ftruncate.m4
@@ -2,7 +2,7 @@
 
 # See if we need to emulate a missing ftruncate function using chsize.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/func.m4 b/gl/m4/func.m4
index dcd2d4f..13c204d 100644
--- a/gl/m4/func.m4
+++ b/gl/m4/func.m4
@@ -1,5 +1,5 @@
 # func.m4 serial 2
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
new file mode 100644
index 0000000..9cd3e67
--- /dev/null
+++ b/gl/m4/getaddrinfo.m4
@@ -0,0 +1,210 @@
+# getaddrinfo.m4 serial 29
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETADDRINFO],
+[
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
+  AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H
+  AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo])
+  GETADDRINFO_LIB=
+  gai_saved_LIBS="$LIBS"
+
+  dnl Where is getaddrinfo()?
+  dnl - On Solaris, it is in libsocket.
+  dnl - On Haiku, it is in libnetwork.
+  dnl - On BeOS, it is in libnet.
+  dnl - On native Windows, it is in ws2_32.dll.
+  dnl - Otherwise it is in libc.
+  AC_SEARCH_LIBS([getaddrinfo], [socket network net],
+    [if test "$ac_cv_search_getaddrinfo" != "none required"; then
+       GETADDRINFO_LIB="$ac_cv_search_getaddrinfo"
+     fi])
+  LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
+
+  HAVE_GETADDRINFO=1
+  AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#include <stddef.h>
+]], [[getaddrinfo("", "", NULL, NULL);]])],
+      [gl_cv_func_getaddrinfo=yes],
+      [gl_cv_func_getaddrinfo=no])])
+  if test $gl_cv_func_getaddrinfo = no; then
+    AC_CACHE_CHECK([for getaddrinfo in ws2tcpip.h and -lws2_32],
+                   gl_cv_w32_getaddrinfo, [
+      gl_cv_w32_getaddrinfo=no
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS -lws2_32"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+#include <stddef.h>
+]], [[getaddrinfo(NULL, NULL, NULL, NULL);]])], [gl_cv_w32_getaddrinfo=yes])
+      LIBS="$am_save_LIBS"
+    ])
+    if test "$gl_cv_w32_getaddrinfo" = "yes"; then
+      GETADDRINFO_LIB="-lws2_32"
+      LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
+    else
+      HAVE_GETADDRINFO=0
+    fi
+  fi
+
+  # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
+  # inline function declared in ws2tcpip.h, so we need to get that
+  # header included somehow.
+  AC_CHECK_DECLS([gai_strerror], [], [], [[
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+#include <stddef.h>
+]])
+  if test $ac_cv_have_decl_gai_strerror = yes; then
+    AC_CHECK_DECLS([gai_strerrorA], [], [], [[
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+#include <stddef.h>
+]])
+    dnl check for correct signature
+    AC_CACHE_CHECK([for gai_strerror with POSIX signature],
+     [gl_cv_func_gai_strerror_posix_signature], [
+      AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+#include <stddef.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *gai_strerror(int);]])],
+        [gl_cv_func_gai_strerror_posix_signature=yes],
+        [gl_cv_func_gai_strerror_posix_signature=no])])
+    if test $gl_cv_func_gai_strerror_posix_signature = no; then
+      REPLACE_GAI_STRERROR=1
+    fi
+  fi
+
+  LIBS="$gai_saved_LIBS"
+
+  gl_PREREQ_GETADDRINFO
+
+  AC_SUBST([GETADDRINFO_LIB])
+])
+
+# Prerequisites of lib/netdb.in.h and lib/getaddrinfo.c.
+AC_DEFUN([gl_PREREQ_GETADDRINFO], [
+  AC_REQUIRE([gl_NETDB_H_DEFAULTS])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
+  AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB
+  AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB
+  AC_REQUIRE([gl_FUNC_INET_NTOP]) dnl for INET_NTOP_LIB
+  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
+  dnl have sa_len so the result is correct anyway.
+  AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [
+#include <sys/types.h>
+#include <sys/socket.h>
+])
+
+  AC_CHECK_HEADERS_ONCE([netinet/in.h])
+
+  AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, getnameinfo],,,[[
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+]])
+  if test $ac_cv_have_decl_getaddrinfo = no; then
+    HAVE_DECL_GETADDRINFO=0
+  fi
+  if test $ac_cv_have_decl_freeaddrinfo = no; then
+    HAVE_DECL_FREEADDRINFO=0
+  fi
+  if test $ac_cv_have_decl_gai_strerror = no; then
+    HAVE_DECL_GAI_STRERROR=0
+  fi
+  if test $ac_cv_have_decl_getnameinfo = no; then
+    HAVE_DECL_GETNAMEINFO=0
+  fi
+
+  AC_CHECK_TYPES([struct addrinfo],,,[
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
+  if test $ac_cv_type_struct_addrinfo = no; then
+    HAVE_STRUCT_ADDRINFO=0
+  fi
+
+  dnl Append $HOSTENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates.
+  case " $GETADDRINFO_LIB " in
+    *" $HOSTENT_LIB "*) ;;
+    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;;
+  esac
+
+  dnl Append $SERVENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates.
+  case " $GETADDRINFO_LIB " in
+    *" $SERVENT_LIB "*) ;;
+    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
+  esac
+
+  dnl Append $INET_NTOP_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates.
+  case " $GETADDRINFO_LIB " in
+    *" $INET_NTOP_LIB "*) ;;
+    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;;
+  esac
+])
diff --git a/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4
index f828cf3..ccb1f47 100644
--- a/gl/m4/getcwd.m4
+++ b/gl/m4/getcwd.m4
@@ -1,12 +1,12 @@
 # getcwd.m4 - check for working getcwd that is compatible with glibc
 
-# Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert.
-# serial 9
+# serial 11
 
 AC_DEFUN([gl_FUNC_GETCWD_NULL],
   [
@@ -108,20 +108,43 @@ AC_DEFUN([gl_FUNC_GETCWD],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   gl_abort_bug=no
-  case $gl_cv_func_getcwd_null,$host_os in
-  *,mingw*)
-    gl_cv_func_getcwd_path_max=yes;;
-  yes,*)
-    gl_FUNC_GETCWD_PATH_MAX
-    gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);;
+  case "$host_os" in
+    mingw*)
+      gl_cv_func_getcwd_path_max=yes
+      ;;
+    *)
+      gl_FUNC_GETCWD_PATH_MAX
+      case "$gl_cv_func_getcwd_null" in
+        *yes)
+          gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes])
+          ;;
+      esac
+      ;;
   esac
-
-  case 
$gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature$gl_cv_func_getcwd_path_max,$gl_abort_bug
 in
-  *yes,yes,yes,no) ;;
-  *)
-    dnl Full replacement lib/getcwd.c, overrides LGPL replacement.
-    REPLACE_GETCWD=1;;
+  dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD
+  dnl if appropriate.
+  case "$gl_cv_func_getcwd_path_max" in
+    "no, it has the AIX bug") ;;
+    *)
+      AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1],
+        [Define to 1 if getcwd minimally works, that is, its result can be
+         trusted when it succeeds.])
+      ;;
+  esac
+  case "$gl_cv_func_getcwd_path_max" in
+    "no, but it is partly working")
+      AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1],
+        [Define to 1 if getcwd works, except it sometimes fails when it
+         shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.])
+      ;;
   esac
+
+  if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
+     || test $gl_cv_func_getcwd_posix_signature != yes \
+     || test "$gl_cv_func_getcwd_path_max" != yes \
+     || test $gl_abort_bug = yes; then
+    REPLACE_GETCWD=1
+  fi
 ])
 
 # Prerequisites of lib/getcwd.c, when full replacement is in effect.
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 6a0f632..8bd3d3f 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,6 +1,6 @@
 # getdelim.m4 serial 9
 
-dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 4c57797..01f38cf 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,6 +1,6 @@
 # getline.m4 serial 25
 
-dnl Copyright (C) 1998-2003, 2005-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
 dnl
 dnl This file is free software; the Free Software Foundation
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index 047a3db..2aea895 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,5 +1,5 @@
-# getopt.m4 serial 38
-dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
+# getopt.m4 serial 39
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -25,8 +25,6 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
   if test $REPLACE_GETOPT = 1; then
     dnl Arrange for getopt.h to be created.
     gl_GETOPT_SUBSTITUTE_HEADER
-    dnl Arrange for unistd.h to include getopt.h.
-    GNULIB_UNISTD_H_GETOPT=1
   fi
 ])
 
diff --git a/gl/m4/getpagesize.m4 b/gl/m4/getpagesize.m4
index f7ac1ef..156133a 100644
--- a/gl/m4/getpagesize.m4
+++ b/gl/m4/getpagesize.m4
@@ -1,5 +1,5 @@
 # getpagesize.m4 serial 9
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 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,
diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4
index 13e55f6..2a7e160 100644
--- a/gl/m4/getpass.m4
+++ b/gl/m4/getpass.m4
@@ -1,5 +1,5 @@
 # getpass.m4 serial 14
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+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,
diff --git a/gl/m4/getsubopt.m4 b/gl/m4/getsubopt.m4
index 827d8c5..5538941 100644
--- a/gl/m4/getsubopt.m4
+++ b/gl/m4/getsubopt.m4
@@ -1,5 +1,5 @@
 # getsubopt.m4 serial 5
-dnl Copyright (C) 2004, 2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 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.
diff --git a/gl/m4/gettext.m4 b/gl/m4/gettext.m4
index cab4dfc..5415f88 100644
--- a/gl/m4/gettext.m4
+++ b/gl/m4/gettext.m4
@@ -1,5 +1,5 @@
 # gettext.m4 serial 64 (gettext-0.18.2)
-dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -35,7 +35,7 @@ dnl    will be ignored.  If NEEDSYMBOL is specified and is
 dnl    'need-formatstring-macros', then GNU gettext implementations that don't
 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
 dnl INTLDIR is used to find the intl libraries.  If empty,
-dnl    the value `$(top_builddir)/intl/' is used.
+dnl    the value '$(top_builddir)/intl/' is used.
 dnl
 dnl The result of the configuration is one of three cases:
 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4
index f2122dc..7d03d12 100644
--- a/gl/m4/gettime.m4
+++ b/gl/m4/gettime.m4
@@ -1,5 +1,5 @@
 # gettime.m4 serial 8
-dnl Copyright (C) 2002, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index 47c1e1d..2385e39 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
 # serial 17
 
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/glibc2.m4 b/gl/m4/glibc2.m4
index a5fe3cf..f4c4ad1 100644
--- a/gl/m4/glibc2.m4
+++ b/gl/m4/glibc2.m4
@@ -1,5 +1,5 @@
 # glibc2.m4 serial 3
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-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,
diff --git a/gl/m4/glibc21.m4 b/gl/m4/glibc21.m4
index bc81c11..c938fb1 100644
--- a/gl/m4/glibc21.m4
+++ b/gl/m4/glibc21.m4
@@ -1,5 +1,5 @@
 # glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-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,
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 409b70b..74c1b39 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
 # 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
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests 
--aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept 
alloca alphasort argp bind byteswap c-ctype close connect error extensions func 
getpass getsubopt gettext gettime havelib inet_ntop inet_pton lib-msvc-compat 
lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple 
minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir 
select send sendto setsockopt shutdown snprintf socket sockets socklen stdint 
strcase strverscmp sys_socket sys_stat time_r timespec u64 unistd 
valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix 
vprintf-posix vsnprintf warnings
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests 
--aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept 
alloca alphasort argp bind byteswap c-ctype close connect error extensions 
freeaddrinfo func getaddrinfo getnameinfo getpass getsubopt gettext gettime 
havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen 
maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in 
pmccabe2html progname read-file recv recvfrom scandir select send sendto 
setsockopt shutdown snprintf socket sockets socklen stdint strcase strverscmp 
sys_socket sys_stat time_r timespec u64 unistd usleep valgrind-tests vasprintf 
version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -43,7 +43,10 @@ gl_MODULES([
   connect
   error
   extensions
+  freeaddrinfo
   func
+  getaddrinfo
+  getnameinfo
   getpass
   getsubopt
   gettext
@@ -84,6 +87,7 @@ gl_MODULES([
   timespec
   u64
   unistd
+  usleep
   valgrind-tests
   vasprintf
   version-etc
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 7d83299..ae4d254 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 31
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 32
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,12 +13,12 @@ AC_DEFUN([gl_COMMON], [
 ])
 AC_DEFUN([gl_COMMON_BODY], [
   AH_VERBATIM([_Noreturn],
-[/* The _Noreturn keyword of draft C1X.  */
+[/* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
-# elif 1200 <= _MSC_VER
+# elif defined _MSC_VER && 1200 <= _MSC_VER
 #  define _Noreturn __declspec (noreturn)
 # else
 #  define _Noreturn
@@ -224,7 +224,7 @@ m4_ifndef([AS_VAR_IF],
 # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
 #   to CC twice
 #   <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
-# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard.
+# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
 AC_DEFUN([gl_PROG_CC_C99],
 [
   dnl Change that version number to the minimum Autoconf version that supports
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index fe23cdf..fcf7b8d 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
 # 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
@@ -113,6 +113,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module func:
   # Code from module func-tests:
   # Code from module fwrite-tests:
+  # Code from module getaddrinfo:
+  # Code from module getaddrinfo-tests:
   # Code from module getcwd-lgpl:
   # Code from module getcwd-lgpl-tests:
   # Code from module getdelim:
@@ -134,6 +136,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module gettimeofday-tests:
   # Code from module gnumakefile:
   # Code from module havelib:
+  # Code from module hostent:
   # Code from module ignore-value:
   # Code from module ignore-value-tests:
   # Code from module include_next:
@@ -222,6 +225,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module send-tests:
   # Code from module sendto:
   # Code from module sendto-tests:
+  # Code from module servent:
   # Code from module setenv:
   # Code from module setenv-tests:
   # Code from module setsockopt:
@@ -303,6 +307,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module sys_uio-tests:
   # Code from module sysexits:
   # Code from module sysexits-tests:
+  # Code from module test-framework-sh:
+  # Code from module test-framework-sh-tests:
   # Code from module thread:
   # Code from module thread-tests:
   # Code from module threadlib:
@@ -318,6 +324,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module unsetenv:
   # Code from module unsetenv-tests:
   # Code from module useless-if-before-free:
+  # Code from module usleep:
+  # Code from module usleep-tests:
   # Code from module valgrind-tests:
   # Code from module vasnprintf:
   # Code from module vasnprintf-tests:
@@ -457,6 +465,14 @@ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
 fi
 gl_STDIO_MODULE_INDICATOR([ftello])
 gl_FUNC
+gl_GETADDRINFO
+if test $HAVE_GETADDRINFO = 0; then
+  AC_LIBOBJ([getaddrinfo])
+fi
+if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
+  AC_LIBOBJ([gai_strerror])
+fi
+gl_NETDB_MODULE_INDICATOR([getaddrinfo])
 gl_FUNC_GETDELIM
 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
   AC_LIBOBJ([getdelim])
@@ -474,14 +490,20 @@ if test $REPLACE_GETOPT = 1; then
   AC_LIBOBJ([getopt])
   AC_LIBOBJ([getopt1])
   gl_PREREQ_GETOPT
+  dnl Arrange for unistd.h to include getopt.h.
+  GNULIB_GL_UNISTD_H_GETOPT=1
 fi
+AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
 gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
 gl_FUNC_GETOPT_POSIX
 if test $REPLACE_GETOPT = 1; then
   AC_LIBOBJ([getopt])
   AC_LIBOBJ([getopt1])
   gl_PREREQ_GETOPT
+  dnl Arrange for unistd.h to include getopt.h.
+  GNULIB_GL_UNISTD_H_GETOPT=1
 fi
+AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
 gl_FUNC_GETPASS
 if test $HAVE_GETPASS = 0; then
   AC_LIBOBJ([getpass])
@@ -519,6 +541,7 @@ m4_if(m4_version_compare([2.61a.100],
         m4_defn([m4_PACKAGE_VERSION])), [1], [],
       [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
         [GNUmakefile=$GNUmakefile])])
+gl_HOSTENT
 gl_FUNC_INET_NTOP
 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
   AC_LIBOBJ([inet_ntop])
@@ -660,6 +683,7 @@ if test "$ac_cv_header_winsock2_h" = yes; then
   AC_LIBOBJ([sendto])
 fi
 gl_SYS_SOCKET_MODULE_INDICATOR([sendto])
+gl_SERVENT
 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
 if test "$ac_cv_header_winsock2_h" = yes; then
   AC_LIBOBJ([setsockopt])
@@ -787,6 +811,11 @@ gl_TIME_MODULE_INDICATOR([time_r])
 gl_TIMESPEC
 AC_REQUIRE([AC_C_INLINE])
 gl_UNISTD_H
+gl_FUNC_USLEEP
+if test $HAVE_USLEEP = 0 || test $REPLACE_USLEEP = 1; then
+  AC_LIBOBJ([usleep])
+fi
+gl_UNISTD_MODULE_INDICATOR([usleep])
 gl_VALGRIND_TESTS
 gl_FUNC_VASNPRINTF
 gl_FUNC_VASPRINTF
@@ -1138,6 +1167,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/fstat.c
   lib/ftell.c
   lib/ftello.c
+  lib/gai_strerror.c
+  lib/getaddrinfo.c
   lib/getdelim.c
   lib/getline.c
   lib/getopt.c
@@ -1247,6 +1278,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/timespec.h
   lib/u64.h
   lib/unistd.in.h
+  lib/usleep.c
   lib/vasnprintf.c
   lib/vasnprintf.h
   lib/vasprintf.c
@@ -1296,6 +1328,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/ftello.m4
   m4/ftruncate.m4
   m4/func.m4
+  m4/getaddrinfo.m4
   m4/getcwd.m4
   m4/getdelim.m4
   m4/getline.m4
@@ -1309,6 +1342,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/glibc2.m4
   m4/glibc21.m4
   m4/gnulib-common.m4
+  m4/hostent.m4
   m4/iconv.m4
   m4/include_next.m4
   m4/inet_ntop.m4
@@ -1373,6 +1407,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/realloc.m4
   m4/scandir.m4
   m4/select.m4
+  m4/servent.m4
   m4/setenv.m4
   m4/signal_h.m4
   m4/signbit.m4
@@ -1420,6 +1455,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/uintmax_t.m4
   m4/ungetc.m4
   m4/unistd_h.m4
+  m4/usleep.m4
   m4/valgrind-tests.m4
   m4/vasnprintf.m4
   m4/vasprintf.m4
@@ -1492,6 +1528,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-ftruncate.sh
   tests/test-func.c
   tests/test-fwrite.c
+  tests/test-getaddrinfo.c
   tests/test-getcwd-lgpl.c
   tests/test-getdelim.c
   tests/test-getline.c
@@ -1503,6 +1540,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-ignore-value.c
   tests/test-inet_ntop.c
   tests/test-inet_pton.c
+  tests/test-init.sh
   tests/test-intprops.c
   tests/test-inttypes.c
   tests/test-ioctl.c
@@ -1585,6 +1623,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-u64.c
   tests/test-unistd.c
   tests/test-unsetenv.c
+  tests/test-usleep.c
   tests/test-vasnprintf.c
   tests/test-vasprintf.c
   tests/test-vc-list-files-cvs.sh
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index ed41e9d..a09ffc1 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
 # gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/hostent.m4 b/gl/m4/hostent.m4
new file mode 100644
index 0000000..5134775
--- /dev/null
+++ b/gl/m4/hostent.m4
@@ -0,0 +1,49 @@
+# hostent.m4 serial 2
+dnl Copyright (C) 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HOSTENT],
+[
+  dnl Where are gethostent(), sethostent(), endhostent(), gethostbyname(),
+  dnl gethostbyaddr() defined?
+  dnl - On Solaris, they are in libnsl. Ignore libxnet.
+  dnl - On Haiku, they are in libnetwork.
+  dnl - On BeOS, they are in libnet.
+  dnl - On native Windows, they are in ws2_32.dll.
+  dnl - Otherwise they are in libc.
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
+  HOSTENT_LIB=
+  gl_saved_libs="$LIBS"
+  AC_SEARCH_LIBS([gethostbyname], [nsl network net],
+    [if test "$ac_cv_search_gethostbyname" != "none required"; then
+       HOSTENT_LIB="$ac_cv_search_gethostbyname"
+     fi])
+  LIBS="$gl_saved_libs"
+  if test -z "$HOSTENT_LIB"; then
+    AC_CHECK_FUNCS([gethostbyname], , [
+      AC_CACHE_CHECK([for gethostbyname in winsock2.h and -lws2_32],
+        [gl_cv_w32_gethostbyname],
+        [gl_cv_w32_gethostbyname=no
+         gl_save_LIBS="$LIBS"
+         LIBS="$LIBS -lws2_32"
+         AC_LINK_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#include <stddef.h>
+              ]],
+              [[gethostbyname(NULL);]])],
+           [gl_cv_w32_gethostbyname=yes])
+         LIBS="$gl_save_LIBS"
+        ])
+      if test "$gl_cv_w32_gethostbyname" = "yes"; then
+        HOSTENT_LIB="-lws2_32"
+      fi
+    ])
+  fi
+  AC_SUBST([HOSTENT_LIB])
+])
diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4
index 98fcd64..6a47236 100644
--- a/gl/m4/iconv.m4
+++ b/gl/m4/iconv.m4
@@ -1,5 +1,5 @@
 # iconv.m4 serial 18 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index 8a1fab6..a60a261 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
 # include_next.m4 serial 23
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+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.
@@ -143,7 +143,7 @@ choke me
 # even if the compiler does not support include_next.
 # The three "///" are to pacify Sun C 5.8, which otherwise would say
 # "warning: #include of /usr/include/... may be non-portable".
-# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
 # Note: This macro assumes that the header file is not empty after
 # preprocessing, i.e. it does not only define preprocessor macros but also
 # provides some type/enum definitions or function/variable declarations.
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 4936fa3..1ebd960 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,5 +1,5 @@
 # inet_ntop.m4 serial 19
-dnl Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4
index e64da7b..e7b44e2 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,5 +1,5 @@
 # inet_pton.m4 serial 17
-dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/intdiv0.m4 b/gl/m4/intdiv0.m4
index 58e8a73..6d89aeb 100644
--- a/gl/m4/intdiv0.m4
+++ b/gl/m4/intdiv0.m4
@@ -1,5 +1,5 @@
 # intdiv0.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2002, 2007-2008, 2010-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/intl.m4 b/gl/m4/intl.m4
index 96031eb..d67e29c 100644
--- a/gl/m4/intl.m4
+++ b/gl/m4/intl.m4
@@ -1,5 +1,5 @@
-# intl.m4 serial 17b
-dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
+# intl.m4 serial 17c
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -296,5 +296,5 @@ AC_DEFUN([gt_CHECK_DECL],
     gt_value=0
   fi
   AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
-    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+    [Define to 1 if you have the declaration of '$1', and to 0 if you don't.])
 ])
diff --git a/gl/m4/intldir.m4 b/gl/m4/intldir.m4
index 31507d1..b81de61 100644
--- a/gl/m4/intldir.m4
+++ b/gl/m4/intldir.m4
@@ -1,5 +1,5 @@
 # intldir.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/intlmacosx.m4 b/gl/m4/intlmacosx.m4
index 51f8547..dc2ddfe 100644
--- a/gl/m4/intlmacosx.m4
+++ b/gl/m4/intlmacosx.m4
@@ -1,5 +1,5 @@
 # intlmacosx.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2004-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/intmax.m4 b/gl/m4/intmax.m4
index 9d28921..e3b251f 100644
--- a/gl/m4/intmax.m4
+++ b/gl/m4/intmax.m4
@@ -1,5 +1,5 @@
 # intmax.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2002-2005, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4
index 7341054..c1a4a75 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,5 +1,5 @@
 # intmax_t.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 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,
diff --git a/gl/m4/inttypes-pri.m4 b/gl/m4/inttypes-pri.m4
index e252b27..977206f 100644
--- a/gl/m4/inttypes-pri.m4
+++ b/gl/m4/inttypes-pri.m4
@@ -1,5 +1,5 @@
 # inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
index cc027a4..eec4f41 100644
--- a/gl/m4/inttypes.m4
+++ b/gl/m4/inttypes.m4
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 24
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# inttypes.m4 serial 26
+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.
@@ -24,22 +24,6 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
 
   AC_REQUIRE([gl_MULTIARCH])
 
-  dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
-  dnl <inttypes.h> relies on them.  This macro is only needed when a
-  dnl C++ compiler is in use; it has no effect for a C compiler.
-  dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
-  dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
-  dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
-  AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
-    [Define to make the limit macros in <stdint.h> visible.])
-  AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
-[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
-   <inttypes.h> relies on them.  */
-#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && 
GL_TRIGGER_STDC_LIMIT_MACROS
-# define __STDC_LIMIT_MACROS 1
-#endif
-])
-
   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([[#include <inttypes.h>
@@ -163,6 +147,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
   HAVE_DECL_IMAXDIV=1;   AC_SUBST([HAVE_DECL_IMAXDIV])
   HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
   HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+  REPLACE_STRTOIMAX=0;   AC_SUBST([REPLACE_STRTOIMAX])
   INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
   INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
   PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4
index f10fd54..91c7bca 100644
--- a/gl/m4/inttypes_h.m4
+++ b/gl/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
 # inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4
index a1db8fc..ec0b728 100644
--- a/gl/m4/ioctl.m4
+++ b/gl/m4/ioctl.m4
@@ -1,5 +1,5 @@
 # ioctl.m4 serial 4
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/isnand.m4 b/gl/m4/isnand.m4
index 48f1a48..54b64a4 100644
--- a/gl/m4/isnand.m4
+++ b/gl/m4/isnand.m4
@@ -1,5 +1,5 @@
 # isnand.m4 serial 11
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/isnanf.m4 b/gl/m4/isnanf.m4
index 66ed954..97f638a 100644
--- a/gl/m4/isnanf.m4
+++ b/gl/m4/isnanf.m4
@@ -1,5 +1,5 @@
 # isnanf.m4 serial 14
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/isnanl.m4 b/gl/m4/isnanl.m4
index daabe2a..81469ab 100644
--- a/gl/m4/isnanl.m4
+++ b/gl/m4/isnanl.m4
@@ -1,5 +1,5 @@
 # isnanl.m4 serial 17
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index d83fea1..1369bbe 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -1,6 +1,6 @@
 # Enable large files on systems where this is not the default.
 
-# Copyright 1992-1996, 1998-2011 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lcmessage.m4 b/gl/m4/lcmessage.m4
index baf41c5..4ed0eb6 100644
--- a/gl/m4/lcmessage.m4
+++ b/gl/m4/lcmessage.m4
@@ -1,5 +1,5 @@
 # lcmessage.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2011 Free Software Foundation,
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-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,
diff --git a/gl/m4/ld-output-def.m4 b/gl/m4/ld-output-def.m4
index 2169f51..3511684 100644
--- a/gl/m4/ld-output-def.m4
+++ b/gl/m4/ld-output-def.m4
@@ -1,5 +1,5 @@
 # ld-output-def.m4 serial 2
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ld-version-script.m4 b/gl/m4/ld-version-script.m4
index aec2f41..fd8c043 100644
--- a/gl/m4/ld-version-script.m4
+++ b/gl/m4/ld-version-script.m4
@@ -1,5 +1,5 @@
 # ld-version-script.m4 serial 2
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ldexpl.m4 b/gl/m4/ldexpl.m4
index f5d15fd..9c9ec67 100644
--- a/gl/m4/ldexpl.m4
+++ b/gl/m4/ldexpl.m4
@@ -1,5 +1,5 @@
 # ldexpl.m4 serial 14
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4
index ae003f7..4e1374d 100644
--- a/gl/m4/lib-ld.m4
+++ b/gl/m4/lib-ld.m4
@@ -1,5 +1,5 @@
 # lib-ld.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index e7c9ba9..d11b4b4 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,5 +1,5 @@
 # lib-link.m4 serial 26 (gettext-0.18.2)
-dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-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.
diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4
index 7e5f0bd..007aa05 100644
--- a/gl/m4/lib-prefix.m4
+++ b/gl/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
 # lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4
index 9686945..c0a6206 100644
--- a/gl/m4/lock.m4
+++ b/gl/m4/lock.m4
@@ -1,5 +1,5 @@
 # lock.m4 serial 11 (gettext-0.18.2)
-dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4
index aed816c..b9c65c7 100644
--- a/gl/m4/longlong.m4
+++ b/gl/m4/longlong.m4
@@ -1,5 +1,5 @@
-# longlong.m4 serial 16
-dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc.
+# longlong.m4 serial 17
+dnl Copyright (C) 1999-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.
@@ -51,7 +51,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
       fi])
   if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `long long int'.])
+      [Define to 1 if the system has the type 'long long int'.])
   fi
 ])
 
@@ -77,7 +77,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
      fi])
   if test $ac_cv_type_unsigned_long_long_int = yes; then
     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `unsigned long long int'.])
+      [Define to 1 if the system has the type 'unsigned long long int'.])
   fi
 ])
 
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index 73c4069..86db59e 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,5 +1,5 @@
 # lseek.m4 serial 8
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index fe161d4..b83858b 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 23
+# serial 24
 
-# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -65,6 +65,6 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
     ])
   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
+      [Define to 1 if 'lstat' dereferences a symlink specified
        with a trailing slash.])
 ])
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 87018ec..d3c39f5 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
 # malloc.m4 serial 13
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4
index aec43f5..7841979 100644
--- a/gl/m4/malloca.m4
+++ b/gl/m4/malloca.m4
@@ -1,5 +1,5 @@
 # malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 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,
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index 67db064..fd0e372 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,5 +1,5 @@
-# manywarnings.m4 serial 1
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# manywarnings.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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -30,9 +30,9 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
 
 # gl_MANYWARN_ALL_GCC(VARIABLE)
 # -----------------------------
-# Add all documented GCC (currently as per version 4.4) warning
-# parameters to variable VARIABLE.  Note that you need to test them
-# using gl_WARN_ADD if you want to make sure your gcc understands it.
+# Add all documented GCC warning parameters to variable VARIABLE.
+# Note that you need to test them using gl_WARN_ADD if you want to
+# make sure your gcc understands it.
 AC_DEFUN([gl_MANYWARN_ALL_GCC],
 [
   dnl First, check if -Wno-missing-field-initializers is needed.
@@ -148,6 +148,32 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     ; 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 \
+    -Wdiv-by-zero \
+    -Wdouble-promotion \
+    -Wendif-labels \
+    -Wextra \
+    -Wformat-contains-nul \
+    -Wformat-extra-args \
+    -Wformat-zero-length \
+    -Wformat=2 \
+    -Wmultichar \
+    -Wnormalized=nfc \
+    -Woverflow \
+    -Wpointer-to-int-cast \
+    -Wpragmas \
+    -Wsuggest-attribute=const \
+    -Wsuggest-attribute=noreturn \
+    -Wsuggest-attribute=pure \
+    -Wtrampolines \
+    ; do
+    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
+  done
 
   # Disable the missing-field-initializers warning if needed
   if test "$gl_cv_cc_nomfi_needed" = yes; then
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index e58a9e9..5d7d52b 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,5 +1,5 @@
 # math_h.m4 serial 56
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4
index f6dc3e7..0040294 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,5 +1,5 @@
 # memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 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.
diff --git a/gl/m4/memmem.m4 b/gl/m4/memmem.m4
index e912205..eebe94c 100644
--- a/gl/m4/memmem.m4
+++ b/gl/m4/memmem.m4
@@ -1,5 +1,5 @@
 # memmem.m4 serial 23
-dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mempcpy.m4 b/gl/m4/mempcpy.m4
index 7214a4b..c926941 100644
--- a/gl/m4/mempcpy.m4
+++ b/gl/m4/mempcpy.m4
@@ -1,5 +1,5 @@
 # mempcpy.m4 serial 11
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 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,
diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4
index beb9cb1..45c6230 100644
--- a/gl/m4/minmax.m4
+++ b/gl/m4/minmax.m4
@@ -1,5 +1,5 @@
 # minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index 952536f..4613cbe 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
 # mmap-anon.m4 serial 9
-dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4
index f9cf704..40f612a 100644
--- a/gl/m4/mode_t.m4
+++ b/gl/m4/mode_t.m4
@@ -1,5 +1,5 @@
 # mode_t.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4
index fb797f0..8db4617 100644
--- a/gl/m4/msvc-inval.m4
+++ b/gl/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
 # msvc-inval.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4
index b2f6bb4..0125050 100644
--- a/gl/m4/msvc-nothrow.m4
+++ b/gl/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
 # msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index 691d892..b424dce 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,5 +1,5 @@
 # multiarch.m4 serial 6
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4
index a54d670..e0f3ee8 100644
--- a/gl/m4/netdb_h.m4
+++ b/gl/m4/netdb_h.m4
@@ -1,5 +1,5 @@
 # netdb_h.m4 serial 11
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4
index 87235b7..e181388 100644
--- a/gl/m4/netinet_in_h.m4
+++ b/gl/m4/netinet_in_h.m4
@@ -1,5 +1,5 @@
 # netinet_in_h.m4 serial 5
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/nls.m4 b/gl/m4/nls.m4
index 6a21216..0866677 100644
--- a/gl/m4/nls.m4
+++ b/gl/m4/nls.m4
@@ -1,5 +1,5 @@
 # nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2011 Free Software Foundation,
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-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,
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index 60aad95..08ef825 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,5 +1,5 @@
 # nocrash.m4 serial 3
-dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4
index d819184..c85971d 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,5 +1,5 @@
 # open.m4 serial 13
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/opendir.m4 b/gl/m4/opendir.m4
index fa315b9..08da440 100644
--- a/gl/m4/opendir.m4
+++ b/gl/m4/opendir.m4
@@ -1,5 +1,5 @@
-# opendir.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+# opendir.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.
@@ -17,7 +17,9 @@ AC_DEFUN([gl_FUNC_OPENDIR],
   m4_ifdef([gl_FUNC_FCHDIR], [
     gl_TEST_FCHDIR
     if test $HAVE_FCHDIR = 0; then
-      REPLACE_OPENDIR=1
+      if test $HAVE_OPENDIR = 1; then
+        REPLACE_OPENDIR=1
+      fi
     fi
   ])
 ])
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
index 4913fa0..0117861 100644
--- a/gl/m4/pathmax.m4
+++ b/gl/m4/pathmax.m4
@@ -1,5 +1,5 @@
 # pathmax.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+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,
diff --git a/gl/m4/perror.m4 b/gl/m4/perror.m4
index cb17ba3..369a824 100644
--- a/gl/m4/perror.m4
+++ b/gl/m4/perror.m4
@@ -1,5 +1,5 @@
 # perror.m4 serial 6
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pipe.m4 b/gl/m4/pipe.m4
index 9013174..37aef11 100644
--- a/gl/m4/pipe.m4
+++ b/gl/m4/pipe.m4
@@ -1,5 +1,5 @@
 # pipe.m4 serial 2
-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/po.m4 b/gl/m4/po.m4
index 9a0cca8..6bf122a 100644
--- a/gl/m4/po.m4
+++ b/gl/m4/po.m4
@@ -1,5 +1,5 @@
 # po.m4 serial 17a
-dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/printf-frexp.m4 b/gl/m4/printf-frexp.m4
index 83ff9ce..de5d641 100644
--- a/gl/m4/printf-frexp.m4
+++ b/gl/m4/printf-frexp.m4
@@ -1,5 +1,5 @@
 # printf-frexp.m4 serial 5
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/printf-frexpl.m4 b/gl/m4/printf-frexpl.m4
index e15628a..55dd6bc 100644
--- a/gl/m4/printf-frexpl.m4
+++ b/gl/m4/printf-frexpl.m4
@@ -1,5 +1,5 @@
 # printf-frexpl.m4 serial 9
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/printf-posix.m4 b/gl/m4/printf-posix.m4
index a9b91f7..0b9da42 100644
--- a/gl/m4/printf-posix.m4
+++ b/gl/m4/printf-posix.m4
@@ -1,5 +1,5 @@
 # printf-posix.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index 0814c91..6d1fa54 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,5 +1,5 @@
-# printf.m4 serial 46
-dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+# printf.m4 serial 47
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -952,7 +952,7 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-           # Guess no only on Solaris, native Win32, and BeOS systems.
+           # Guess no only on Solaris, native Windows, and BeOS systems.
            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
            beos*)        gl_cv_func_printf_precision="guessing no" ;;
diff --git a/gl/m4/progtest.m4 b/gl/m4/progtest.m4
index 5130d56..ce3abbc 100644
--- a/gl/m4/progtest.m4
+++ b/gl/m4/progtest.m4
@@ -1,5 +1,5 @@
 # progtest.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2005, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4
index 1497b4a..1cb23a5 100644
--- a/gl/m4/putenv.m4
+++ b/gl/m4/putenv.m4
@@ -1,5 +1,5 @@
 # putenv.m4 serial 18
-dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/rawmemchr.m4 b/gl/m4/rawmemchr.m4
index 3f136a6..1930164 100644
--- a/gl/m4/rawmemchr.m4
+++ b/gl/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
 # rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/read-file.m4 b/gl/m4/read-file.m4
index 93e0ac3..3665247 100644
--- a/gl/m4/read-file.m4
+++ b/gl/m4/read-file.m4
@@ -1,5 +1,5 @@
 # read-file.m4 serial 3
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/readdir.m4 b/gl/m4/readdir.m4
index cfeed08..437ec08 100644
--- a/gl/m4/readdir.m4
+++ b/gl/m4/readdir.m4
@@ -1,5 +1,5 @@
 # readdir.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 5cc1340..039ed19 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,5 +1,5 @@
 # realloc.m4 serial 12
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/scandir.m4 b/gl/m4/scandir.m4
index 25ebe06..24a3af4 100644
--- a/gl/m4/scandir.m4
+++ b/gl/m4/scandir.m4
@@ -1,5 +1,5 @@
 # scandir.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/select.m4 b/gl/m4/select.m4
index a58f0ac..037b3d3 100644
--- a/gl/m4/select.m4
+++ b/gl/m4/select.m4
@@ -1,5 +1,5 @@
 # select.m4 serial 6
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4
new file mode 100644
index 0000000..21da957
--- /dev/null
+++ b/gl/m4/servent.m4
@@ -0,0 +1,51 @@
+# servent.m4 serial 2
+dnl Copyright (C) 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SERVENT],
+[
+  dnl Where are getservent(), setservent(), endservent(), getservbyname(),
+  dnl getservbyport() defined?
+  dnl Where are getprotoent(), setprotoent(), endprotoent(), getprotobyname(),
+  dnl getprotobynumber() defined?
+  dnl - On Solaris, they are in libsocket. Ignore libxnet.
+  dnl - On Haiku, they are in libnetwork.
+  dnl - On BeOS, they are in libnet.
+  dnl - On native Windows, they are in ws2_32.dll.
+  dnl - Otherwise they are in libc.
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
+  SERVENT_LIB=
+  gl_saved_libs="$LIBS"
+  AC_SEARCH_LIBS([getservbyname], [socket network net],
+    [if test "$ac_cv_search_getservbyname" != "none required"; then
+       SERVENT_LIB="$ac_cv_search_getservbyname"
+     fi])
+  LIBS="$gl_saved_libs"
+  if test -z "$SERVENT_LIB"; then
+    AC_CHECK_FUNCS([getservbyname], , [
+      AC_CACHE_CHECK([for getservbyname in winsock2.h and -lws2_32],
+        [gl_cv_w32_getservbyname],
+        [gl_cv_w32_getservbyname=no
+         gl_save_LIBS="$LIBS"
+         LIBS="$LIBS -lws2_32"
+         AC_LINK_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#include <stddef.h>
+              ]],
+              [[getservbyname(NULL,NULL);]])],
+           [gl_cv_w32_getservbyname=yes])
+         LIBS="$gl_save_LIBS"
+        ])
+      if test "$gl_cv_w32_getservbyname" = "yes"; then
+        SERVENT_LIB="-lws2_32"
+      fi
+    ])
+  fi
+  AC_SUBST([SERVENT_LIB])
+])
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index bc215a6..a1f30bc 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,5 +1,5 @@
 # setenv.m4 serial 25
-dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/signal_h.m4 b/gl/m4/signal_h.m4
index 5cf54a0..ed4d730 100644
--- a/gl/m4/signal_h.m4
+++ b/gl/m4/signal_h.m4
@@ -1,5 +1,5 @@
 # signal_h.m4 serial 18
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/signbit.m4 b/gl/m4/signbit.m4
index bbeb1f4..8955326 100644
--- a/gl/m4/signbit.m4
+++ b/gl/m4/signbit.m4
@@ -1,5 +1,5 @@
 # signbit.m4 serial 11
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index e807098..5a8162b 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
 # size_max.m4 serial 10
-dnl Copyright (C) 2003, 2005-2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sleep.m4 b/gl/m4/sleep.m4
index 74362e4..7e736d4 100644
--- a/gl/m4/sleep.m4
+++ b/gl/m4/sleep.m4
@@ -1,5 +1,5 @@
 # sleep.m4 serial 6
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4
index 6f71623..de94edd 100644
--- a/gl/m4/snprintf.m4
+++ b/gl/m4/snprintf.m4
@@ -1,5 +1,5 @@
 # snprintf.m4 serial 6
-dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4
index 2aa972d..92a1af2 100644
--- a/gl/m4/socketlib.m4
+++ b/gl/m4/socketlib.m4
@@ -1,5 +1,5 @@
 # socketlib.m4 serial 1
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4
index cbe754f..e3738d9 100644
--- a/gl/m4/sockets.m4
+++ b/gl/m4/sockets.m4
@@ -1,5 +1,5 @@
 # sockets.m4 serial 7
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4
index 4475154..a4ab43b 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,5 +1,5 @@
 # socklen.m4 serial 10
-dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
index c38daea..5f97c3e 100644
--- a/gl/m4/sockpfaf.m4
+++ b/gl/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
 # sockpfaf.m4 serial 8
-dnl Copyright (C) 2004, 2006, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index d712752..209d64c 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,5 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 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.
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index c63f59f..d67dbcd 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,6 +1,6 @@
 # serial 8
 
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index da64dc6..9752ba5 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -1,6 +1,6 @@
-# Check for stdalign.h that conforms to C1x.
+# Check for stdalign.h that conforms to C11.
 
-dnl Copyright 2011 Free Software Foundation, Inc.
+dnl Copyright 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.
@@ -9,9 +9,24 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_STDALIGN_H],
 [
-  AC_CHECK_HEADERS_ONCE([stdalign.h])
+  AC_CACHE_CHECK([for working stdalign.h],
+    [gl_cv_header_working_stdalign_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdalign.h>
+            int align_int = alignof (int) + _Alignof (double);
 
-  if test $ac_cv_header_stdalign_h = yes; then
+            /* 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;
+            #endif
+          ]])],
+       [gl_cv_header_working_stdalign_h=yes],
+       [gl_cv_header_working_stdalign_h=no])])
+
+  if test $gl_cv_header_working_stdalign_h = yes; then
     STDALIGN_H=''
   else
     STDALIGN_H='stdalign.h'
diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4
index 5705de9..5c313cb 100644
--- a/gl/m4/stdarg.m4
+++ b/gl/m4/stdarg.m4
@@ -1,5 +1,5 @@
 # stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4
index 1ebf3e6..eabfa64 100644
--- a/gl/m4/stdbool.m4
+++ b/gl/m4/stdbool.m4
@@ -1,6 +1,6 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index 1ae2344..cc11609 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,6 +1,6 @@
 dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
 # stddef_h.m4 serial 4
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index 092161c..28d342e 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 41
-dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
+# stdint.m4 serial 43
+dnl Copyright (C) 2001-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.
@@ -69,8 +69,6 @@ AC_DEFUN_ONCE([gl_STDINT_H],
       [gl_cv_header_working_stdint_h=no
        AC_COMPILE_IFELSE([
          AC_LANG_PROGRAM([[
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
 #include <stdint.h>
 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
@@ -219,8 +217,6 @@ struct s {
           dnl This detects a bug on HP-UX 11.23/ia64.
           AC_RUN_IFELSE([
             AC_LANG_PROGRAM([[
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
 #include <stdint.h>
 ]
diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4
index 356b14e..581de96 100644
--- a/gl/m4/stdint_h.m4
+++ b/gl/m4/stdint_h.m4
@@ -1,5 +1,5 @@
 # stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 39bf80e..1973e8d 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,5 +1,5 @@
 # stdio_h.m4 serial 40
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index fbdba98..bcb4cb8 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 37
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 39
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,8 +21,8 @@ AC_DEFUN([gl_STDLIB_H],
 #endif
     ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
     initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt
-    ptsname random_r realpath rpmatch setenv setstate_r srandom_r strtod
-    strtoll strtoull unlockpt unsetenv])
+    ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srandom_r
+    strtod strtoll strtoull unlockpt unsetenv])
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -52,6 +52,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_MKSTEMPS=0;      AC_SUBST([GNULIB_MKSTEMPS])
   GNULIB_POSIX_OPENPT=0;  AC_SUBST([GNULIB_POSIX_OPENPT])
   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_R=0;      AC_SUBST([GNULIB_RANDOM_R])
   GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
@@ -79,6 +80,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_MKSTEMPS=1;           AC_SUBST([HAVE_MKSTEMPS])
   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_H=1;           AC_SUBST([HAVE_RANDOM_H])
   HAVE_RANDOM_R=1;           AC_SUBST([HAVE_RANDOM_R])
   HAVE_REALPATH=1;           AC_SUBST([HAVE_REALPATH])
@@ -97,6 +99,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   REPLACE_MALLOC=0;          AC_SUBST([REPLACE_MALLOC])
   REPLACE_MBTOWC=0;          AC_SUBST([REPLACE_MBTOWC])
   REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
+  REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
   REPLACE_REALLOC=0;         AC_SUBST([REPLACE_REALLOC])
   REPLACE_REALPATH=0;        AC_SUBST([REPLACE_REALPATH])
diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4
index c676176..717fa9c 100644
--- a/gl/m4/strcase.m4
+++ b/gl/m4/strcase.m4
@@ -1,5 +1,5 @@
 # strcase.m4 serial 11
-dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 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.
diff --git a/gl/m4/strchrnul.m4 b/gl/m4/strchrnul.m4
index d89a062..d3dfb9a 100644
--- a/gl/m4/strchrnul.m4
+++ b/gl/m4/strchrnul.m4
@@ -1,5 +1,5 @@
 # strchrnul.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4
index d744ad5..db0c8c1 100644
--- a/gl/m4/strdup.m4
+++ b/gl/m4/strdup.m4
@@ -1,6 +1,6 @@
 # strdup.m4 serial 13
 
-dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
+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,
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index ca05be6..6bf14ef 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,5 +1,5 @@
 # strerror.m4 serial 16
-dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strerror_r.m4 b/gl/m4/strerror_r.m4
index 1d4a653..5bdf0ab 100644
--- a/gl/m4/strerror_r.m4
+++ b/gl/m4/strerror_r.m4
@@ -1,5 +1,5 @@
 # strerror_r.m4 serial 14
-dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 4f9f511..5677e09 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,6 +1,6 @@
 # Configure a GNU-like replacement for <string.h>.
 
-# Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# Copyright (C) 2007-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4
index 481f8f3..a057e1c 100644
--- a/gl/m4/strings_h.m4
+++ b/gl/m4/strings_h.m4
@@ -1,7 +1,7 @@
 # Configure a replacement for <strings.h>.
 # serial 6
 
-# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strndup.m4 b/gl/m4/strndup.m4
index e1ac20b..bdde5fe 100644
--- a/gl/m4/strndup.m4
+++ b/gl/m4/strndup.m4
@@ -1,5 +1,5 @@
 # strndup.m4 serial 20
-dnl Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4
index 672acfd..d97e307 100644
--- a/gl/m4/strnlen.m4
+++ b/gl/m4/strnlen.m4
@@ -1,5 +1,5 @@
 # strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 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,
diff --git a/gl/m4/strverscmp.m4 b/gl/m4/strverscmp.m4
index 394b4c3..d744647 100644
--- a/gl/m4/strverscmp.m4
+++ b/gl/m4/strverscmp.m4
@@ -1,5 +1,5 @@
 # strverscmp.m4 serial 8
-dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 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.
diff --git a/gl/m4/symlink.m4 b/gl/m4/symlink.m4
index 680c14f..f84b21e 100644
--- a/gl/m4/symlink.m4
+++ b/gl/m4/symlink.m4
@@ -1,7 +1,7 @@
 # serial 5
 # See if we need to provide symlink replacement.
 
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index 8c7d112..94a2669 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,5 +1,5 @@
 # sys_ioctl_h.m4 serial 10
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4
index b1914fb..eaf056a 100644
--- a/gl/m4/sys_select_h.m4
+++ b/gl/m4/sys_select_h.m4
@@ -1,5 +1,5 @@
 # sys_select_h.m4 serial 20
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 7da91a4..8d4e7e1 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
 # sys_socket_h.m4 serial 22
-dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index 83ebac6..a0b96bc 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
 # sys_stat_h.m4 serial 26   -*- Autoconf -*-
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4
index 064e0de..bed3797 100644
--- a/gl/m4/sys_time_h.m4
+++ b/gl/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
 # Configure a replacement for <sys/time.h>.
 # serial 7
 
-# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index 62113df..8d18ddb 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
 # sys_types_h.m4 serial 2
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4
index bafa0ac..ddf844b 100644
--- a/gl/m4/sys_uio_h.m4
+++ b/gl/m4/sys_uio_h.m4
@@ -1,5 +1,5 @@
 # sys_uio_h.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/sysexits.m4 b/gl/m4/sysexits.m4
index cff6606..c5741d2 100644
--- a/gl/m4/sysexits.m4
+++ b/gl/m4/sysexits.m4
@@ -1,5 +1,5 @@
 # sysexits.m4 serial 6
-dnl Copyright (C) 2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/thread.m4 b/gl/m4/thread.m4
index 49a4bc7..cd66c3e 100644
--- a/gl/m4/thread.m4
+++ b/gl/m4/thread.m4
@@ -1,5 +1,5 @@
 # thread.m4 serial 2
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4
index 8a621fd..9cedb67 100644
--- a/gl/m4/threadlib.m4
+++ b/gl/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 8 (gettext-0.18.2)
-dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+# threadlib.m4 serial 9 (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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +15,7 @@ dnl default is 'no', otherwise it is system dependent. In 
both cases, the user
 dnl can change the choice through the options --enable-threads=choice or
 dnl --disable-threads.
 dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
-dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
 dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
 dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
 dnl libtool).
@@ -53,7 +53,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
   AC_ARG_ENABLE([threads],
-AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify 
multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify 
multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
 AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
     [gl_use_threads=$enableval],
     [if test -n "$gl_use_threads_default"; then
@@ -276,17 +276,19 @@ int main ()
       fi
     fi
     if test -z "$gl_have_pthread"; then
-      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
-        if { case "$host_os" in
-               mingw*) true;;
-               *) false;;
-             esac
-           }; then
-          gl_threads_api=win32
-          AC_DEFINE([USE_WIN32_THREADS], [1],
-            [Define if the Win32 multithreading API can be used.])
-        fi
-      fi
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
+            AC_DEFINE([USE_WINDOWS_THREADS], [1],
+              [Define if the native Windows multithreading API can be used.])
+          fi
+          ;;
+      esac
     fi
   fi
   AC_MSG_CHECKING([for multithread API to use])
@@ -358,7 +360,7 @@ dnl Cygwin            posix       -lpthread       Y      OK
 dnl
 dnl Any of the above  pth         -lpth                  0.0
 dnl
-dnl Mingw             win32                       N      OK
+dnl Mingw             windows                     N      OK
 dnl
 dnl BeOS 5            --
 dnl
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index 3454b23..b88da76 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,6 +1,6 @@
 # Configure a more-standard replacement for <time.h>.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
 # serial 6
 
@@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 ])
 
-dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
+dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared
 dnl in time.h, sys/time.h, or pthread.h.
 
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4
index d646edc..c3579fb 100644
--- a/gl/m4/time_r.m4
+++ b/gl/m4/time_r.m4
@@ -1,6 +1,6 @@
 dnl Reentrant time functions: localtime_r, gmtime_r.
 
-dnl Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4
index 4a1c7ad..597b9c2 100644
--- a/gl/m4/timespec.m4
+++ b/gl/m4/timespec.m4
@@ -1,6 +1,6 @@
 #serial 14
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/uintmax_t.m4 b/gl/m4/uintmax_t.m4
index c1f954e..983b675 100644
--- a/gl/m4/uintmax_t.m4
+++ b/gl/m4/uintmax_t.m4
@@ -1,5 +1,5 @@
 # uintmax_t.m4 serial 12
-dnl Copyright (C) 1997-2004, 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4
index 749f6bd..95bb3eb 100644
--- a/gl/m4/ungetc.m4
+++ b/gl/m4/ungetc.m4
@@ -1,5 +1,5 @@
 # ungetc.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 57c8094..7595534 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 61
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# unistd_h.m4 serial 63
+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.
@@ -41,10 +41,11 @@ AC_DEFUN([gl_UNISTD_H],
 #endif
     ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
     fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
-    gethostname getlogin getlogin_r getpagesize getusershell setusershell
-    endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite
-    readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
-    usleep])
+    gethostname getlogin getlogin_r getpagesize
+    getusershell setusershell endusershell
+    group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
+    readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r
+    unlink unlinkat usleep])
 ])
 
 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -82,6 +83,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_GETPAGESIZE=0;          AC_SUBST([GNULIB_GETPAGESIZE])
   GNULIB_GETUSERSHELL=0;         AC_SUBST([GNULIB_GETUSERSHELL])
   GNULIB_GROUP_MEMBER=0;         AC_SUBST([GNULIB_GROUP_MEMBER])
+  GNULIB_ISATTY=0;               AC_SUBST([GNULIB_ISATTY])
   GNULIB_LCHOWN=0;               AC_SUBST([GNULIB_LCHOWN])
   GNULIB_LINK=0;                 AC_SUBST([GNULIB_LINK])
   GNULIB_LINKAT=0;               AC_SUBST([GNULIB_LINKAT])
@@ -94,11 +96,11 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_READLINK=0;             AC_SUBST([GNULIB_READLINK])
   GNULIB_READLINKAT=0;           AC_SUBST([GNULIB_READLINKAT])
   GNULIB_RMDIR=0;                AC_SUBST([GNULIB_RMDIR])
+  GNULIB_SETHOSTNAME=0;          AC_SUBST([GNULIB_SETHOSTNAME])
   GNULIB_SLEEP=0;                AC_SUBST([GNULIB_SLEEP])
   GNULIB_SYMLINK=0;              AC_SUBST([GNULIB_SYMLINK])
   GNULIB_SYMLINKAT=0;            AC_SUBST([GNULIB_SYMLINKAT])
   GNULIB_TTYNAME_R=0;            AC_SUBST([GNULIB_TTYNAME_R])
-  GNULIB_UNISTD_H_GETOPT=0;      AC_SUBST([GNULIB_UNISTD_H_GETOPT])
   GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
   GNULIB_UNISTD_H_SIGPIPE=0;     AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
   GNULIB_UNLINK=0;               AC_SUBST([GNULIB_UNLINK])
@@ -131,6 +133,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_PWRITE=1;          AC_SUBST([HAVE_PWRITE])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
   HAVE_READLINKAT=1;      AC_SUBST([HAVE_READLINKAT])
+  HAVE_SETHOSTNAME=1;     AC_SUBST([HAVE_SETHOSTNAME])
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_SYMLINK=1;         AC_SUBST([HAVE_SYMLINK])
   HAVE_SYMLINKAT=1;       AC_SUBST([HAVE_SYMLINKAT])
@@ -143,6 +146,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
   HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
   HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
+  HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
   HAVE_DECL_TTYNAME_R=1;  AC_SUBST([HAVE_DECL_TTYNAME_R])
   HAVE_OS_H=0;            AC_SUBST([HAVE_OS_H])
   HAVE_SYS_PARAM_H=0;     AC_SUBST([HAVE_SYS_PARAM_H])
@@ -156,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_GETLOGIN_R=0;   AC_SUBST([REPLACE_GETLOGIN_R])
   REPLACE_GETGROUPS=0;    AC_SUBST([REPLACE_GETGROUPS])
   REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
+  REPLACE_ISATTY=0;       AC_SUBST([REPLACE_ISATTY])
   REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
   REPLACE_LINK=0;         AC_SUBST([REPLACE_LINK])
   REPLACE_LINKAT=0;       AC_SUBST([REPLACE_LINKAT])
diff --git a/gl/m4/usleep.m4 b/gl/m4/usleep.m4
new file mode 100644
index 0000000..07fa9e9
--- /dev/null
+++ b/gl/m4/usleep.m4
@@ -0,0 +1,35 @@
+# usleep.m4 serial 2
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro intentionally does not check for select or nanosleep;
+dnl both of those modules can require external libraries.
+AC_DEFUN([gl_FUNC_USLEEP],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  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_CHECK_FUNCS_ONCE([usleep])
+  AC_CHECK_TYPE([useconds_t], [],
+    [AC_DEFINE([useconds_t], [unsigned int], [Define to an unsigned 32-bit
+      type if <sys/types.h> lacks this type.])])
+  if test $ac_cv_func_usleep = no; then
+    HAVE_USLEEP=0
+  else
+    dnl POSIX allows implementations to reject arguments larger than
+    dnl 999999, but GNU guarantees it will work.
+    AC_CACHE_CHECK([whether usleep allows large arguments],
+      [gl_cv_func_usleep_works],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#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
+  fi
+])
diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4
index 9c4d029..077e025 100644
--- a/gl/m4/valgrind-tests.m4
+++ b/gl/m4/valgrind-tests.m4
@@ -1,5 +1,5 @@
-# valgrind-tests.m4 serial 2
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# valgrind-tests.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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,9 +21,12 @@ AC_DEFUN([gl_VALGRIND_TESTS],
     AC_CHECK_PROGS(VALGRIND, valgrind)
   fi
 
-  if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then
+  OPTS="-q --error-exitcode=1 --suppressions=suppressions.valgrind"
+
+  if test -n "$VALGRIND" \
+     && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then
     opt_valgrind_tests=yes
-    VALGRIND="$VALGRIND -q --error-exitcode=1 
--suppressions=suppressions.valgrind"
+    VALGRIND="$VALGRIND $OPTS"
   else
     opt_valgrind_tests=no
     VALGRIND=
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index da0a6d9..61fe499 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
 # vasnprintf.m4 serial 34
-dnl Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4
index 6db52b1..205ceea 100644
--- a/gl/m4/vasprintf.m4
+++ b/gl/m4/vasprintf.m4
@@ -1,5 +1,5 @@
 # vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 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,
diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4
index 5032bf8..4c6c678 100644
--- a/gl/m4/version-etc.m4
+++ b/gl/m4/version-etc.m4
@@ -1,5 +1,5 @@
 # version-etc.m4 serial 1
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vfprintf-posix.m4 b/gl/m4/vfprintf-posix.m4
index 5ec93d1..441bd57 100644
--- a/gl/m4/vfprintf-posix.m4
+++ b/gl/m4/vfprintf-posix.m4
@@ -1,5 +1,5 @@
 # vfprintf-posix.m4 serial 14
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4
index 75c34b6..7b24d39 100644
--- a/gl/m4/visibility.m4
+++ b/gl/m4/visibility.m4
@@ -1,5 +1,5 @@
 # visibility.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vprintf-posix.m4 b/gl/m4/vprintf-posix.m4
index 299ff7e..0320352 100644
--- a/gl/m4/vprintf-posix.m4
+++ b/gl/m4/vprintf-posix.m4
@@ -1,5 +1,5 @@
 # vprintf-posix.m4 serial 3
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4
index d6ce1e6..22ec57b 100644
--- a/gl/m4/vsnprintf.m4
+++ b/gl/m4/vsnprintf.m4
@@ -1,5 +1,5 @@
 # vsnprintf.m4 serial 6
-dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index f09deef..03b113c 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
 # warn-on-use.m4 serial 4
-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index a4a750a..69d05a6 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,5 +1,5 @@
 # warnings.m4 serial 5
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 977491f..c7a8b2d 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -1,6 +1,6 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index d2c03c4..534735d 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index da1ce3d..3260cce 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,5 +1,5 @@
 # wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index 8c693bc..b3b7fee 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,5 +1,5 @@
 # xsize.m4 serial 4
-dnl Copyright (C) 2003-2004, 2008-2011 Free Software Foundation, Inc.
+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,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/yield.m4 b/gl/m4/yield.m4
index 15d5ac2..94e69c4 100644
--- a/gl/m4/yield.m4
+++ b/gl/m4/yield.m4
@@ -1,5 +1,5 @@
 # yield.m4 serial 2
-dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+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.
diff --git a/gl/malloc.c b/gl/malloc.c
index da45618..ffe042b 100644
--- a/gl/malloc.c
+++ b/gl/malloc.c
@@ -1,6 +1,6 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 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
diff --git a/gl/math.in.h b/gl/math.in.h
index eadb489..0271afe 100644
--- a/gl/math.in.h
+++ b/gl/math.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <math.h>.
 
-   Copyright (C) 2002-2003, 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 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
@@ -1246,7 +1246,7 @@ _GL_EXTERN_C int isnand (double x);
 /* Test whether X is a NaN.  */
 #  undef isnanl
 #  define isnanl rpl_isnanl
-_GL_EXTERN_C int isnanl (long double x);
+_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
 # endif
 #endif
 
@@ -1272,7 +1272,7 @@ _GL_EXTERN_C int rpl_isnand (double x);
 #  if @HAVE_ISNANL@ && __GNUC__ >= 4
 #   define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
 #  else
-_GL_EXTERN_C int rpl_isnanl (long double x);
+_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
 #   define gl_isnan_l(x) rpl_isnanl (x)
 #  endif
 #  undef isnan
diff --git a/gl/memchr.c b/gl/memchr.c
index 6d903b1..b8fb0ef 100644
--- a/gl/memchr.c
+++ b/gl/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012
    Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (address@hidden),
diff --git a/gl/memmem.c b/gl/memmem.c
index acd1a3e..3d97864 100644
--- a/gl/memmem.c
+++ b/gl/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2011 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
diff --git a/gl/mempcpy.c b/gl/mempcpy.c
index 6a148a9..db7cdc9 100644
--- a/gl/mempcpy.c
+++ b/gl/mempcpy.c
@@ -1,5 +1,5 @@
 /* Copy memory area and return pointer after last written byte.
-   Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 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
diff --git a/gl/minmax.h b/gl/minmax.h
index 172fafe..7f581c7 100644
--- a/gl/minmax.h
+++ b/gl/minmax.h
@@ -1,5 +1,5 @@
 /* MIN, MAX macros.
-   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2011 Free Software
+   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c
index d10099e..b7a917d 100644
--- a/gl/msvc-inval.c
+++ b/gl/msvc-inval.c
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
@@ -40,7 +40,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
 
 # else
 
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #  define WIN32_LEAN_AND_MEAN
 #  include <windows.h>
 
diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h
index 393272e..373f9bf 100644
--- a/gl/msvc-inval.h
+++ b/gl/msvc-inval.h
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
@@ -207,7 +207,7 @@ extern struct gl_msvc_inval_per_thread 
*gl_msvc_inval_current (void);
    or when SANE_LIBRARY_HANDLING is desired.  */
 
 /* The braces here avoid GCC warnings like
-   "warning: suggest explicit braces to avoid ambiguous `else'".  */
+   "warning: suggest explicit braces to avoid ambiguous 'else'".  */
 # define TRY_MSVC_INVAL \
     do                                                                         
\
       {                                                                        
\
diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c
index 8965140..f0fea17 100644
--- a/gl/msvc-nothrow.c
+++ b/gl/msvc-nothrow.c
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
@@ -21,7 +21,7 @@
 /* Specification.  */
 #include "msvc-nothrow.h"
 
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h
index 462fb67..e066b24 100644
--- a/gl/msvc-nothrow.h
+++ b/gl/msvc-nothrow.h
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/netdb.in.h b/gl/netdb.in.h
index 69b6d5d..ddc97b9 100644
--- a/gl/netdb.in.h
+++ b/gl/netdb.in.h
@@ -1,5 +1,5 @@
 /* Provide a netdb.h header file for systems lacking it (read: MinGW).
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
@@ -80,9 +80,9 @@ struct addrinfo
 
 # endif
 
-/* Possible values for `ai_flags' field in `addrinfo' structure.  */
+/* Possible values for 'ai_flags' field in 'addrinfo' structure.  */
 # ifndef AI_PASSIVE
-#  define AI_PASSIVE    0x0001  /* Socket address is intended for `bind'.  */
+#  define AI_PASSIVE    0x0001  /* Socket address is intended for 'bind'.  */
 # endif
 # ifndef AI_CANONNAME
 #  define AI_CANONNAME  0x0002  /* Request for canonical name.  */
@@ -111,16 +111,16 @@ struct addrinfo
                                       returned address type.  */
 # endif
 
-/* Error values for `getaddrinfo' function.  */
+/* Error values for 'getaddrinfo' function.  */
 # ifndef EAI_BADFLAGS
-#  define EAI_BADFLAGS    -1    /* Invalid value for `ai_flags' field.  */
+#  define EAI_BADFLAGS    -1    /* Invalid value for 'ai_flags' field.  */
 #  define EAI_NONAME      -2    /* NAME or SERVICE is unknown.  */
 #  define EAI_AGAIN       -3    /* Temporary failure in name resolution.  */
 #  define EAI_FAIL        -4    /* Non-recoverable failure in name res.  */
 #  define EAI_NODATA      -5    /* No address associated with NAME.  */
-#  define EAI_FAMILY      -6    /* `ai_family' not supported.  */
-#  define EAI_SOCKTYPE    -7    /* `ai_socktype' not supported.  */
-#  define EAI_SERVICE     -8    /* SERVICE not supported for `ai_socktype'.  */
+#  define EAI_FAMILY      -6    /* 'ai_family' not supported.  */
+#  define EAI_SOCKTYPE    -7    /* 'ai_socktype' not supported.  */
+#  define EAI_SERVICE     -8    /* SERVICE not supported for 'ai_socktype'.  */
 #  define EAI_MEMORY      -10   /* Memory allocation failure.  */
 # endif
 
@@ -141,7 +141,7 @@ struct addrinfo
 # endif
 # ifndef EAI_SYSTEM
 /* Not defined on mingw32. */
-#  define EAI_SYSTEM      -11   /* System error returned in `errno'.  */
+#  define EAI_SYSTEM      -11   /* System error returned in 'errno'.  */
 # endif
 
 # if 0
@@ -179,7 +179,7 @@ _GL_CXXALIAS_SYS (getaddrinfo, int,
 _GL_CXXALIASWARN (getaddrinfo);
 
 # if address@hidden@
-/* Free `addrinfo' structure AI including associated storage.
+/* Free 'addrinfo' structure AI including associated storage.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/getaddrinfo.html>.  */
 _GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai)
diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h
index 966d6a5..e06dfe0 100644
--- a/gl/netinet_in.in.h
+++ b/gl/netinet_in.in.h
@@ -1,5 +1,5 @@
 /* Substitute for <netinet/in.h>.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/opendir.c b/gl/opendir.c
index 20ae75e..50e25e3 100644
--- a/gl/opendir.c
+++ b/gl/opendir.c
@@ -1,5 +1,5 @@
 /* Start reading the entries of a directory.
-   Copyright (C) 2006-2011 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
diff --git a/gl/override/m4/valgrind-tests.m4.diff 
b/gl/override/m4/valgrind-tests.m4.diff
index dac9a24..d94b157 100644
--- a/gl/override/m4/valgrind-tests.m4.diff
+++ b/gl/override/m4/valgrind-tests.m4.diff
@@ -1,11 +1,11 @@
---- valgrind-tests.m4.orig     2011-05-21 09:37:17.415555504 +0200
-+++ valgrind-tests.m4  2011-05-21 09:37:34.600259721 +0200
-@@ -23,7 +23,7 @@
+--- valgrind-tests.m4.orig
++++ valgrind-tests.m4
+@@ -21,7 +21,7 @@ AC_DEFUN([gl_VALGRIND_TESTS],
+     AC_CHECK_PROGS(VALGRIND, valgrind)
+   fi
  
-   if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then
-     opt_valgrind_tests=yes
--    VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=full"
-+    VALGRIND="$VALGRIND -q --error-exitcode=1 
--suppressions=suppressions.valgrind"
-   else
-     opt_valgrind_tests=no
-     VALGRIND=
+-  OPTS="-q --error-exitcode=1 --leak-check=full"
++  OPTS="-q --error-exitcode=1 --suppressions=suppressions.valgrind"
+ 
+   if test -n "$VALGRIND" \
+      && $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then
diff --git a/gl/printf-args.c b/gl/printf-args.c
index 8f3727b..979435f 100644
--- a/gl/printf-args.c
+++ b/gl/printf-args.c
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2011 Free Software
+   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/printf-args.h b/gl/printf-args.h
index 70cca4f..39ec7f4 100644
--- a/gl/printf-args.h
+++ b/gl/printf-args.h
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2006-2007, 2011 Free Software
+   Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/printf-frexp.c b/gl/printf-frexp.c
index 267081c..eb47205 100644
--- a/gl/printf-frexp.c
+++ b/gl/printf-frexp.c
@@ -1,5 +1,5 @@
 /* Split a double into fraction and mantissa, for hexadecimal printf.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/printf-frexp.h b/gl/printf-frexp.h
index 10dd371..985d7d2 100644
--- a/gl/printf-frexp.h
+++ b/gl/printf-frexp.h
@@ -1,5 +1,5 @@
 /* Split a double into fraction and mantissa, for hexadecimal printf.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/printf-frexpl.c b/gl/printf-frexpl.c
index 2de6528..568d2ff 100644
--- a/gl/printf-frexpl.c
+++ b/gl/printf-frexpl.c
@@ -1,5 +1,5 @@
 /* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/printf-frexpl.h b/gl/printf-frexpl.h
index a8cbcbf..341dded 100644
--- a/gl/printf-frexpl.h
+++ b/gl/printf-frexpl.h
@@ -1,5 +1,5 @@
 /* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/printf-parse.c b/gl/printf-parse.c
index ff24ba4..d2a58a1 100644
--- a/gl/printf-parse.c
+++ b/gl/printf-parse.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999-2000, 2002-2003, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2002-2003, 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
@@ -421,7 +421,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, 
arguments *a)
                     }
 #endif
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-                  /* On native Win32, PRIdMAX is defined as "I64d".
+                  /* On native Windows, PRIdMAX is defined as "I64d".
                      We cannot change it to "lld" because PRIdMAX must also
                      be understood by the system's printf routines.  */
                   else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
diff --git a/gl/printf-parse.h b/gl/printf-parse.h
index 76e5ba3..3830f3c 100644
--- a/gl/printf-parse.h
+++ b/gl/printf-parse.h
@@ -1,5 +1,5 @@
 /* Parse printf format string.
-   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 Free Software
+   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/progname.c b/gl/progname.c
index 2465748..bdd4dd7 100644
--- a/gl/progname.c
+++ b/gl/progname.c
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2001.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/progname.h b/gl/progname.h
index 0844066..a75a02e 100644
--- a/gl/progname.h
+++ b/gl/progname.h
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2009-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2001.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/rawmemchr.c b/gl/rawmemchr.c
index 095a50a..c94a0e1 100644
--- a/gl/rawmemchr.c
+++ b/gl/rawmemchr.c
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/read-file.c b/gl/read-file.c
index bcbfbbb..72ab4e8 100644
--- a/gl/read-file.c
+++ b/gl/read-file.c
@@ -1,5 +1,5 @@
 /* read-file.c -- read file contents into a string
-   Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson and Bruno Haible.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/read-file.h b/gl/read-file.h
index 42663ef..b45b76d 100644
--- a/gl/read-file.h
+++ b/gl/read-file.h
@@ -1,5 +1,5 @@
 /* read-file.h -- read file contents into a string
-   Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/readdir.c b/gl/readdir.c
index 04858b0..28aff9c 100644
--- a/gl/readdir.c
+++ b/gl/readdir.c
@@ -1,5 +1,5 @@
 /* Read the next entry of a directory.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/realloc.c b/gl/realloc.c
index 0c96ffa..99556cc 100644
--- a/gl/realloc.c
+++ b/gl/realloc.c
@@ -1,6 +1,6 @@
 /* realloc() function that is glibc compatible.
 
-   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2011 Free Software
+   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/recv.c b/gl/recv.c
index 4755f63..c6e2c00 100644
--- a/gl/recv.c
+++ b/gl/recv.c
@@ -1,6 +1,6 @@
 /* recv.c --- wrappers for Windows recv function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/recvfrom.c b/gl/recvfrom.c
index 5ce2b12..2f0ecdb 100644
--- a/gl/recvfrom.c
+++ b/gl/recvfrom.c
@@ -1,6 +1,6 @@
 /* recvfrom.c --- wrappers for Windows recvfrom function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/scandir.c b/gl/scandir.c
index 0ce67f0..da1287b 100644
--- a/gl/scandir.c
+++ b/gl/scandir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-1998, 2000, 2002-2003, 2009-2011 Free Software
+/* Copyright (C) 1992-1998, 2000, 2002-2003, 2009-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
diff --git a/gl/select.c b/gl/select.c
index 236b951..8bcfef0 100644
--- a/gl/select.c
+++ b/gl/select.c
@@ -1,7 +1,7 @@
 /* Emulation for select(2)
    Contributed by Paolo Bonzini.
 
-   Copyright 2008-2011 Free Software Foundation, Inc.
+   Copyright 2008-2012 Free Software Foundation, Inc.
 
    This file is part of gnulib.
 
@@ -24,7 +24,7 @@
 #include <assert.h>
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Win32.  */
+/* Native Windows.  */
 
 #include <sys/types.h>
 #include <errno.h>
@@ -78,6 +78,8 @@ typedef DWORD (WINAPI *PNtQueryInformationFile)
 #define PIPE_BUF        512
 #endif
 
+/* 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)
 
 static BOOL
@@ -95,11 +97,14 @@ IsSocketHandle (HANDLE h)
   return ev.lNetworkEvents != 0xDEADBEEF;
 }
 
-/* Compute output fd_sets for libc descriptor FD (whose Win32 handle is H).  */
+/* Compute output fd_sets for libc descriptor FD (whose Windows handle is
+   H).  */
 
 static int
-win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset 
*wbits,
-                   struct bitset *xbits)
+windows_poll_handle (HANDLE h, int fd,
+                    struct bitset *rbits,
+                    struct bitset *wbits,
+                     struct bitset *xbits)
 {
   BOOL read, write, except;
   int i, ret;
@@ -140,11 +145,12 @@ win32_poll_handle (HANDLE h, int fd, struct bitset 
*rbits, struct bitset *wbits,
         {
           /* It was the write-end of the pipe.  Check if it is writable.
              If NtQueryInformationFile fails, optimistically assume the pipe is
-             writable.  This could happen on Win9x, where 
NtQueryInformationFile
-             is not available, or if we inherit a pipe that doesn't permit
-             FILE_READ_ATTRIBUTES access on the write end (I think this should
-             not happen since WinXP SP2; WINE seems fine too).  Otherwise,
-             ensure that enough space is available for atomic writes.  */
+             writable.  This could happen on Windows 9x, where
+             NtQueryInformationFile is not available, or if we inherit a pipe
+             that doesn't permit FILE_READ_ATTRIBUTES access on the write end
+             (I think this should not happen since Windows XP SP2; WINE seems
+             fine too).  Otherwise, ensure that enough space is available for
+             atomic writes.  */
           memset (&iosb, 0, sizeof (iosb));
           memset (&fpli, 0, sizeof (fpli));
 
@@ -369,7 +375,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set 
*xfds,
 
           /* Poll now.  If we get an event, do not wait below.  */
           if (wait_timeout != 0
-              && win32_poll_handle (h, i, &rbits, &wbits, &xbits))
+              && windows_poll_handle (h, i, &rbits, &wbits, &xbits))
             wait_timeout = 0;
         }
     }
@@ -446,7 +452,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set 
*xfds,
         {
           /* Not a socket.  */
           nhandles++;
-          win32_poll_handle (h, i, &rbits, &wbits, &xbits);
+          windows_poll_handle (h, i, &rbits, &wbits, &xbits);
           if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))))
             {
               rc++;
@@ -468,7 +474,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set 
*xfds,
   return rc;
 }
 
-#else /* ! Native Win32.  */
+#else /* ! Native Windows.  */
 
 #include <sys/select.h>
 
diff --git a/gl/send.c b/gl/send.c
index cd21482..83fe8e6 100644
--- a/gl/send.c
+++ b/gl/send.c
@@ -1,6 +1,6 @@
 /* send.c --- wrappers for Windows send function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/sendto.c b/gl/sendto.c
index 95efab8..ab575f4 100644
--- a/gl/sendto.c
+++ b/gl/sendto.c
@@ -1,6 +1,6 @@
 /* sendto.c --- wrappers for Windows sendto function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/setsockopt.c b/gl/setsockopt.c
index 6a7ca5e..9f414d5 100644
--- a/gl/setsockopt.c
+++ b/gl/setsockopt.c
@@ -1,6 +1,6 @@
 /* setsockopt.c --- wrappers for Windows setsockopt function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/shutdown.c b/gl/shutdown.c
index 1c302a2..ea19421 100644
--- a/gl/shutdown.c
+++ b/gl/shutdown.c
@@ -1,6 +1,6 @@
 /* shutdown.c --- wrappers for Windows shutdown function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/signal.in.h b/gl/signal.in.h
index e18e0b2..e0f0554 100644
--- a/gl/signal.in.h
+++ b/gl/signal.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <signal.h>.
 
-   Copyright (C) 2006-2011 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
diff --git a/gl/signbitd.c b/gl/signbitd.c
index 4042349..7629ff5 100644
--- a/gl/signbitd.c
+++ b/gl/signbitd.c
@@ -1,5 +1,5 @@
 /* signbit() macro: Determine the sign bit of a floating-point number.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/signbitf.c b/gl/signbitf.c
index 3ec472f..f99f992 100644
--- a/gl/signbitf.c
+++ b/gl/signbitf.c
@@ -1,5 +1,5 @@
 /* signbit() macro: Determine the sign bit of a floating-point number.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/signbitl.c b/gl/signbitl.c
index 4453d8f..35afcf1 100644
--- a/gl/signbitl.c
+++ b/gl/signbitl.c
@@ -1,5 +1,5 @@
 /* signbit() macro: Determine the sign bit of a floating-point number.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/size_max.h b/gl/size_max.h
index d5f3152..e669bf1 100644
--- a/gl/size_max.h
+++ b/gl/size_max.h
@@ -1,5 +1,5 @@
 /* size_max.h -- declare SIZE_MAX through system headers
-   Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/sleep.c b/gl/sleep.c
index 45b9d80..e5d3299 100644
--- a/gl/sleep.c
+++ b/gl/sleep.c
@@ -1,5 +1,5 @@
 /* Pausing execution of the current thread.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2007.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/snprintf.c b/gl/snprintf.c
index 9db2379..bb01880 100644
--- a/gl/snprintf.c
+++ b/gl/snprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson and Paul Eggert.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/socket.c b/gl/socket.c
index af6be25..c668df0 100644
--- a/gl/socket.c
+++ b/gl/socket.c
@@ -1,6 +1,6 @@
 /* socket.c --- wrappers for Windows socket function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/sockets.c b/gl/sockets.c
index 39939b0..3daec45 100644
--- a/gl/sockets.c
+++ b/gl/sockets.c
@@ -1,6 +1,6 @@
 /* sockets.c --- wrappers for Windows socket functions
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/sockets.h b/gl/sockets.h
index 323f68c..2efa413 100644
--- a/gl/sockets.h
+++ b/gl/sockets.h
@@ -1,6 +1,6 @@
 /* sockets.h - wrappers for Windows socket functions
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
@@ -26,8 +26,17 @@
 #define SOCKETS_2_1 0x201
 #define SOCKETS_2_2 0x202
 
-int gl_sockets_startup (int version);
-int gl_sockets_cleanup (void);
+int gl_sockets_startup (int version)
+#if !WINDOWS_SOCKETS
+  _GL_ATTRIBUTE_CONST
+#endif
+  ;
+
+int gl_sockets_cleanup (void)
+#if !WINDOWS_SOCKETS
+  _GL_ATTRIBUTE_CONST
+#endif
+  ;
 
 /* This function is useful it you create a socket using gnulib's
    Winsock wrappers but needs to pass on the socket handle to some
diff --git a/gl/stdalign.in.h b/gl/stdalign.in.h
index 79e5691..ae8d5b9 100644
--- a/gl/stdalign.in.h
+++ b/gl/stdalign.in.h
@@ -1,6 +1,6 @@
-/* A substitute for ISO C 1x <stdalign.h>.
+/* A substitute for ISO C11 <stdalign.h>.
 
-   Copyright 2011 Free Software Foundation, Inc.
+   Copyright 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
@@ -21,12 +21,14 @@
 #ifndef _GL_STDALIGN_H
 #define _GL_STDALIGN_H
 
-/* ISO C1X <stdalign.h> for platforms that lack it.
+/* ISO C11 <stdalign.h> for platforms that lack it.
 
    References:
-   ISO C1X <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>
+   ISO C11 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
    sections 6.5.3.4, 6.7.5, 7.15.
-   C++0X <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>
+   C++11 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
    section 18.10. */
 
 /* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
@@ -68,7 +70,7 @@
    To be portable to Sun C 5.11, do not align auto variables to
    anything stricter than their default alignment.
 
-   The following draft C1X requirements are not supported here:
+   The following C11 requirements are not supported here:
 
      - If A is zero, alignas has no effect.
      - alignas can be used multiple times; the strictest one wins.
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 43f9607..3e0e43f 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <stdarg.h>.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h
index b64dc75..cabe4b8 100644
--- a/gl/stdbool.in.h
+++ b/gl/stdbool.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2001.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/stddef.in.h b/gl/stddef.in.h
index c7b98e7..65e1775 100644
--- a/gl/stddef.in.h
+++ b/gl/stddef.in.h
@@ -1,6 +1,6 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index b6d08c7..6129f1a 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -49,6 +49,17 @@
       diagnostics.  */
 #  define __STDINT_H__
 # endif
+
+  /* Some pre-C++11 <stdint.h> implementations need this.  */
+# ifdef __cplusplus
+#  ifndef __STDC_CONSTANT_MACROS
+#   define __STDC_CONSTANT_MACROS 1
+#  endif
+#  ifndef __STDC_LIMIT_MACROS
+#   define __STDC_LIMIT_MACROS 1
+#  endif
+# endif
+
   /* Other systems may have an incomplete or buggy <stdint.h>.
      Include it before <inttypes.h>, since any "#include <stdint.h>"
      in <inttypes.h> would reinclude us, skipping our contents because
@@ -313,8 +324,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof 
(uintmax_t)
 
 /* 7.18.2. Limits of specified-width integer types */
 
-#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
-
 /* 7.18.2.1. Limits of exact-width integer types */
 
 /* Here we assume a standard architecture where the hardware integer
@@ -534,12 +543,8 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == 
sizeof (uintmax_t)
 #define WINT_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, address@hidden@)
 
-#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
-
 /* 7.18.4. Macros for integer constants */
 
-#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
 /* 7.18.4.1. Macros for minimum-width integer constants */
 /* According to ISO C 99 Technical Corrigendum 1 */
 
@@ -600,7 +605,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof 
(uintmax_t)
 # endif
 #endif
 
-#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
-
 #endif /* address@hidden@_STDINT_H */
 #endif /* !defined address@hidden@_STDINT_H && !defined 
_GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h
index d41c32f..a065c1a 100644
--- a/gl/stdio-impl.h
+++ b/gl/stdio-impl.h
@@ -1,5 +1,5 @@
 /* Implementation details of FILE streams.
-   Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008, 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
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index ce00af5..0481930 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <stdio.h>.
 
-   Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2004, 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
@@ -186,7 +186,7 @@ _GL_CXXALIASWARN (fdopen);
 #elif defined GNULIB_POSIXCHECK
 # undef fdopen
 /* Assume fdopen is always declared.  */
-_GL_WARN_ON_USE (fdopen, "fdopen on Win32 platforms is not POSIX compatible - "
+_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX 
compliant - "
                  "use gnulib module fdopen for portability");
 #endif
 
@@ -259,7 +259,7 @@ _GL_CXXALIASWARN (fopen);
 #elif defined GNULIB_POSIXCHECK
 # undef fopen
 /* Assume fopen is always declared.  */
-_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
+_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX 
compliant - "
                  "use gnulib module fopen for portability");
 #endif
 
@@ -387,7 +387,7 @@ _GL_CXXALIASWARN (freopen);
 # undef freopen
 /* Assume freopen is always declared.  */
 _GL_WARN_ON_USE (freopen,
-                 "freopen on Win32 platforms is not POSIX compatible - "
+                 "freopen on native Windows platforms is not POSIX compliant - 
"
                  "use gnulib module freopen for portability");
 #endif
 
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 1a8df49..ea1c1c3 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 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
@@ -455,6 +455,32 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
 # endif
 #endif
 
+#if @GNULIB_PTSNAME_R@
+/* Set the pathname of the pseudo-terminal slave associated with
+   the master FD is open on and return 0, or set errno and return
+   non-zero on errors.  */
+# if @REPLACE_PTSNAME_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ptsname_r
+#   define ptsname_r rpl_ptsname_r
+#  endif
+_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
+_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
+# else
+#  if address@hidden@
+_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
+#  endif
+_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
+# endif
+_GL_CXXALIASWARN (ptsname_r);
+#elif defined GNULIB_POSIXCHECK
+# undef ptsname_r
+# if HAVE_RAW_DECL_PTSNAME_R
+_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
+                 "use gnulib module ptsname_r for portability");
+# endif
+#endif
+
 #if @GNULIB_PUTENV@
 # if @REPLACE_PUTENV@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/gl/str-two-way.h b/gl/str-two-way.h
index 08a6cd3..c47503f 100644
--- a/gl/str-two-way.h
+++ b/gl/str-two-way.h
@@ -1,5 +1,5 @@
 /* Byte-wise substring search, using the Two-Way algorithm.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Eric Blake <address@hidden>, 2008.
 
diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c
index 9a77bb5..bc2bd12 100644
--- a/gl/strcasecmp.c
+++ b/gl/strcasecmp.c
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007, 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
diff --git a/gl/strchrnul.c b/gl/strchrnul.c
index 61db4e8..1be4249 100644
--- a/gl/strchrnul.c
+++ b/gl/strchrnul.c
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003, 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
diff --git a/gl/strdup.c b/gl/strdup.c
index ba7e76b..c083551 100644
--- a/gl/strdup.c
+++ b/gl/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2011 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2012 Free Software
    Foundation, Inc.
 
    This file is part of the GNU C Library.
diff --git a/gl/strerror-override.c b/gl/strerror-override.c
index 4e2c32b..9ca6523 100644
--- a/gl/strerror-override.c
+++ b/gl/strerror-override.c
@@ -1,6 +1,6 @@
 /* strerror-override.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/strerror-override.h b/gl/strerror-override.h
index 09540b9..09526ea 100644
--- a/gl/strerror-override.h
+++ b/gl/strerror-override.h
@@ -1,6 +1,6 @@
 /* strerror-override.h --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/strerror.c b/gl/strerror.c
index 63899ca..587bd21 100644
--- a/gl/strerror.c
+++ b/gl/strerror.c
@@ -1,6 +1,6 @@
 /* strerror.c --- POSIX compatible system error routine
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/string.in.h b/gl/string.in.h
index 62d7994..93f70de 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <string.h>.
 
-   Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 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
diff --git a/gl/strings.in.h b/gl/strings.in.h
index 8bb455e..4724eee 100644
--- a/gl/strings.in.h
+++ b/gl/strings.in.h
@@ -1,6 +1,6 @@
 /* A substitute <strings.h>.
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/stripslash.c b/gl/stripslash.c
index 1212440..ef458c6 100644
--- a/gl/stripslash.c
+++ b/gl/stripslash.c
@@ -1,6 +1,6 @@
 /* stripslash.c -- remove redundant trailing slashes from a file name
 
-   Copyright (C) 1990, 2001, 2003-2006, 2009-2011 Free Software Foundation,
+   Copyright (C) 1990, 2001, 2003-2006, 2009-2012 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -35,7 +35,7 @@ strip_trailing_slashes (char *file)
   bool had_slash;
 
   /* last_component returns "" for file system roots, but we need to turn
-     `///' into `/'.  */
+     "///" into "/".  */
   if (! *base)
     base = file;
   base_lim = base + base_len (base);
diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c
index 1e0d75f..fa65ba0 100644
--- a/gl/strncasecmp.c
+++ b/gl/strncasecmp.c
@@ -1,5 +1,5 @@
 /* strncasecmp.c -- case insensitive string comparator
-   Copyright (C) 1998-1999, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007, 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
diff --git a/gl/strndup.c b/gl/strndup.c
index 4a3bece..6d0eaf2 100644
--- a/gl/strndup.c
+++ b/gl/strndup.c
@@ -1,6 +1,6 @@
 /* A replacement function, for systems that lack strndup.
 
-   Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2011 Free Software
+   Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
diff --git a/gl/strnlen.c b/gl/strnlen.c
index 3cefa97..7778537 100644
--- a/gl/strnlen.c
+++ b/gl/strnlen.c
@@ -1,5 +1,5 @@
 /* Find the length of STRING, but scan at most MAXLEN characters.
-   Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/strverscmp.c b/gl/strverscmp.c
index bbcad44..6a34933 100644
--- a/gl/strverscmp.c
+++ b/gl/strverscmp.c
@@ -1,5 +1,5 @@
 /* Compare strings while treating digits characters numerically.
-   Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2011 Free Software
+   Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2012 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jean-François Bignolles <address@hidden>, 1997.
@@ -43,7 +43,7 @@
    - It's typically faster.
    POSIX says that only '0' through '9' are digits.  Prefer ISDIGIT to
    isdigit unless it's important to use the locale's definition
-   of `digit' even when the host does not conform to POSIX.  */
+   of "digit" even when the host does not conform to POSIX.  */
 #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
 
 #undef __strverscmp
diff --git a/gl/sys_select.in.h b/gl/sys_select.in.h
index 4406a7a..5f93fb1 100644
--- a/gl/sys_select.in.h
+++ b/gl/sys_select.in.h
@@ -1,5 +1,5 @@
 /* Substitute for <sys/select.h>.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 43681a4..49b61de 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -1,6 +1,6 @@
 /* Provide a sys/socket header file for systems lacking it (read: MinGW)
    and for systems where it is incomplete.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index 77a7177..d93d3fd 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -1,5 +1,5 @@
 /* Provide a more complete sys/stat header file.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-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
diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
index db4eeae..c9ee565 100644
--- a/gl/sys_time.in.h
+++ b/gl/sys_time.in.h
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/time.h.
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h
index 63389de..f37b999 100644
--- a/gl/sys_types.in.h
+++ b/gl/sys_types.in.h
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/types.h.
 
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/sys_uio.in.h b/gl/sys_uio.in.h
index 6995e6c..07b9629 100644
--- a/gl/sys_uio.in.h
+++ b/gl/sys_uio.in.h
@@ -1,5 +1,5 @@
 /* Substitute for <sys/uio.h>.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/sysexits.in.h b/gl/sysexits.in.h
index f925b69..8e8c962 100644
--- a/gl/sysexits.in.h
+++ b/gl/sysexits.in.h
@@ -1,5 +1,5 @@
 /* exit() exit codes for some BSD system programs.
-   Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003, 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
diff --git a/gl/tests/Makefile.am b/gl/tests/Makefile.am
index 0edbe38..e7f83f3 100644
--- a/gl/tests/Makefile.am
+++ b/gl/tests/Makefile.am
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
 # 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
@@ -388,6 +388,15 @@ EXTRA_DIST += test-fwrite.c signature.h macros.h
 
 ## end   gnulib module fwrite-tests
 
+## begin gnulib module getaddrinfo-tests
+
+TESTS += test-getaddrinfo
+check_PROGRAMS += test-getaddrinfo
+test_getaddrinfo_LDADD = $(LDADD) @GETADDRINFO_LIB@ @LIBINTL@
+EXTRA_DIST += signature.h test-getaddrinfo.c
+
+## end   gnulib module getaddrinfo-tests
+
 ## begin gnulib module getcwd-lgpl
 
 
@@ -507,7 +516,7 @@ BUILT_SOURCES += inttypes.h
 
 # We need the following in order to create <inttypes.h> when the system
 # doesn't have one that works with the given compiler.
-inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
+inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
@@ -528,10 +537,12 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status 
$(WARN_ON_USE_H) $(ARG_N
              -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
              -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
              -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+             -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
              -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' 
\
              -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
              -e 
's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
              -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/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)/inttypes.in.h; \
@@ -738,7 +749,7 @@ EXTRA_libtests_a_SOURCES += perror.c
 
 TESTS += test-perror.sh test-perror2
 check_PROGRAMS += test-perror test-perror2
-EXTRA_DIST += init.sh macros.h signature.h test-perror.c test-perror2.c 
test-perror.sh
+EXTRA_DIST += macros.h signature.h test-perror.c test-perror2.c test-perror.sh
 
 ## end   gnulib module perror-tests
 
@@ -1258,6 +1269,14 @@ EXTRA_DIST += test-sysexits.c
 
 ## end   gnulib module sysexits-tests
 
+## begin gnulib module test-framework-sh-tests
+
+TESTS += test-init.sh
+EXTRA_DIST += init.sh
+EXTRA_DIST += test-init.sh
+
+## end   gnulib module test-framework-sh-tests
+
 ## begin gnulib module thread
 
 libtests_a_SOURCES += glthread/thread.h glthread/thread.c
@@ -1323,6 +1342,14 @@ EXTRA_DIST += test-unsetenv.c signature.h macros.h
 
 ## end   gnulib module unsetenv-tests
 
+## begin gnulib module usleep-tests
+
+TESTS += test-usleep
+check_PROGRAMS += test-usleep
+EXTRA_DIST += test-usleep.c signature.h macros.h
+
+## end   gnulib module usleep-tests
+
 ## begin gnulib module vasnprintf-tests
 
 TESTS += test-vasnprintf
@@ -1346,7 +1373,7 @@ EXTRA_DIST += test-vasprintf.c signature.h macros.h
 TESTS += test-vc-list-files-git.sh
 TESTS += test-vc-list-files-cvs.sh
 TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)'
-EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh
+EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh
 
 ## end   gnulib module vc-list-files-tests
 
@@ -1355,7 +1382,7 @@ EXTRA_DIST += test-vc-list-files-git.sh 
test-vc-list-files-cvs.sh init.sh
 TESTS_ENVIRONMENT += MAKE='$(MAKE)'
 TESTS += test-verify test-verify.sh
 check_PROGRAMS += test-verify
-EXTRA_DIST += test-verify.c test-verify.sh init.sh
+EXTRA_DIST += test-verify.c test-verify.sh
 
 ## end   gnulib module verify-tests
 
diff --git a/gl/tests/binary-io.h b/gl/tests/binary-io.h
index c09dbf5..824ad5b 100644
--- a/gl/tests/binary-io.h
+++ b/gl/tests/binary-io.h
@@ -1,5 +1,5 @@
 /* Binary mode I/O.
-   Copyright (C) 2001, 2003, 2005, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005, 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
diff --git a/gl/tests/dup2.c b/gl/tests/dup2.c
index 790c98a..f6d0f1c 100644
--- a/gl/tests/dup2.c
+++ b/gl/tests/dup2.c
@@ -1,6 +1,6 @@
 /* Duplicate an open file descriptor to a specified file descriptor.
 
-   Copyright (C) 1999, 2004-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2004-2007, 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
@@ -31,7 +31,7 @@
 
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #  define WIN32_LEAN_AND_MEAN
 #  include <windows.h>
 
diff --git a/gl/tests/fcntl.in.h b/gl/tests/fcntl.in.h
index 0a07221..84ae3ee 100644
--- a/gl/tests/fcntl.in.h
+++ b/gl/tests/fcntl.in.h
@@ -1,6 +1,6 @@
 /* Like <fcntl.h>, but with non-working flags defined to 0.
 
-   Copyright (C) 2006-2011 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
@@ -177,12 +177,12 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
 /* Fix up the O_* macros.  */
 
 #if !defined O_DIRECT && defined O_DIRECTIO
-/* Tru64 spells it `O_DIRECTIO'.  */
+/* Tru64 spells it 'O_DIRECTIO'.  */
 # define O_DIRECT O_DIRECTIO
 #endif
 
 #if !defined O_CLOEXEC && defined O_NOINHERIT
-/* Mingw spells it `O_NOINHERIT'.  */
+/* Mingw spells it 'O_NOINHERIT'.  */
 # define O_CLOEXEC O_NOINHERIT
 #endif
 
diff --git a/gl/tests/fdopen.c b/gl/tests/fdopen.c
index 50c889b..6595b16 100644
--- a/gl/tests/fdopen.c
+++ b/gl/tests/fdopen.c
@@ -1,5 +1,5 @@
 /* Open a stream with a given file descriptor.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/getcwd-lgpl.c b/gl/tests/getcwd-lgpl.c
index 2761422..f1e821b 100644
--- a/gl/tests/getcwd-lgpl.c
+++ b/gl/tests/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
    This file is part of gnulib.
 
    This program is free software: you can redistribute it and/or modify
@@ -32,7 +32,7 @@ typedef int dummy;
    (perhaps because the absolute name was longer than PATH_MAX, or
    because of missing read/search permissions on parent directories)
    or SIZE was too small.  If successful, returns BUF.  If BUF is
-   NULL, an array is allocated with `malloc'; the array is SIZE bytes
+   NULL, an array is allocated with 'malloc'; the array is SIZE bytes
    long, unless SIZE == 0, in which case it is as big as
    necessary.  */
 
diff --git a/gl/tests/getpagesize.c b/gl/tests/getpagesize.c
index d7c1ba8..02c00fb 100644
--- a/gl/tests/getpagesize.c
+++ b/gl/tests/getpagesize.c
@@ -1,6 +1,6 @@
 /* getpagesize emulation for systems where it cannot be done in a C macro.
 
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
@@ -22,7 +22,7 @@
 /* Specification. */
 #include <unistd.h>
 
-/* This implementation is only for native Win32 systems.  */
+/* This implementation is only for native Windows systems.  */
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
 # define WIN32_LEAN_AND_MEAN
diff --git a/gl/tests/glthread/lock.c b/gl/tests/glthread/lock.c
index 64dbd3f..3ab4fad 100644
--- a/gl/tests/glthread/lock.c
+++ b/gl/tests/glthread/lock.c
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-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
@@ -630,7 +630,7 @@ glthread_once_singlethreaded (gl_once_t *once_control)
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 /* -------------------------- gl_lock_t datatype -------------------------- */
 
diff --git a/gl/tests/glthread/lock.h b/gl/tests/glthread/lock.h
index 028d881..02377cd 100644
--- a/gl/tests/glthread/lock.h
+++ b/gl/tests/glthread/lock.h
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-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
@@ -614,7 +614,7 @@ extern int glthread_once_singlethreaded (gl_once_t 
*once_control);
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <windows.h>
@@ -623,8 +623,8 @@ extern int glthread_once_singlethreaded (gl_once_t 
*once_control);
 extern "C" {
 # endif
 
-/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex,
-   Semaphore types, because
+/* We can use CRITICAL_SECTION directly, rather than the native Windows Event,
+   Mutex, Semaphore types, because
      - we need only to synchronize inside a single process (address space),
        not inter-process locking,
      - we don't need to support trylock operations.  (TryEnterCriticalSection
@@ -710,9 +710,9 @@ extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock);
 
 /* --------------------- gl_recursive_lock_t datatype --------------------- */
 
-/* The Win32 documentation says that CRITICAL_SECTION already implements a
-   recursive lock.  But we need not rely on it: It's easy to implement a
-   recursive lock without this assumption.  */
+/* The native Windows documentation says that CRITICAL_SECTION already
+   implements a recursive lock.  But we need not rely on it: It's easy to
+   implement a recursive lock without this assumption.  */
 
 typedef struct
         {
@@ -764,7 +764,7 @@ extern void glthread_once_func (gl_once_t *once_control, 
void (*initfunction) (v
 
 /* ========================================================================= */
 
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WINDOWS_THREADS)
 
 /* Provide dummy implementation if threads are not supported.  */
 
diff --git a/gl/tests/glthread/thread.c b/gl/tests/glthread/thread.c
index 83b8c57..be0a871 100644
--- a/gl/tests/glthread/thread.c
+++ b/gl/tests/glthread/thread.c
@@ -1,5 +1,5 @@
 /* Creating and controlling threads.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-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
@@ -43,7 +43,7 @@ const gl_thread_t gl_null_thread /* = { .p = NULL } */;
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 #include <process.h>
 
diff --git a/gl/tests/glthread/thread.h b/gl/tests/glthread/thread.h
index 064d72f..b95d6a2 100644
--- a/gl/tests/glthread/thread.h
+++ b/gl/tests/glthread/thread.h
@@ -1,5 +1,5 @@
 /* Creating and controlling threads.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-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
@@ -290,7 +290,7 @@ typedef thread_t gl_thread_t;
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <windows.h>
@@ -337,7 +337,7 @@ extern int gl_thread_exit_func (void *retval);
 
 /* ========================================================================= */
 
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WINDOWS_THREADS)
 
 /* Provide dummy implementation if threads are not supported.  */
 
diff --git a/gl/tests/glthread/threadlib.c b/gl/tests/glthread/threadlib.c
index 646defa..30d6d51 100644
--- a/gl/tests/glthread/threadlib.c
+++ b/gl/tests/glthread/threadlib.c
@@ -1,5 +1,5 @@
 /* Multithreading primitives.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-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
diff --git a/gl/tests/glthread/yield.h b/gl/tests/glthread/yield.h
index 4fa2d8b..040afe3 100644
--- a/gl/tests/glthread/yield.h
+++ b/gl/tests/glthread/yield.h
@@ -1,5 +1,5 @@
 /* Yielding the processor to other threads and processes.
-   Copyright (C) 2005-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005-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
@@ -89,7 +89,7 @@ extern "C" {
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <windows.h>
@@ -109,7 +109,7 @@ extern "C" {
 
 /* ========================================================================= */
 
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WINDOWS_THREADS)
 
 /* Provide dummy implementation if threads are not supported.  */
 
diff --git a/gl/tests/ignore-value.h b/gl/tests/ignore-value.h
index f021a1a..92f2fbc 100644
--- a/gl/tests/ignore-value.h
+++ b/gl/tests/ignore-value.h
@@ -1,6 +1,6 @@
 /* ignore a function return without a compiler warning
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/infinity.h b/gl/tests/infinity.h
index 19a6873..631473e 100644
--- a/gl/tests/infinity.h
+++ b/gl/tests/infinity.h
@@ -1,5 +1,5 @@
 /* Macros for infinity.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/init.sh b/gl/tests/init.sh
index 373d9d4..5985552 100644
--- a/gl/tests/init.sh
+++ b/gl/tests/init.sh
@@ -1,6 +1,6 @@
 # source this file; set up for tests
 
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -61,7 +61,7 @@ ME_=`expr "./$0" : '.*/\(.*\)$'`
 
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the handler.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
 # Turn off errexit here so that we don't trip the bug with OSF1/Tru64
 # sh inside this function.
 Exit () { set +e; (exit $1); exit $1; }
@@ -172,7 +172,7 @@ else
     if test "$re_shell_" = __current__; then
       # 'eval'ing this code makes Solaris 10's /bin/sh exit with
       # $? set to 2.  It does not evaluate any of the code after the
-      # "unexpected" first `('.  Thus, we must run it in a subshell.
+      # "unexpected" first '('.  Thus, we must run it in a subshell.
       ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
     else
       "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
@@ -221,16 +221,102 @@ export MALLOC_PERTURB_
 # a partition, or to undo any other global state changes.
 cleanup_ () { :; }
 
-if ( diff -u "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
-  compare () { diff -u "$@"; }
-elif ( diff -c "$0" "$0" < /dev/null ) > /dev/null 2>&1; then
-  compare () { diff -c "$@"; }
+# Emit a header similar to that from diff -u;  Print the simulated "diff"
+# command so that the order of arguments is clear.  Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+  printf '%s\n' "diff -u $*" \
+    "--- $1    1970-01-01" \
+    "+++ $2    1970-01-01"
+}
+
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
+{
+  test $# = 2 || return 2
+
+  if test "x$1" = x/dev/null; then
+    test -s "$2" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+    return 1
+  fi
+
+  if test "x$2" = x/dev/null; then
+    test -s "$1" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+    return 1
+  fi
+
+  return 2
+}
+
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff -u "$@"; }
+  else
+    compare_ ()
+    {
+      if diff -u "$@" > diff.out; then
+        # No differences were found, but Solaris 'diff' produces output
+        # "No differences encountered". Hide this output.
+        rm -f diff.out
+        true
+      else
+        cat diff.out
+        rm -f diff.out
+        false
+      fi
+    }
+  fi
+elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff -c "$@"; }
+  else
+    compare_ ()
+    {
+      if diff -c "$@" > diff.out; then
+        # No differences were found, but AIX and HP-UX 'diff' produce output
+        # "No differences encountered" or "There are no differences between the
+        # files.". Hide this output.
+        rm -f diff.out
+        true
+      else
+        cat diff.out
+        rm -f diff.out
+        false
+      fi
+    }
+  fi
 elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
-  compare () { cmp -s "$@"; }
+  compare_ () { cmp -s "$@"; }
 else
-  compare () { cmp "$@"; }
+  compare_ () { cmp "$@"; }
 fi
 
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+  # This looks like it can be factored to use a simple "case $?"
+  # after unchecked compare_dev_null_ invocation, but that would
+  # fail in a "set -e" environment.
+  if compare_dev_null_ "$@"; then
+    return 0
+  else
+    case $? in
+      1) return 1;;
+      *) compare_ "$@";;
+    esac
+  fi
+}
+
 # An arbitrary prefix to help distinguish test directories.
 testdir_prefix_ () { printf gt; }
 
@@ -441,7 +527,7 @@ mktempd_ ()
   esac
 
   # First, try to use mktemp.
-  d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
     || fail=1
 
   # The resulting name must be in the specified directory.
diff --git a/gl/tests/inttypes.in.h b/gl/tests/inttypes.in.h
index 7abf394..b9da2b5 100644
--- a/gl/tests/inttypes.in.h
+++ b/gl/tests/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2012 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Derek Price.
    This file is part of gnulib.
 
@@ -31,6 +31,12 @@
    The include_next requires a split double-inclusion guard.  */
 #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 # if @HAVE_INTTYPES_H@
+
+   /* Some pre-C++11 <stdint.h> implementations need this.  */
+#  if defined __cplusplus && ! defined __STDC_FORMAT_MACROS
+#   define __STDC_FORMAT_MACROS 1
+#  endif
+
 #  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
 # endif
 #endif
@@ -50,994 +56,992 @@
 # error "This file assumes that 'int' has exactly 32 bits. Please report your 
platform and compiler to <address@hidden>."
 #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.  */
 
 /* 7.8.1 Macros for format specifiers */
 
-#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
-
-# if defined _TNS_R_TARGET
+#if defined _TNS_R_TARGET
    /* Tandem NonStop R series and compatible platforms released before
       July 2005 support %Ld but not %lld.  */
-#  define _LONG_LONG_FORMAT_PREFIX "L"
-# else
-#  define _LONG_LONG_FORMAT_PREFIX "ll"
-# endif
+# define _LONG_LONG_FORMAT_PREFIX "L"
+#else
+# define _LONG_LONG_FORMAT_PREFIX "ll"
+#endif
 
-# if !defined PRId8 || @PRI_MACROS_BROKEN@
-#  undef PRId8
-#  ifdef INT8_MAX
-#   define PRId8 "d"
-#  endif
+#if !defined PRId8 || @PRI_MACROS_BROKEN@
+# undef PRId8
+# ifdef INT8_MAX
+#  define PRId8 "d"
 # endif
-# if !defined PRIi8 || @PRI_MACROS_BROKEN@
-#  undef PRIi8
-#  ifdef INT8_MAX
-#   define PRIi8 "i"
-#  endif
+#endif
+#if !defined PRIi8 || @PRI_MACROS_BROKEN@
+# undef PRIi8
+# ifdef INT8_MAX
+#  define PRIi8 "i"
 # endif
-# if !defined PRIo8 || @PRI_MACROS_BROKEN@
-#  undef PRIo8
-#  ifdef UINT8_MAX
-#   define PRIo8 "o"
-#  endif
+#endif
+#if !defined PRIo8 || @PRI_MACROS_BROKEN@
+# undef PRIo8
+# ifdef UINT8_MAX
+#  define PRIo8 "o"
 # endif
-# if !defined PRIu8 || @PRI_MACROS_BROKEN@
-#  undef PRIu8
-#  ifdef UINT8_MAX
-#   define PRIu8 "u"
-#  endif
+#endif
+#if !defined PRIu8 || @PRI_MACROS_BROKEN@
+# undef PRIu8
+# ifdef UINT8_MAX
+#  define PRIu8 "u"
 # endif
-# if !defined PRIx8 || @PRI_MACROS_BROKEN@
-#  undef PRIx8
-#  ifdef UINT8_MAX
-#   define PRIx8 "x"
-#  endif
+#endif
+#if !defined PRIx8 || @PRI_MACROS_BROKEN@
+# undef PRIx8
+# ifdef UINT8_MAX
+#  define PRIx8 "x"
 # endif
-# if !defined PRIX8 || @PRI_MACROS_BROKEN@
-#  undef PRIX8
-#  ifdef UINT8_MAX
-#   define PRIX8 "X"
-#  endif
+#endif
+#if !defined PRIX8 || @PRI_MACROS_BROKEN@
+# undef PRIX8
+# ifdef UINT8_MAX
+#  define PRIX8 "X"
 # endif
-# if !defined PRId16 || @PRI_MACROS_BROKEN@
-#  undef PRId16
-#  ifdef INT16_MAX
-#   define PRId16 "d"
-#  endif
+#endif
+#if !defined PRId16 || @PRI_MACROS_BROKEN@
+# undef PRId16
+# ifdef INT16_MAX
+#  define PRId16 "d"
 # endif
-# if !defined PRIi16 || @PRI_MACROS_BROKEN@
-#  undef PRIi16
-#  ifdef INT16_MAX
-#   define PRIi16 "i"
-#  endif
+#endif
+#if !defined PRIi16 || @PRI_MACROS_BROKEN@
+# undef PRIi16
+# ifdef INT16_MAX
+#  define PRIi16 "i"
 # endif
-# if !defined PRIo16 || @PRI_MACROS_BROKEN@
-#  undef PRIo16
-#  ifdef UINT16_MAX
-#   define PRIo16 "o"
-#  endif
+#endif
+#if !defined PRIo16 || @PRI_MACROS_BROKEN@
+# undef PRIo16
+# ifdef UINT16_MAX
+#  define PRIo16 "o"
 # endif
-# if !defined PRIu16 || @PRI_MACROS_BROKEN@
-#  undef PRIu16
-#  ifdef UINT16_MAX
-#   define PRIu16 "u"
-#  endif
+#endif
+#if !defined PRIu16 || @PRI_MACROS_BROKEN@
+# undef PRIu16
+# ifdef UINT16_MAX
+#  define PRIu16 "u"
 # endif
-# if !defined PRIx16 || @PRI_MACROS_BROKEN@
-#  undef PRIx16
-#  ifdef UINT16_MAX
-#   define PRIx16 "x"
-#  endif
+#endif
+#if !defined PRIx16 || @PRI_MACROS_BROKEN@
+# undef PRIx16
+# ifdef UINT16_MAX
+#  define PRIx16 "x"
 # endif
-# if !defined PRIX16 || @PRI_MACROS_BROKEN@
-#  undef PRIX16
-#  ifdef UINT16_MAX
-#   define PRIX16 "X"
-#  endif
+#endif
+#if !defined PRIX16 || @PRI_MACROS_BROKEN@
+# undef PRIX16
+# ifdef UINT16_MAX
+#  define PRIX16 "X"
 # endif
-# if !defined PRId32 || @PRI_MACROS_BROKEN@
-#  undef PRId32
-#  ifdef INT32_MAX
-#   define PRId32 "d"
-#  endif
+#endif
+#if !defined PRId32 || @PRI_MACROS_BROKEN@
+# undef PRId32
+# ifdef INT32_MAX
+#  define PRId32 "d"
 # endif
-# if !defined PRIi32 || @PRI_MACROS_BROKEN@
-#  undef PRIi32
-#  ifdef INT32_MAX
-#   define PRIi32 "i"
-#  endif
+#endif
+#if !defined PRIi32 || @PRI_MACROS_BROKEN@
+# undef PRIi32
+# ifdef INT32_MAX
+#  define PRIi32 "i"
 # endif
-# if !defined PRIo32 || @PRI_MACROS_BROKEN@
-#  undef PRIo32
-#  ifdef UINT32_MAX
-#   define PRIo32 "o"
-#  endif
+#endif
+#if !defined PRIo32 || @PRI_MACROS_BROKEN@
+# undef PRIo32
+# ifdef UINT32_MAX
+#  define PRIo32 "o"
 # endif
-# if !defined PRIu32 || @PRI_MACROS_BROKEN@
-#  undef PRIu32
-#  ifdef UINT32_MAX
-#   define PRIu32 "u"
-#  endif
+#endif
+#if !defined PRIu32 || @PRI_MACROS_BROKEN@
+# undef PRIu32
+# ifdef UINT32_MAX
+#  define PRIu32 "u"
 # endif
-# if !defined PRIx32 || @PRI_MACROS_BROKEN@
-#  undef PRIx32
-#  ifdef UINT32_MAX
-#   define PRIx32 "x"
-#  endif
+#endif
+#if !defined PRIx32 || @PRI_MACROS_BROKEN@
+# undef PRIx32
+# ifdef UINT32_MAX
+#  define PRIx32 "x"
 # endif
-# if !defined PRIX32 || @PRI_MACROS_BROKEN@
-#  undef PRIX32
-#  ifdef UINT32_MAX
-#   define PRIX32 "X"
-#  endif
+#endif
+#if !defined PRIX32 || @PRI_MACROS_BROKEN@
+# undef PRIX32
+# ifdef UINT32_MAX
+#  define PRIX32 "X"
 # endif
-# ifdef INT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
-#   define _PRI64_PREFIX "l"
-#  elif defined _MSC_VER || defined __MINGW32__
-#   define _PRI64_PREFIX "I64"
-#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-#   define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
-#  endif
-#  if !defined PRId64 || @PRI_MACROS_BROKEN@
-#   undef PRId64
-#   define PRId64 _PRI64_PREFIX "d"
-#  endif
-#  if !defined PRIi64 || @PRI_MACROS_BROKEN@
-#   undef PRIi64
-#   define PRIi64 _PRI64_PREFIX "i"
-#  endif
+#endif
+#ifdef INT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#  define _PRI64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+#  define _PRI64_PREFIX "I64"
+# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#  define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined PRId64 || @PRI_MACROS_BROKEN@
+#  undef PRId64
+#  define PRId64 _PRI64_PREFIX "d"
+# endif
+# if !defined PRIi64 || @PRI_MACROS_BROKEN@
+#  undef PRIi64
+#  define PRIi64 _PRI64_PREFIX "i"
 # endif
-# ifdef UINT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
-#   define _PRIu64_PREFIX "l"
-#  elif defined _MSC_VER || defined __MINGW32__
-#   define _PRIu64_PREFIX "I64"
-#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-#   define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
-#  endif
-#  if !defined PRIo64 || @PRI_MACROS_BROKEN@
-#   undef PRIo64
-#   define PRIo64 _PRIu64_PREFIX "o"
-#  endif
-#  if !defined PRIu64 || @PRI_MACROS_BROKEN@
-#   undef PRIu64
-#   define PRIu64 _PRIu64_PREFIX "u"
-#  endif
-#  if !defined PRIx64 || @PRI_MACROS_BROKEN@
-#   undef PRIx64
-#   define PRIx64 _PRIu64_PREFIX "x"
-#  endif
-#  if !defined PRIX64 || @PRI_MACROS_BROKEN@
-#   undef PRIX64
-#   define PRIX64 _PRIu64_PREFIX "X"
-#  endif
+#endif
+#ifdef UINT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#  define _PRIu64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+#  define _PRIu64_PREFIX "I64"
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#  define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined PRIo64 || @PRI_MACROS_BROKEN@
+#  undef PRIo64
+#  define PRIo64 _PRIu64_PREFIX "o"
+# endif
+# if !defined PRIu64 || @PRI_MACROS_BROKEN@
+#  undef PRIu64
+#  define PRIu64 _PRIu64_PREFIX "u"
+# endif
+# if !defined PRIx64 || @PRI_MACROS_BROKEN@
+#  undef PRIx64
+#  define PRIx64 _PRIu64_PREFIX "x"
+# endif
+# if !defined PRIX64 || @PRI_MACROS_BROKEN@
+#  undef PRIX64
+#  define PRIX64 _PRIu64_PREFIX "X"
 # endif
+#endif
 
-# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIdLEAST8
-#  define PRIdLEAST8 "d"
-# endif
-# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIiLEAST8
-#  define PRIiLEAST8 "i"
-# endif
-# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIoLEAST8
-#  define PRIoLEAST8 "o"
-# endif
-# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIuLEAST8
-#  define PRIuLEAST8 "u"
-# endif
-# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIxLEAST8
-#  define PRIxLEAST8 "x"
-# endif
-# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIXLEAST8
-#  define PRIXLEAST8 "X"
-# endif
-# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIdLEAST16
-#  define PRIdLEAST16 "d"
-# endif
-# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIiLEAST16
-#  define PRIiLEAST16 "i"
-# endif
-# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIoLEAST16
-#  define PRIoLEAST16 "o"
-# endif
-# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIuLEAST16
-#  define PRIuLEAST16 "u"
-# endif
-# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIxLEAST16
-#  define PRIxLEAST16 "x"
-# endif
-# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIXLEAST16
-#  define PRIXLEAST16 "X"
-# endif
-# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIdLEAST32
-#  define PRIdLEAST32 "d"
-# endif
-# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIiLEAST32
-#  define PRIiLEAST32 "i"
-# endif
-# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIoLEAST32
-#  define PRIoLEAST32 "o"
-# endif
-# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIuLEAST32
-#  define PRIuLEAST32 "u"
-# endif
-# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIxLEAST32
-#  define PRIxLEAST32 "x"
-# endif
-# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIXLEAST32
-#  define PRIXLEAST32 "X"
-# endif
-# ifdef INT64_MAX
-#  if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIdLEAST64
-#   define PRIdLEAST64 PRId64
-#  endif
-#  if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIiLEAST64
-#   define PRIiLEAST64 PRIi64
-#  endif
+#if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+#endif
+#if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+#endif
+#if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+#endif
+#if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+#endif
+#if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+#endif
+#if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+#endif
+#if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+#endif
+#if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+#endif
+#if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+#endif
+#if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+#endif
+#if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+#endif
+#if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+#endif
+#if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+#endif
+#if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+#endif
+#if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+#endif
+#if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+#endif
+#if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+#endif
+#if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+#endif
+#ifdef INT64_MAX
+# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST64
+#  define PRIdLEAST64 PRId64
 # endif
-# ifdef UINT64_MAX
-#  if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIoLEAST64
-#   define PRIoLEAST64 PRIo64
-#  endif
-#  if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIuLEAST64
-#   define PRIuLEAST64 PRIu64
-#  endif
-#  if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIxLEAST64
-#   define PRIxLEAST64 PRIx64
-#  endif
-#  if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIXLEAST64
-#   define PRIXLEAST64 PRIX64
-#  endif
+# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST64
+#  define PRIiLEAST64 PRIi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST64
+#  define PRIoLEAST64 PRIo64
+# endif
+# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST64
+#  define PRIuLEAST64 PRIu64
+# endif
+# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST64
+#  define PRIxLEAST64 PRIx64
 # endif
+# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST64
+#  define PRIXLEAST64 PRIX64
+# endif
+#endif
 
-# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIdFAST8
-#  if INT_FAST8_MAX > INT32_MAX
-#   define PRIdFAST8 PRId64
-#  else
-#   define PRIdFAST8 "d"
-#  endif
+#if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST8
+# if INT_FAST8_MAX > INT32_MAX
+#  define PRIdFAST8 PRId64
+# else
+#  define PRIdFAST8 "d"
 # endif
-# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIiFAST8
-#  if INT_FAST8_MAX > INT32_MAX
-#   define PRIiFAST8 PRIi64
-#  else
-#   define PRIiFAST8 "i"
-#  endif
+#endif
+#if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST8
+# if INT_FAST8_MAX > INT32_MAX
+#  define PRIiFAST8 PRIi64
+# else
+#  define PRIiFAST8 "i"
 # endif
-# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIoFAST8
-#  if UINT_FAST8_MAX > UINT32_MAX
-#   define PRIoFAST8 PRIo64
-#  else
-#   define PRIoFAST8 "o"
-#  endif
+#endif
+#if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+#  define PRIoFAST8 PRIo64
+# else
+#  define PRIoFAST8 "o"
 # endif
-# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIuFAST8
-#  if UINT_FAST8_MAX > UINT32_MAX
-#   define PRIuFAST8 PRIu64
-#  else
-#   define PRIuFAST8 "u"
-#  endif
+#endif
+#if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+#  define PRIuFAST8 PRIu64
+# else
+#  define PRIuFAST8 "u"
 # endif
-# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIxFAST8
-#  if UINT_FAST8_MAX > UINT32_MAX
-#   define PRIxFAST8 PRIx64
-#  else
-#   define PRIxFAST8 "x"
-#  endif
+#endif
+#if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+#  define PRIxFAST8 PRIx64
+# else
+#  define PRIxFAST8 "x"
 # endif
-# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
-#  undef PRIXFAST8
-#  if UINT_FAST8_MAX > UINT32_MAX
-#   define PRIXFAST8 PRIX64
-#  else
-#   define PRIXFAST8 "X"
-#  endif
+#endif
+#if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+#  define PRIXFAST8 PRIX64
+# else
+#  define PRIXFAST8 "X"
 # endif
-# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIdFAST16
-#  if INT_FAST16_MAX > INT32_MAX
-#   define PRIdFAST16 PRId64
-#  else
-#   define PRIdFAST16 "d"
-#  endif
+#endif
+#if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST16
+# if INT_FAST16_MAX > INT32_MAX
+#  define PRIdFAST16 PRId64
+# else
+#  define PRIdFAST16 "d"
 # endif
-# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIiFAST16
-#  if INT_FAST16_MAX > INT32_MAX
-#   define PRIiFAST16 PRIi64
-#  else
-#   define PRIiFAST16 "i"
-#  endif
+#endif
+#if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST16
+# if INT_FAST16_MAX > INT32_MAX
+#  define PRIiFAST16 PRIi64
+# else
+#  define PRIiFAST16 "i"
 # endif
-# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIoFAST16
-#  if UINT_FAST16_MAX > UINT32_MAX
-#   define PRIoFAST16 PRIo64
-#  else
-#   define PRIoFAST16 "o"
-#  endif
+#endif
+#if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+#  define PRIoFAST16 PRIo64
+# else
+#  define PRIoFAST16 "o"
 # endif
-# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIuFAST16
-#  if UINT_FAST16_MAX > UINT32_MAX
-#   define PRIuFAST16 PRIu64
-#  else
-#   define PRIuFAST16 "u"
-#  endif
+#endif
+#if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+#  define PRIuFAST16 PRIu64
+# else
+#  define PRIuFAST16 "u"
 # endif
-# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIxFAST16
-#  if UINT_FAST16_MAX > UINT32_MAX
-#   define PRIxFAST16 PRIx64
-#  else
-#   define PRIxFAST16 "x"
-#  endif
+#endif
+#if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+#  define PRIxFAST16 PRIx64
+# else
+#  define PRIxFAST16 "x"
 # endif
-# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
-#  undef PRIXFAST16
-#  if UINT_FAST16_MAX > UINT32_MAX
-#   define PRIXFAST16 PRIX64
-#  else
-#   define PRIXFAST16 "X"
-#  endif
+#endif
+#if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+#  define PRIXFAST16 PRIX64
+# else
+#  define PRIXFAST16 "X"
 # endif
-# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIdFAST32
-#  if INT_FAST32_MAX > INT32_MAX
-#   define PRIdFAST32 PRId64
-#  else
-#   define PRIdFAST32 "d"
-#  endif
+#endif
+#if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST32
+# if INT_FAST32_MAX > INT32_MAX
+#  define PRIdFAST32 PRId64
+# else
+#  define PRIdFAST32 "d"
 # endif
-# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIiFAST32
-#  if INT_FAST32_MAX > INT32_MAX
-#   define PRIiFAST32 PRIi64
-#  else
-#   define PRIiFAST32 "i"
-#  endif
+#endif
+#if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST32
+# if INT_FAST32_MAX > INT32_MAX
+#  define PRIiFAST32 PRIi64
+# else
+#  define PRIiFAST32 "i"
 # endif
-# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIoFAST32
-#  if UINT_FAST32_MAX > UINT32_MAX
-#   define PRIoFAST32 PRIo64
-#  else
-#   define PRIoFAST32 "o"
-#  endif
+#endif
+#if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+#  define PRIoFAST32 PRIo64
+# else
+#  define PRIoFAST32 "o"
 # endif
-# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIuFAST32
-#  if UINT_FAST32_MAX > UINT32_MAX
-#   define PRIuFAST32 PRIu64
-#  else
-#   define PRIuFAST32 "u"
-#  endif
+#endif
+#if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+#  define PRIuFAST32 PRIu64
+# else
+#  define PRIuFAST32 "u"
 # endif
-# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIxFAST32
-#  if UINT_FAST32_MAX > UINT32_MAX
-#   define PRIxFAST32 PRIx64
-#  else
-#   define PRIxFAST32 "x"
-#  endif
+#endif
+#if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+#  define PRIxFAST32 PRIx64
+# else
+#  define PRIxFAST32 "x"
 # endif
-# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
-#  undef PRIXFAST32
-#  if UINT_FAST32_MAX > UINT32_MAX
-#   define PRIXFAST32 PRIX64
-#  else
-#   define PRIXFAST32 "X"
-#  endif
+#endif
+#if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+#  define PRIXFAST32 PRIX64
+# else
+#  define PRIXFAST32 "X"
 # endif
-# ifdef INT64_MAX
-#  if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIdFAST64
-#   define PRIdFAST64 PRId64
-#  endif
-#  if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIiFAST64
-#   define PRIiFAST64 PRIi64
-#  endif
+#endif
+#ifdef INT64_MAX
+# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST64
+#  define PRIdFAST64 PRId64
 # endif
-# ifdef UINT64_MAX
-#  if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIoFAST64
-#   define PRIoFAST64 PRIo64
-#  endif
-#  if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIuFAST64
-#   define PRIuFAST64 PRIu64
-#  endif
-#  if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIxFAST64
-#   define PRIxFAST64 PRIx64
-#  endif
-#  if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
-#   undef PRIXFAST64
-#   define PRIXFAST64 PRIX64
-#  endif
+# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST64
+#  define PRIiFAST64 PRIi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST64
+#  define PRIoFAST64 PRIo64
+# endif
+# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST64
+#  define PRIuFAST64 PRIu64
+# endif
+# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST64
+#  define PRIxFAST64 PRIx64
 # endif
+# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST64
+#  define PRIXFAST64 PRIX64
+# endif
+#endif
 
-# if !defined PRIdMAX || @PRI_MACROS_BROKEN@
-#  undef PRIdMAX
-#  if @INT32_MAX_LT_INTMAX_MAX@
-#   define PRIdMAX PRId64
-#  else
-#   define PRIdMAX "ld"
-#  endif
+#if !defined PRIdMAX || @PRI_MACROS_BROKEN@
+# undef PRIdMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+#  define PRIdMAX PRId64
+# else
+#  define PRIdMAX "ld"
 # endif
-# if !defined PRIiMAX || @PRI_MACROS_BROKEN@
-#  undef PRIiMAX
-#  if @INT32_MAX_LT_INTMAX_MAX@
-#   define PRIiMAX PRIi64
-#  else
-#   define PRIiMAX "li"
-#  endif
+#endif
+#if !defined PRIiMAX || @PRI_MACROS_BROKEN@
+# undef PRIiMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+#  define PRIiMAX PRIi64
+# else
+#  define PRIiMAX "li"
 # endif
-# if !defined PRIoMAX || @PRI_MACROS_BROKEN@
-#  undef PRIoMAX
-#  if @UINT32_MAX_LT_UINTMAX_MAX@
-#   define PRIoMAX PRIo64
-#  else
-#   define PRIoMAX "lo"
-#  endif
+#endif
+#if !defined PRIoMAX || @PRI_MACROS_BROKEN@
+# undef PRIoMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+#  define PRIoMAX PRIo64
+# else
+#  define PRIoMAX "lo"
 # endif
-# if !defined PRIuMAX || @PRI_MACROS_BROKEN@
-#  undef PRIuMAX
-#  if @UINT32_MAX_LT_UINTMAX_MAX@
-#   define PRIuMAX PRIu64
-#  else
-#   define PRIuMAX "lu"
-#  endif
+#endif
+#if !defined PRIuMAX || @PRI_MACROS_BROKEN@
+# undef PRIuMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+#  define PRIuMAX PRIu64
+# else
+#  define PRIuMAX "lu"
 # endif
-# if !defined PRIxMAX || @PRI_MACROS_BROKEN@
-#  undef PRIxMAX
-#  if @UINT32_MAX_LT_UINTMAX_MAX@
-#   define PRIxMAX PRIx64
-#  else
-#   define PRIxMAX "lx"
-#  endif
+#endif
+#if !defined PRIxMAX || @PRI_MACROS_BROKEN@
+# undef PRIxMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+#  define PRIxMAX PRIx64
+# else
+#  define PRIxMAX "lx"
 # endif
-# if !defined PRIXMAX || @PRI_MACROS_BROKEN@
-#  undef PRIXMAX
-#  if @UINT32_MAX_LT_UINTMAX_MAX@
-#   define PRIXMAX PRIX64
-#  else
-#   define PRIXMAX "lX"
-#  endif
+#endif
+#if !defined PRIXMAX || @PRI_MACROS_BROKEN@
+# undef PRIXMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+#  define PRIXMAX PRIX64
+# else
+#  define PRIXMAX "lX"
 # endif
+#endif
 
-# if !defined PRIdPTR || @PRI_MACROS_BROKEN@
-#  undef PRIdPTR
-#  ifdef INTPTR_MAX
-#   define PRIdPTR @PRIPTR_PREFIX@ "d"
-#  endif
+#if !defined PRIdPTR || @PRI_MACROS_BROKEN@
+# undef PRIdPTR
+# ifdef INTPTR_MAX
+#  define PRIdPTR @PRIPTR_PREFIX@ "d"
 # endif
-# if !defined PRIiPTR || @PRI_MACROS_BROKEN@
-#  undef PRIiPTR
-#  ifdef INTPTR_MAX
-#   define PRIiPTR @PRIPTR_PREFIX@ "i"
-#  endif
+#endif
+#if !defined PRIiPTR || @PRI_MACROS_BROKEN@
+# undef PRIiPTR
+# ifdef INTPTR_MAX
+#  define PRIiPTR @PRIPTR_PREFIX@ "i"
 # endif
-# if !defined PRIoPTR || @PRI_MACROS_BROKEN@
-#  undef PRIoPTR
-#  ifdef UINTPTR_MAX
-#   define PRIoPTR @PRIPTR_PREFIX@ "o"
-#  endif
+#endif
+#if !defined PRIoPTR || @PRI_MACROS_BROKEN@
+# undef PRIoPTR
+# ifdef UINTPTR_MAX
+#  define PRIoPTR @PRIPTR_PREFIX@ "o"
 # endif
-# if !defined PRIuPTR || @PRI_MACROS_BROKEN@
-#  undef PRIuPTR
-#  ifdef UINTPTR_MAX
-#   define PRIuPTR @PRIPTR_PREFIX@ "u"
-#  endif
+#endif
+#if !defined PRIuPTR || @PRI_MACROS_BROKEN@
+# undef PRIuPTR
+# ifdef UINTPTR_MAX
+#  define PRIuPTR @PRIPTR_PREFIX@ "u"
 # endif
-# if !defined PRIxPTR || @PRI_MACROS_BROKEN@
-#  undef PRIxPTR
-#  ifdef UINTPTR_MAX
-#   define PRIxPTR @PRIPTR_PREFIX@ "x"
-#  endif
+#endif
+#if !defined PRIxPTR || @PRI_MACROS_BROKEN@
+# undef PRIxPTR
+# ifdef UINTPTR_MAX
+#  define PRIxPTR @PRIPTR_PREFIX@ "x"
 # endif
-# if !defined PRIXPTR || @PRI_MACROS_BROKEN@
-#  undef PRIXPTR
-#  ifdef UINTPTR_MAX
-#   define PRIXPTR @PRIPTR_PREFIX@ "X"
-#  endif
+#endif
+#if !defined PRIXPTR || @PRI_MACROS_BROKEN@
+# undef PRIXPTR
+# ifdef UINTPTR_MAX
+#  define PRIXPTR @PRIPTR_PREFIX@ "X"
 # endif
+#endif
 
-# if !defined SCNd8 || @PRI_MACROS_BROKEN@
-#  undef SCNd8
-#  ifdef INT8_MAX
-#   define SCNd8 "hhd"
-#  endif
+#if !defined SCNd8 || @PRI_MACROS_BROKEN@
+# undef SCNd8
+# ifdef INT8_MAX
+#  define SCNd8 "hhd"
 # endif
-# if !defined SCNi8 || @PRI_MACROS_BROKEN@
-#  undef SCNi8
-#  ifdef INT8_MAX
-#   define SCNi8 "hhi"
-#  endif
+#endif
+#if !defined SCNi8 || @PRI_MACROS_BROKEN@
+# undef SCNi8
+# ifdef INT8_MAX
+#  define SCNi8 "hhi"
 # endif
-# if !defined SCNo8 || @PRI_MACROS_BROKEN@
-#  undef SCNo8
-#  ifdef UINT8_MAX
-#   define SCNo8 "hho"
-#  endif
+#endif
+#if !defined SCNo8 || @PRI_MACROS_BROKEN@
+# undef SCNo8
+# ifdef UINT8_MAX
+#  define SCNo8 "hho"
 # endif
-# if !defined SCNu8 || @PRI_MACROS_BROKEN@
-#  undef SCNu8
-#  ifdef UINT8_MAX
-#   define SCNu8 "hhu"
-#  endif
+#endif
+#if !defined SCNu8 || @PRI_MACROS_BROKEN@
+# undef SCNu8
+# ifdef UINT8_MAX
+#  define SCNu8 "hhu"
 # endif
-# if !defined SCNx8 || @PRI_MACROS_BROKEN@
-#  undef SCNx8
-#  ifdef UINT8_MAX
-#   define SCNx8 "hhx"
-#  endif
+#endif
+#if !defined SCNx8 || @PRI_MACROS_BROKEN@
+# undef SCNx8
+# ifdef UINT8_MAX
+#  define SCNx8 "hhx"
 # endif
-# if !defined SCNd16 || @PRI_MACROS_BROKEN@
-#  undef SCNd16
-#  ifdef INT16_MAX
-#   define SCNd16 "hd"
-#  endif
+#endif
+#if !defined SCNd16 || @PRI_MACROS_BROKEN@
+# undef SCNd16
+# ifdef INT16_MAX
+#  define SCNd16 "hd"
 # endif
-# if !defined SCNi16 || @PRI_MACROS_BROKEN@
-#  undef SCNi16
-#  ifdef INT16_MAX
-#   define SCNi16 "hi"
-#  endif
+#endif
+#if !defined SCNi16 || @PRI_MACROS_BROKEN@
+# undef SCNi16
+# ifdef INT16_MAX
+#  define SCNi16 "hi"
 # endif
-# if !defined SCNo16 || @PRI_MACROS_BROKEN@
-#  undef SCNo16
-#  ifdef UINT16_MAX
-#   define SCNo16 "ho"
-#  endif
+#endif
+#if !defined SCNo16 || @PRI_MACROS_BROKEN@
+# undef SCNo16
+# ifdef UINT16_MAX
+#  define SCNo16 "ho"
 # endif
-# if !defined SCNu16 || @PRI_MACROS_BROKEN@
-#  undef SCNu16
-#  ifdef UINT16_MAX
-#   define SCNu16 "hu"
-#  endif
+#endif
+#if !defined SCNu16 || @PRI_MACROS_BROKEN@
+# undef SCNu16
+# ifdef UINT16_MAX
+#  define SCNu16 "hu"
 # endif
-# if !defined SCNx16 || @PRI_MACROS_BROKEN@
-#  undef SCNx16
-#  ifdef UINT16_MAX
-#   define SCNx16 "hx"
-#  endif
+#endif
+#if !defined SCNx16 || @PRI_MACROS_BROKEN@
+# undef SCNx16
+# ifdef UINT16_MAX
+#  define SCNx16 "hx"
 # endif
-# if !defined SCNd32 || @PRI_MACROS_BROKEN@
-#  undef SCNd32
-#  ifdef INT32_MAX
-#   define SCNd32 "d"
-#  endif
+#endif
+#if !defined SCNd32 || @PRI_MACROS_BROKEN@
+# undef SCNd32
+# ifdef INT32_MAX
+#  define SCNd32 "d"
 # endif
-# if !defined SCNi32 || @PRI_MACROS_BROKEN@
-#  undef SCNi32
-#  ifdef INT32_MAX
-#   define SCNi32 "i"
-#  endif
+#endif
+#if !defined SCNi32 || @PRI_MACROS_BROKEN@
+# undef SCNi32
+# ifdef INT32_MAX
+#  define SCNi32 "i"
 # endif
-# if !defined SCNo32 || @PRI_MACROS_BROKEN@
-#  undef SCNo32
-#  ifdef UINT32_MAX
-#   define SCNo32 "o"
-#  endif
+#endif
+#if !defined SCNo32 || @PRI_MACROS_BROKEN@
+# undef SCNo32
+# ifdef UINT32_MAX
+#  define SCNo32 "o"
 # endif
-# if !defined SCNu32 || @PRI_MACROS_BROKEN@
-#  undef SCNu32
-#  ifdef UINT32_MAX
-#   define SCNu32 "u"
-#  endif
+#endif
+#if !defined SCNu32 || @PRI_MACROS_BROKEN@
+# undef SCNu32
+# ifdef UINT32_MAX
+#  define SCNu32 "u"
 # endif
-# if !defined SCNx32 || @PRI_MACROS_BROKEN@
-#  undef SCNx32
-#  ifdef UINT32_MAX
-#   define SCNx32 "x"
-#  endif
+#endif
+#if !defined SCNx32 || @PRI_MACROS_BROKEN@
+# undef SCNx32
+# ifdef UINT32_MAX
+#  define SCNx32 "x"
 # endif
-# ifdef INT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
-#   define _SCN64_PREFIX "l"
-#  elif defined _MSC_VER || defined __MINGW32__
-#   define _SCN64_PREFIX "I64"
-#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-#   define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
-#  endif
-#  if !defined SCNd64 || @PRI_MACROS_BROKEN@
-#   undef SCNd64
-#   define SCNd64 _SCN64_PREFIX "d"
-#  endif
-#  if !defined SCNi64 || @PRI_MACROS_BROKEN@
-#   undef SCNi64
-#   define SCNi64 _SCN64_PREFIX "i"
-#  endif
+#endif
+#ifdef INT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#  define _SCN64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+#  define _SCN64_PREFIX "I64"
+# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#  define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined SCNd64 || @PRI_MACROS_BROKEN@
+#  undef SCNd64
+#  define SCNd64 _SCN64_PREFIX "d"
+# endif
+# if !defined SCNi64 || @PRI_MACROS_BROKEN@
+#  undef SCNi64
+#  define SCNi64 _SCN64_PREFIX "i"
 # endif
-# ifdef UINT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
-#   define _SCNu64_PREFIX "l"
-#  elif defined _MSC_VER || defined __MINGW32__
-#   define _SCNu64_PREFIX "I64"
-#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-#   define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
-#  endif
-#  if !defined SCNo64 || @PRI_MACROS_BROKEN@
-#   undef SCNo64
-#   define SCNo64 _SCNu64_PREFIX "o"
-#  endif
-#  if !defined SCNu64 || @PRI_MACROS_BROKEN@
-#   undef SCNu64
-#   define SCNu64 _SCNu64_PREFIX "u"
-#  endif
-#  if !defined SCNx64 || @PRI_MACROS_BROKEN@
-#   undef SCNx64
-#   define SCNx64 _SCNu64_PREFIX "x"
-#  endif
+#endif
+#ifdef UINT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#  define _SCNu64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+#  define _SCNu64_PREFIX "I64"
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#  define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined SCNo64 || @PRI_MACROS_BROKEN@
+#  undef SCNo64
+#  define SCNo64 _SCNu64_PREFIX "o"
+# endif
+# if !defined SCNu64 || @PRI_MACROS_BROKEN@
+#  undef SCNu64
+#  define SCNu64 _SCNu64_PREFIX "u"
+# endif
+# if !defined SCNx64 || @PRI_MACROS_BROKEN@
+#  undef SCNx64
+#  define SCNx64 _SCNu64_PREFIX "x"
 # endif
+#endif
 
-# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNdLEAST8
-#  define SCNdLEAST8 "hhd"
-# endif
-# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNiLEAST8
-#  define SCNiLEAST8 "hhi"
-# endif
-# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNoLEAST8
-#  define SCNoLEAST8 "hho"
-# endif
-# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNuLEAST8
-#  define SCNuLEAST8 "hhu"
-# endif
-# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNxLEAST8
-#  define SCNxLEAST8 "hhx"
-# endif
-# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNdLEAST16
-#  define SCNdLEAST16 "hd"
-# endif
-# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNiLEAST16
-#  define SCNiLEAST16 "hi"
-# endif
-# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNoLEAST16
-#  define SCNoLEAST16 "ho"
-# endif
-# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNuLEAST16
-#  define SCNuLEAST16 "hu"
-# endif
-# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNxLEAST16
-#  define SCNxLEAST16 "hx"
-# endif
-# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNdLEAST32
-#  define SCNdLEAST32 "d"
-# endif
-# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNiLEAST32
-#  define SCNiLEAST32 "i"
-# endif
-# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNoLEAST32
-#  define SCNoLEAST32 "o"
-# endif
-# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNuLEAST32
-#  define SCNuLEAST32 "u"
-# endif
-# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNxLEAST32
-#  define SCNxLEAST32 "x"
-# endif
-# ifdef INT64_MAX
-#  if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNdLEAST64
-#   define SCNdLEAST64 SCNd64
-#  endif
-#  if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNiLEAST64
-#   define SCNiLEAST64 SCNi64
-#  endif
+#if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST8
+# define SCNdLEAST8 "hhd"
+#endif
+#if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST8
+# define SCNiLEAST8 "hhi"
+#endif
+#if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST8
+# define SCNoLEAST8 "hho"
+#endif
+#if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST8
+# define SCNuLEAST8 "hhu"
+#endif
+#if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST8
+# define SCNxLEAST8 "hhx"
+#endif
+#if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST16
+# define SCNdLEAST16 "hd"
+#endif
+#if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST16
+# define SCNiLEAST16 "hi"
+#endif
+#if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST16
+# define SCNoLEAST16 "ho"
+#endif
+#if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST16
+# define SCNuLEAST16 "hu"
+#endif
+#if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST16
+# define SCNxLEAST16 "hx"
+#endif
+#if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST32
+# define SCNdLEAST32 "d"
+#endif
+#if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST32
+# define SCNiLEAST32 "i"
+#endif
+#if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST32
+# define SCNoLEAST32 "o"
+#endif
+#if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST32
+# define SCNuLEAST32 "u"
+#endif
+#if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST32
+# define SCNxLEAST32 "x"
+#endif
+#ifdef INT64_MAX
+# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST64
+#  define SCNdLEAST64 SCNd64
 # endif
-# ifdef UINT64_MAX
-#  if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNoLEAST64
-#   define SCNoLEAST64 SCNo64
-#  endif
-#  if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNuLEAST64
-#   define SCNuLEAST64 SCNu64
-#  endif
-#  if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNxLEAST64
-#   define SCNxLEAST64 SCNx64
-#  endif
+# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST64
+#  define SCNiLEAST64 SCNi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST64
+#  define SCNoLEAST64 SCNo64
+# endif
+# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST64
+#  define SCNuLEAST64 SCNu64
+# endif
+# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST64
+#  define SCNxLEAST64 SCNx64
 # endif
+#endif
 
-# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNdFAST8
-#  if INT_FAST8_MAX > INT32_MAX
-#   define SCNdFAST8 SCNd64
-#  elif INT_FAST8_MAX == 0x7fff
-#   define SCNdFAST8 "hd"
-#  elif INT_FAST8_MAX == 0x7f
-#   define SCNdFAST8 "hhd"
-#  else
-#   define SCNdFAST8 "d"
-#  endif
+#if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST8
+# if INT_FAST8_MAX > INT32_MAX
+#  define SCNdFAST8 SCNd64
+# elif INT_FAST8_MAX == 0x7fff
+#  define SCNdFAST8 "hd"
+# elif INT_FAST8_MAX == 0x7f
+#  define SCNdFAST8 "hhd"
+# else
+#  define SCNdFAST8 "d"
 # endif
-# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNiFAST8
-#  if INT_FAST8_MAX > INT32_MAX
-#   define SCNiFAST8 SCNi64
-#  elif INT_FAST8_MAX == 0x7fff
-#   define SCNiFAST8 "hi"
-#  elif INT_FAST8_MAX == 0x7f
-#   define SCNiFAST8 "hhi"
-#  else
-#   define SCNiFAST8 "i"
-#  endif
+#endif
+#if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST8
+# if INT_FAST8_MAX > INT32_MAX
+#  define SCNiFAST8 SCNi64
+# elif INT_FAST8_MAX == 0x7fff
+#  define SCNiFAST8 "hi"
+# elif INT_FAST8_MAX == 0x7f
+#  define SCNiFAST8 "hhi"
+# else
+#  define SCNiFAST8 "i"
 # endif
-# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNoFAST8
-#  if UINT_FAST8_MAX > UINT32_MAX
-#   define SCNoFAST8 SCNo64
-#  elif UINT_FAST8_MAX == 0xffff
-#   define SCNoFAST8 "ho"
-#  elif UINT_FAST8_MAX == 0xff
-#   define SCNoFAST8 "hho"
-#  else
-#   define SCNoFAST8 "o"
-#  endif
+#endif
+#if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+#  define SCNoFAST8 SCNo64
+# elif UINT_FAST8_MAX == 0xffff
+#  define SCNoFAST8 "ho"
+# elif UINT_FAST8_MAX == 0xff
+#  define SCNoFAST8 "hho"
+# else
+#  define SCNoFAST8 "o"
 # endif
-# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNuFAST8
-#  if UINT_FAST8_MAX > UINT32_MAX
-#   define SCNuFAST8 SCNu64
-#  elif UINT_FAST8_MAX == 0xffff
-#   define SCNuFAST8 "hu"
-#  elif UINT_FAST8_MAX == 0xff
-#   define SCNuFAST8 "hhu"
-#  else
-#   define SCNuFAST8 "u"
-#  endif
+#endif
+#if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+#  define SCNuFAST8 SCNu64
+# elif UINT_FAST8_MAX == 0xffff
+#  define SCNuFAST8 "hu"
+# elif UINT_FAST8_MAX == 0xff
+#  define SCNuFAST8 "hhu"
+# else
+#  define SCNuFAST8 "u"
 # endif
-# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
-#  undef SCNxFAST8
-#  if UINT_FAST8_MAX > UINT32_MAX
-#   define SCNxFAST8 SCNx64
-#  elif UINT_FAST8_MAX == 0xffff
-#   define SCNxFAST8 "hx"
-#  elif UINT_FAST8_MAX == 0xff
-#   define SCNxFAST8 "hhx"
-#  else
-#   define SCNxFAST8 "x"
-#  endif
+#endif
+#if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+#  define SCNxFAST8 SCNx64
+# elif UINT_FAST8_MAX == 0xffff
+#  define SCNxFAST8 "hx"
+# elif UINT_FAST8_MAX == 0xff
+#  define SCNxFAST8 "hhx"
+# else
+#  define SCNxFAST8 "x"
 # endif
-# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNdFAST16
-#  if INT_FAST16_MAX > INT32_MAX
-#   define SCNdFAST16 SCNd64
-#  elif INT_FAST16_MAX == 0x7fff
-#   define SCNdFAST16 "hd"
-#  else
-#   define SCNdFAST16 "d"
-#  endif
+#endif
+#if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST16
+# if INT_FAST16_MAX > INT32_MAX
+#  define SCNdFAST16 SCNd64
+# elif INT_FAST16_MAX == 0x7fff
+#  define SCNdFAST16 "hd"
+# else
+#  define SCNdFAST16 "d"
 # endif
-# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNiFAST16
-#  if INT_FAST16_MAX > INT32_MAX
-#   define SCNiFAST16 SCNi64
-#  elif INT_FAST16_MAX == 0x7fff
-#   define SCNiFAST16 "hi"
-#  else
-#   define SCNiFAST16 "i"
-#  endif
+#endif
+#if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST16
+# if INT_FAST16_MAX > INT32_MAX
+#  define SCNiFAST16 SCNi64
+# elif INT_FAST16_MAX == 0x7fff
+#  define SCNiFAST16 "hi"
+# else
+#  define SCNiFAST16 "i"
 # endif
-# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNoFAST16
-#  if UINT_FAST16_MAX > UINT32_MAX
-#   define SCNoFAST16 SCNo64
-#  elif UINT_FAST16_MAX == 0xffff
-#   define SCNoFAST16 "ho"
-#  else
-#   define SCNoFAST16 "o"
-#  endif
+#endif
+#if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+#  define SCNoFAST16 SCNo64
+# elif UINT_FAST16_MAX == 0xffff
+#  define SCNoFAST16 "ho"
+# else
+#  define SCNoFAST16 "o"
 # endif
-# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNuFAST16
-#  if UINT_FAST16_MAX > UINT32_MAX
-#   define SCNuFAST16 SCNu64
-#  elif UINT_FAST16_MAX == 0xffff
-#   define SCNuFAST16 "hu"
-#  else
-#   define SCNuFAST16 "u"
-#  endif
+#endif
+#if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+#  define SCNuFAST16 SCNu64
+# elif UINT_FAST16_MAX == 0xffff
+#  define SCNuFAST16 "hu"
+# else
+#  define SCNuFAST16 "u"
 # endif
-# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
-#  undef SCNxFAST16
-#  if UINT_FAST16_MAX > UINT32_MAX
-#   define SCNxFAST16 SCNx64
-#  elif UINT_FAST16_MAX == 0xffff
-#   define SCNxFAST16 "hx"
-#  else
-#   define SCNxFAST16 "x"
-#  endif
+#endif
+#if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+#  define SCNxFAST16 SCNx64
+# elif UINT_FAST16_MAX == 0xffff
+#  define SCNxFAST16 "hx"
+# else
+#  define SCNxFAST16 "x"
 # endif
-# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNdFAST32
-#  if INT_FAST32_MAX > INT32_MAX
-#   define SCNdFAST32 SCNd64
-#  else
-#   define SCNdFAST32 "d"
-#  endif
+#endif
+#if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST32
+# if INT_FAST32_MAX > INT32_MAX
+#  define SCNdFAST32 SCNd64
+# else
+#  define SCNdFAST32 "d"
 # endif
-# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNiFAST32
-#  if INT_FAST32_MAX > INT32_MAX
-#   define SCNiFAST32 SCNi64
-#  else
-#   define SCNiFAST32 "i"
-#  endif
+#endif
+#if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST32
+# if INT_FAST32_MAX > INT32_MAX
+#  define SCNiFAST32 SCNi64
+# else
+#  define SCNiFAST32 "i"
 # endif
-# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNoFAST32
-#  if UINT_FAST32_MAX > UINT32_MAX
-#   define SCNoFAST32 SCNo64
-#  else
-#   define SCNoFAST32 "o"
-#  endif
+#endif
+#if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+#  define SCNoFAST32 SCNo64
+# else
+#  define SCNoFAST32 "o"
 # endif
-# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNuFAST32
-#  if UINT_FAST32_MAX > UINT32_MAX
-#   define SCNuFAST32 SCNu64
-#  else
-#   define SCNuFAST32 "u"
-#  endif
+#endif
+#if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+#  define SCNuFAST32 SCNu64
+# else
+#  define SCNuFAST32 "u"
 # endif
-# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
-#  undef SCNxFAST32
-#  if UINT_FAST32_MAX > UINT32_MAX
-#   define SCNxFAST32 SCNx64
-#  else
-#   define SCNxFAST32 "x"
-#  endif
+#endif
+#if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+#  define SCNxFAST32 SCNx64
+# else
+#  define SCNxFAST32 "x"
 # endif
-# ifdef INT64_MAX
-#  if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNdFAST64
-#   define SCNdFAST64 SCNd64
-#  endif
-#  if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNiFAST64
-#   define SCNiFAST64 SCNi64
-#  endif
+#endif
+#ifdef INT64_MAX
+# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST64
+#  define SCNdFAST64 SCNd64
 # endif
-# ifdef UINT64_MAX
-#  if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNoFAST64
-#   define SCNoFAST64 SCNo64
-#  endif
-#  if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNuFAST64
-#   define SCNuFAST64 SCNu64
-#  endif
-#  if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
-#   undef SCNxFAST64
-#   define SCNxFAST64 SCNx64
-#  endif
+# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST64
+#  define SCNiFAST64 SCNi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST64
+#  define SCNoFAST64 SCNo64
 # endif
+# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST64
+#  define SCNuFAST64 SCNu64
+# endif
+# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST64
+#  define SCNxFAST64 SCNx64
+# endif
+#endif
 
-# if !defined SCNdMAX || @PRI_MACROS_BROKEN@
-#  undef SCNdMAX
-#  if @INT32_MAX_LT_INTMAX_MAX@
-#   define SCNdMAX SCNd64
-#  else
-#   define SCNdMAX "ld"
-#  endif
+#if !defined SCNdMAX || @PRI_MACROS_BROKEN@
+# undef SCNdMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+#  define SCNdMAX SCNd64
+# else
+#  define SCNdMAX "ld"
 # endif
-# if !defined SCNiMAX || @PRI_MACROS_BROKEN@
-#  undef SCNiMAX
-#  if @INT32_MAX_LT_INTMAX_MAX@
-#   define SCNiMAX SCNi64
-#  else
-#   define SCNiMAX "li"
-#  endif
+#endif
+#if !defined SCNiMAX || @PRI_MACROS_BROKEN@
+# undef SCNiMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+#  define SCNiMAX SCNi64
+# else
+#  define SCNiMAX "li"
 # endif
-# if !defined SCNoMAX || @PRI_MACROS_BROKEN@
-#  undef SCNoMAX
-#  if @UINT32_MAX_LT_UINTMAX_MAX@
-#   define SCNoMAX SCNo64
-#  else
-#   define SCNoMAX "lo"
-#  endif
+#endif
+#if !defined SCNoMAX || @PRI_MACROS_BROKEN@
+# undef SCNoMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+#  define SCNoMAX SCNo64
+# else
+#  define SCNoMAX "lo"
 # endif
-# if !defined SCNuMAX || @PRI_MACROS_BROKEN@
-#  undef SCNuMAX
-#  if @UINT32_MAX_LT_UINTMAX_MAX@
-#   define SCNuMAX SCNu64
-#  else
-#   define SCNuMAX "lu"
-#  endif
+#endif
+#if !defined SCNuMAX || @PRI_MACROS_BROKEN@
+# undef SCNuMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+#  define SCNuMAX SCNu64
+# else
+#  define SCNuMAX "lu"
 # endif
-# if !defined SCNxMAX || @PRI_MACROS_BROKEN@
-#  undef SCNxMAX
-#  if @UINT32_MAX_LT_UINTMAX_MAX@
-#   define SCNxMAX SCNx64
-#  else
-#   define SCNxMAX "lx"
-#  endif
+#endif
+#if !defined SCNxMAX || @PRI_MACROS_BROKEN@
+# undef SCNxMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+#  define SCNxMAX SCNx64
+# else
+#  define SCNxMAX "lx"
 # endif
+#endif
 
-# if !defined SCNdPTR || @PRI_MACROS_BROKEN@
-#  undef SCNdPTR
-#  ifdef INTPTR_MAX
-#   define SCNdPTR @PRIPTR_PREFIX@ "d"
-#  endif
+#if !defined SCNdPTR || @PRI_MACROS_BROKEN@
+# undef SCNdPTR
+# ifdef INTPTR_MAX
+#  define SCNdPTR @PRIPTR_PREFIX@ "d"
 # endif
-# if !defined SCNiPTR || @PRI_MACROS_BROKEN@
-#  undef SCNiPTR
-#  ifdef INTPTR_MAX
-#   define SCNiPTR @PRIPTR_PREFIX@ "i"
-#  endif
+#endif
+#if !defined SCNiPTR || @PRI_MACROS_BROKEN@
+# undef SCNiPTR
+# ifdef INTPTR_MAX
+#  define SCNiPTR @PRIPTR_PREFIX@ "i"
 # endif
-# if !defined SCNoPTR || @PRI_MACROS_BROKEN@
-#  undef SCNoPTR
-#  ifdef UINTPTR_MAX
-#   define SCNoPTR @PRIPTR_PREFIX@ "o"
-#  endif
+#endif
+#if !defined SCNoPTR || @PRI_MACROS_BROKEN@
+# undef SCNoPTR
+# ifdef UINTPTR_MAX
+#  define SCNoPTR @PRIPTR_PREFIX@ "o"
 # endif
-# if !defined SCNuPTR || @PRI_MACROS_BROKEN@
-#  undef SCNuPTR
-#  ifdef UINTPTR_MAX
-#   define SCNuPTR @PRIPTR_PREFIX@ "u"
-#  endif
+#endif
+#if !defined SCNuPTR || @PRI_MACROS_BROKEN@
+# undef SCNuPTR
+# ifdef UINTPTR_MAX
+#  define SCNuPTR @PRIPTR_PREFIX@ "u"
 # endif
-# if !defined SCNxPTR || @PRI_MACROS_BROKEN@
-#  undef SCNxPTR
-#  ifdef UINTPTR_MAX
-#   define SCNxPTR @PRIPTR_PREFIX@ "x"
-#  endif
+#endif
+#if !defined SCNxPTR || @PRI_MACROS_BROKEN@
+# undef SCNxPTR
+# ifdef UINTPTR_MAX
+#  define SCNxPTR @PRIPTR_PREFIX@ "x"
 # endif
-
 #endif
 
 /* 7.8.2 Functions for greatest-width integer types */
@@ -1075,10 +1079,23 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
 #endif
 
 #if @GNULIB_STRTOIMAX@
-# if address@hidden@
-#  undef strtoimax
-extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# if @REPLACE_STRTOIMAX@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strtoimax
+#   define strtoimax rpl_strtoimax
+#  endif
+_GL_FUNCDECL_RPL (strtoimax, intmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
+# else
+#  if address@hidden@
+#   undef strtoimax
+_GL_FUNCDECL_SYS (strtoimax, intmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
 # endif
+_GL_CXXALIASWARN (strtoimax);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoimax
 # if HAVE_RAW_DECL_STRTOIMAX
@@ -1090,8 +1107,11 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
 #if @GNULIB_STRTOUMAX@
 # if address@hidden@
 #  undef strtoumax
-extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+_GL_FUNCDECL_SYS (strtoumax, uintmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
 # endif
+_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+_GL_CXXALIASWARN (strtoumax);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoumax
 # if HAVE_RAW_DECL_STRTOUMAX
diff --git a/gl/tests/ioctl.c b/gl/tests/ioctl.c
index c6ba989..8701b7a 100644
--- a/gl/tests/ioctl.c
+++ b/gl/tests/ioctl.c
@@ -1,6 +1,6 @@
 /* ioctl.c --- wrappers for Windows ioctl function
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/lstat.c b/gl/tests/lstat.c
index d786288..db119a1 100644
--- a/gl/tests/lstat.c
+++ b/gl/tests/lstat.c
@@ -1,6 +1,6 @@
 /* Work around a bug of lstat on some systems
 
-   Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 1997-2006, 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
@@ -51,11 +51,11 @@ orig_lstat (const char *filename, struct stat *buf)
 # include <errno.h>
 
 /* lstat works differently on Linux and Solaris systems.  POSIX (see
-   `pathname resolution' in the glossary) requires that programs like
-   `ls' take into consideration the fact that FILE has a trailing slash
+   "pathname resolution" in the glossary) requires that programs like
+   'ls' take into consideration the fact that FILE has a trailing slash
    when FILE is a symbolic link.  On Linux and Solaris 10 systems, the
    lstat function already has the desired semantics (in treating
-   `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
+   'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)',
    but on Solaris 9 and earlier it does not.
 
    If FILE has a trailing slash and specifies a symbolic link,
diff --git a/gl/tests/macros.h b/gl/tests/macros.h
index adb3744..77a92f8 100644
--- a/gl/tests/macros.h
+++ b/gl/tests/macros.h
@@ -1,5 +1,5 @@
 /* Common macros used by gnulib tests.
-   Copyright (C) 2006-2011 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
diff --git a/gl/tests/malloca.c b/gl/tests/malloca.c
index ce071f1..3309088 100644
--- a/gl/tests/malloca.c
+++ b/gl/tests/malloca.c
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2003.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/tests/malloca.h b/gl/tests/malloca.h
index 7083a58..725cc22 100644
--- a/gl/tests/malloca.h
+++ b/gl/tests/malloca.h
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2003.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/tests/minus-zero.h b/gl/tests/minus-zero.h
index 9429781..491cef3 100644
--- a/gl/tests/minus-zero.h
+++ b/gl/tests/minus-zero.h
@@ -1,5 +1,5 @@
 /* Macros for floating-point negative zero.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/nan.h b/gl/tests/nan.h
index eb5fd95..2f75da1 100644
--- a/gl/tests/nan.h
+++ b/gl/tests/nan.h
@@ -1,5 +1,5 @@
 /* Macros for not-a-number.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/open.c b/gl/tests/open.c
index 8dc36ef..27801b9 100644
--- a/gl/tests/open.c
+++ b/gl/tests/open.c
@@ -1,5 +1,5 @@
 /* Open a descriptor to a file.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/pathmax.h b/gl/tests/pathmax.h
index c47618a..0fd9296 100644
--- a/gl/tests/pathmax.h
+++ b/gl/tests/pathmax.h
@@ -1,5 +1,5 @@
 /* Define PATH_MAX somehow.  Requires sys/types.h.
-   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software
+   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/tests/perror.c b/gl/tests/perror.c
index af4b56c..4853d1b 100644
--- a/gl/tests/perror.c
+++ b/gl/tests/perror.c
@@ -1,5 +1,5 @@
 /* Print a message describing error code.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/pipe.c b/gl/tests/pipe.c
index 425dd70..eb05f44 100644
--- a/gl/tests/pipe.c
+++ b/gl/tests/pipe.c
@@ -1,5 +1,5 @@
 /* Create a pipe.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/putenv.c b/gl/tests/putenv.c
index 2da3376..3c0f7ea 100644
--- a/gl/tests/putenv.c
+++ b/gl/tests/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2011 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2012 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
@@ -43,7 +43,7 @@ extern char **environ;
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
@@ -91,7 +91,7 @@ _unsetenv (const char *name)
 
 
 /* Put STRING, which is of the form "NAME=VALUE", in the environment.
-   If STRING contains no `=', then remove STRING from the environment.  */
+   If STRING contains no '=', then remove STRING from the environment.  */
 int
 putenv (char *string)
 {
diff --git a/gl/tests/same-inode.h b/gl/tests/same-inode.h
index d434b94..8c3900d 100644
--- a/gl/tests/same-inode.h
+++ b/gl/tests/same-inode.h
@@ -1,6 +1,6 @@
 /* Determine whether two stat buffers refer to the same file.
 
-   Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -18,8 +18,16 @@
 #ifndef SAME_INODE_H
 # define SAME_INODE_H 1
 
-# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
-   ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
-    && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
+# ifdef __VMS
+#  define SAME_INODE(a, b)             \
+    ((a).st_ino[0] == (b).st_ino[0]    \
+     && (a).st_ino[1] == (b).st_ino[1] \
+     && (a).st_ino[2] == (b).st_ino[2] \
+     && (a).st_dev == (b).st_dev)
+# else
+#  define SAME_INODE(a, b)    \
+    ((a).st_ino == (b).st_ino \
+     && (a).st_dev == (b).st_dev)
+# endif
 
 #endif
diff --git a/gl/tests/setenv.c b/gl/tests/setenv.c
index 0a5f67d..8201be2 100644
--- a/gl/tests/setenv.c
+++ b/gl/tests/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -49,7 +49,7 @@
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
@@ -103,11 +103,11 @@ static void *known_values;
 static char **last_environ;
 
 
-/* This function is used by `setenv' and `putenv'.  The difference between
+/* This function is used by 'setenv' and 'putenv'.  The difference between
    the two functions is that for the former must create a new string which
-   is then placed in the environment, while the argument of `putenv'
+   is then placed in the environment, while the argument of 'putenv'
    must be used directly.  This is all complicated by the fact that we try
-   to reuse values once generated for a `setenv' call since we can never
+   to reuse values once generated for a 'setenv' call since we can never
    free the strings.  */
 int
 __add_to_environ (const char *name, const char *value, const char *combined,
@@ -299,7 +299,7 @@ setenv (const char *name, const char *value, int replace)
   return __add_to_environ (name, value, NULL, replace);
 }
 
-/* The `clearenv' was planned to be added to POSIX.1 but probably
+/* The 'clearenv' was planned to be added to POSIX.1 but probably
    never made it.  Nevertheless the POSIX.9 standard (POSIX bindings
    for Fortran 77) requires this function.  */
 int
diff --git a/gl/tests/signature.h b/gl/tests/signature.h
index 8256989..d9d8b47 100644
--- a/gl/tests/signature.h
+++ b/gl/tests/signature.h
@@ -1,5 +1,5 @@
 /* Macro for checking that a function declaration is compliant.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/stat.c b/gl/tests/stat.c
index 1397aa9..9ea53c1 100644
--- a/gl/tests/stat.c
+++ b/gl/tests/stat.c
@@ -1,5 +1,5 @@
 /* Work around platform bugs in stat.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/strerror_r.c b/gl/tests/strerror_r.c
index e6cf99b..be76b0d 100644
--- a/gl/tests/strerror_r.c
+++ b/gl/tests/strerror_r.c
@@ -1,6 +1,6 @@
 /* strerror_r.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
@@ -241,13 +241,13 @@ strerror_r (int errnum, char *buf, size_t buflen)
     /* Try to do what strerror (errnum) does, but without clobbering the
        buffer used by strerror().  */
 
-# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined 
__WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, 
native Win32, Cygwin */
+# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined 
__WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, 
native Windows, Cygwin */
 
-    /* NetBSD:        sys_nerr, sys_errlist are declared through _NETBSD_SOURCE
-                      and <errno.h> above.
-       HP-UX:         sys_nerr, sys_errlist are declared explicitly above.
-       native Win32:  sys_nerr, sys_errlist are declared in <stdlib.h>.
-       Cygwin:        sys_nerr, sys_errlist are declared in <errno.h>.  */
+    /* NetBSD:         sys_nerr, sys_errlist are declared through 
_NETBSD_SOURCE
+                       and <errno.h> above.
+       HP-UX:          sys_nerr, sys_errlist are declared explicitly above.
+       native Windows: sys_nerr, sys_errlist are declared in <stdlib.h>.
+       Cygwin:         sys_nerr, sys_errlist are declared in <errno.h>.  */
     if (errnum >= 0 && errnum < sys_nerr)
       {
 #  if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux)
diff --git a/gl/tests/symlink.c b/gl/tests/symlink.c
index 2896cc9..642ca66 100644
--- a/gl/tests/symlink.c
+++ b/gl/tests/symlink.c
@@ -1,5 +1,5 @@
 /* Stub for symlink().
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/sys_ioctl.in.h b/gl/tests/sys_ioctl.in.h
index dc8aeda..f213411 100644
--- a/gl/tests/sys_ioctl.in.h
+++ b/gl/tests/sys_ioctl.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <sys/ioctl.h>.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-accept.c b/gl/tests/test-accept.c
index 75161a4..201e130 100644
--- a/gl/tests/test-accept.c
+++ b/gl/tests/test-accept.c
@@ -1,5 +1,5 @@
 /* Test accepting a connection to a server socket.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-alloca-opt.c b/gl/tests/test-alloca-opt.c
index 5aa1645..4e814c6 100644
--- a/gl/tests/test-alloca-opt.c
+++ b/gl/tests/test-alloca-opt.c
@@ -1,5 +1,5 @@
 /* Test of optional automatic memory allocation.
-   Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 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
diff --git a/gl/tests/test-argp-2.sh b/gl/tests/test-argp-2.sh
index 20e0d9e..49eff9c 100755
--- a/gl/tests/test-argp-2.sh
+++ b/gl/tests/test-argp-2.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for argp.
-# Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-argp.c b/gl/tests/test-argp.c
index 8fab727..6ba55e9 100644
--- a/gl/tests/test-argp.c
+++ b/gl/tests/test-argp.c
@@ -1,5 +1,5 @@
 /* Test suite for argp.
-   Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNUlib Library.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-arpa_inet.c b/gl/tests/test-arpa_inet.c
index ce7d19f..bda6709 100644
--- a/gl/tests/test-arpa_inet.c
+++ b/gl/tests/test-arpa_inet.c
@@ -1,5 +1,5 @@
 /* Test of <arpa/inet.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-binary-io.c b/gl/tests/test-binary-io.c
index 8e5d193..c695454 100644
--- a/gl/tests/test-binary-io.c
+++ b/gl/tests/test-binary-io.c
@@ -1,5 +1,5 @@
 /* Test of binary mode I/O.
-   Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
@@ -46,19 +46,10 @@ main ()
       exit (1);
     ASSERT (statbuf.st_size == 6);
   }
-  unlink ("t-bin-out2.tmp");
 
   /* Test the SET_BINARY macro.  */
   SET_BINARY (1);
   fputs ("Hello\n", stdout);
-  fclose (stdout);
-  fclose (stderr);
-  {
-    struct stat statbuf;
-    if (stat ("t-bin-out1.tmp", &statbuf) < 0)
-      exit (1);
-    ASSERT (statbuf.st_size == 6);
-  }
 
   return 0;
 }
diff --git a/gl/tests/test-binary-io.sh b/gl/tests/test-binary-io.sh
index 33e128c..272edef 100755
--- a/gl/tests/test-binary-io.sh
+++ b/gl/tests/test-binary-io.sh
@@ -5,6 +5,7 @@ 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
 
 rm -fr $tmpfiles
 
diff --git a/gl/tests/test-bind.c b/gl/tests/test-bind.c
index 490c2fb..b4b5739 100644
--- a/gl/tests/test-bind.c
+++ b/gl/tests/test-bind.c
@@ -1,5 +1,5 @@
 /* Test binding a server socket to a port.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-byteswap.c b/gl/tests/test-byteswap.c
index e9878b3..9893b1d 100644
--- a/gl/tests/test-byteswap.c
+++ b/gl/tests/test-byteswap.c
@@ -1,5 +1,5 @@
 /* Test of <byteswap.h> substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-c-ctype.c b/gl/tests/test-c-ctype.c
index 9d748ff..a9cb655 100644
--- a/gl/tests/test-c-ctype.c
+++ b/gl/tests/test-c-ctype.c
@@ -1,5 +1,5 @@
 /* Test of character handling in C locale.
-   Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
diff --git a/gl/tests/test-close.c b/gl/tests/test-close.c
index 2b87db1..83f71c0 100644
--- a/gl/tests/test-close.c
+++ b/gl/tests/test-close.c
@@ -1,5 +1,5 @@
 /* Test closing a file or socket.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-connect.c b/gl/tests/test-connect.c
index 84f00b5..6e43bf8 100644
--- a/gl/tests/test-connect.c
+++ b/gl/tests/test-connect.c
@@ -1,5 +1,5 @@
 /* Test connecting a client socket.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-dirent.c b/gl/tests/test-dirent.c
index 212644a..24e1759 100644
--- a/gl/tests/test-dirent.c
+++ b/gl/tests/test-dirent.c
@@ -1,5 +1,5 @@
 /* Test of <dirent.h> substitute.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-dup2.c b/gl/tests/test-dup2.c
index a14807a..5043c0c 100644
--- a/gl/tests/test-dup2.c
+++ b/gl/tests/test-dup2.c
@@ -1,5 +1,5 @@
 /* Test duplicating file descriptors.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -33,7 +33,7 @@ SIGNATURE_CHECK (dup2, int, (int, int));
 #endif
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 /* Get _get_osfhandle.  */
@@ -47,7 +47,7 @@ static int
 is_open (int fd)
 {
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-  /* On Win32, the initial state of unassigned standard file
+  /* On native Windows, the initial state of unassigned standard file
      descriptors is that they are open but point to an
      INVALID_HANDLE_VALUE, and there is no fcntl.  */
   return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
@@ -65,7 +65,7 @@ static int
 is_inheritable (int fd)
 {
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-  /* On Win32, the initial state of unassigned standard file
+  /* On native Windows, the initial state of unassigned standard file
      descriptors is that they are open but point to an
      INVALID_HANDLE_VALUE, and there is no fcntl.  */
   HANDLE h = (HANDLE) _get_osfhandle (fd);
diff --git a/gl/tests/test-environ.c b/gl/tests/test-environ.c
index 11df789..972ed06 100644
--- a/gl/tests/test-environ.c
+++ b/gl/tests/test-environ.c
@@ -1,5 +1,5 @@
 /* Test of environ variable.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-errno.c b/gl/tests/test-errno.c
index 7851c22..d9a030f 100644
--- a/gl/tests/test-errno.c
+++ b/gl/tests/test-errno.c
@@ -1,5 +1,5 @@
 /* Test of <errno.h> substitute.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fcntl-h.c b/gl/tests/test-fcntl-h.c
index 7f350b4..00c5468 100644
--- a/gl/tests/test-fcntl-h.c
+++ b/gl/tests/test-fcntl-h.c
@@ -1,5 +1,5 @@
 /* Test of <fcntl.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-fdopen.c b/gl/tests/test-fdopen.c
index 304e520..8e2f7bf 100644
--- a/gl/tests/test-fdopen.c
+++ b/gl/tests/test-fdopen.c
@@ -1,5 +1,5 @@
 /* Test opening a stream with a file descriptor.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fgetc.c b/gl/tests/test-fgetc.c
index 4df46fb..669a71e 100644
--- a/gl/tests/test-fgetc.c
+++ b/gl/tests/test-fgetc.c
@@ -1,5 +1,5 @@
 /* Test of fgetc() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-float.c b/gl/tests/test-float.c
index 57a472f..f3691be 100644
--- a/gl/tests/test-float.c
+++ b/gl/tests/test-float.c
@@ -1,5 +1,5 @@
 /* Test of <float.h> substitute.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
@@ -298,14 +298,7 @@ test_long_double (void)
 
   /* Check that 'long double' is at least as wide as 'double'.  */
   ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG);
-
-  /* Normally, we would also assert this:
-       ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP);
-     but at least on powerpc64 with gcc-4.4.4, it would fail:
-     $ :|gcc -dD -E -include stddef.h -|grep -E 'L?DBL_MIN_EXP'
-     #define __DBL_MIN_EXP__ (-1021)
-     #define __LDBL_MIN_EXP__ (-968)
-  */
+  ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG);
   ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP);
 
   /* Check the value of LDBL_DIG.  */
diff --git a/gl/tests/test-fprintf-posix.h b/gl/tests/test-fprintf-posix.h
index e0fa537..561c69f 100644
--- a/gl/tests/test-fprintf-posix.h
+++ b/gl/tests/test-fprintf-posix.h
@@ -1,5 +1,5 @@
 /* Test of POSIX compatible vsprintf() and sprintf() functions.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fputc.c b/gl/tests/test-fputc.c
index 03a3716..924c222 100644
--- a/gl/tests/test-fputc.c
+++ b/gl/tests/test-fputc.c
@@ -1,5 +1,5 @@
 /* Test of fputc() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fread.c b/gl/tests/test-fread.c
index e205c9e..fd2ac83 100644
--- a/gl/tests/test-fread.c
+++ b/gl/tests/test-fread.c
@@ -1,5 +1,5 @@
 /* Test of fread() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-frexp.c b/gl/tests/test-frexp.c
index a7ec639..7158c8f 100644
--- a/gl/tests/test-frexp.c
+++ b/gl/tests/test-frexp.c
@@ -1,5 +1,5 @@
 /* Test of splitting a double into fraction and mantissa.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-frexpl.c b/gl/tests/test-frexpl.c
index 905b293..ca28f8a 100644
--- a/gl/tests/test-frexpl.c
+++ b/gl/tests/test-frexpl.c
@@ -1,5 +1,5 @@
 /* Test of splitting a 'long double' into fraction and mantissa.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fseek.c b/gl/tests/test-fseek.c
index 150b5f0..1dc03c5 100644
--- a/gl/tests/test-fseek.c
+++ b/gl/tests/test-fseek.c
@@ -1,5 +1,5 @@
 /* Test of fseek() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fseeko.c b/gl/tests/test-fseeko.c
index ad5eec8..d2b348e 100644
--- a/gl/tests/test-fseeko.c
+++ b/gl/tests/test-fseeko.c
@@ -1,5 +1,5 @@
 /* Test of fseeko() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fseeko3.c b/gl/tests/test-fseeko3.c
index 41f2233..ffeb50f 100644
--- a/gl/tests/test-fseeko3.c
+++ b/gl/tests/test-fseeko3.c
@@ -1,5 +1,5 @@
 /* Test of fseeko() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fseeko4.c b/gl/tests/test-fseeko4.c
index 61559e1..3642d3c 100644
--- a/gl/tests/test-fseeko4.c
+++ b/gl/tests/test-fseeko4.c
@@ -1,5 +1,5 @@
 /* Test of fseeko() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fseterr.c b/gl/tests/test-fseterr.c
index cbd97fa..611b0e4 100644
--- a/gl/tests/test-fseterr.c
+++ b/gl/tests/test-fseterr.c
@@ -1,5 +1,5 @@
 /* Test setting the error indicator of a stream.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-fstat.c b/gl/tests/test-fstat.c
index 6c120d9..7f3c3c4 100644
--- a/gl/tests/test-fstat.c
+++ b/gl/tests/test-fstat.c
@@ -1,5 +1,5 @@
 /* Tests of fstat() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-ftell.c b/gl/tests/test-ftell.c
index 54ede05..08c76aa 100644
--- a/gl/tests/test-ftell.c
+++ b/gl/tests/test-ftell.c
@@ -1,5 +1,5 @@
 /* Test of ftell() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-ftell3.c b/gl/tests/test-ftell3.c
index a5167ef..9d225a3 100644
--- a/gl/tests/test-ftell3.c
+++ b/gl/tests/test-ftell3.c
@@ -1,5 +1,5 @@
 /* Test of ftell() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-ftello.c b/gl/tests/test-ftello.c
index 636da81..5df97cf 100644
--- a/gl/tests/test-ftello.c
+++ b/gl/tests/test-ftello.c
@@ -1,5 +1,5 @@
 /* Test of ftello() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-ftello3.c b/gl/tests/test-ftello3.c
index 50d4b88..6908add 100644
--- a/gl/tests/test-ftello3.c
+++ b/gl/tests/test-ftello3.c
@@ -1,5 +1,5 @@
 /* Test of ftello() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-ftello4.c b/gl/tests/test-ftello4.c
index d503f71..7c46d0c 100644
--- a/gl/tests/test-ftello4.c
+++ b/gl/tests/test-ftello4.c
@@ -1,5 +1,5 @@
 /* Test of ftello() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-ftruncate.c b/gl/tests/test-ftruncate.c
index c5da4eb..9a85314 100644
--- a/gl/tests/test-ftruncate.c
+++ b/gl/tests/test-ftruncate.c
@@ -1,5 +1,5 @@
 /* Test truncating a file.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-func.c b/gl/tests/test-func.c
index 19de6d3..0767104 100644
--- a/gl/tests/test-func.c
+++ b/gl/tests/test-func.c
@@ -1,5 +1,5 @@
 /* Test whether __func__ is available
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-fwrite.c b/gl/tests/test-fwrite.c
index 76ed05c..d69f463 100644
--- a/gl/tests/test-fwrite.c
+++ b/gl/tests/test-fwrite.c
@@ -1,5 +1,5 @@
 /* Test of fwrite() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-getaddrinfo.c b/gl/tests/test-getaddrinfo.c
new file mode 100644
index 0000000..5123196
--- /dev/null
+++ b/gl/tests/test-getaddrinfo.c
@@ -0,0 +1,168 @@
+/* Test the getaddrinfo module.
+
+   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
+   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 Simon Josefsson.  */
+
+#include <config.h>
+
+#include <netdb.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *));
+SIGNATURE_CHECK (gai_strerror, char const *, (int));
+SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *,
+                                    struct addrinfo const *,
+                                    struct addrinfo **));
+
+#include <arpa/inet.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <string.h>
+
+/* Whether to print debugging messages.  */
+#define ENABLE_DEBUGGING 0
+
+#if ENABLE_DEBUGGING
+# define dbgprintf printf
+#else
+# define dbgprintf if (0) printf
+#endif
+
+/* BeOS does not have AF_UNSPEC.  */
+#ifndef AF_UNSPEC
+# define AF_UNSPEC 0
+#endif
+
+#ifndef EAI_SERVICE
+# define EAI_SERVICE 0
+#endif
+
+static int
+simple (char const *host, char const *service)
+{
+  char buf[BUFSIZ];
+  static int skip = 0;
+  struct addrinfo hints;
+  struct addrinfo *ai0, *ai;
+  int res;
+  int err;
+
+  /* Once we skipped the test, do not try anything else */
+  if (skip)
+    return 0;
+
+  dbgprintf ("Finding %s service %s...\n", host, service);
+
+  /* This initializes "hints" but does not use it.  Is there a reason
+     for this?  If so, please fix this comment.  */
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_flags = AI_CANONNAME;
+  hints.ai_family = AF_UNSPEC;
+  hints.ai_socktype = SOCK_STREAM;
+
+  res = getaddrinfo (host, service, 0, &ai0);
+  err = errno;
+
+  dbgprintf ("res %d: %s\n", res, gai_strerror (res));
+
+  if (res != 0)
+    {
+      /* EAI_AGAIN is returned if no network is available. Don't fail
+         the test merely because someone is down the country on their
+         in-law's farm. */
+      if (res == EAI_AGAIN)
+        {
+          skip++;
+          fprintf (stderr, "skipping getaddrinfo test: no network?\n");
+          return 77;
+        }
+      /* IRIX reports EAI_NONAME for "https".  Don't fail the test
+         merely because of this.  */
+      if (res == EAI_NONAME)
+        return 0;
+      /* Solaris reports EAI_SERVICE for "http" and "https".  Don't
+         fail the test merely because of this.  */
+      if (res == EAI_SERVICE)
+        return 0;
+#ifdef EAI_NODATA
+      /* AIX reports EAI_NODATA for "https".  Don't fail the test
+         merely because of this.  */
+      if (res == EAI_NODATA)
+        return 0;
+#endif
+      /* Provide details if errno was set.  */
+      if (res == EAI_SYSTEM)
+        fprintf (stderr, "system error: %s\n", strerror (err));
+
+      return 1;
+    }
+
+  for (ai = ai0; ai; ai = ai->ai_next)
+    {
+      dbgprintf ("\tflags %x\n", ai->ai_flags);
+      dbgprintf ("\tfamily %x\n", ai->ai_family);
+      dbgprintf ("\tsocktype %x\n", ai->ai_socktype);
+      dbgprintf ("\tprotocol %x\n", ai->ai_protocol);
+      dbgprintf ("\taddrlen %ld: ", (unsigned long) ai->ai_addrlen);
+      dbgprintf ("\tFound %s\n",
+                 inet_ntop (ai->ai_family,
+                            &((struct sockaddr_in *)
+                              ai->ai_addr)->sin_addr,
+                            buf, sizeof (buf) - 1));
+      if (ai->ai_canonname)
+        dbgprintf ("\tFound %s...\n", ai->ai_canonname);
+
+      {
+        char ipbuf[BUFSIZ];
+        char portbuf[BUFSIZ];
+
+        res = getnameinfo (ai->ai_addr, ai->ai_addrlen,
+                           ipbuf, sizeof (ipbuf) - 1,
+                           portbuf, sizeof (portbuf) - 1,
+                           NI_NUMERICHOST|NI_NUMERICSERV);
+        dbgprintf ("\t\tgetnameinfo %d: %s\n", res, gai_strerror (res));
+        if (res == 0)
+          {
+            dbgprintf ("\t\tip %s\n", ipbuf);
+            dbgprintf ("\t\tport %s\n", portbuf);
+          }
+      }
+
+    }
+
+  freeaddrinfo (ai0);
+
+  return 0;
+}
+
+#define HOST1 "www.gnu.org"
+#define SERV1 "http"
+#define HOST2 "www.ibm.com"
+#define SERV2 "https"
+#define HOST3 "microsoft.com"
+#define SERV3 "http"
+#define HOST4 "google.org"
+#define SERV4 "ldap"
+
+int main (void)
+{
+  return simple (HOST1, SERV1)
+    + simple (HOST2, SERV2)
+    + simple (HOST3, SERV3)
+    + simple (HOST4, SERV4);
+}
diff --git a/gl/tests/test-getcwd-lgpl.c b/gl/tests/test-getcwd-lgpl.c
index 69a7b90..3010760 100644
--- a/gl/tests/test-getcwd-lgpl.c
+++ b/gl/tests/test-getcwd-lgpl.c
@@ -1,5 +1,5 @@
 /* Test of getcwd() function.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-getdelim.c b/gl/tests/test-getdelim.c
index f4d1c9d..08c6197 100644
--- a/gl/tests/test-getdelim.c
+++ b/gl/tests/test-getdelim.c
@@ -1,5 +1,5 @@
 /* Test of getdelim() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-getline.c b/gl/tests/test-getline.c
index bead4b6..d8bb8a3 100644
--- a/gl/tests/test-getline.c
+++ b/gl/tests/test-getline.c
@@ -1,5 +1,5 @@
 /* Test of getline() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-getopt.c b/gl/tests/test-getopt.c
index 69f2cfa..e08a834 100644
--- a/gl/tests/test-getopt.c
+++ b/gl/tests/test-getopt.c
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-getopt.h b/gl/tests/test-getopt.h
index f7b3911..978b753 100644
--- a/gl/tests/test-getopt.h
+++ b/gl/tests/test-getopt.h
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-getopt_long.h b/gl/tests/test-getopt_long.h
index c1035b1..9d55c65 100644
--- a/gl/tests/test-getopt_long.h
+++ b/gl/tests/test-getopt_long.h
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-getpeername.c b/gl/tests/test-getpeername.c
index 1ccd9b4..f15b32f 100644
--- a/gl/tests/test-getpeername.c
+++ b/gl/tests/test-getpeername.c
@@ -1,5 +1,5 @@
 /* Test getpeername() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-gettimeofday.c b/gl/tests/test-gettimeofday.c
index 7d09fc3..4a9d264 100644
--- a/gl/tests/test-gettimeofday.c
+++ b/gl/tests/test-gettimeofday.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
  * Written by Jim Meyering.
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-ignore-value.c b/gl/tests/test-ignore-value.c
index 6953f4c..f036134 100644
--- a/gl/tests/test-ignore-value.c
+++ b/gl/tests/test-ignore-value.c
@@ -1,6 +1,6 @@
 /* Test the "ignore-value" module.
 
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-inet_ntop.c b/gl/tests/test-inet_ntop.c
index ebb7c1c..34de5f6 100644
--- a/gl/tests/test-inet_ntop.c
+++ b/gl/tests/test-inet_ntop.c
@@ -1,5 +1,5 @@
 /* Test of inet_ntop function.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-inet_pton.c b/gl/tests/test-inet_pton.c
index 49c140c..844908c 100644
--- a/gl/tests/test-inet_pton.c
+++ b/gl/tests/test-inet_pton.c
@@ -1,5 +1,5 @@
 /* Test of inet_pton function.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-init.sh b/gl/tests/test-init.sh
new file mode 100755
index 0000000..3368a99
--- /dev/null
+++ b/gl/tests/test-init.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# Unit tests for init.sh
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# 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/>.  */
+
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
+
+fail=0
+
+test_compare()
+{
+  touch empty || fail=1
+  echo xyz > in || fail=1
+
+  compare /dev/null /dev/null >out 2>err || fail=1
+  test -s out && fail_ "out not empty: $(cat out)"
+  # "err" should be empty, too, but has "set -x" output when VERBOSE=yes
+  case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+  compare /dev/null empty >out 2>err || fail=1
+  test -s out && fail_ "out not empty: $(cat out)"
+  case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+  compare in in >out 2>err || fail=1
+  test -s out && fail_ "out not empty: $(cat out)"
+  case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+  compare /dev/null in >out 2>err && fail=1
+  cat <<\EOF > exp
+diff -u /dev/null in
+--- /dev/null  1970-01-01
++++ in 1970-01-01
++xyz
+EOF
+  compare exp out || fail=1
+  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
+--- 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
+}
+
+test_compare
+
+Exit $fail
diff --git a/gl/tests/test-intprops.c b/gl/tests/test-intprops.c
index 1a34d77..aeb1168 100644
--- a/gl/tests/test-intprops.c
+++ b/gl/tests/test-intprops.c
@@ -1,5 +1,5 @@
 /* Test intprops.h.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-inttypes.c b/gl/tests/test-inttypes.c
index 5bf952c..698d3dc 100644
--- a/gl/tests/test-inttypes.c
+++ b/gl/tests/test-inttypes.c
@@ -1,5 +1,5 @@
 /* Test of <inttypes.h> substitute.
-   Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 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
@@ -18,9 +18,6 @@
 
 #include <config.h>
 
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
 #include <inttypes.h>
 
 #include <stddef.h>
diff --git a/gl/tests/test-ioctl.c b/gl/tests/test-ioctl.c
index 130ee42..c3aadce 100644
--- a/gl/tests/test-ioctl.c
+++ b/gl/tests/test-ioctl.c
@@ -1,5 +1,5 @@
 /* Test of ioctl() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-isnand-nolibm.c b/gl/tests/test-isnand-nolibm.c
index d120459..d35e9b3 100644
--- a/gl/tests/test-isnand-nolibm.c
+++ b/gl/tests/test-isnand-nolibm.c
@@ -1,5 +1,5 @@
 /* Test of isnand() substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-isnand.h b/gl/tests/test-isnand.h
index 181e36f..52d35bf 100644
--- a/gl/tests/test-isnand.h
+++ b/gl/tests/test-isnand.h
@@ -1,5 +1,5 @@
 /* Test of isnand() substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-isnanf-nolibm.c b/gl/tests/test-isnanf-nolibm.c
index 6d720be..cef9925 100644
--- a/gl/tests/test-isnanf-nolibm.c
+++ b/gl/tests/test-isnanf-nolibm.c
@@ -1,5 +1,5 @@
 /* Test of isnanf() substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-isnanf.h b/gl/tests/test-isnanf.h
index 4a33508..10adf30 100644
--- a/gl/tests/test-isnanf.h
+++ b/gl/tests/test-isnanf.h
@@ -1,5 +1,5 @@
 /* Test of isnanf() substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-isnanl-nolibm.c b/gl/tests/test-isnanl-nolibm.c
index 5322087..96159f8 100644
--- a/gl/tests/test-isnanl-nolibm.c
+++ b/gl/tests/test-isnanl-nolibm.c
@@ -1,5 +1,5 @@
 /* Test of isnanl() substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-isnanl.h b/gl/tests/test-isnanl.h
index 9f1d763..8a9e684 100644
--- a/gl/tests/test-isnanl.h
+++ b/gl/tests/test-isnanl.h
@@ -1,5 +1,5 @@
 /* Test of isnanl() substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-listen.c b/gl/tests/test-listen.c
index becc453..3ea82d4 100644
--- a/gl/tests/test-listen.c
+++ b/gl/tests/test-listen.c
@@ -1,5 +1,5 @@
 /* Test listen() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-lock.c b/gl/tests/test-lock.c
index 3f8846b..06bb3df 100644
--- a/gl/tests/test-lock.c
+++ b/gl/tests/test-lock.c
@@ -1,5 +1,5 @@
 /* Test of locking in multithreaded situations.
-   Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
@@ -18,7 +18,7 @@
 
 #include <config.h>
 
-#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WIN32_THREADS
+#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WINDOWS_THREADS
 
 #if USE_POSIX_THREADS
 # define TEST_POSIX_THREADS 1
@@ -29,8 +29,8 @@
 #if USE_PTH_THREADS
 # define TEST_PTH_THREADS 1
 #endif
-#if USE_WIN32_THREADS
-# define TEST_WIN32_THREADS 1
+#if USE_WINDOWS_THREADS
+# define TEST_WINDOWS_THREADS 1
 #endif
 
 /* Whether to enable locking.
@@ -69,7 +69,7 @@
 # undef USE_POSIX_THREADS
 # undef USE_SOLARIS_THREADS
 # undef USE_PTH_THREADS
-# undef USE_WIN32_THREADS
+# undef USE_WINDOWS_THREADS
 #endif
 #include "glthread/lock.h"
 
@@ -83,8 +83,8 @@
 # if TEST_PTH_THREADS
 #  define USE_PTH_THREADS 1
 # endif
-# if TEST_WIN32_THREADS
-#  define USE_WIN32_THREADS 1
+# if TEST_WINDOWS_THREADS
+#  define USE_WINDOWS_THREADS 1
 # endif
 #endif
 
diff --git a/gl/tests/test-lstat.c b/gl/tests/test-lstat.c
index 372e056..459bf88 100644
--- a/gl/tests/test-lstat.c
+++ b/gl/tests/test-lstat.c
@@ -1,5 +1,5 @@
 /* Test of lstat() function.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-lstat.h b/gl/tests/test-lstat.h
index 883c4e8..4a81494 100644
--- a/gl/tests/test-lstat.h
+++ b/gl/tests/test-lstat.h
@@ -1,5 +1,5 @@
 /* Test of lstat() function.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-malloc-gnu.c b/gl/tests/test-malloc-gnu.c
index c2a3d6b..16b3a0a 100644
--- a/gl/tests/test-malloc-gnu.c
+++ b/gl/tests/test-malloc-gnu.c
@@ -1,5 +1,5 @@
 /* Test of malloc function.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-malloca.c b/gl/tests/test-malloca.c
index 92c86f2..d7732c3 100644
--- a/gl/tests/test-malloca.c
+++ b/gl/tests/test-malloca.c
@@ -1,5 +1,5 @@
 /* Test of safe automatic memory allocation.
-   Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 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
diff --git a/gl/tests/test-math.c b/gl/tests/test-math.c
index 8565925..f6e61a7 100644
--- a/gl/tests/test-math.c
+++ b/gl/tests/test-math.c
@@ -1,5 +1,5 @@
 /* Test of <math.h> substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-memchr.c b/gl/tests/test-memchr.c
index a11f6cd..1298c27 100644
--- a/gl/tests/test-memchr.c
+++ b/gl/tests/test-memchr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2012 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-netdb.c b/gl/tests/test-netdb.c
index 13a8925..2312f3f 100644
--- a/gl/tests/test-netdb.c
+++ b/gl/tests/test-netdb.c
@@ -1,5 +1,5 @@
 /* Test of <netdb.h> substitute.
-   Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008, 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
diff --git a/gl/tests/test-netinet_in.c b/gl/tests/test-netinet_in.c
index b1edc66..d318e47 100644
--- a/gl/tests/test-netinet_in.c
+++ b/gl/tests/test-netinet_in.c
@@ -1,5 +1,5 @@
 /* Test of <netinet/in.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-open.c b/gl/tests/test-open.c
index 3c5b2ab..b9ec9bf 100644
--- a/gl/tests/test-open.c
+++ b/gl/tests/test-open.c
@@ -1,5 +1,5 @@
 /* Test of opening a file descriptor.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-open.h b/gl/tests/test-open.h
index 2ba5d13..cab1d27 100644
--- a/gl/tests/test-open.h
+++ b/gl/tests/test-open.h
@@ -1,5 +1,5 @@
 /* Test of opening a file descriptor.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-pathmax.c b/gl/tests/test-pathmax.c
index 96a1364..c6d0ccc 100644
--- a/gl/tests/test-pathmax.c
+++ b/gl/tests/test-pathmax.c
@@ -1,5 +1,5 @@
 /* Test of "pathmax.h".
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-perror.c b/gl/tests/test-perror.c
index d3751d8..dbbeb33 100644
--- a/gl/tests/test-perror.c
+++ b/gl/tests/test-perror.c
@@ -1,5 +1,5 @@
 /* Test of perror() function.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-perror2.c b/gl/tests/test-perror2.c
index e230f92..446bce9 100644
--- a/gl/tests/test-perror2.c
+++ b/gl/tests/test-perror2.c
@@ -1,5 +1,5 @@
 /* Test of perror() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-pipe.c b/gl/tests/test-pipe.c
index 90f41f9..ebee805 100644
--- a/gl/tests/test-pipe.c
+++ b/gl/tests/test-pipe.c
@@ -1,5 +1,5 @@
 /* Test of pipe.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -26,7 +26,7 @@ SIGNATURE_CHECK (pipe, int, (int[2]));
 #include <stdbool.h>
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 /* Get _get_osfhandle.  */
@@ -41,7 +41,7 @@ static bool
 is_open (int fd)
 {
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-  /* On Win32, the initial state of unassigned standard file
+  /* On native Windows, the initial state of unassigned standard file
      descriptors is that they are open but point to an
      INVALID_HANDLE_VALUE, and there is no fcntl.  */
   return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
diff --git a/gl/tests/test-printf-frexp.c b/gl/tests/test-printf-frexp.c
index d1b0d84..d144a52 100644
--- a/gl/tests/test-printf-frexp.c
+++ b/gl/tests/test-printf-frexp.c
@@ -1,5 +1,5 @@
 /* Test of splitting a double into fraction and mantissa.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-printf-frexpl.c b/gl/tests/test-printf-frexpl.c
index 4e9704f..ac77781 100644
--- a/gl/tests/test-printf-frexpl.c
+++ b/gl/tests/test-printf-frexpl.c
@@ -1,5 +1,5 @@
 /* Test of splitting a 'long double' into fraction and mantissa.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-printf-posix.h b/gl/tests/test-printf-posix.h
index 3d29212..53ef905 100644
--- a/gl/tests/test-printf-posix.h
+++ b/gl/tests/test-printf-posix.h
@@ -1,5 +1,5 @@
 /* Test of POSIX compatible vsprintf() and sprintf() functions.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-rawmemchr.c b/gl/tests/test-rawmemchr.c
index be8feac..9e31500 100644
--- a/gl/tests/test-rawmemchr.c
+++ b/gl/tests/test-rawmemchr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2012 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-read-file.c b/gl/tests/test-read-file.c
index de7a0bb..aec3c4b 100644
--- a/gl/tests/test-read-file.c
+++ b/gl/tests/test-read-file.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2007, 2010-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2006-2007, 2010-2012 Free Software Foundation, Inc.
  * Written by Simon Josefsson
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-recv.c b/gl/tests/test-recv.c
index ae811b6..a147d5d 100644
--- a/gl/tests/test-recv.c
+++ b/gl/tests/test-recv.c
@@ -1,5 +1,5 @@
 /* Test the recv() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-recvfrom.c b/gl/tests/test-recvfrom.c
index 069b9cf..1447620 100644
--- a/gl/tests/test-recvfrom.c
+++ b/gl/tests/test-recvfrom.c
@@ -1,5 +1,5 @@
 /* Test the recvfrom() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-select-fd.c b/gl/tests/test-select-fd.c
index de2f3e9..32df4b7 100644
--- a/gl/tests/test-select-fd.c
+++ b/gl/tests/test-select-fd.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading or writing from a given file 
descriptor.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-select-stdin.c b/gl/tests/test-select-stdin.c
index 5a6f81a..75dd855 100644
--- a/gl/tests/test-select-stdin.c
+++ b/gl/tests/test-select-stdin.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading from stdin.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-select.c b/gl/tests/test-select.c
index 9c6fb9d..f6e193e 100644
--- a/gl/tests/test-select.c
+++ b/gl/tests/test-select.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-select.h b/gl/tests/test-select.h
index 4612dfc..9fe998c 100644
--- a/gl/tests/test-select.h
+++ b/gl/tests/test-select.h
@@ -1,5 +1,5 @@
 /* Test of select() substitute.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
@@ -30,7 +30,7 @@
 #include "macros.h"
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-# define WIN32_NATIVE
+# define WINDOWS_NATIVE
 #endif
 
 #ifdef HAVE_SYS_WAIT_H
@@ -121,7 +121,7 @@ connect_to_socket (bool blocking)
 
   if (!blocking)
     {
-#ifdef WIN32_NATIVE
+#ifdef WINDOWS_NATIVE
       unsigned long iMode = 1;
       ioctl (s, FIONBIO, (char *) &iMode);
 
@@ -262,7 +262,7 @@ static void
 test_bad_fd (select_fn my_select)
 {
   /* This tests fails on OSF/1 and native Windows, even with fd = 16.  */
-#if !(defined __osf__ || defined WIN32_NATIVE)
+#if !(defined __osf__ || defined WINDOWS_NATIVE)
   int fd;
 
   /* On Linux, MacOS X, *BSD, values of fd like 99 or 399 are discarded
@@ -318,7 +318,7 @@ test_connect_first (select_fn my_select)
 static void
 test_accept_first (select_fn my_select)
 {
-#ifndef WIN32_NATIVE
+#ifndef WINDOWS_NATIVE
   int s = open_server_socket ();
   struct sockaddr_in ia;
   socklen_t addrlen;
diff --git a/gl/tests/test-send.c b/gl/tests/test-send.c
index 9fb24d4..febbe20 100644
--- a/gl/tests/test-send.c
+++ b/gl/tests/test-send.c
@@ -1,5 +1,5 @@
 /* Test the send() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sendto.c b/gl/tests/test-sendto.c
index 9e8a519..88fad93 100644
--- a/gl/tests/test-sendto.c
+++ b/gl/tests/test-sendto.c
@@ -1,5 +1,5 @@
 /* Test the sendto() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-setenv.c b/gl/tests/test-setenv.c
index 50eb71b..4752a11 100644
--- a/gl/tests/test-setenv.c
+++ b/gl/tests/test-setenv.c
@@ -1,5 +1,5 @@
 /* Tests of setenv.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-setsockopt.c b/gl/tests/test-setsockopt.c
index 7a16cfa..cc78a1b 100644
--- a/gl/tests/test-setsockopt.c
+++ b/gl/tests/test-setsockopt.c
@@ -1,5 +1,5 @@
 /* Test setsockopt() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-shutdown.c b/gl/tests/test-shutdown.c
index d154f8e..91d979a 100644
--- a/gl/tests/test-shutdown.c
+++ b/gl/tests/test-shutdown.c
@@ -1,5 +1,5 @@
 /* Test the shutdown() function.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-signal-h.c b/gl/tests/test-signal-h.c
index 7103e1f..9529017 100644
--- a/gl/tests/test-signal-h.c
+++ b/gl/tests/test-signal-h.c
@@ -1,5 +1,5 @@
 /* Test of <signal.h> substitute.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-signbit.c b/gl/tests/test-signbit.c
index 940156e..d9ff91d 100644
--- a/gl/tests/test-signbit.c
+++ b/gl/tests/test-signbit.c
@@ -1,5 +1,5 @@
 /* Test of signbit() substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sleep.c b/gl/tests/test-sleep.c
index 3550e2b..a0a2e77 100644
--- a/gl/tests/test-sleep.c
+++ b/gl/tests/test-sleep.c
@@ -1,5 +1,5 @@
 /* Test of sleep() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-snprintf.c b/gl/tests/test-snprintf.c
index 2b5a54c..bd66449 100644
--- a/gl/tests/test-snprintf.c
+++ b/gl/tests/test-snprintf.c
@@ -1,5 +1,5 @@
 /* Test of snprintf() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sockets.c b/gl/tests/test-sockets.c
index 0170d37..f43e011 100644
--- a/gl/tests/test-sockets.c
+++ b/gl/tests/test-sockets.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2012 Free Software Foundation, Inc.
  * Written by Simon Josefsson.
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-stat.c b/gl/tests/test-stat.c
index cd74491..db9adf9 100644
--- a/gl/tests/test-stat.c
+++ b/gl/tests/test-stat.c
@@ -1,5 +1,5 @@
 /* Tests of stat.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-stat.h b/gl/tests/test-stat.h
index 3c8f7ad..2c9afc0 100644
--- a/gl/tests/test-stat.h
+++ b/gl/tests/test-stat.h
@@ -1,5 +1,5 @@
 /* Tests of stat.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-stdalign.c b/gl/tests/test-stdalign.c
index 7090a26..d4c1d2e 100644
--- a/gl/tests/test-stdalign.c
+++ b/gl/tests/test-stdalign.c
@@ -1,5 +1,5 @@
 /* Test of <stdalign.h>.
-   Copyright 2009-2011 Free Software Foundation, Inc.
+   Copyright 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
@@ -71,7 +71,7 @@ CHECK_STATIC (int64_t);
 #endif
 CHECK_STATIC (float);
 CHECK_STATIC (double);
-CHECK_STATIC (longdouble);
+/* CHECK_STATIC (longdouble); */
 CHECK_STATIC (struct1);
 CHECK_STATIC (struct2);
 CHECK_STATIC (struct3);
@@ -101,8 +101,8 @@ main ()
   CHECK_ALIGNED (static_float_Alignas);
   CHECK_ALIGNED (static_double_alignas);
   CHECK_ALIGNED (static_double_Alignas);
-  CHECK_ALIGNED (static_longdouble_alignas);
-  CHECK_ALIGNED (static_longdouble_Alignas);
+  /* CHECK_ALIGNED (static_longdouble_alignas); */
+  /* CHECK_ALIGNED (static_longdouble_Alignas); */
   CHECK_ALIGNED (static_struct1_alignas);
   CHECK_ALIGNED (static_struct1_Alignas);
   CHECK_ALIGNED (static_struct2_alignas);
diff --git a/gl/tests/test-stdbool.c b/gl/tests/test-stdbool.c
index e115ba2..c22ca1f 100644
--- a/gl/tests/test-stdbool.c
+++ b/gl/tests/test-stdbool.c
@@ -1,5 +1,5 @@
 /* Test of <stdbool.h> substitute.
-   Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2007, 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
diff --git a/gl/tests/test-stddef.c b/gl/tests/test-stddef.c
index c929af8..d7237b3 100644
--- a/gl/tests/test-stddef.c
+++ b/gl/tests/test-stddef.c
@@ -1,5 +1,5 @@
 /* Test of <stddef.h> substitute.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-stdint.c b/gl/tests/test-stdint.c
index f606cc3..23b2b28 100644
--- a/gl/tests/test-stdint.c
+++ b/gl/tests/test-stdint.c
@@ -1,5 +1,5 @@
 /* Test of <stdint.h> substitute.
-   Copyright (C) 2006-2011 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
@@ -21,8 +21,6 @@
 /* Whether to enable pedantic checks. */
 #define DO_PEDANTIC 0
 
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* likewise */
 #include <stdint.h>
 
 #include "verify.h"
diff --git a/gl/tests/test-stdio.c b/gl/tests/test-stdio.c
index 7e7a206..7bd67c2 100644
--- a/gl/tests/test-stdio.c
+++ b/gl/tests/test-stdio.c
@@ -1,5 +1,5 @@
 /* Test of <stdio.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-stdlib.c b/gl/tests/test-stdlib.c
index 210aab4..7eeb410 100644
--- a/gl/tests/test-stdlib.c
+++ b/gl/tests/test-stdlib.c
@@ -1,5 +1,5 @@
 /* Test of <stdlib.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-strchrnul.c b/gl/tests/test-strchrnul.c
index 6ea8adc..f1d0928 100644
--- a/gl/tests/test-strchrnul.c
+++ b/gl/tests/test-strchrnul.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2012 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-strerror.c b/gl/tests/test-strerror.c
index 3ffb12e..a40c079 100644
--- a/gl/tests/test-strerror.c
+++ b/gl/tests/test-strerror.c
@@ -1,5 +1,5 @@
 /* Test of strerror() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-strerror_r.c b/gl/tests/test-strerror_r.c
index 956c458..0539de2 100644
--- a/gl/tests/test-strerror_r.c
+++ b/gl/tests/test-strerror_r.c
@@ -1,5 +1,5 @@
 /* Test of strerror_r() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-string.c b/gl/tests/test-string.c
index 54c49a9..56e5974 100644
--- a/gl/tests/test-string.c
+++ b/gl/tests/test-string.c
@@ -1,5 +1,5 @@
 /* Test of <string.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-strings.c b/gl/tests/test-strings.c
index ee2ad62..1805e16 100644
--- a/gl/tests/test-strings.c
+++ b/gl/tests/test-strings.c
@@ -1,5 +1,5 @@
 /* Test of <strings.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-strnlen.c b/gl/tests/test-strnlen.c
index 18d6fcd..cbc1883 100644
--- a/gl/tests/test-strnlen.c
+++ b/gl/tests/test-strnlen.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2010-2012 Free Software Foundation, Inc.
  * Written by Eric Blake
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-strverscmp.c b/gl/tests/test-strverscmp.c
index 9a9da10..d58cec2 100644
--- a/gl/tests/test-strverscmp.c
+++ b/gl/tests/test-strverscmp.c
@@ -1,5 +1,5 @@
 /* Test of strverscmp() function.
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-symlink.c b/gl/tests/test-symlink.c
index 367e045..b3caac9 100644
--- a/gl/tests/test-symlink.c
+++ b/gl/tests/test-symlink.c
@@ -1,5 +1,5 @@
 /* Tests of symlink.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-symlink.h b/gl/tests/test-symlink.h
index 4d93929..a7c4079 100644
--- a/gl/tests/test-symlink.h
+++ b/gl/tests/test-symlink.h
@@ -1,5 +1,5 @@
 /* Tests of symlink.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-sys_ioctl.c b/gl/tests/test-sys_ioctl.c
index dd01b4a..725cabf 100644
--- a/gl/tests/test-sys_ioctl.c
+++ b/gl/tests/test-sys_ioctl.c
@@ -1,5 +1,5 @@
 /* Test of <sys/ioctl.h> substitute.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-sys_select.c b/gl/tests/test-sys_select.c
index 76596db..a473eba 100644
--- a/gl/tests/test-sys_select.c
+++ b/gl/tests/test-sys_select.c
@@ -1,5 +1,5 @@
 /* Test of <sys/select.h> substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sys_socket.c b/gl/tests/test-sys_socket.c
index 58c1899..271815d 100644
--- a/gl/tests/test-sys_socket.c
+++ b/gl/tests/test-sys_socket.c
@@ -1,5 +1,5 @@
 /* Test of <sys/socket.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-sys_stat.c b/gl/tests/test-sys_stat.c
index 3303bad..0702e04 100644
--- a/gl/tests/test-sys_stat.c
+++ b/gl/tests/test-sys_stat.c
@@ -1,5 +1,5 @@
 /* Test of <sys/stat.h> substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sys_time.c b/gl/tests/test-sys_time.c
index da64b85..a9ac5e3 100644
--- a/gl/tests/test-sys_time.c
+++ b/gl/tests/test-sys_time.c
@@ -1,5 +1,5 @@
 /* Test of <sys/time.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-sys_types.c b/gl/tests/test-sys_types.c
index 816c9d6..c2af992 100644
--- a/gl/tests/test-sys_types.c
+++ b/gl/tests/test-sys_types.c
@@ -1,5 +1,5 @@
 /* Test of <sys/types.h> substitute.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sys_uio.c b/gl/tests/test-sys_uio.c
index 7855a6b..ffb46ce 100644
--- a/gl/tests/test-sys_uio.c
+++ b/gl/tests/test-sys_uio.c
@@ -1,5 +1,5 @@
 /* Test of <sys/uio.h> substitute.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sys_wait.h b/gl/tests/test-sys_wait.h
index 3c9b322..d3726df 100644
--- a/gl/tests/test-sys_wait.h
+++ b/gl/tests/test-sys_wait.h
@@ -1,5 +1,5 @@
 /* Test of macros shared between <sys/wait.h> and <stdlib.h>.
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-sysexits.c b/gl/tests/test-sysexits.c
index 0d9a22c..a5333d0 100644
--- a/gl/tests/test-sysexits.c
+++ b/gl/tests/test-sysexits.c
@@ -1,5 +1,5 @@
 /* Test of <sysexits.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-thread_create.c b/gl/tests/test-thread_create.c
index 1348c8c..0f86771 100644
--- a/gl/tests/test-thread_create.c
+++ b/gl/tests/test-thread_create.c
@@ -1,5 +1,5 @@
 /* Test of gl_thread_create () macro.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
@@ -67,7 +67,7 @@ main ()
     }
   else
     {
-#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WIN32_THREADS
+#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WINDOWS_THREADS
       fputs ("glthread_create failed\n", stderr);
       return 1;
 #else
diff --git a/gl/tests/test-thread_self.c b/gl/tests/test-thread_self.c
index 816ee09..707f7fe 100644
--- a/gl/tests/test-thread_self.c
+++ b/gl/tests/test-thread_self.c
@@ -1,5 +1,5 @@
 /* Test of gl_thread_self () macro.
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-time.c b/gl/tests/test-time.c
index d499a5c..acf3d2d 100644
--- a/gl/tests/test-time.c
+++ b/gl/tests/test-time.c
@@ -1,5 +1,5 @@
 /* Test of <time.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-u64.c b/gl/tests/test-u64.c
index bdfc95f..8be841d 100644
--- a/gl/tests/test-u64.c
+++ b/gl/tests/test-u64.c
@@ -1,5 +1,5 @@
 /* Test of <u64.h>
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-unistd.c b/gl/tests/test-unistd.c
index be1ae06..e53fd7a 100644
--- a/gl/tests/test-unistd.c
+++ b/gl/tests/test-unistd.c
@@ -1,5 +1,5 @@
 /* Test of <unistd.h> substitute.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/tests/test-unsetenv.c b/gl/tests/test-unsetenv.c
index 9c9443b..926526d 100644
--- a/gl/tests/test-unsetenv.c
+++ b/gl/tests/test-unsetenv.c
@@ -1,5 +1,5 @@
 /* Tests of unsetenv.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/tests/test-sys_ioctl.c b/gl/tests/test-usleep.c
similarity index 68%
copy from gl/tests/test-sys_ioctl.c
copy to gl/tests/test-usleep.c
index dd01b4a..1e4cac1 100644
--- a/gl/tests/test-sys_ioctl.c
+++ b/gl/tests/test-usleep.c
@@ -1,5 +1,5 @@
-/* Test of <sys/ioctl.h> substitute.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+/* Test of usleep() function.
+   Copyright (C) 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
@@ -18,10 +18,23 @@
 
 #include <config.h>
 
-#include <sys/ioctl.h>
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (usleep, int, (useconds_t));
+
+#include <time.h>
+
+#include "macros.h"
 
 int
 main (void)
 {
+  time_t start = time (NULL);
+  ASSERT (usleep (1000000) == 0);
+  ASSERT (start < time (NULL));
+
+  ASSERT (usleep (0) == 0);
+
   return 0;
 }
diff --git a/gl/tests/test-vasnprintf.c b/gl/tests/test-vasnprintf.c
index 6b2a0ff..4e548b1 100644
--- a/gl/tests/test-vasnprintf.c
+++ b/gl/tests/test-vasnprintf.c
@@ -1,5 +1,5 @@
 /* Test of vasnprintf() and asnprintf() functions.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-vasprintf.c b/gl/tests/test-vasprintf.c
index 6882d18..4d7635b 100644
--- a/gl/tests/test-vasprintf.c
+++ b/gl/tests/test-vasprintf.c
@@ -1,5 +1,5 @@
 /* Test of vasprintf() and asprintf() functions.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-vc-list-files-cvs.sh 
b/gl/tests/test-vc-list-files-cvs.sh
index 531b269..68b0a0f 100755
--- a/gl/tests/test-vc-list-files-cvs.sh
+++ b/gl/tests/test-vc-list-files-cvs.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2012 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,6 @@ for i in with-cvsu without; do
   ok=0
   mkdir $tmpdir && cd $tmpdir &&
     # without cvs, skip the test
-    # The double use of 'exit' is needed for the reference to $? inside the 
trap.
     { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
       || skip_ "cvs not found in PATH"; } &&
     mkdir w && cd w &&
diff --git a/gl/tests/test-vc-list-files-git.sh 
b/gl/tests/test-vc-list-files-git.sh
index 523b2a9..1ea6d89 100755
--- a/gl/tests/test-vc-list-files-git.sh
+++ b/gl/tests/test-vc-list-files-git.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2012 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-verify.c b/gl/tests/test-verify.c
index 454f4f4..5ab9c58 100644
--- a/gl/tests/test-verify.c
+++ b/gl/tests/test-verify.c
@@ -1,6 +1,6 @@
 /* Test the "verify" module.
 
-   Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 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
diff --git a/gl/tests/test-version-etc.c b/gl/tests/test-version-etc.c
index 00a5d7c..36ced60 100644
--- a/gl/tests/test-version-etc.c
+++ b/gl/tests/test-version-etc.c
@@ -1,5 +1,5 @@
 /* Test suite for version-etc.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNUlib Library.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-version-etc.sh b/gl/tests/test-version-etc.sh
index c1ed827..945383b 100755
--- a/gl/tests/test-version-etc.sh
+++ b/gl/tests/test-version-etc.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for version-etc.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-vfprintf-posix.c b/gl/tests/test-vfprintf-posix.c
index 1db3112..706ee70 100644
--- a/gl/tests/test-vfprintf-posix.c
+++ b/gl/tests/test-vfprintf-posix.c
@@ -1,5 +1,5 @@
 /* Test of POSIX compatible vfprintf() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-vprintf-posix.c b/gl/tests/test-vprintf-posix.c
index fcad8af..f64bf83 100644
--- a/gl/tests/test-vprintf-posix.c
+++ b/gl/tests/test-vprintf-posix.c
@@ -1,5 +1,5 @@
 /* Test of POSIX compatible vfprintf() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-vsnprintf.c b/gl/tests/test-vsnprintf.c
index 7a52082..9ee61c0 100644
--- a/gl/tests/test-vsnprintf.c
+++ b/gl/tests/test-vsnprintf.c
@@ -1,5 +1,5 @@
 /* Test of vsnprintf() function.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/test-wchar.c b/gl/tests/test-wchar.c
index 2d3bad7..0d72005 100644
--- a/gl/tests/test-wchar.c
+++ b/gl/tests/test-wchar.c
@@ -1,5 +1,5 @@
 /* Test of <wchar.h> substitute.
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/unsetenv.c b/gl/tests/unsetenv.c
index 16b50d1..ddbe9a4 100644
--- a/gl/tests/unsetenv.c
+++ b/gl/tests/unsetenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,7 @@
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
diff --git a/gl/tests/w32sock.h b/gl/tests/w32sock.h
index 0b8334e..846c342 100644
--- a/gl/tests/w32sock.h
+++ b/gl/tests/w32sock.h
@@ -1,6 +1,6 @@
 /* w32sock.h --- internal auxilliary functions for Windows socket functions
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/tests/zerosize-ptr.h b/gl/tests/zerosize-ptr.h
index beeb3da..9c060e7 100644
--- a/gl/tests/zerosize-ptr.h
+++ b/gl/tests/zerosize-ptr.h
@@ -1,5 +1,5 @@
 /* Return a pointer to a zero-size object in memory.
-   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/time.in.h b/gl/time.in.h
index 1fbebf4..5080d45 100644
--- a/gl/time.in.h
+++ b/gl/time.in.h
@@ -1,6 +1,6 @@
 /* A more-standard <time.h>.
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/time_r.c b/gl/time_r.c
index 31d010e..dbde157 100644
--- a/gl/time_r.c
+++ b/gl/time_r.c
@@ -1,6 +1,6 @@
 /* Reentrant time functions like localtime_r.
 
-   Copyright (C) 2003, 2006-2007, 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 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
diff --git a/gl/timespec.h b/gl/timespec.h
index acf815c..388ddb8 100644
--- a/gl/timespec.h
+++ b/gl/timespec.h
@@ -1,6 +1,6 @@
 /* timespec -- System time interface
 
-   Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2011 Free Software
+   Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2012 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/gl/u64.h b/gl/u64.h
index 182d649..dadd6d7 100644
--- a/gl/u64.h
+++ b/gl/u64.h
@@ -1,6 +1,6 @@
 /* uint64_t-like operations that work even on hosts lacking uint64_t
 
-   Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 77e5675..6aac9c3 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2011 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
@@ -935,6 +935,27 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable 
- "
 #endif
 
 
+#if @GNULIB_ISATTY@
+# if @REPLACE_ISATTY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef isatty
+#   define isatty rpl_isatty
+#  endif
+_GL_FUNCDECL_RPL (isatty, int, (int fd));
+_GL_CXXALIAS_RPL (isatty, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (isatty, int, (int fd));
+# endif
+_GL_CXXALIASWARN (isatty);
+#elif defined GNULIB_POSIXCHECK
+# undef isatty
+# if HAVE_RAW_DECL_ISATTY
+_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
+                 "use gnulib module isatty for portability");
+# endif
+#endif
+
+
 #if @GNULIB_LCHOWN@
 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
    to GID (if GID is not -1).  Do not follow symbolic links.
@@ -1268,6 +1289,33 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
 #endif
 
 
+#if @GNULIB_SETHOSTNAME@
+/* Set the host name of the machine.
+   The host name may or may not be fully qualified.
+
+   Put LEN bytes of NAME into the host name.
+   Return 0 if successful, otherwise, set errno and return -1.
+
+   Platforms with no ability to set the hostname return -1 and set
+   errno = ENOSYS.  */
+# if address@hidden@ || address@hidden@
+_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
+   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));
+_GL_CXXALIASWARN (sethostname);
+#elif defined GNULIB_POSIXCHECK
+# undef sethostname
+# if HAVE_RAW_DECL_SETHOSTNAME
+_GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
+                 "use gnulib module sethostname for portability");
+# endif
+#endif
+
+
 #if @GNULIB_SLEEP@
 /* Pause the execution of the current thread for N seconds.
    Returns the number of seconds left to sleep.
diff --git a/gl/usleep.c b/gl/usleep.c
new file mode 100644
index 0000000..ea640bf
--- /dev/null
+++ b/gl/usleep.c
@@ -0,0 +1,58 @@
+/* Pausing execution of the current thread.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Written by Eric Blake <address@hidden>, 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/>.  */
+
+/* This file is _intentionally_ light-weight.  Rather than using
+   select or nanosleep, both of which drag in external libraries on
+   some platforms, this merely rounds up to the nearest second if
+   usleep() does not exist.  If sub-second resolution is important,
+   then use a more powerful interface to begin with.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unistd.h>
+
+#include <errno.h>
+
+#ifndef HAVE_USLEEP
+# define HAVE_USLEEP 0
+#endif
+
+/* Sleep for MICRO microseconds, which can be greater than 1 second.
+   Return -1 and set errno to EINVAL on range error (about 4295
+   seconds), or 0 on success.  Interaction with SIGALARM is
+   unspecified.  */
+
+int
+usleep (useconds_t micro)
+{
+  unsigned int seconds = micro / 1000000;
+  if (sizeof seconds < sizeof micro && micro / 1000000 != seconds)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  if (!HAVE_USLEEP && micro % 1000000)
+    seconds++;
+  while ((seconds = sleep (seconds)) != 0);
+
+#undef usleep
+#if !HAVE_USLEEP
+# define usleep(x) 0
+#endif
+  return usleep (micro % 1000000);
+}
diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c
index 71f8d80..16fca49 100644
--- a/gl/vasnprintf.c
+++ b/gl/vasnprintf.c
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999, 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
@@ -4885,7 +4885,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                    in format strings in writable memory may crash the program
                    (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
                    in this situation.  */
-                /* On native Win32 systems (such as mingw), we can avoid using
+                /* On native Windows systems (such as mingw), we can avoid 
using
                    %n because:
                      - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
                        snprintf does not write more than the specified number
@@ -4894,7 +4894,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                      - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf
                        allows us to recognize the case of an insufficient
                        buffer size: it returns -1 in this case.
-                   On native Win32 systems (such as mingw) where the OS is
+                   On native Windows systems (such as mingw) where the OS is
                    Windows Vista, the use of %n in format strings by default
                    crashes the program. See
                      <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h
index c9f4c21..fdd5868 100644
--- a/gl/vasnprintf.h
+++ b/gl/vasnprintf.h
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2004, 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
diff --git a/gl/vasprintf.c b/gl/vasprintf.c
index 3001c26..6d1cd97 100644
--- a/gl/vasprintf.c
+++ b/gl/vasprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 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
diff --git a/gl/verify.h b/gl/verify.h
index 9a8caad..cef14ad 100644
--- a/gl/verify.h
+++ b/gl/verify.h
@@ -1,6 +1,6 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 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
@@ -21,13 +21,11 @@
 # define _GL_VERIFY_H
 
 
-/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
-   C1X draft N1548 section 6.7.10.  This is supported by GCC 4.6.0 and
-   later, in C mode, and its use here generates easier-to-read diagnostics
-   when verify (R) fails.
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
+   This is supported by GCC 4.6.0 and later, in C mode, and its use
+   here generates easier-to-read diagnostics when verify (R) fails.
 
-   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the
-   C++0X draft N3242 section 7.(4).
+   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
    This will likely be supported by future GCC versions, in C++ mode.
 
    Use this only with GCC.  If we were willing to slow 'configure'
@@ -188,7 +186,7 @@ template <int w>
    trailing ';'.  If R is false, fail at compile-time, preferably
    with a diagnostic that includes the string-literal DIAGNOSTIC.
 
-   Unfortunately, unlike C1X, this implementation must appear as an
+   Unfortunately, unlike C11, this implementation must appear as an
    ordinary declaration, and cannot appear inside struct { ... }.  */
 
 # ifdef _GL_HAVE__STATIC_ASSERT
@@ -205,7 +203,7 @@ template <int w>
 #   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
 #  endif
 #  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
-#   define static_assert _Static_assert /* Draft C1X requires this #define.  */
+#   define static_assert _Static_assert /* C11 requires this #define.  */
 #  endif
 # endif
 
diff --git a/gl/version-etc-fsf.c b/gl/version-etc-fsf.c
index c821583..c452f40 100644
--- a/gl/version-etc-fsf.c
+++ b/gl/version-etc-fsf.c
@@ -1,5 +1,5 @@
 /* Variable with FSF copyright information, for version-etc.
-   Copyright (C) 1999-2006, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999-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
diff --git a/gl/version-etc.c b/gl/version-etc.c
index b8d4724..ae1e44d 100644
--- a/gl/version-etc.c
+++ b/gl/version-etc.c
@@ -1,5 +1,5 @@
 /* Print --version and bug-reporting information in a consistent format.
-   Copyright (C) 1999-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
@@ -38,7 +38,7 @@
 # define PACKAGE PACKAGE_TARNAME
 #endif
 
-enum { COPYRIGHT_YEAR = 2011 };
+enum { COPYRIGHT_YEAR = 2012 };
 
 /* The three functions below display the --version information the
    standard way.
diff --git a/gl/version-etc.h b/gl/version-etc.h
index a9b313d..c62704c 100644
--- a/gl/version-etc.h
+++ b/gl/version-etc.h
@@ -1,5 +1,5 @@
 /* Print --version and bug-reporting information in a consistent format.
-   Copyright (C) 1999, 2003, 2005, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003, 2005, 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
@@ -22,7 +22,7 @@
 # include <stdarg.h>
 # include <stdio.h>
 
-/* The `sentinel' attribute was added in gcc 4.0.  */
+/* The 'sentinel' attribute was added in gcc 4.0.  */
 #ifndef _GL_ATTRIBUTE_SENTINEL
 # if 4 <= __GNUC__
 #  define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
@@ -72,7 +72,7 @@ extern void version_etc (FILE *stream,
                          /* const char *author1, ..., NULL */ ...)
   _GL_ATTRIBUTE_SENTINEL;
 
-/* Display the usual `Report bugs to' stanza */
+/* Display the usual "Report bugs to" stanza.  */
 extern void emit_bug_reporting_address (void);
 
 #endif /* VERSION_ETC_H */
diff --git a/gl/vfprintf.c b/gl/vfprintf.c
index 55486d6..bc1bec9 100644
--- a/gl/vfprintf.c
+++ b/gl/vfprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to a stream.
-   Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 2004, 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
diff --git a/gl/vprintf.c b/gl/vprintf.c
index 0388713..075b3d9 100644
--- a/gl/vprintf.c
+++ b/gl/vprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to a stream.
-   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 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
diff --git a/gl/vsnprintf.c b/gl/vsnprintf.c
index 3f6f6a8..ac2637e 100644
--- a/gl/vsnprintf.c
+++ b/gl/vsnprintf.c
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc.
    Written by Simon Josefsson and Yoann Vandoorselaere <address@hidden>.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/gl/w32sock.h b/gl/w32sock.h
index 0b8334e..846c342 100644
--- a/gl/w32sock.h
+++ b/gl/w32sock.h
@@ -1,6 +1,6 @@
 /* w32sock.h --- internal auxilliary functions for Windows socket functions
 
-   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index 1ed4521..86c97ff 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   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
diff --git a/gl/xsize.h b/gl/xsize.h
index 6505c42..4c1e615 100644
--- a/gl/xsize.h
+++ b/gl/xsize.h
@@ -1,6 +1,6 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008-2011 Free Software Foundation, Inc.
+   Copyright (C) 2003, 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
diff --git a/lib/auth/cert.c b/lib/auth/cert.c
index cdd0d70..38d2c00 100644
--- a/lib/auth/cert.c
+++ b/lib/auth/cert.c
@@ -1401,7 +1401,7 @@ cleanup:
 #endif
 
 int
-_gnutls_proc_cert_server_certificate (gnutls_session_t session,
+_gnutls_proc_certificate (gnutls_session_t session,
                                       opaque * data, size_t data_size)
 {
   int ret;
diff --git a/lib/auth/cert.h b/lib/auth/cert.h
index 176d214..7ef0e92 100644
--- a/lib/auth/cert.h
+++ b/lib/auth/cert.h
@@ -128,7 +128,7 @@ int _gnutls_gen_cert_client_cert_vrfy (gnutls_session_t, 
gnutls_buffer_st *);
 int _gnutls_gen_cert_server_cert_req (gnutls_session_t, gnutls_buffer_st *);
 int _gnutls_proc_cert_cert_req (gnutls_session_t, opaque *, size_t);
 int _gnutls_proc_cert_client_cert_vrfy (gnutls_session_t, opaque *, size_t);
-int _gnutls_proc_cert_server_certificate (gnutls_session_t, opaque *, size_t);
+int _gnutls_proc_certificate (gnutls_session_t, opaque *, size_t);
 int _gnutls_get_selected_cert (gnutls_session_t session,
                                gnutls_pcert_st ** apr_cert_list,
                                int *apr_cert_list_length,
@@ -141,8 +141,6 @@ void _gnutls_selected_certs_set (gnutls_session_t session,
                                  gnutls_pcert_st * certs, int ncerts,
                                  gnutls_privkey_t key, int need_free);
 
-#define _gnutls_proc_cert_client_certificate 
_gnutls_proc_cert_server_certificate
-
 gnutls_rsa_params_t _gnutls_certificate_get_rsa_params (gnutls_rsa_params_t
                                                         rsa_params,
                                                         gnutls_params_function
diff --git a/lib/auth/dhe.c b/lib/auth/dhe.c
index 87496af..c21405d 100644
--- a/lib/auth/dhe.c
+++ b/lib/auth/dhe.c
@@ -53,8 +53,8 @@ const mod_auth_st ecdhe_ecdsa_auth_struct = {
   _gnutls_gen_cert_client_cert_vrfy,
   _gnutls_gen_cert_server_cert_req,
 
-  _gnutls_proc_cert_server_certificate,
-  _gnutls_proc_cert_client_certificate,
+  _gnutls_proc_certificate,
+  _gnutls_proc_certificate,
   proc_dhe_server_kx,
   proc_dhe_client_kx,
   _gnutls_proc_cert_client_cert_vrfy,
@@ -70,8 +70,8 @@ const mod_auth_st ecdhe_rsa_auth_struct = {
   _gnutls_gen_cert_client_cert_vrfy,
   _gnutls_gen_cert_server_cert_req,
 
-  _gnutls_proc_cert_server_certificate,
-  _gnutls_proc_cert_client_certificate,
+  _gnutls_proc_certificate,
+  _gnutls_proc_certificate,
   proc_dhe_server_kx,
   proc_dhe_client_kx,
   _gnutls_proc_cert_client_cert_vrfy,
@@ -87,8 +87,8 @@ const mod_auth_st dhe_rsa_auth_struct = {
   _gnutls_gen_cert_client_cert_vrfy,    /* gen client cert vrfy */
   _gnutls_gen_cert_server_cert_req,     /* server cert request */
 
-  _gnutls_proc_cert_server_certificate,
-  _gnutls_proc_cert_client_certificate,
+  _gnutls_proc_certificate,
+  _gnutls_proc_certificate,
   proc_dhe_server_kx,
   proc_dhe_client_kx,
   _gnutls_proc_cert_client_cert_vrfy,   /* proc client cert vrfy */
@@ -104,8 +104,8 @@ const mod_auth_st dhe_dss_auth_struct = {
   _gnutls_gen_cert_client_cert_vrfy,    /* gen client cert vrfy */
   _gnutls_gen_cert_server_cert_req,     /* server cert request */
 
-  _gnutls_proc_cert_server_certificate,
-  _gnutls_proc_cert_client_certificate,
+  _gnutls_proc_certificate,
+  _gnutls_proc_certificate,
   proc_dhe_server_kx,
   proc_dhe_client_kx,
   _gnutls_proc_cert_client_cert_vrfy,   /* proc client cert vrfy */
diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c
index d07e5e5..0806d03 100644
--- a/lib/auth/rsa.c
+++ b/lib/auth/rsa.c
@@ -54,8 +54,8 @@ const mod_auth_st rsa_auth_struct = {
   _gnutls_gen_cert_client_cert_vrfy,    /* gen client cert vrfy */
   _gnutls_gen_cert_server_cert_req,     /* server cert request */
 
-  _gnutls_proc_cert_server_certificate,
-  _gnutls_proc_cert_client_certificate,
+  _gnutls_proc_certificate,
+  _gnutls_proc_certificate,
   NULL,                         /* proc server kx */
   proc_rsa_client_kx,           /* proc client kx */
   _gnutls_proc_cert_client_cert_vrfy,   /* proc client cert vrfy */
diff --git a/lib/auth/rsa_export.c b/lib/auth/rsa_export.c
index fca2826..4bd9750 100644
--- a/lib/auth/rsa_export.c
+++ b/lib/auth/rsa_export.c
@@ -58,8 +58,8 @@ const mod_auth_st rsa_export_auth_struct = {
   _gnutls_gen_cert_client_cert_vrfy,    /* gen client cert vrfy */
   _gnutls_gen_cert_server_cert_req,     /* server cert request */
 
-  _gnutls_proc_cert_server_certificate,
-  _gnutls_proc_cert_client_certificate,
+  _gnutls_proc_certificate,
+  _gnutls_proc_certificate,
   proc_rsa_export_server_kx,
   proc_rsa_export_client_kx,    /* proc client kx */
   _gnutls_proc_cert_client_cert_vrfy,   /* proc client cert vrfy */
diff --git a/lib/auth/srp_rsa.c b/lib/auth/srp_rsa.c
index 614425b..e3b8785 100644
--- a/lib/auth/srp_rsa.c
+++ b/lib/auth/srp_rsa.c
@@ -52,7 +52,7 @@ const mod_auth_st srp_rsa_auth_struct = {
   NULL,
   NULL,
 
-  _gnutls_proc_cert_server_certificate,
+  _gnutls_proc_certificate,
   NULL,                         /* certificate */
   proc_srp_cert_server_kx,
   _gnutls_proc_srp_client_kx,
@@ -69,7 +69,7 @@ const mod_auth_st srp_dss_auth_struct = {
   NULL,
   NULL,
 
-  _gnutls_proc_cert_server_certificate,
+  _gnutls_proc_certificate,
   NULL,                         /* certificate */
   proc_srp_cert_server_kx,
   _gnutls_proc_srp_client_kx,
diff --git a/lib/gnutls_dh_primes.c b/lib/gnutls_dh_primes.c
index f4fac9f..bd0b956 100644
--- a/lib/gnutls_dh_primes.c
+++ b/lib/gnutls_dh_primes.c
@@ -155,6 +155,7 @@ gnutls_dh_params_cpy (gnutls_dh_params_t dst, 
gnutls_dh_params_t src)
 
   dst->params[0] = _gnutls_mpi_copy (src->params[0]);
   dst->params[1] = _gnutls_mpi_copy (src->params[1]);
+  dst->q_bits = src->q_bits;
 
   if (dst->params[0] == NULL || dst->params[1] == NULL)
     return GNUTLS_E_MEMORY_ERROR;
diff --git a/lib/nettle/mpi.c b/lib/nettle/mpi.c
index f1342ec..1f5b293 100644
--- a/lib/nettle/mpi.c
+++ b/lib/nettle/mpi.c
@@ -421,9 +421,6 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int 
nbits, unsigned int *q
   unsigned int q_bytes, w_bytes, r_bytes, w_bits;
   int ret;
 
-  mpz_init (*prime);
-  mpz_init (*generator);
-
   /* security level enforcement. 
    * Values for q are selected according to ECRYPT II recommendations.
    */
@@ -454,8 +451,6 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int 
nbits, unsigned int *q
       return GNUTLS_E_MEMORY_ERROR;
     }
 
-  mpz_init2 (*prime, nbits);
-  mpz_init (*generator);
   mpz_init (q);
   mpz_init (w);
   mpz_init (r);
@@ -531,7 +526,6 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int 
nbits, unsigned int *q
    * c = r^(2w)
    * if c!=1 c is the generator for the subgroup of order q-1
    * 
-   * (here we reuse q as r)
    */
   r_bytes = p_bytes;
 
diff --git a/lib/x509/output.c b/lib/x509/output.c
index d21a420..ab056de 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -966,7 +966,7 @@ print_extensions (gnutls_buffer_st * str, const char 
*prefix, int type,
       else if (strcmp (oid, "1.3.6.1.5.5.7.1.1") == 0)
         {
           addf (str, _("%s\t\tAuthority Information "
-                      "Access Information (%s):\n"), prefix,
+                      "Access (%s):\n"), prefix,
                 critical ? _("critical") : _("not critical"));
 
           if (type == TYPE_CRT)
diff --git a/maint.mk b/maint.mk
index d2f5830..3e16b50 100644
--- a/maint.mk
+++ b/maint.mk
@@ -2,7 +2,7 @@
 # This Makefile fragment tries to be general-purpose enough to be
 # used by many projects via the gnulib maintainer-makefile module.
 
-## Copyright (C) 2001-2011 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
@@ -126,7 +126,7 @@ export LC_ALL = C
 
 _cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
 
-# Collect the names of rules starting with `sc_'.
+# Collect the names of rules starting with 'sc_'.
 syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' 
\
                        $(srcdir)/$(ME) $(_cfg_mk)))
 .PHONY: $(syntax-check-rules)
@@ -221,15 +221,6 @@ define _sc_say_and_exit
    { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; };
 endef
 
-# _sc_search_regexp used to be named _prohibit_regexp.  However,
-# upgrading to the new definition and leaving the old name undefined
-# would usually convert each custom rule using $(_prohibit_regexp)
-# (usually defined in cfg.mk) into a no-op.  This definition ensures
-# that people know right away if they're still using the old name.
-# FIXME: remove in 2012.
-_prohibit_regexp = \
-  $(error '*** you need to s/_prohibit_regexp/_sc_search_regexp/, and adapt')
-
 define _sc_search_regexp
    dummy=; : so we do not need a semicolon before each use;            \
                                                                        \
@@ -303,7 +294,7 @@ sc_space_tab:
        halt='found SPACE-TAB sequence; remove the SPACE'               \
          $(_sc_search_regexp)
 
-# Don't use *scanf or the old ato* functions in `real' code.
+# Don't use *scanf or the old ato* functions in "real" code.
 # They provide no error checking mechanism.
 # Instead, use strto* functions.
 sc_prohibit_atoi_atof:
@@ -335,15 +326,15 @@ sc_prohibit_magic_number_exit:
          $(_sc_search_regexp)
 
 # Using EXIT_SUCCESS as the first argument to error is misleading,
-# since when that parameter is 0, error does not exit.  Use `0' instead.
+# since when that parameter is 0, error does not exit.  Use '0' instead.
 sc_error_exit_success:
        @prohibit='error *\(EXIT_SUCCESS,'                              \
        in_vc_files='\.[chly]$$'                                        \
        halt='found error (EXIT_SUCCESS'                                \
         $(_sc_search_regexp)
 
-# `FATAL:' should be fully upper-cased in error messages
-# `WARNING:' should be fully upper-cased, or fully lower-cased
+# "FATAL:" should be fully upper-cased in error messages
+# "WARNING:" should be fully upper-cased, or fully lower-cased
 sc_error_message_warn_fatal:
        @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
            | grep -E '"Warning|"Fatal|"fatal' &&                       \
@@ -1087,15 +1078,15 @@ sc_po_check:
 
 # 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'
+# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
+msg = '$(ME): Do not use '\'':'\'' above; use $$(PATH_SEPARATOR) instead'
 sc_makefile_path_separator_check:
        @prohibit='PATH[=].*:'                                          \
        in_vc_files='akefile|\.mk$$'                                    \
        halt=$(msg)                                                     \
          $(_sc_search_regexp)
 
-# Check that `make alpha' will not fail at the end of the process,
+# Check that 'make alpha' will not fail at the end of the process,
 # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
 # and is read-only.
 writable-files:
@@ -1157,6 +1148,16 @@ sc_cross_check_PATH_usage_in_tests:
                1>&2; exit 1; } || :;                                   \
        fi
 
+# BRE regex of file contents to identify a test script.
+_test_script_regex ?= \<init\.sh\>
+
+# In tests, use "compare expected actual", not the reverse.
+sc_prohibit_reversed_compare_failure:
+       @prohibit='\<compare [^ ]+ ([^ ]*exp|/dev/null)'                \
+       containing='$(_test_script_regex)'                              \
+       halt='reversed compare arguments'                               \
+         $(_sc_search_regexp)
+
 # #if HAVE_... will evaluate to false for any non numeric string.
 # That would be flagged by using -Wundef, however gnulib currently
 # tests many undefined macros, and so we can't enable that option.
@@ -1438,16 +1439,16 @@ sc_tight_scope: tight-scope.mk
 
 tight-scope.mk: $(ME)
        @rm -f $@ address@hidden
-       @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(ME) > address@hidden
+       @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > 
address@hidden
        @chmod a=r address@hidden && mv address@hidden $@
 
 ifeq (a,b)
 # TS-start
 
 # Most functions should have static scope.
-# Any that don't must be marked with `extern', but `main'
-# and `usage' are exceptions: they're always extern, but
-# do not need to be marked.  Symbols matching `__.*' are
+# Any that don't must be marked with 'extern', but 'main'
+# and 'usage' are exceptions: they're always extern, but
+# do not need to be marked.  Symbols matching '__.*' are
 # reserved by the compiler, so are automatically excluded below.
 _gl_TS_unmarked_extern_functions ?= main usage
 _gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) *\(/
@@ -1457,9 +1458,9 @@ _gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) 
*\(/
 # export _gl_TS_extern = extern|XTERN
 _gl_TS_extern ?= extern
 
-# The second nm|grep checks for file-scope variables with `extern' scope.
+# The second nm|grep checks for file-scope variables with 'extern' scope.
 # Without gnulib's progname module, you might put program_name here.
-# Symbols matching `__.*' are reserved by the compiler,
+# Symbols matching '__.*' are reserved by the compiler,
 # so are automatically excluded below.
 _gl_TS_unmarked_extern_vars ?=
 
diff --git a/tests/slow/Makefile.am b/tests/slow/Makefile.am
index c8d93dc..8e321ac 100644
--- a/tests/slow/Makefile.am
+++ b/tests/slow/Makefile.am
@@ -18,8 +18,7 @@
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
-AM_CPPFLAGS = \
-       -I$(top_srcdir)/lib/includes            \
+AM_CPPFLAGS = -I$(top_srcdir)/lib/includes             \
        -I$(top_builddir)/lib/includes \
        -I$(top_srcdir)/tests/
 
diff --git a/tests/slow/gendh.c b/tests/slow/gendh.c
index e3732bb..d29e876 100644
--- a/tests/slow/gendh.c
+++ b/tests/slow/gendh.c
@@ -43,6 +43,10 @@ doit (void)
 
   if (gnutls_dh_params_generate2 (dh_params, 1024) < 0)
     fail ("Error in prime generation\n");
+    
+  gnutls_dh_params_deinit(dh_params);
+  
+  gnutls_global_deinit();
 
-  success ("generated DH params OK\n");
+  if (debug) success ("generated DH params OK\n");
 }


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]