math, unistd: avoid redundant includes
[gnulib.git] / ChangeLog
index 3d04361..903ea91 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2009-12-22  Eric Blake  <ebb9@byu.net>
+
+       math, unistd: avoid redundant includes
+       * lib/math.in.h (isnan): No need to re-include <math.h>.
+       * lib/unistd.in.h (getcwd): Likewise, for <stdlib.h>.
+
+       getsubopt: work around cygwin bug
+       * lib/stdlib.in.h (includes): Move unistd inclusion sooner, to
+       avoid conflicting with system getsubopt.
+       * doc/posix-functions/getsubopt.texi (getsubopt): Document the
+       bug.
+
+       getopt: synchronize from glibc
+       * lib/getopt.c (_getopt_initialize, _getopt_internal_r): Swap
+       parameter order.  Adjust all callers.
+       (_getopt_internal_r, main): Adjust quoting in error messages.
+       Drop considerations for outdated POSIX 1003.2 error message.
+       * lib/getopt1.c (_getopt_long_r, _getopt_long_only_r): Adjust
+       callers.
+       * lib/getopt_int.h (_getopt_internal_r): Adjust prototype.
+
+       test-getopt: test stderr behavior
+       * modules/getopt-posix-tests (Depends-on): Add dup2.
+       * tests/test-getopt.c (ASSERT): Avoid stderr.
+       (main): Move stderr to a temporary file.
+       * tests/test-getopt.h (getopt_loop): No longer manipulate opterr.
+       Instead, add parameter to inform caller if output occurred.
+       (test_getopt): Adjust all existing tests to expect silence, and
+       add new tests of leading ":".
+       * doc/glibc-functions/getopt_long.texi (getopt_long): Document
+       glibc shortcomings with leading "-:" or "+:" in optstring.
+       * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
+       Likewise.
+       * doc/posix-functions/getopt.texi (getopt): Likewise.
+
+       test-getopt: enhance test
+       * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require that getopt_long
+       supports optind=0.
+       * tests/test-getopt.c (OPTIND_MIN): Move...
+       * tests/test-getopt.h (OPTIND_MIN): ...here.
+       * tests/test-getopt_long.h (test_getopt_long): Add more coverage.
+       Require that optind=0 works, since modern BSD supports it in
+       addition to optreset, and since coreutils expects it.
+       (test_getopt_long_only): New test.
+       * doc/glibc-functions/getopt_long.texi (getopt_long): Document
+       glibc shortcomings with 'W;', and enforcement of optind=0.
+       * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
+       Likewise.
+
+2009-12-21  Bruno Haible  <bruno@clisp.org>
+
+       localename: Improvements for MacOS X and Cygwin.
+       * lib/localename.h (gl_locale_name_environ): New declaration.
+       * lib/localename.c (gl_locale_name_environ): New function, extracted from
+       gl_locale_name_posix. Ignore dummy LANG values on MacOS X and Cygwin.
+       (gl_locale_name_posix): Invoke it.
+       (gl_locale_name_default): Add comments. Use Windows native API also on
+       Cygwin.
+
+2009-12-21  Bruno Haible  <bruno@clisp.org>
+
+       Update list of Win32 locale ids.
+       * lib/localename.c (LANG_ROMANSH): Renamed from LANG_RHAETO_ROMANCE.
+       (LANG_SAMI): Renamed from LANG_SAAMI.
+       (LANG_BASHKIR, LANG_LUXEMBOURGISH, LANG_GREENLANDIC,
+       LANG_MAPUDUNGUN, LANG_MOHAWK, LANG_BRETON, LANG_OCCITAN, LANG_CORSICAN,
+       LANG_ALSATIAN, LANG_YAKUT, LANG_KICHE, LANG_KINYARWANDA, LANG_WOLOF,
+       LANG_DARI, LANG_SCOTTISH_GAELIC): New macros.
+       (SUBLANG_AFRIKAANS_SOUTH_AFRICA, SUBLANG_ALBANIAN_ALBANIA,
+       SUBLANG_ALSATIAN_FRANCE, SUBLANG_AMHARIC_ETHIOPIA,
+       SUBLANG_ARMENIAN_ARMENIA, SUBLANG_ASSAMESE_INDIA,
+       SUBLANG_BASHKIR_RUSSIA, SUBLANG_BASQUE_BASQUE,
+       SUBLANG_BELARUSIAN_BELARUS, SUBLANG_BRETON_FRANCE,
+       SUBLANG_BULGARIAN_BULGARIA, SUBLANG_CAMBODIAN_CAMBODIA,
+       SUBLANG_CATALAN_SPAIN, SUBLANG_CORSICAN_FRANCE,
+       SUBLANG_CZECH_CZECH_REPUBLIC, SUBLANG_DANISH_DENMARK,
+       SUBLANG_DARI_AFGHANISTAN, SUBLANG_DIVEHI_MALDIVES,
+       SUBLANG_DUTCH_SURINAM, SUBLANG_ESTONIAN_ESTONIA,
+       SUBLANG_FAEROESE_FAROE_ISLANDS, SUBLANG_FARSI_IRAN,
+       SUBLANG_FINNISH_FINLAND, SUBLANG_FRISIAN_NETHERLANDS,
+       SUBLANG_GALICIAN_SPAIN, SUBLANG_GEORGIAN_GEORGIA,
+       SUBLANG_GREEK_GREECE, SUBLANG_GREENLANDIC_GREENLAND,
+       SUBLANG_GUJARATI_INDIA, SUBLANG_HAUSA_NIGERIA_LATIN,
+       SUBLANG_HEBREW_ISRAEL, SUBLANG_HINDI_INDIA, SUBLANG_HUNGARIAN_HUNGARY,
+       SUBLANG_ICELANDIC_ICELAND, SUBLANG_IGBO_NIGERIA,
+       SUBLANG_INDONESIAN_INDONESIA, SUBLANG_INUKTITUT_CANADA,
+       SUBLANG_INUKTITUT_CANADA_LATIN, SUBLANG_IRISH_IRELAND,
+       SUBLANG_JAPANESE_JAPAN, SUBLANG_KANNADA_INDIA,
+       SUBLANG_KAZAK_KAZAKHSTAN, SUBLANG_KICHE_GUATEMALA,
+       SUBLANG_KINYARWANDA_RWANDA, SUBLANG_KONKANI_INDIA,
+       SUBLANG_KYRGYZ_KYRGYZSTAN, SUBLANG_LAO_LAOS, SUBLANG_LATVIAN_LATVIA,
+       SUBLANG_LITHUANIAN_LITHUANIA, SUBLANG_LOWER_SORBIAN_GERMANY,
+       SUBLANG_LUXEMBOURGISH_LUXEMBOURG, SUBLANG_MACEDONIAN_MACEDONIA,
+       SUBLANG_MALAYALAM_INDIA, SUBLANG_MALTESE_MALTA,
+       SUBLANG_MAORI_NEW_ZEALAND, SUBLANG_MAPUDUNGUN_CHILE,
+       SUBLANG_MARATHI_INDIA, SUBLANG_MOHAWK_CANADA, SUBLANG_NEPALI_NEPAL,
+       SUBLANG_OCCITAN_FRANCE, SUBLANG_ORIYA_INDIA,
+       SUBLANG_PASHTO_AFGHANISTAN, SUBLANG_POLISH_POLAND,
+       SUBLANG_ROMANSH_SWITZERLAND, SUBLANG_SAMI_NORTHERN_NORWAY,
+       SUBLANG_SAMI_NORTHERN_SWEDEN, SUBLANG_SAMI_NORTHERN_FINLAND,
+       SUBLANG_SAMI_LULE_NORWAY, SUBLANG_SAMI_LULE_SWEDEN,
+       SUBLANG_SAMI_SOUTHERN_NORWAY, SUBLANG_SAMI_SOUTHERN_SWEDEN,
+       SUBLANG_SAMI_SKOLT_FINLAND, SUBLANG_SAMI_INARI_FINLAND,
+       SUBLANG_SANSKRIT_INDIA, SUBLANG_SINHALESE_SRI_LANKA,
+       SUBLANG_SLOVAK_SLOVAKIA, SUBLANG_SLOVENIAN_SLOVENIA,
+       SUBLANG_SOTHO_SOUTH_AFRICA, SUBLANG_SWAHILI_KENYA,
+       SUBLANG_SWEDISH_SWEDEN, SUBLANG_SYRIAC_SYRIA,
+       SUBLANG_TAGALOG_PHILIPPINES, SUBLANG_TAJIK_TAJIKISTAN,
+       SUBLANG_TAMIL_INDIA, SUBLANG_TATAR_RUSSIA, SUBLANG_TELUGU_INDIA,
+       SUBLANG_THAI_THAILAND, SUBLANG_TSWANA_SOUTH_AFRICA,
+       SUBLANG_TURKISH_TURKEY, SUBLANG_TURKMEN_TURKMENISTAN,
+       SUBLANG_UKRAINIAN_UKRAINE, SUBLANG_UPPER_SORBIAN_GERMANY,
+       SUBLANG_VIETNAMESE_VIETNAM, SUBLANG_WELSH_UNITED_KINGDOM,
+       SUBLANG_WOLOF_SENEGAL, SUBLANG_XHOSA_SOUTH_AFRICA,
+       SUBLANG_YAKUT_RUSSIA, SUBLANG_YI_PRC, SUBLANG_YORUBA_NIGERIA,
+       SUBLANG_ZULU_SOUTH_AFRICA): New macros.
+       (gl_locale_name_from_win32_LANGID): Handle also the territory neutral
+       locale ids. Add support for Alsatian, Bashkir, Breton, Corsican, Dari,
+       Greenlandic, K'iche', Kinyarwanda, Luxembourgish, Mapudungun, Mohawk,
+       Occitan, Scottish Gaelic, Wolof, Yakut. Change language code for Yi.
+       Add more languages and countries for Sami, Sorbian. Add more countries
+       for Serbian, Dutch. Add more scripts for Inuktitut. Be more precise
+       for Pashto. Change country for Syriac, Tswana.
+
+2009-12-21  Eric Blake  <ebb9@byu.net>
+
+       test-utimens: avoid spurious failure
+       * tests/test-chown.h (nap): Factor...
+       * tests/nap.h: ...into new file.
+       * tests/test-lchown.h (nap): Avoid duplication.
+       * tests/test-utimens-common.h (nap): Use shared implementation,
+       necessary on file systems with 1-second resolution.
+       * modules/chown-tests (Files): Include new file.
+       * modules/fdutimensat-tests (Files): Likewise.
+       * modules/futimens-tests (Files): Likewise.
+       * modules/lchown-tests (Files): Likewise.
+       * modules/openat-tests (Files): Likewise.
+       * modules/utimens-tests (Files): Likewise.
+       * modules/utimensat-tests (Files): Likewise.
+
+2009-12-19  Eric Blake  <ebb9@byu.net>
+
+       futimens, utimensat: work around Linux bug
+       * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect ctime bug.
+       * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
+       * lib/utimensat.c (rpl_utimensat): Work around it.
+       * lib/futimens.c (rpl_futimens): Adjust comment.
+
+       utimens: work around Linux ctime bug
+       * lib/utimens.c (detect_ctime_bug): New helper function.
+       (update_timespec): Differentiate between workaround needed for
+       this bug vs. what is needed for systems that lack utimensat.
+       (fdutimens, lutimens): Work around bug.
+
+       utimens: check for ctime update
+       * tests/test-utimens-common.h (check_ctime): Define.
+       * tests/test-utimens.h (test_utimens): Expose the Linux bug.
+       * tests/test-futimens.h (test_futimens): Likewise.
+       * tests/test-lutimens.h (test_lutimens): Likewise.
+       * doc/posix-functions/futimens.texi (futimens): Document the bug.
+       * doc/posix-functions/utimensat.texi (utimensat): Likewise.
+
+2009-12-19  Bruno Haible  <bruno@clisp.org>
+
+       dprintf-posix: Check against memory leak fixed on 2009-12-15.
+       * tests/test-dprintf-posix2.sh: New file.
+       * tests/test-dprintf-posix2.c: New file.
+       * modules/dprintf-posix-tests (Files): Add them.
+       (configure.ac): Check for getrlimit and setrlimit.
+       (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
+
+2009-12-19  Bruno Haible  <bruno@clisp.org>
+
+       fprintf-posix: Check against memory leak fixed on 2009-12-15.
+       * tests/test-fprintf-posix3.sh: New file.
+       * tests/test-fprintf-posix3.c: New file.
+       * modules/fprintf-posix-tests (Files): Add them.
+       (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
+
+2009-12-19  Eric Blake  <ebb9@byu.net>
+
+       dirfd: fix prototype
+       * lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
+       * lib/dirfd.c (dirfd): Likewise.
+
+       canonicalize: reduce memory usage
+       * lib/canonicalize.c (canonicalize_filename_mode): Trim the
+       allocation to size.
+       Reported by Solar Designer <solar@openwall.com>.
+
+2009-12-19  Bruno Haible  <bruno@clisp.org>
+
+       New module attribute 'Applicability'.
+       * modules/TEMPLATE-EXTENDED: New field 'Applicability'.
+       * gnulib-tool: New option --extract-applicability.
+       (func_usage): Document it.
+       (sed_extract_prog): Recognize it.
+       (func_get_applicability): New function.
+       (func_import): Generalize handling of 'link-warning' module.
+       * modules/link-warning (Applicability): New section.
+       * modules/arg-nonnull (Applicability): New section.
+       Repoted by Simon Josefsson <simon@josefsson.org>.
+
+2009-12-19  Bruno Haible  <bruno@clisp.org>
+
+       fflush: tweak
+       * lib/fflush.c (update_fpos_cache): Don't use fpos_t on Cygwin.
+       * lib/fseeko.c (rpl_fseeko): Likewise.
+
+2009-12-16  José E. Marchesi  <jemarch@gnu.org>  (tiny change)
+
+       * lib/gl_list.h: Fix typo in comment.
+
+2009-12-16  Eric Blake  <ebb9@byu.net>
+
+       fcntl: use to simplify other modules
+       * modules/cloexec (Depends-on): Add fcntl.
+       * modules/fchdir (Depends-on): Likewise.
+       * modules/fd-safer-flag (Depends-on): Likewise.
+       * modules/unistd-safer (Depends-on): Likewise.
+       * modules/dup3 (configure.ac): Set module indicator.
+       * m4/fchdir.m4 (gl_FUNC_FCHDIR): Replace fcntl if fchdir is
+       missing.
+       * lib/fchdir.c (_gl_register_dup): Fix comment.
+       * lib/cloexec.c (dup_cloexec): Simplify, by relying on fcntl.
+       * lib/dup-safer.c (dup_safer): Likewise.
+       * lib/dup-safer-flag.c (dup_safer_flag): Likewise.
+       * lib/dup3.c (dup3): Likewise.
+       * tests/test-fchdir.c (main): Enhance test.
+       Fixes a dup_cloexec bug reported by Ondřej Vašík.
+
+       fcntl: port portions of fcntl to mingw
+       * m4/fcntl.m4 (gl_FUNC_FCNTL): Also build fcntl.c on mingw.
+       * lib/fcntl.c (fcntl) <F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD>: Provide
+       replacement for mingw.
+       * modules/fcntl (Description): Update.
+       (Depends-on): Add dup2.
+       * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness.
+       * modules/fcntl-h (Makefile.am): Substitute it.
+       * lib/fcntl.in.h (fcntl): Update declaration.
+       (F_DUPFD, F_GETFD): New macros, when needed.
+       * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
+       * doc/posix-functions/fcntl.texi (fcntl): Likewise.
+       * tests/test-fcntl.c (check_flags, main): Enhance test for items
+       we now guarantee.
+
+       fcntl: work around cygwin bug in F_DUPFD
+       * m4/fcntl.m4 (gl_REPLACE_FCNTL): New macro.
+       (gl_FUNC_FCNTL): Use it.  Test for F_DUPFD bug.
+       * lib/fcntl.c (rpl_fcntl) <F_DUPFD>: Work around it.
+       <F_DUPFD_CLOEXEC>: Reduce calls to _gl_register_dup.
+       * doc/posix-functions/fcntl.texi (fcntl): Document it.
+
+       fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
+       * modules/fcntl (Files): List new files.
+       (configure.ac): Run a test.
+       * m4/fcntl.m4 (gl_FUNC_FCNTL): New file.
+       * lib/fcntl.c (rpl_fcntl): Likewise.
+       * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness defaults.
+       (gl_FCNTL_H): Always replace fcntl.h.
+       * modules/fcntl-h (Makefile.am): Substitute witnesses.
+       * lib/fcntl.in.h (fcntl): Declare replacement.
+       (F_DUPFD_CLOEXEC, GNULIB_defined_F_DUPFD_CLOEXEC): New macro when
+       needed, plus a witness.
+       * doc/posix-functions/fcntl.texi (fcntl): Document this.
+       * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
+       * tests/test-fcntl.c: New file.
+       * modules/fcntl-tests: Likewise.
+
+       binary-io: avoid potential compilation warning
+       * lib/binary-io.h [__DJGPP__]: Avoid null preprocessor
+       directives.
+
+       fflush: avoid compilation error on NetBSD
+       * lib/fflush.c (update_fpos_cache): Use a union to safely convert
+       between off_t and fpos_t, since the latter is sometimes a struct.
+       * lib/fseeko.c (rpl_fseeko): Likewise.
+       Reported by Alexander Nasonov <alnsn@yandex.ru>.
+
+2009-12-15  Eric Blake  <ebb9@byu.net>
+
+       fcntl-h, stdio, sys_ioctl: fix declarations
+       * lib/stdio.in.h (dprintf): Use of link warning on a variadic
+       function must not take arguments.
+       * lib/sys_ioctl.in.h (ioctl): Likewise.
+       * lib/fcntl.in.h (openat): Likewise.  Declare extern.
+       (open): Add a link warning.
+
+2009-12-15  Jim Meyering  <meyering@redhat.com>
+
+       areadlink, areadlink-with-size: relax license to LGPLv2+
+       * modules/areadlink (License): Relax to LGPLv2+.
+       * modules/areadlink-with-size (License): Likewise.
+
+2009-12-15  Joel E. Denny  <jdenny@clemson.edu>
+           Bruno Haible  <bruno@clisp.org>
+
+       *printf: Fix memory leak.
+       * lib/fprintf.c (fprintf): Free memory allocated by vasnprintf.
+       * lib/vfprintf.c (vfprintf): Likewise.
+       * lib/dprintf.c (dprintf): Likewise.
+       * lib/vdprintf.c (vdprintf): Likewise.
+
+2009-12-14  Eric Blake  <ebb9@byu.net>
+
+       accept4: adjust module dependencies
+       * modules/accept4 (Depends-on): Use fcntl-h, not fcntl.
+
+       utimens: one more try at avoiding compiler warning
+       * lib/utimens.c (lutimens): Lower scope of result.
+
+2009-12-13  Bruno Haible  <bruno@clisp.org>
+
+       Move the malloc checking from module 'list' to new module 'xlist'.
+       * modules/xlist: New file.
+       * lib/gl_xlist.h: New file.
+       * lib/gl_xlist.c: New file.
+       * lib/gl_list.h (gl_list_create_empty, gl_list_create,
+       gl_list_node_set_value, gl_list_set_at, gl_list_add_first,
+       gl_list_add_last, gl_list_add_before, gl_list_add_after,
+       gl_list_nx_add_at, gl_sortedlist_add): Disable declarations.
+       (gl_list_nx_create_empty, gl_list_nx_create, gl_list_node_nx_set_value,
+       gl_list_nx_set_at, gl_list_nx_add_first, gl_list_nx_add_last,
+       gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at,
+       gl_sortedlist_nx_add): New declarations.
+       (struct gl_list_implementation): Rename and change methods accordingly.
+       (gl_list_nx_create_empty): Renamed from gl_list_create_empty.
+       (gl_list_nx_create): Renamed from gl_list_create.
+       (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
+       (gl_list_nx_set_at): Renamed from gl_list_set_at.
+       (gl_list_nx_add_first): Renamed from gl_list_add_first.
+       (gl_list_nx_add_last): Renamed from gl_list_add_last.
+       (gl_list_nx_add_before): Renamed from gl_list_add_before.
+       (gl_list_nx_add_after): Renamed from gl_list_add_after.
+       (gl_list_nx_add_at): Renamed from gl_list_add_at.
+       (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
+       * lib/gl_list.c (gl_list_nx_create_empty): Renamed from
+       gl_list_create_empty.
+       (gl_list_nx_create): Renamed from gl_list_create.
+       (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
+       (gl_list_nx_set_at): Renamed from gl_list_set_at.
+       (gl_list_nx_add_first): Renamed from gl_list_add_first.
+       (gl_list_nx_add_last): Renamed from gl_list_add_last.
+       (gl_list_nx_add_before): Renamed from gl_list_add_before.
+       (gl_list_nx_add_after): Renamed from gl_list_add_after.
+       (gl_list_nx_add_at): Renamed from gl_list_add_at.
+       (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
+       * lib/gl_array_list.c: Don't include xalloc.h.
+       (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Return
+       NULL upon out-of-memory.
+       (gl_array_nx_create): Renamed from gl_array_create. Return NULL upon
+       out-of-memory.
+       (gl_array_node_nx_set_value): Renamed from gl_array_node_set_value.
+       Change return type to 'int'.
+       (gl_array_nx_set_at): Renamed from gl_array_set_at.
+       (grow): Change return type to 'int'. Return -1 upon out-of-memory.
+       (gl_array_nx_add_first): Renamed from gl_array_add_first. Return NULL
+       upon out-of-memory.
+       (gl_array_nx_add_last): Renamed from gl_array_add_last. Return NULL
+       upon out-of-memory.
+       (gl_array_nx_add_before): Renamed from gl_array_add_before. Return NULL
+       upon out-of-memory.
+       (gl_array_nx_add_after): Renamed from gl_array_add_after. Return NULL
+       upon out-of-memory.
+       (gl_array_nx_add_at): Renamed from gl_array_add_at. Return NULL upon
+       out-of-memory.
+       (gl_array_sortedlist_nx_add): Renamed from gl_array_sortedlist_add.
+       Update.
+       (gl_array_list_implementation): Update.
+       * lib/gl_carray_list.c: Don't include xalloc.h.
+       (gl_carray_nx_create_empty): Renamed from gl_carray_create_empty.
+       Return NULL upon out-of-memory.
+       (gl_carray_nx_create): Renamed from gl_carray_create. Return NULL upon
+       out-of-memory.
+       (gl_carray_node_nx_set_value): Renamed from gl_carray_node_set_value.
+       Change return type to 'int'.
+       (gl_carray_nx_set_at): Renamed from gl_carray_set_at.
+       (grow): Change return type to 'int'. Return -1 upon out-of-memory.
+       (gl_carray_nx_add_first): Renamed from gl_carray_add_first. Return NULL
+       upon out-of-memory.
+       (gl_carray_nx_add_last): Renamed from gl_carray_add_last. Return NULL
+       upon out-of-memory.
+       (gl_carray_nx_add_at): Renamed from gl_carray_add_at. Return NULL upon
+       out-of-memory.
+       (gl_carray_nx_add_before): Renamed from gl_carray_add_before. Update.
+       (gl_carray_nx_add_after): Renamed from gl_carray_add_after. Update.
+       (gl_carray_sortedlist_nx_add): Renamed from gl_carray_sortedlist_add.
+       Update.
+       (gl_carray_list_implementation): Update.
+       * lib/gl_anyhash_list2.h (hash_resize): Do nothing upon out-of-memory.
+       * lib/gl_anylinked_list2.h (gl_linked_nx_create_empty): Renamed from
+       gl_linked_create_empty. Return NULL upon out-of-memory.
+       (gl_linked_nx_create): Renamed from gl_linked_create. Return NULL upon
+       out-of-memory.
+       (gl_linked_node_nx_set_value): Renamed from gl_linked_node_set_value.
+       Change return type to 'int'. Return -1 upon out-of-memory.
+       (gl_linked_nx_set_at): Renamed from gl_linked_set_at. Return NULL upon
+       out-of-memory.
+       (gl_linked_nx_add_first): Renamed from gl_linked_add_first. Return NULL
+       upon out-of-memory.
+       (gl_linked_nx_add_last): Renamed from gl_linked_add_last. Return NULL
+       upon out-of-memory.
+       (gl_linked_nx_add_before): Renamed from gl_linked_add_before. Return
+       NULL upon out-of-memory.
+       (gl_linked_nx_add_after): Renamed from gl_linked_add_after. Return NULL
+       upon out-of-memory.
+       (gl_linked_nx_add_at): Renamed from gl_linked_add_at. Return NULL upon
+       out-of-memory.
+       (gl_linked_sortedlist_nx_add): Renamed from gl_linked_sortedlist_add.
+       Update.
+       * lib/gl_linked_list.c: Don't include xalloc.h.
+       (gl_linked_list_implementation): Update.
+       * lib/gl_linkedhash_list.c: Don't include xalloc.h.
+       (add_to_bucket): Change return type to 'int'.
+       (gl_linkedhash_list_implementation): Update.
+       * lib/gl_anytree_list1.h (free_subtree): New function.
+       * lib/gl_anytree_list2.h (gl_tree_nx_create_empty): Renamed from
+       gl_tree_create_empty. Return NULL upon out-of-memory.
+       (gl_tree_node_nx_set_value): Renamed from gl_tree_node_set_value.
+       Change return type to 'int'. Return -1 upon out-of-memory.
+       (gl_tree_nx_set_at): Renamed from gl_tree_set_at. Return NULL upon
+       out-of-memory.
+       (gl_tree_nx_add_at): Renamed from gl_tree_add_at. Update.
+       (gl_tree_remove_node): New function, moved here from
+       lib/gl_anyavltree_list2.h and lib/gl_anyrbtree_list2.h.
+       (gl_tree_sortedlist_nx_add): Renamed from gl_tree_sortedlist_add.
+       Update.
+       * lib/gl_anyavltree_list2.h (create_subtree_with_contents): Use
+       malloc, not xmalloc. Return NULL upon out-of-memory.
+       (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
+       out-of-memory.
+       (gl_tree_remove_node_from_tree): New function, extracted from
+       gl_tree_remove_node.
+       (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
+       upon out-of-memory.
+       (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
+       out-of-memory.
+       (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
+       upon out-of-memory.
+       (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
+       upon out-of-memory.
+       (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
+       * lib/gl_anyrbtree_list2.h (create_subtree_with_contents): Use malloc,
+       not xmalloc. Return NULL upon out-of-memory.
+       (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
+       out-of-memory.
+       (gl_tree_remove_node_from_tree): New function, extracted from
+       gl_tree_remove_node.
+       (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
+       upon out-of-memory.
+       (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
+       out-of-memory.
+       (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
+       upon out-of-memory.
+       (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
+       upon out-of-memory.
+       (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
+       * lib/gl_avltree_list.c: Don't include xalloc.h. Include
+       gl_anytree_list1.h before gl_anyavltree_list2.h.
+       (gl_avltree_list_implementation): Update.
+       * lib/gl_rbtree_list.c: Don't include xalloc.h. Include
+       gl_anytree_list1.h before gl_anyavltree_list2.h.
+       (gl_rbtree_list_implementation): Update.
+       * lib/gl_anytreehash_list1.h (add_to_bucket, add_nodes_to_buckets):
+       Change return type to 'int'. Return -1 upon out-of-memory. Use
+       __builtin_expect.
+       * lib/gl_avltreehash_list.c: Don't include xalloc.h.
+       (gl_avltreehash_list_implementation): Update.
+       * lib/gl_rbtreehash_list.c: Don't include xalloc.h.
+       (gl_rbtreehash_list_implementation): Update.
+       * modules/array-list (Depends-on): Remove xalloc.
+       * modules/carray-list (Depends-on): Likewise.
+       * modules/linked-list (Depends-on): Likewise.
+       * modules/linkedhash-list (Depends-on): Likewise.
+       * modules/avltree-list (Depends-on): Likewise.
+       * modules/rbtree-list (Depends-on): Likewise.
+       * modules/avltreehash-list (Depends-on): Likewise.
+       * modules/rbtreehash-list (Depends-on): Likewise.
+
+       * modules/xsublist: New file.
+       * lib/gl_xsublist.h: New file.
+       * lib/gl_xsublist.c: New file.
+       * lib/gl_sublist.h (gl_sublist_create): Disable declaration.
+       (gl_sublist_nx_create): New declaration.
+       * lib/gl_sublist.c: Don't include xalloc.h.
+       (gl_sublist_nx_create_empty): Renamed from gl_sublist_create_empty.
+       (gl_sublist_nx_create_fill): Renamed from gl_sublist_create_fill.
+       (gl_sublist_node_nx_set_value): Renamed from gl_sublist_node_set_value.
+       Change return type to 'int'. Return -1 upon out-of-memory.
+       (gl_sublist_nx_set_at): Renamed from gl_sublist_set_at. Return NULL
+       upon out-of-memory.
+       (gl_sublist_nx_add_first): Renamed from gl_sublist_add_first. Return
+       NULL upon out-of-memory.
+       (gl_sublist_nx_add_last): Renamed from gl_sublist_add_last. Return NULL
+       upon out-of-memory.
+       (gl_sublist_nx_add_before): Renamed from gl_sublist_add_before. Return
+       NULL upon out-of-memory.
+       (gl_sublist_nx_add_after): Renamed from gl_sublist_add_after. Return
+       NULL upon out-of-memory.
+       (gl_sublist_nx_add_at): Renamed from gl_sublist_add_at. Return NULL
+       upon out-of-memory.
+       (gl_sublist_sortedlist_nx_add): Renamed from gl_sublist_sortedlist_add.
+       (gl_sublist_list_implementation): Update.
+       (gl_sublist_nx_create): Renamed from gl_sublist_create. Return NULL
+       upon out-of-memory.
+       * modules/sublist (Depends-on): Remove xalloc.
+
+       * tests/test-array_list.c: Use gl_list_nx_* functions where possible.
+       * tests/test-carray_list.c: Likewise.
+       * tests/test-linked_list.c: Likewise.
+       * tests/test-linkedhash_list.c: Likewise.
+       * tests/test-avltree_list.c: Likewise.
+       * tests/test-rbtree_list.c: Likewise.
+       * tests/test-avltreehash_list.c: Likewise.
+       * tests/test-rbtreehash_list.c: Likewise.
+       * modules/array-list-tests (Makefile.am): Don't link with @LIBINTL@.
+       * modules/carray-list-tests (Makefile.am): Likewise.
+       * modules/linked-list-tests (Makefile.am): Likewise.
+       * modules/linkedhash-list-tests (Makefile.am): Likewise.
+       * modules/avltree-list-tests (Makefile.am): Likewise.
+       * modules/rbtree-list-tests (Makefile.am): Likewise.
+       * modules/avltreehash-list-tests (Makefile.am): Likewise.
+       * modules/rbtreehash-list-tests (Makefile.am): Likewise.
+
+       * NEWS: Mention the changes.
+
+       * lib/clean-temp.c: Include gl_xlist.h.
+       * modules/clean-temp (Depends-on): Add xlist.
+
+       * lib/git-merge-changelog.c: Include gl_xlist.h instead of gl_list.h.
+       * modules/git-merge-changelog (Depends-on): Add xlist. Remove list.
+
+       * tests/test-array_oset.c: Include gl_xlist.h.
+       * modules/array-oset-tests (Depends-on): Add xlist.
+
+       Reported by José E. Marchesi <jemarch@gnu.org>.
+
+2009-12-13  Bruno Haible  <bruno@clisp.org>
+
+       Move the malloc checking from module 'oset' to new module 'xoset'.
+       * modules/xoset: New file.
+       * lib/gl_xoset.h: New file.
+       * lib/gl_xoset.c: New file.
+       * lib/gl_oset.h (gl_oset_create_empty, gl_oset_add): Disable
+       declarations.
+       (gl_oset_nx_create_empty, gl_oset_nx_add): New declarations.
+       (struct gl_oset_implementation): Rename and change methods accordingly.
+       (gl_oset_nx_create_empty): Renamed from gl_oset_create_empty.
+       (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
+       'int'. Mark as __warn_unused_result__.
+       * lib/gl_oset.c (gl_oset_nx_create_empty): Renamed from
+       gl_oset_create_empty.
+       (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
+       'int'.
+       * lib/gl_array_oset.c: Don't include xalloc.h.
+       (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Use
+       malloc, not xmalloc.
+       (grow): Change return type to 'int'. Don't call xalloc_die.
+       (gl_array_nx_add_at): Renamed from gl_array_add_at. Change return type
+       to 'int'.
+       (gl_array_nx_add): Renamed from gl_array_add. Change return type to
+       'int'.
+       (gl_array_oset_implementation): Update.
+       * lib/gl_anytree_oset.h (gl_tree_nx_create_empty): Renamed from
+       gl_tree_create_empty.
+       (gl_tree_nx_add): Renamed from gl_tree_add. Change return type to
+       'int'.
+       * lib/gl_avltree_oset.c: Don't include xalloc.h.
+       (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
+       xmalloc.
+       (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
+       not xmalloc.
+       (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
+       xmalloc.
+       (gl_avltree_oset_implementation): Update.
+       * lib/gl_rbtree_oset.c: Don't include xalloc.h.
+       (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
+       xmalloc.
+       (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
+       not xmalloc.
+       (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
+       xmalloc.
+       (gl_rbtree_oset_implementation): Update.
+       * modules/array-oset (Depends-on): Remove xalloc.
+       * modules/avltree-oset (Depends-on): Likewise.
+       * modules/rbtree-oset (Depends-on): Likewise.
+       * tests/test-array_oset.c: Use gl_oset_nx_* functions where possible.
+       * tests/test-avltree_oset.c: Likewise.
+       * tests/test-rbtree_oset.c: Likewise.
+       * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
+       * modules/avltree-oset-tests (Makefile.am): Don't link with @LIBINTL@.
+       * modules/rbtree-oset-tests (Makefile.am): Likewise.
+       * NEWS: Mention the change.
+
+2009-12-05  Alfred M. Szmidt  <ams@gnu.org>
+
+       maint.mk: allow a project to override release-prep commands
+       * top/maint.mk (alpha, beta, stable): Move release-preparatory
+       commands into a new rule.
+       (release-prep): New rule.
+       (release-prep-hook): New overridable variable.
+
+2009-12-13  Bruno Haible  <bruno@clisp.org>
+
+       * lib/localcharset.c (locale_charset): Fix comment about use of GetACP.
+
+2009-12-13  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk (null_AM_MAKEFLAGS, built_programs): remove unused definitions
+       * top/maint.mk (null_AM_MAKEFLAGS, built_programs): Remove definitions.
+
+2009-12-12  Bruno Haible  <bruno@clisp.org>
+
+       duplocale: Tweak.
+       * lib/duplocale.c (rpl_duplocale): Mark categories array as 'const'.
+
+2009-12-12  Karl Berry  <karl@gnu.org>
+
+       * config/srclist.txt (strtoll.c): tab changes, no more sync.
+
+2009-12-12  Bruno Haible  <bruno@clisp.org>
+
+       * m4/po.m4: Undo incorrect untabification.
+
+2009-12-12  Bruno Haible  <bruno@clisp.org>
+
+       c-strtod, c-strtold: Use multithread-safe implementation on MacOS X.
+       * modules/c-strtod (Depends-on): Add locale.
+       * modules/c-strtold (Depends-on): Likewise.
+
+2009-12-12  Bruno Haible  <bruno@clisp.org>
+
+       * lib/localcharset.c (locale_charset): Add comment about use of GetACP.
+
+2009-12-11  Eric Blake  <ebb9@byu.net>
+
+       setenv: relax requirement in light of POSIX ruling
+       * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test handling of "" but
+       not NULL.
+       * tests/test-setenv.c (main): Relax test.
+       * tests/test-unsetenv.c (main): Likewise.
+       * doc/posix-functions/setenv.texi (setenv): Document this.
+       * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
+
+2009-12-11  Bruno Haible  <bruno@clisp.org>
+
+       New module 'fd-safer-flag'.
+       * lib/dup-safer-flag.c: New file, extracted from lib/dup-safer.c.
+       * lib/dup-safer.c (dup_safer_flag): Remove function.
+       * lib/fd-safer-flag.c: New file, extracted from lib/fd-safer.c.
+       * lib/fd-safer.c (fd_safer_flag): Remove function.
+       * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): Update condition.
+       * modules/cloexec (configure.ac): Drop indicator macro.
+       * modules/fd-safer-flag: New file.
+       * modules/pipe2-safer (Depends-on): Add fd-safer-flag. Remove cloexec.
+       * modules/stdlib-safer (Depends-on): Add fd-safer-flag.
+       * modules/unistd-safer-tests (Depends-on): Add fd-safer-flag.
+
+2009-12-11  Bruno Haible  <bruno@clisp.org>
+
+       Tests for module 'nl_langinfo'.
+       * modules/nl_langinfo-tests: New file.
+       * tests/test-nl_langinfo.sh: New file.
+       * tests/test-nl_langinfo.c: New file.
+
+       New module 'nl_langinfo'.
+       * lib/nl_langinfo.c: New file.
+       * m4/nl_langinfo.m4: New file.
+       * modules/nl_langinfo: New file.
+       * doc/posix-functions/nl_langinfo.texi: Mention the new module.
+
+2009-12-11  Bruno Haible  <bruno@clisp.org>
+
+       Tests for module 'langinfo'.
+       * modules/langinfo-tests: New file.
+       * tests/test-langinfo.c: New file.
+
+       New module 'langinfo'.
+       * lib/langinfo.in.h: New file.
+       * m4/langinfo_h.m4: New file.
+       * modules/langinfo: New file.
+       * doc/posix-headers/langinfo.texi: Mention the new module.
+
+2009-12-11  Bruno Haible  <bruno@clisp.org>
+
+       * lib/config.charset: Untabify.
+
+2009-12-11  Bruno Haible  <bruno@clisp.org>
+
+       * modules/unistd-safer (configure.ac): Drop indicator macro.
+
+2009-12-11  Bruno Haible  <bruno@clisp.org>
+
+       Move pipe2-safer code to its own file.
+       * lib/pipe2-safer.c: New file, extracted from lib/pipe-safer.c.
+       * lib/pipe-safer.c (pipe2_safer): Remove function.
+       * modules/pipe2-safer (Files): Add lib/pipe2-safer.c.
+       (Makefile.am): Add it to lib_SOURCES.
+
+2009-12-10  Bruno Haible  <bruno@clisp.org>
+
+       * lib/recvfrom.c (rpl_recvfrom): Allow the from argument to be NULL.
+
+2009-12-10  Bruno Haible  <bruno@clisp.org>
+
+       Declare which arguments expect non-NULL values, for GCC and clang.
+       * build-aux/arg-nonnull.h: New file.
+       * modules/arg-nonnull: New file.
+       * lib/arpa_inet.in.h (_GL_ARG_NONNULL): New placeholder.
+       (inet_ntop, inet_pton): Use it.
+       * lib/dirent.in.h (_GL_ARG_NONNULL): New placeholder.
+       (closedir, dirfd, opendir, scandir, alphasort): Use it.
+       * lib/fcntl.in.h (_GL_ARG_NONNULL): New placeholder.
+       (open, openat): Use it.
+       * lib/fnmatch.in.h (_GL_ARG_NONNULL): New placeholder.
+       (fnmatch): Use it.
+       * lib/getopt.in.h (_GL_ARG_NONNULL): New placeholder.
+       (getopt, getopt_long, getopt_long_only): Use it.
+       * lib/glob.in.h (_GL_ARG_NONNULL): New placeholder.
+       * lib/glob-libc.h (glob, globfree, glob64, globfree64, glob_pattern_p):
+       Use it.
+       * lib/iconv.in.h (_GL_ARG_NONNULL): New placeholder.
+       (iconv_open): Use it.
+       * lib/inttypes.in.h (_GL_ARG_NONNULL): New placeholder.
+       (strtoimax, strtoumax): Use it.
+       * lib/locale.in.h (_GL_ARG_NONNULL): New placeholder.
+       (duplocale): Use it.
+       * lib/math.in.h (_GL_ARG_NONNULL): New placeholder.
+       (frexp, frexpl): Use it.
+       * lib/netdb.in.h (_GL_ARG_NONNULL): New placeholder.
+       (getaddrinfo, freeaddrinfo, getnameinfo): Use it.
+       * lib/search.in.h (_GL_ARG_NONNULL): New placeholder.
+       (tsearch, tfind, tdelete, twalk): Use it.
+       * lib/signal.in.h (_GL_ARG_NONNULL): New placeholder.
+       (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
+       sigpending): Use it.
+       * lib/spawn.in.h (_GL_ARG_NONNULL): New placeholder.
+       (posix_spawn, posix_spawnp, posix_spawnattr_init,
+       posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
+       posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
+       posix_spawnattr_setsigmask, posix_spawnattr_getflags,
+       posix_spawnattr_setflags, posix_spawnattr_getpgroup,
+       posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
+       posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
+       posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
+       posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
+       posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
+       Use it.
+       * lib/stdio.in.h (_GL_ARG_NONNULL): New placeholder.
+       (dprintf, fclose, fopen, fprintf, fpurge, fputc, fputs, freopen,
+       rpl_fseek, fseeko, rpl_ftell, ftello, fwrite, getdelim, getline,
+       obstack_printf, obstack_vprintf, popen, printf, putc, puts, remove,
+       rename, renameat, snprintf, sprintf, asprintf, vasprintf, vdprintf,
+       vfprintf, vprintf, vsnprintf, vsprintf): Use it.
+       * lib/stdlib.in.h (_GL_ARG_NONNULL): New placeholder.
+       (atoll, canonicalize_file_name, getloadavg, getsubopt, mkdtemp,
+       mkostemp, mkostemps, mkstemp, mkstemps, putenv, srandom_r, initstate_r,
+       setstate_r, random_r, realpath, rpmatch, setenv, strtod, strtoll,
+       strtoull, unsetenv): Use it.
+       * lib/string.in.h (_GL_ARG_NONNULL): New placeholder.
+       (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
+       strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
+       strcasestr, strtok_r, mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
+       mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
+       mbsspn, mbssep, mbstok_r, strverscmp): Use it.
+       * lib/strings.in.h (_GL_ARG_NONNULL): New placeholder.
+       (strcasecmp, strncasecmp): Use it.
+       * lib/sys_socket.in.h (_GL_ARG_NONNULL): New placeholder.
+       (rpl_connect, rpl_bind, rpl_getpeername, rpl_getsockname,
+       rpl_getsockopt, rpl_recv, rpl_send, rpl_recvfrom, rpl_sendto,
+       rpl_setsockopt): Use it.
+       * lib/sys_stat.in.h (_GL_ARG_NONNULL): New placeholder.
+       (fchmodat, fstat, fstatat, lchmod, rpl_lstat, mkdir, mkdirat, mkfifo,
+       mkfifoat, mknod, mknodat, stat, utimensat): Use it.
+       * lib/sys_time.in.h (_GL_ARG_NONNULL): New placeholder.
+       (gettimeofday): Use it.
+       * lib/sys_times.in.h (_GL_ARG_NONNULL): New placeholder.
+       (times): Use it.
+       * lib/sys_utsname.in.h (_GL_ARG_NONNULL): New placeholder.
+       (uname): Use it.
+       * lib/time.in.h (_GL_ARG_NONNULL): New placeholder.
+       (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): Use it.
+       * lib/unistd.in.h (_GL_ARG_NONNULL): New placeholder.
+       (chown, euidaccess, faccessat, _gl_register_fd, fchownat,
+       getdomainname, gethostname, getlogin_r, lchown, link, linkat, pipe2,
+       pread, readlink, readlinkat, rmdir, symlink, symlinkat, unlink,
+       unlinkat, write): Use it.
+       * lib/wchar.in.h (_GL_ARG_NONNULL): New placeholder.
+       (mbsrtowcs, mbsnrtowcs, wcsrtombs, wcsnrtombs): Use it.
+       * lib/argv-iter.h: Include arg-nonnull.h.
+       (_ATTRIBUTE_NONNULL_): Remove macro.
+       (argv_iter_init_argv, argv_iter_init_stream, argv_iter,
+       argv_iter_n_args, argv_iter_free): Use _GL_ARG_NONNULL.
+       * lib/canonicalize-lgpl.c (_GL_ARG_NONNULL): Define, to defeat gcc
+       optimization.
+       * lib/getaddrinfo.c (_GL_ARG_NONNULL): Likewise.
+       * lib/getdelim.c (_GL_ARG_NONNULL): Likewise.
+       * lib/glob.c (_GL_ARG_NONNULL): Likewise.
+       * lib/random_r.c (_GL_ARG_NONNULL): Likewise.
+       * lib/setenv.c (_GL_ARG_NONNULL): Likewise.
+       * lib/strtod.c (_GL_ARG_NONNULL): Likewise.
+       * lib/tsearch.c (_GL_ARG_NONNULL): Likewise.
+       * lib/unsetenv.c (_GL_ARG_NONNULL): Likewise.
+       * modules/arpa_inet (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into arpa/inet.h.
+       * modules/dirent (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into dirent.h.
+       * modules/fcntl-h (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into fcntl.h.
+       * modules/fnmatch (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into fnmatch.h.
+       * modules/getopt-posix (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into getopt.h.
+       * modules/glob (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into glob.h.
+       * modules/iconv_open (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into iconv.h.
+       * modules/inttypes (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into inttypes.h.
+       * modules/locale (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into locale.h.
+       * modules/math (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into math.h.
+       * modules/netdb (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into netdb.h.
+       * modules/search (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into search.h.
+       * modules/signal (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into signal.h.
+       * modules/spawn (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into spawn.h.
+       * modules/stdio (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into stdio.h.
+       * modules/stdlib (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into stdlib.h.
+       * modules/string (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into string.h.
+       * modules/strings (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into strings.h.
+       * modules/sys_socket (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into sys/socket.h.
+       * modules/sys_stat (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into sys/stat.h.
+       * modules/sys_time (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into sys/time.h.
+       * modules/sys_times (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into sys/times.h.
+       * modules/sys_utsname (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into sys/utsname.h.
+       * modules/time (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into time.h.
+       * modules/unistd (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into unistd.h.
+       * modules/wchar (Depends-on): Add arg-nonnull.
+       (Makefile.am): Insert arg-nonnull.h into wchar.h.
+       * modules/argv-iter (Depends-on): Add arg-nonnull.
+       * tests/test-canonicalize.c (null_ptr): New function.
+       (main): Use it.
+       * tests/test-canonicalize-lgpl.c (null_ptr): New function.
+       (main): Use it.
+       * tests/test-memmem.c (null_ptr): New function.
+       (main): Use it.
+       Reported by Jim Meyering.
+
+2009-12-10  Bruno Haible  <bruno@clisp.org>
+
+       Use spaces for indentation, not tabs.
+       * lib/**/*.[hcy] except lib/reg*.[hc]: Untabify.
+       * m4/*.m4: Untabify.
+       * build-aux/*.h: Untabify.
+       * tests/**/*.[hc]: Untabify.
+       * README: New section "Indent with spaces, not TABs", based on
+       coreutils/HACKING and comments by Pádraig Brady and Paolo Bonzini.
+       * NEWS: Mention the change.
+
+2009-12-10  Bruno Haible  <bruno@clisp.org>
+
+       pty test: Fix link error.
+       * modules/pty-tests (Makefile.am): Add the default LDADD value to
+       test_pty_LDADD.
+
+2009-12-07  Simon Josefsson  <simon@josefsson.org>
+
+       * modules/pty: New file.
+       * modules/pty-tests: New file.
+       * m4/pty.m4: New file.
+       * tests/test-pty.c: New file.
+       * doc/glibc-headers/pty.texi: Modified.
+       * doc/glibc-functions/forkpty.texi: Modified.
+       * doc/glibc-functions/openpty.texi: Modified.
+
+2009-12-10  Bruno Haible  <bruno@clisp.org>
+
+       Avoid syntax error in C++ mode.
+       * lib/stdio.in.h (rename): Don't use parameter name 'new'.
+
+2009-12-10  Bruno Haible  <bruno@clisp.org>
+
+       Use sed with option -e.
+       * gnulib-tool (func_version, func_emit_copyright_notice,
+       func_emit_initmacro_end, func_import, func_create_testdir): Pass
+       option -e to sed.
+       * modules/link-warning (Makefile.am): Likewise.
+
+2009-12-10  Jim Meyering  <meyering@redhat.com>
+
+       mgetgroups: do not write bytes beyond end of malloc'd buffer
+       * lib/mgetgroups.c: Fix an off-by-one error.  When we have no
+       username, we call getgroups with a one-element-shorter buffer,
+       but still told it the length was original, max_n_groups.
+
+2009-12-09  Eric Blake  <ebb9@byu.net>
+
+       cloexec: relax license
+       * modules/cloexec (Maintainer): Add myself.
+       (License): Use LGPL, not GPL.
+
+       link-warning: optimize generation
+       * modules/link-warning (Makefile.am): Reduce process usage.
+
+2009-12-09  Bruno Haible  <bruno@clisp.org>
+
+       * doc/posix-functions/unsetenv.texi: Mention Solaris 10 bug for which a
+       workaround was added on 2009-11-17.
+
+2009-12-09  Jim Meyering  <meyering@redhat.com>
+           Bruno Haible  <bruno@clisp.org>
+
+       link-warning: Allow extra lines at the top of build-aux/link-warning.h.
+       * modules/link-warning (Makefile.am): Make the comment-removing sed
+       command more robust in the face of bootstrap-prepended comment lines.
+
+2009-12-09  Bruno Haible  <bruno@clisp.org>
+
+       * lib/mgetgroups.c (mgetgroups): Don't remove duplicates if there is at
+       most one group.
+
+2009-12-09  Simon Josefsson <simon@josefsson.org>
+           Bruno Haible  <bruno@clisp.org>
+
+       * build-aux/link-warning.h: Add copyright notice.
+       * modules/link-warning (Makefile.am): Generate link-warning.h from
+       build-aux/link-warning.h. Update LINK_WARNING_H accordingly.
+       * NEWS: Mention change in link-warning module.
+       * modules/arpa_inet (Makefile.am): Add dependency to arpa/inet.h.
+       * modules/dirent (Makefile.am): Add dependency to dirent.h.
+       * modules/fcntl-h (Makefile.am): Add dependency to fcntl.h.
+       * modules/getopt-posix (Makefile.am): Add dependency to getopt.h.
+       * modules/inttypes (Makefile.am): Add dependency to inttypes.h.
+       * modules/math (Makefile.am): Add dependency to math.h.
+       * modules/search (Makefile.am): Add dependency to search.h.
+       * modules/signal (Makefile.am): Add dependency to signal.h.
+       * modules/spawn (Makefile.am): Add dependency to spawn.h.
+       * modules/stdio (Makefile.am): Add dependency to stdio.h.
+       * modules/stdlib (Makefile.am): Add dependency to stdlib.h.
+       * modules/string (Makefile.am): Add dependency to string.h.
+       * modules/strings (Makefile.am): Add dependency to strings.h.
+       * modules/sys_ioctl (Makefile.am): Add dependency to sys/ioctl.h.
+       * modules/sys_select (Makefile.am): Add dependency to sys/select.h.
+       * modules/sys_socket (Makefile.am): Add dependency to sys/socket.h.
+       * modules/sys_stat (Makefile.am): Add dependency to sys/stat.h.
+       * modules/sys_times (Makefile.am): Add dependency to sys/times.h.
+       * modules/sys_utsname (Makefile.am): Add dependency to sys/utsname.h.
+       * modules/sys_wait (Makefile.am): Add dependency to sys/wait.h.
+       * modules/unistd (Makefile.am): Add dependency to unistd.h.
+       * modules/wchar (Makefile.am): Add dependency to wchar.h.
+
+2009-12-09  Bruno Haible  <bruno@clisp.org>
+
+       fchdir: Optimize away rpl_fstat when possible.
+       * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set REPLACE_FSTAT only together with
+       REPLACE_OPEN_DIRECTORY.
+       * lib/fchdir.c (rpl_fstat): Define only when REPLACE_OPEN_DIRECTORY.
+
+2009-12-09  Bruno Haible  <bruno@clisp.org>
+
+       * lib/fchdir.c: Update comment.
+
+2009-12-09  Bruno Haible  <bruno@clisp.org>
+
+       * lib/cloexec.c (set_cloexec_flag): Clarify intent of dup2 call.
+
+2009-12-08  Eric Blake  <ebb9@byu.net>
+
+       fchdir: avoid memory leak on re-registration.
+       * lib/fchdir.c (ensure_dirs_slot): Avoid memory leak.
+
+2009-12-08  Jim Meyering  <meyering@redhat.com>
+
+       init.sh: avoid Solaris 10 /bin/sh portability problem
+       Solaris 10's /bin/sh does not pass '.' arguments 2.. to the
+       sourced script:
+         $ printf 'echo "$@"\n' > f; /bin/sh -c '. ./f bar'
+         $ printf 'echo "$@"\n' > f; /bin/bash -c '. ./f bar'
+         bar
+       tests/init.sh relied on that, accepting a --set-path=DIR argument,
+       and two tests used that idiom.
+       * tests/init.sh: Update suggested usage comments.
+       (path_prepend_): New function, to be used in place
+       of the --src-path=DIR option.
+       (setup_): Move PATH-prepending code into path_prepend_.
+       * tests/test-pread.sh: Adapt to new usage.
+       * tests/test-xalloc-die.sh: Likewise.
+
+2009-12-08  Simon Josefsson  <simon@josefsson.org>
+
+       * doc/gnulib.texi (Glibc pty.h): Add.
+       * doc/glibc-functions/forkpty.texi: Add.
+       * doc/glibc-functions/openpty.texi: Add.
+       Suggested by Bruno Haible.
+
+2009-12-08  Eric Blake  <ebb9@byu.net>
+
+       fchdir: fix logic bugs
+       * m4/fchdir.m4 (gl_FUNC_FCHDIR): Fix logic bug.
+       * tests/test-fchdir.c (main): Enhance test.
+       * lib/fchdir.c (rpl_fstat): Always provide if fchdir replacement
+       is in use.
+
+       dup2: fix logic bugs
+       * lib/dup2.c (dup2): Fix logic bugs.  Use HAVE_DUP2 rather than
+       REPLACE_DUP2 to decide when rpl_dup2 is needed.
+       * m4/dup2.m4 (gl_REPLACE_DUP2): Only define REPLACE_DUP2 when dup2
+       exists.
+       (gl_FUNC_DUP2): Drop unneeded AC_DEFINE.
+
+2009-12-07  Eric Blake  <ebb9@byu.net>
+
+       unlink: fix m4 detection
+       * m4/unlink.m4 (gl_FUNC_UNLINK): Include correct header.
+
+       unistd-safer: add unit test
+       * modules/unistd-safer-tests: New file.
+       * tests/test-dup-safer.c: Likewise.
+       * tests/test-cloexec.c (setmode): Avoid compiler warning.
+       * tests/test-dup2.c (setmode): Likewise.
+       * lib/cloexec.c (dup_cloexec): Fix mingw compile error.
+
+       cloexec: preserve text vs. binary across dup_cloexec
+       * lib/cloexec.c (dup_cloexec) [W32]: Query and use translation
+       mode.
+       * modules/dup2-tests (Depends-on): Add binary-io.
+       * modules/cloexec-tests (Depends-on): Likewise.
+       * tests/test-dup2.c (setmode, is_mode): New helpers.
+       (main): Add tests that translation mode is preserved.
+       * tests/test-cloexec.c (setmode, is_mode, main): Likewise.
+       Reported by Bruno Haible.
+
+       mgetgroups: reduce duplicate listings
+       * lib/mgetgroups.c (mgetgroups): Reduce duplicates from the
+       resulting array.
+       * tests/test-chown.h (test_chown): Simplify client.
+       * tests/test-lchown.h (test_lchown): Likewise.
+
+2009-12-06  Bruno Haible  <bruno@clisp.org>
+
+       * lib/cloexec.c (dup_cloexec): Fix handling of _gl_register_dup return
+       value.
+
+2009-12-06  Bruno Haible  <bruno@clisp.org>
+
+       * lib/progname.c: Include stdio.h, stdlib.h.
+       (set_program_name): Reject a NULL argument.
+
+2009-12-05  Eric Blake  <ebb9@byu.net>
+
+       pipe2-safer: new module
+       * modules/pipe2-safer: New file.
+       * lib/unistd-safer.h (pipe2_safer): New prototype.
+       * lib/unistd--.h (pipe2): New wrapper.
+       * lib/pipe-safer.c (pipe2_safer): New function.
+       * modules/pipe (Depends-on): Add pipe2-safer.
+       * lib/pipe.c (create_pipe) [WIN32]: Let pipe2_safer do the work.
+
+       stdlib-safer: preserve cloexec flag for mkostemp[s]
+       * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer): Use new
+       fd_safer_flag.
+
+       unistd-safer: allow preservation of cloexec status via flag
+       * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): New
+       prototypes.
+       * lib/dup-safer.c (dup_safer_flag): New function.
+       * lib/fd-safer.c (fd_safer_flag): Likewise.
+       * modules/cloexec (configure.ac): Set witness.
+
+       test-dup2: enhance test
+       * modules/dup2-tests (Depends-on): Add cloexec.
+       * tests/test-dup2.c (main): Enhance test.
+
+       cloexec: add dup_cloexec
+       * lib/cloexec.h (dup_cloexec): New prototype.  Add copyright
+       header and comments.
+       * lib/cloexec.c (set_cloexec_flag): Add comments.
+       (dup_cloexec): New function, with mingw implementation borrowed
+       from...
+       * lib/w32spawn.h (dup_noinherit): ...here.
+       * modules/execute (Depends-on): Add cloexec.
+       * modules/pipe (Depends-on): Likewise.
+       * modules/cloexec (Depends-on): Add dup2.
+       * modules/cloexec-tests (Files): New file.
+       * tests/test-cloexec.c: Likewise.
+
+       test-xalloc-die: fix test for mingw
+       * modules/xalloc-die-tests (Files): Add tests/init.sh.
+       * tests/test-xalloc-die.sh: Rewrite to use init.sh.  Strip
+       directory and .exe suffix off argv[0] output.
+
+       test-fseeko: fix test for mingw
+       * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather
+       than undefining fseek, so test will pass on mingw.
+
+2009-12-05  Bruno Haible  <bruno@clisp.org>
+
+       * lib/progname.h (set_program_name): Clarify specification.
+       * lib/progname.c (set_program_name): Likewise.
+       Reported by Jim Meyering.
+
+2009-12-05  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: backslash-escape parens in default regexp
+       * top/maint.mk (news-check-regexp): Now that we're using grep -E,
+       backslash-escape the literal parentheses.
+
+       maint.mk: news-date-check: use grep -E
+       * top/maint.mk (today): Define a Make variable, not a...
+       (news-date-check): ...shell variable.
+       (news-date-regexp): Use the Make variable.
+       Use grep's -E option.  Change the failing diagnostic to mention
+       the variable, $(news-date-regexp).
+
+2009-12-04  Alfred M. Szmidt  <ams@gnu.org>
+
+       maintainer-makefile: allow customization of NEWS entry format
+       * top/maint.mk (news-date-regexp): New overridable variable.
+       (news-date-check): Use it.
+
+2009-12-04  Eric Blake  <ebb9@byu.net>
+
+       mgetgroups: add xgetgroups, and avoid ENOSYS failures
+       * lib/mgetgroups.h (xgetgroups): New prototype.
+       * lib/mgetgroups.c (xgetgroups): New wrapper.
+       (mgetgroups): Handle ENOSYS.
+       * modules/mgetgroups (Depends-on): Add realloc.
+       Reported by Scott Harrison <scott.gnu.2009@scottrix.co.uk>.
+
+       mgetgroups: avoid argument promotion issues with -1
+       * lib/mgetgroups.c (mgetgroups): A cast is required when checking
+       for invalid gid_t.
+       * tests/test-chown.h (getegid, test_chown): Likewise.
+       * tests/test-lchown.h (getegid, test_lchown): Likewise.
+
+2009-12-03  Paolo Bonzini  <bonzini@gnu.org>
+
+       exclude: Fix header file problems.
+       * lib/exclude.h: Add multiple inclusion guards and include stdbool.h.
+
+2009-12-01  Jim Meyering  <meyering@redhat.com>
+
+       fts: fts_open: do not let an empty string cause immediate failure
+       This is required in support of GNU rm, for which the command
+       "rm A '' B" must process and remove both A and B, in spite of
+       the empty string argument.
+       * lib/fts.c (fts_open): Do not let the presence of an empty string
+       cause fts_open to fail immediately.  Most fts-using tools must be
+       able to process all arguments, in order, and can be expected to
+       diagnose such arguments themselves.
+
+2009-11-30  Eric Blake  <ebb9@byu.net>
+
+       utimens: fix compilation error
+       * lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]:
+       Declare variable at right scope.
+
 2009-11-29  Jim Meyering  <meyering@redhat.com>
 
        bootstrap: handle perl-5.11's changed --version output