summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* uchar: Work around incorrect char16_t, char32_t types on Haiku 2020.Bruno Haible2020-05-095-30/+113
| | | | | | | | | | | | | | * lib/uchar.in.h (char16_t): Define as macro if GNULIB_OVERRIDES_CHAR16_T. (char32_t): Define as macro if GNULIB_OVERRIDES_CHAR32_T. * m4/uchar.m4 (gl_TYPE_CHAR16_T, gl_TYPE_CHAR32_T): New macros. (gl_UCHAR_H): Invoke them. (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_OVERRIDES_CHAR16_T, GNULIB_OVERRIDES_CHAR32_T. * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Require gl_TYPE_CHAR32_T and test GNULIB_OVERRIDES_CHAR32_T. * modules/uchar (Makefile.am): Substitute GNULIB_OVERRIDES_CHAR16_T, GNULIB_OVERRIDES_CHAR32_T.
* Macro tweaks.Bruno Haible2020-05-093-8/+14
| | | | | * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Correct config.h comment. * m4/wint_t.m4 (gt_TYPE_WINT_T): Correct indentation.
* c32rtomb: Avoid compilation failure on Haiku.Bruno Haible2020-05-093-3/+27
| | | | | | * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb without excluding inline definitions. * doc/posix-functions/c32rtomb.texi: Mention the Haiku problem.
* mbrtoc32: Avoid compilation failure on Haiku.Bruno Haible2020-05-093-5/+35
| | | | | | | * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): New macro. (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Use it instead of AC_CHECK_FUNCS_ONCE. * doc/posix-functions/mbrtoc32.texi: Mention the Haiku problem.
* limits-h: Define LONG_BIT correctly on Haiku/x86_64.Bruno Haible2020-05-092-3/+25
| | | | * lib/limits.in.h: Define and test _GL_ALREADY_INCLUDING_LIMITS_H.
* list: Update documentation.Bruno Haible2020-05-082-0/+62
| | | | | | | | Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00062.html>. * doc/containers.texi (Container data types): Document the new list operations and their complexity.
* ignore-value tests: Use module 'attribute'.Bruno Haible2020-05-084-14/+17
| | | | | | | * m4/gnulib-common.m4 (gl_COMMON_BODY): Fix a typo. * tests/test-ignore-value.c: Include attribute.h. (_GL_ATTRIBUTE_RETURN_CHECK): Remove macro. Use NODISCARD instead. * modules/ignore-value-tests (Depends-on): Add attribute.
* uniname/uniname: Use module 'attribute'.Bruno Haible2020-05-085-16/+15
| | | | | | | * lib/uniname/gen-uninames.lisp: Emit a reference to ATTRIBUTE_PACKED. * lib/uniname/uninames.h: Regenerated. * lib/uniname/uniname.c: Include attribute.h. * modules/uniname/uniname (Depends-on): Add attribute.
* c32rtomb: Use module 'attribute'.Bruno Haible2020-05-083-8/+9
| | | | | | * lib/c32rtomb.c: Include attribute.h. (FALLTHROUGH): Remove macro. * modules/c32rtomb (Depends-on): Add attribute.
* xsize: Use module 'attribute'.Bruno Haible2020-05-083-16/+14
| | | | | * lib/xsize.h: Include attribute.h. Use ATTRIBUTE_PURE. * modules/xsize (Depends-on): Add attribute.
* autoupdateKarl Berry2020-05-081-27/+27
|
* * m4/gnulib-common.m4 (gl_COMMON_BODY): Minor style fixes.Paul Eggert2020-05-062-3/+5
|
* * lib/attribute.h: Minor style fixes.Paul Eggert2020-05-062-6/+8
|
* Fix version-etc glitch on OpenIndianaPaul Eggert2020-05-062-10/+9
| | | | | | | Problem reported by Mats Erik Andersson in: https://lists.gnu.org/r/bug-gnulib/2020-05/msg00067.html * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Remove defn that now clashes with gnulib-common.h. All uses changed.
* autoupdateKarl Berry2020-05-061-4/+20
|
* autoupdateKarl Berry2020-05-051-2/+2
|
* attribute: add _GL_ATTRIBUTE_RETURNS_NONNULLPaul Eggert2020-05-033-0/+8
|
* attribute: minor fixupsPaul Eggert2020-05-033-4/+5
| | | | | Suggested by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2020-05/msg00049.html
* attribute: new modulePaul Eggert2020-05-0355-359/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies use of GCC and C2X attributes like ‘deprecated’. * MODULES.html.sh: Add attribute. * doc/attribute.texi, lib/attribute.h, modules/attribute: New files. * doc/gnulib.texi (Particular Modules): Add Attributes. * lib/backupfile.c, lib/fnmatch.c, lib/freopen-safer.c: * lib/mbrtoc32.c, lib/mbrtowc.c, lib/nstrftime.c, lib/quotearg.c: * lib/savewd.c, lib/unistr/u8-uctomb-aux.c, lib/unistr/u8-uctomb.c: * lib/vasnprintf.c: Include attribute.h, and let it define FALLTHROUGH. * lib/bitset/base.h, lib/c-stack.c (__attribute__): Remove macro. * lib/bitset/base.h (ATTRIBUTE_UNUSED): Define in terms of _GL_ATTRIBUTE_MAYBE_UNUSED, for forwards compatibility to C2X. * lib/dfa.c (FALLTHROUGH): Define consistently with gl_COMMON_BODY. This is a copy since Gawk doesn’t use Gnulib. * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Remove definition that is incompatible with gl_COMMON_BODY’s. All uses changed. * lib/fts.c: Include attribte.h, for FALLTHROUGH. Keep the existing FALLTHROUGH definition since Glibc might use it, and it does no harm to Gnulib’s FALLTHROUGH. * lib/fts_.h, lib/inttostr.h: (__GNUC_PREREQ): Remove; no longer needed. (__attribute_warn_unused_result__): Remove. All uses replaced by _GL_ATTRIBUTE_NODISCARD. * lib/gl_list.h, lib/gl_map.h, lib/gl_omap.h, lib/gl_oset.h: * lib/gl_set.h: Prefer _GL_ATTRIBUTE_NODISCARD to an ifdeffed __attribute__ ((__warn_unused_result__)), for forward compatibility to C2X. * lib/hash.h (_GL_ATTRIBUTE_WUR): Remove. All uses replaced by _GL_ATTRIBUTE_NODISCARD. (_GL_ATTRIBUTE_DEPRECATED): Remove, since gl_COMMON_BODY defines it. * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Remove. All uses replaced by gl_COMMON_BODY’s implementation, which has a slightly different signature. * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Remove. All uses replaced by _GL_ATTRIBUTE_NODISCARD. * lib/unused-parameter.h (_GL_UNUSED_PARAMETER): Define in terms of _GL_ATTRIBUTE_MAYBE_UNUSED. No doubt all uses should be replaced, at some point. * m4/gnulib-common.m4 (_GL_GNUC_PREREQ): New macro. (_Noreturn): Use it. (_GL_HAS_ATTRIBUTE, _GL_ATTRIBUTE_ALLOC_SIZE) (_GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL) (_GL_ATTRIBUTE_COLD) (_GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR) (_GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE) (_GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT) (_GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MAY_ALIAS) (_GL_ATTRIBUTE_MAYBE_UNUSED) (_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE) (_GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_NONSTRING) (_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE) (_GL_ATTRIBUTE_SENTINEL): New macros. * modules/backup-rename, modules/backupfile, modules/c-vasnprintf: * modules/fnmatch, modules/freopen-safer, modules/fts: * modules/mbrtoc32, modules/mbrtowc, modules/nstrftime: * modules/quotearg, modules/savewd: * modules/unistdio/u16-u16-vasnprintf: * modules/unistdio/u16-vasnprintf: * modules/unistdio/u32-u32-vasnprintf: * modules/unistdio/u32-vasnprintf: * modules/unistdio/u8-u8-vasnprintf: * modules/unistdio/u8-vasnprintf: * modules/unistdio/ulc-vasnprintf: * modules/unistr/u8-uctomb, modules/vasnprintf: (Depends-on:): Add attribute module.
* bison: Fix today's commit.Bruno Haible2020-05-032-4/+9
| | | | * m4/bison.m4 (gl_PROG_BISON): Set ac_verc_fail to 'yes', not 'true'.
* list-c++: Add get_first, get_last, set_first, set_last operations.Bruno Haible2020-05-033-7/+35
| | | | | | * lib/gl_list.hh (class gl_List): Add methods get_first, get_last, set_first, set_last. * lib/gl_list.h: Tweak comments.
* bison: rely on bison's %require to check a version requirementAkim Demaille2020-05-033-15/+32
| | | | | | | | | | | See https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00021.html. * m4/bison.m4 (gl_PROG_BISON): Let bison itself decide if it it recent enough of not. So far it is the only know Yacc tool that supports '%require'. Other yaccs will actually even choke on seeing the -o option after the input file name. * m4/parse-datetime.m4: Simplify gl_PROG_BISON invocation.
* list: Add get_first, get_last, set_first, set_last operations.Bruno Haible2020-05-023-0/+93
| | | | | | * lib/gl_list.h (gl_list_get_first, gl_list_get_last, gl_list_nx_set_first, gl_list_nx_set_last): New functions. * lib/gl_xlist.h (gl_list_set_first, gl_list_set_last): New functions.
* list: Remove redundant code for remove_first and remove_last operations.Bruno Haible2020-05-0213-203/+28
| | | | | | | | | | | | | | | | | * lib/gl_list.h (struct gl_list_implementation): Remove fields remove_first, remove_last. (gl_list_remove_first, gl_list_remove_last): Implement in a generic way. * lib/gl_array_list.c: Revert last change. * lib/gl_carray_list.c: Likewise. * lib/gl_anylinked_list2.h: Likewise. * lib/gl_linked_list.c: Likewise. * lib/gl_linkedhash_list.c: Likewise. * lib/gl_anytree_list2.h: Likewise. * lib/gl_avltree_list.c: Likewise. * lib/gl_avltreehash_list.c: Likewise. * lib/gl_rbtree_list.c: Likewise. * lib/gl_rbtreehash_list.c: Likewise. * lib/gl_sublist.c: Likewise.
* autoupdateKarl Berry2020-05-021-21/+24
|
* bison-i18n: Fix typo in last commit.Bruno Haible2020-05-021-1/+1
| | | | * m4/bison-i18n.m4 (BISON_I18N): Fix typo in the --help output.
* bison-i18n: Add support for cross-compilation.Bruno Haible2020-05-022-11/+37
| | | | | | | | | | | Reported by Hongxu Jia <hongxu.jia@windriver.com> in <https://lists.gnu.org/archive/html/bison-patches/2016-02/msg00000.html> via Akim Demaille <akim@lrde.epita.fr>. * m4/bison-i18n.m4 (BISON_I18N): Accept a configure option --with-bison-prefix=PREFIX and use it to determine BISON_LOCALEDIR. Don't use bison's --print-localedir option when cross-compiling. Also, fix an error message and a comment.
* list: Add remove_first and remove_last operations.Bruno Haible2020-05-0222-40/+461
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00092.html>. * lib/gl_list.h (struct gl_list_implementation): Add fields remove_first, remove_last. (gl_list_remove_first, gl_list_remove_last): New functions. * lib/gl_array_list.c (gl_array_remove_first, gl_array_remove_last): New functions, based on gl_array_remove_at. (gl_array_list_implementation): Implement the new operations. * lib/gl_carray_list.c (gl_carray_remove_first, gl_carray_remove_last): New functions, based on gl_carray_remove_at. (gl_carray_list_implementation): Implement the new operations. * lib/gl_anylinked_list2.h (gl_linked_remove_first, gl_linked_remove_last): New functions, based on gl_linked_remove_at. * lib/gl_linked_list.c (gl_linked_list_implementation): Implement the new operations. * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Likewise. * lib/gl_anytree_list2.h (gl_tree_remove_first, gl_tree_remove_last): New functions, based on gl_tree_remove_at. * lib/gl_avltree_list.c (gl_avltree_list_implementation): Implement the new operations. * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation): Likewise. * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Likewise. * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Likewise. * lib/gl_sublist.c (gl_sublist_remove_first, gl_sublist_remove_last): New functions, based on gl_sublist_remove_at. (gl_sublist_list_implementation): Implement the new operations. * lib/gl_list.hh (class gl_List): Add methods remove_first, remove_last. * tests/test-array_list.c (main): Test also gl_list_remove_first and gl_list_remove_last. * tests/test-avltree_list.c (main): Likewise. * tests/test-avltreehash_list.c (main): Likewise. * tests/test-carray_list.c (main): Likewise. * tests/test-linked_list.c (main): Likewise. * tests/test-linkedhash_list.c (main): Likewise. * tests/test-rbtree_list.c (main): Likewise. * tests/test-rbtreehash_list.c (main): Likewise.
* parse-datetime: Fix a build failure with an older bison version.Bruno Haible2020-05-012-3/+11
| | | | | * modules/parse-datetime (Makefile.am): Don't do the post-processing of parse-datetime.tab.c if a suitable version of bison was not found.
* bison: New module.Bruno Haible2020-05-015-26/+99
| | | | | | | | | * m4/bison.m4 (gl_PROG_BISON): New macro, extracted from m4/parse-datetime.m4. * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Invoke gl_PROG_BISON. * modules/bison: New file. * modules/parse-datetime (Files): Remove m4/bison.m4. (Depends-on): Add bison.
* Add poke to users.txtJose E. Marchesi2020-05-012-0/+6
|
* posix_spawn_file_actions_addfchdir tests: Enhance test.Bruno Haible2020-04-283-3/+35
| | | | | | | | | * tests/test-posix_spawn5.c: Include findprog.h. (test): New function, extracted from main. (main): Invoke it. Also, invoke it with a program name such as "bin/pwd". * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add findprog.
* posix_spawn_file_actions_addchdir tests: Enhance test.Bruno Haible2020-04-283-3/+35
| | | | | | | | | * tests/test-posix_spawn4.c: Include findprog.h. (test): New function, extracted from main. (main): Invoke it. Also, invoke it with a program name such as "bin/pwd". * modules/posix_spawn_file_actions_addchdir-tests (Depends-on): Add findprog.
* posix_spawn_file_actions_destroy: Fix a crash (bug from 2019-06-10).Bruno Haible2020-04-282-1/+9
| | | | | * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Don't access elements of the wrong union member.
* getdate: Remove deprecated module.Bruno Haible2020-04-285-31/+15
| | | | | | | * modules/getdate: Remove file. * doc/getdate.texi: Remove file. * lib/getdate.h: Remove file. * NEWS: Mention the removal.
* realloc: Remove deprecated module.Bruno Haible2020-04-283-31/+9
| | | | | * modules/realloc: Remove file. * NEWS: Mention the removal.
* calloc: Remove deprecated module.Bruno Haible2020-04-283-26/+9
| | | | | * modules/calloc: Remove file. * NEWS: Mention the removal.
* malloc: Remove deprecated module.Bruno Haible2020-04-283-31/+9
| | | | | * modules/malloc: Remove file. * NEWS: Mention the removal.
* fnmatch-posix: Remove deprecated module.Bruno Haible2020-04-284-31/+10
| | | | | | * modules/fnmatch-posix: Remove file. * MODULES.html.sh (Enhancements for POSIX:2008 functions): Update. * NEWS: Mention the removal.
* pipe: Remove deprecated module.Bruno Haible2020-04-284-28/+13
| | | | | | * modules/pipe: Remove file. * lib/pipe.h: Remove file. * NEWS: Mention the removal.
* getopt: Remove deprecated module.Bruno Haible2020-04-283-26/+11
| | | | | * modules/getopt: Remove file. * NEWS: Mention the removal.
* remove-dest-slash: Remove deprecated module.Bruno Haible2020-04-284-27/+11
| | | | | | | * modules/rename-dest-slash: Remove file. * MODULES.html.sh (Compatibility checks for POSIX:2008 functions): Update. * NEWS: Mention the removal.
* unictype/bidicategory-*: Remove deprecated modules.Bruno Haible2020-04-288-135/+20
| | | | | | | | | | * modules/unictype/bidicategory-all: Remove file. * modules/unictype/bidicategory-byname: Remove file. * modules/unictype/bidicategory-name: Remove file. * modules/unictype/bidicategory-of: Remove file. * modules/unictype/bidicategory-test: Remove file. * MODULES.html.sh (Unicode string functions): Update. * NEWS: Mention the removals.
* autoupdateKarl Berry2020-04-262-3/+10
|
* Tune fts for FTS_LOGICAL+FTS_NOSTATPaul Eggert2020-04-252-3/+14
| | | | | | | | | From a suggestion by Askar Safin in: https://lists.gnu.org/r/bug-gnulib/2020-04/msg00074.html * lib/fts.c (fts_build): If file types are known, optimize FTS_LOGICAL+FTS_NOSTAT for non-symlinks and non-directories the same way that we already optimize FTS_PHYSICAL+FTS_NOSTAT for non-directories.
* autoupdateKarl Berry2020-04-252-4/+4
|
* vasnprintf: Add support for printing wide characters using escapes.Bruno Haible2020-04-192-28/+304
| | | | | | | | | | * lib/vasnprintf.c (ENABLE_WCHAR_FALLBACK): Document optional macro. (wctomb_fallback): New function. (local_wctomb): New function. (local_wcrtomb): New function or macro. (MAX_ROOM_NEEDED): Adjust estimate for %lc. (VASNPRINTF): Simplify %ls code by use of local_wcrtomb. Add code for %lc.
* fts: remove NOSTAT_LEAF_OPTIMIZATIONPaul Eggert2020-04-153-53/+25
| | | | | | | | | | | | | | | | It caused ‘find’ and ‘du’ to dump core, and it was useful only for obsolescent Linux filesystems anyway. Problem reported in: https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html Quite possibly there is still a serious underlying fts bug with tight-loop-check and mutating file systems, but if so this patch should cause the bug to be triggered less often. * lib/fts.c (enum leaf_optimization): Remove NOSTAT_LEAF_OPTIMIZATION, as it’s problematic. (S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed. (leaf_optimization): Remove special cases for ReiserFS and XFS. (fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code. * lib/fts_.h (struct _ftsent.fts_n_dirs_remaining): Remove. All uses removed.
* explicit_bzero: Improve code style.Bastien Roucariès2020-04-142-1/+6
| | | | * lib/explicit_bzero.c (explicit_bzero): Use '\0' instead of 0.
* explicit_bzero: On native Windows, use SecureZeroMemory().Bastien Roucariès2020-04-142-1/+14
| | | | | | | * lib/explicit_bzero.c: Include <windows.h>. (explicit_bzero): On native Windows, use SecureZeroMemory. Signed-off-by: Bastien Roucariès <rouca@debian.org>