summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* savedir: prefer idx_t for indexesPaul Eggert2021-06-112-8/+7
| | | | | * lib/savedir.c (streamsavedir): Prefer idx_t to size_t for indexes, using idx_t-related allocators.
* readutmp: prefer idx_t for indexesPaul Eggert2021-06-113-6/+9
| | | | | * lib/readutmp.c (read_utmp): Prefer idx_t to size_t for indexes, using idx_t-related allocators.
* readtokens: prefer idx_t for indexesPaul Eggert2021-06-113-8/+9
| | | | | * lib/readtokens.c (readtoken, readtokens): Prefer idx_t to size_t for indexes, using idx_t-related allocators.
* linebuffer: prefer idx_t for indexesPaul Eggert2021-06-114-5/+9
| | | | | | | | * lib/linebuffer.c (readlinebuffer_delim): * lib/linebuffer.h (struct linebuffer): Prefer idx_t to size_t for indexes, using idx_t-related allocators. * lib/linebuffer.h: Include idx.h. * modules/linebuffer (Depends-on): Add idx.
* getusershell: prefer idx_t for indexesPaul Eggert2021-06-112-5/+6
| | | | | * lib/getusershell.c (line_size, readname): Prefer idx_t to size_t for indexes, using idx_t-related allocators.
* exclude: prefer idx_t for most indexesPaul Eggert2021-06-112-16/+15
| | | | | | * lib/exclude.c (struct exclude_pattern, free_exclude_segment) (file_pattern_matches, add_exclude, add_exclude_fp): Prefer idx_t to size_t for indexes, and use idx_t-related allocators.
* dfa: prefer idx_t for indexesPaul Eggert2021-06-112-14/+16
| | | | | | * lib/dfa.c (mbs_to_wchar, state_index, dfaoptimize, dfaanalyze) (icatalloc, enlist, allocmust, dfamust): Prefer idx_t to size_t for indexes, and use idx_t-related allocators.
* dirname: prefer idx_t for some indexesPaul Eggert2021-06-113-23/+33
| | | | | | | | * lib/basename.c (base_name): Prefer idx_t to size_t for indexes, and use idx_t-related allocators. * lib/basename.c: Do not include xstrndup.h. (basename): Simplify by always using memcpy. * modules/dirname (Depends-on): Removbe xstrndup.
* xalloc: new idx_t-based allocatorsPaul Eggert2021-06-114-142/+212
| | | | | | | | | | | | | | | | This is for code that prefers to use idx_t for sizes. * lib/xalloc.h (ximalloc, xizalloc, xicalloc, xirealloc) (xireallocarray, ximemdup, ximemdup0) [GNULIB_XALLOC]: New decls. (x2nrealloc): Now just a decl, as the body is moved into xmalloc.c. * lib/xmalloc.c: Include ialloc.h. Rename some local parameters to be consistent with the .h files. (nonnull): New static function. (xmalloc, xcalloc): Simplify by using nonnull. (ximalloc, xirealloc, xireallocarray, xizalloc, xicalloc) (ximemdup, ximemdup0): New functions. (x2nrealloc): Moved here from xalloc.h. * modules/xalloc (Depends-on): Add ialloc.
* ialloc: new modulePaul Eggert2021-06-114-0/+129
| | | | * lib/ialloc.c, lib/ialloc.h, modules/ialloc: New files.
* exclude: improve wide-character hashingPaul Eggert2021-06-112-2/+9
| | | | | | * lib/exclude.c (string_hasher_ci): Take the modulo at the end rather than each time a wide character is retrieved; this should be more efficient and should hash better.
* Make message in last commit more precise.Bruno Haible2021-06-112-4/+11
| | | | | | | Suggested by Eric Blake. * gnulib-tool (func_emit_tests_Makefile_am): Add more precision to 'check-notice' message.
* Clarify where to report test failures from Gnulib tests.Bruno Haible2021-06-102-0/+14
| | | | | * gnulib-tool (func_emit_tests_Makefile_am): Emit a dependency of 'check-am' on 'check-notice' that prints a notice.
* Clarify that compiler warnings in the Gnulib tests can be ignored.Bruno Haible2021-06-103-7/+118
| | | | | | | | | | | * gnulib-tool (func_emit_tests_Makefile_am): Emit overrides for CFLAGS and CXXFLAGS. Emit a dependency of 'all' on 'all-notice' that prints a notice. (func_emit_initmacro_start): Add a second argument. If it is true, emit code to require gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS. (func_import, func_create_testdir): All callers updated. * m4/gnulib-common.m4 (gl_CC_ALLOW_WARNINGS, gl_CXX_ALLOW_WARNINGS): New macros.
* sigsegv tests: Hide a null pointer from the compiler's optimizations.Bruno Haible2021-06-092-1/+10
| | | | | | | | Patch by Paul Eggert. * tests/test-sigsegv-catch-stackoverflow2.c (null_pointer_to_volatile_int): New variable. (main): Use it.
* get_ppid_of: Add support for DragonFly BSD.Bruno Haible2021-06-082-2/+7
| | | | * lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.
* sigsegv: Document context type for DragonFly BSD.Bruno Haible2021-06-082-1/+7
| | | | | * lib/sigsegv.in.h (stackoverflow_context_t): On DragonFly BSD, it is a pointer to 'struct sigcontext'.
* dynarray, scratch_buffer: Fix VPATH builds (regression from yesterday).Bruno Haible2021-06-083-0/+15
| | | | | | | | | * modules/dynarray (configure.ac): Invoke AC_PROG_MKDIR_P. (Makefile.am): Create malloc/ directory before creating malloc/dynarray.gl.h and malloc/dynarray-skeleton.gl.h. * modules/scratch_buffer (configure.ac): Invoke AC_PROG_MKDIR_P. (Makefile.am): Create malloc/ directory before creating malloc/scratch_buffer.gl.h.
* ptsname_r: Add support for DragonFly BSD 6.0.Bruno Haible2021-06-083-2/+43
| | | | | * lib/ptsname_r.c (__ptsname_r): Add implementation for DragonFly BSD. * tests/test-ptsname_r.c (main): Treat Dragonfly BSD like Solaris.
* Avoid some test failures on DragonFly BSD 6.0.Bruno Haible2021-06-086-11/+36
| | | | | | | | | * tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that fail. * tests/test-c32isalpha.c (main): Likewise. * tests/test-c32islower.c (main): Likewise. * tests/test-c32isupper.c (main): Likewise. * tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris.
* mountlist: recognize fuse.portal as dummy file systemKamil Dudka2021-06-072-0/+7
| | | | | | | | | | | | | | This was originally proposed at: https://lists.gnu.org/archive/html/bug-gnulib/2021-02/msg00053.html As the full review might take some time, would it be possible to apply at least the part related to fuse.portal file systems? They started to cause problems recently: https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/1905623 https://github.com/muesli/duf/issues/35 https://bugzilla.redhat.com/1913358
* host-os: Add support for DragonFly BSD.Bruno Haible2021-06-072-1/+8
| | | | | * m4/host-os.m4 (gl_HOST_OS): On DragonFly BSD, set HOST_OPERATING_SYSTEM to "DragonFly BSD", not "Dragonfly".
* thread: Fix test link error on DragonFly BSD 6.0.Bruno Haible2021-06-073-22/+21
| | | | | | | * lib/glthread/thread.c (gl_thread_create): Moved to here... * lib/glthread/thread.h (gl_thread_create): ...from here. (_GLTHREAD_THREAD_INLINE): Remove macro. Remove _GL_INLINE_HEADER_BEGIN/END invocations.
* sigsegv: Avoid a gcc warning "declaration of 'sig' shadows a parameter".Bruno Haible2021-06-072-2/+10
| | | | | | | | Reported by Dmitry V. Levin <ldv@altlinux.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-06/msg00018.html>. * lib/sigsegv.c (sigsegv_handler): Use a different local variable name than 'sig'.
* Fix comments.Bruno Haible2021-06-072-2/+2
|
* scratch_buffer: Avoid conflict with prepr. macros owned by the system.Bruno Haible2021-06-073-3/+32
| | | | | | | | | * lib/scratch_buffer.h: Don't include <libc-config.h>. Define _GL_LIKELY, _GL_UNLIKELY. Include malloc/scratch_buffer.gl.h instead of malloc/scratch_buffer.h. * modules/scratch_buffer (Depends-on): Add builtin-expect. (Makefile.am): Arrange to create malloc/scratch_buffer.gl.h from malloc/scratch_buffer.h.
* dynarray: Avoid conflict with preprocessor macros owned by the system.Bruno Haible2021-06-073-3/+44
| | | | | | | | | | | * lib/dynarray.h: Don't include <libc-config.h>. Define _GL_LIKELY, _GL_UNLIKELY. Include malloc/dynarray.gl.h instead of malloc/dynarray.h. Include malloc/dynarray-skeleton.gl.h instead of malloc/dynarray-skeleton.c. * modules/dynarray (Depends-on): Add builtin-expect. (Makefile.am): Arrange to create malloc/dynarray.gl.h from malloc/dynarray.h and malloc/dynarray-skeleton.gl.h from malloc/dynarray-skeleton.c.
* glob-h: Make last patch work with Solaris 10 cc.Bruno Haible2021-06-071-0/+1
| | | | * modules/glob-h (Makefile.am): Also transform the '__restrict' macro.
* glob-h: Avoid conflict with preprocessor macros owned by the system.Bruno Haible2021-06-074-10/+32
| | | | | | | | | | This fixes a compilation error on DragonFly BSD 6.0. * lib/glob.in.h: Don't include <libc-config.h>. Don't define __USE_GNU. Include glob-libc.gl.h instead of glob-libc.h. * modules/glob-h (Makefile.am): Arrange to create glob-libc.gl.h from glob-libc.h. * lib/libc-config.h: Add comment.
* ChangeLog: add entries for the last three commitsDmitry V. Levin2021-06-061-0/+14
|
* regex-tests: test for regressions fixed by the previous commitDmitry V. Levin2021-06-061-0/+4
| | | | | | | * tests/test-regex.c (tests): Add test cases for *+ and ** regressions fixed by the previous commit. Link: https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00134.html
* regex: fix match with possessive quantifierEgor Ignatov2021-06-061-1/+1
| | | | | | | | | | | Fix behaviour introduced in 70b673eb7, where regexps with possessive quantifier("*+") didn't match. * lib/regexec.c (set_regs): Pop if CUR_NODE has already been checked only when we have a fail stack. Fixes: 70b673eb7 ("regex: fix longstanding backref match bug") Signed-off-by: Egor Ignatov <egori@altlinux.org>
* regex-tests: remove incorrect commentDmitry V. Levin2021-06-061-1/+0
| | | | | | | | * tests/test-regex.c (tests): Remove the comment saying that some tests are not used. That comment was copied along with tests from glibc where some of these tests are commented out. Fixes: 70b673eb7 ("regex: fix longstanding backref match bug")
* lib-symbol-visibility: Make configure check work for newer GCC.Bruno Haible2021-06-052-1/+13
| | | | | | | | Reported by Ozkan Sezer <sezeroz@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00117.html>. * m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each declaration in the test program.
* vasnprintf: Don't leak memory when memory allocation fails.Bruno Haible2021-06-052-9/+26
| | | | | | | | | Found by Coverity. Reported by Mike Fabian <mfabian@redhat.com> in <https://lists.gnu.org/archive/html/bug-libunistring/2021-06/msg00000.html>. * lib/vasnprintf.c (VASNPRINTF): In places where a local variable points to heap-allocated storage, free that storage before doing 'goto out_of_memory;'.
* gnulib-tool: Stop doing license notice replacements.Bruno Haible2021-06-046-105/+43
| | | | | | | | | | | * gnulib-tool: Don't document --more-symlinks and --more-hardlinks any more. (do_copyrights): Remove variable. (func_import): Don't perform license updates on imported files any more. * pygnulib/GLInfo.py: Don't document --more-symlinks any more. * doc/gnulib-intro.texi (Copyright): Document the new situation. * doc/gnulib.texi (Module description): Likewise. * NEWS: Mention the change.
* git-merge-changelog: Fix license.Bruno Haible2021-06-043-6/+12
| | | | | * modules/git-merge-changelog (License): Change back to GPL. * lib/git-merge-changelog.c: Use a GPLv3+ notice.
* Put GPLv3+ notices in source files where appropriate.Bruno Haible2021-06-0451-70/+790
| | | | | | * lib/*.{h,c}: Use GPLv3+ notice whenever the module description says so. * build-aux/pmccabe.css: Likewise.
* Put LGPLv3+ notices in source files where appropriate.Bruno Haible2021-06-04300-2056/+2229
| | | | | * lib/**.{h,c}: Use LGPLv3+ notice whenever the module description says so.
* Put "LGPLv3+ or GPLv2+" notices in source files where appropriate.Bruno Haible2021-06-04575-4794/+9499
| | | | | * lib/**.{h,c,gperf}: Use "LGPLv3+ or GPLv2+" notice whenever the module description says so.
* Generate correct license notices in libunistring files.Bruno Haible2021-06-04173-114/+4185
| | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (output_library_license, output_tests_license): New functions. (output_predicate, output_category, output_combclass, output_bidi_category, output_decimal_digit, output_digit, output_numeric, output_mirror, output_joining_type, output_joining_group, output_scripts, output_scripts_byname, output_blocks, output_ident_category, output_lbrk_tables, output_wbrk_tables, output_gbp_table, output_decomposition_tables, output_composition_tables, output_simple_mapping, output_casing_rules): Invoke output_library_license. (output_predicate_test, output_decimal_digit_test, output_digit_test, output_numeric_test, output_joining_type_test, output_joining_group_test, output_gbp_test, output_simple_mapping_test): Invoke output_tests_license. * lib/uni*/*.h, lib/uni*/*.gperf: Regenerated. * tests/uni*/*.h: Likewise.
* Generate correct license notices in libunistring files.Bruno Haible2021-06-043-8/+67
| | | | | | * lib/uniname/gen-uninames.lisp (main): Emit a copyright and license notice. * lib/uniname/uninames.h: Regenerated.
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-04725-5154/+5703
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* Put "unlimited" notices in source files where appropriate.Bruno Haible2021-06-042-12/+9
| | | | | * build-aux/prefix-gnulib-mk: Use "unlimited" notice, since the module description says so.
* Put public domain notices in source files where appropriate.Bruno Haible2021-06-045-18/+18
| | | | * lib/{alloca.c,atexit.c,memmove.c}: Use public domain notice.
* Revamp check-copyright script.Bruno Haible2021-06-042-27/+151
| | | | | | | | * check-copyright: Search only the first 50 lines of each file. Recognize 'LGPLv3+ or GPLv2+', 'unlimited', and 'public domain' license notices. For files that are part of several modules, consider the weakest among the licenses. Allocate more room for the first output column.
* gnupload, git-merge-changelog: Fix module description.Bruno Haible2021-06-045-5/+15
| | | | | | | | * gnulib-tool (func_import, func_create_testdir): Treat 'GPLv2+ build tool' like 'GPLed build tool'. * pygnulib/GLImport.py (prepare): Likewise. * modules/gnupload (License): Change to 'GPLv2+ build tool'. * modules/git-merge-changelog (License): Change to GPLv2+.
* New directory with license notices.Bruno Haible2021-06-0411-0/+216
| | | | * etc/license-notices/*: New files.
* reallocarray-tests: port to weird platformsPaul Eggert2021-05-302-3/+11
| | | | | | * tests/test-reallocarray.c (main): Don’t assume that PTRDIFF_MAX / 2 + 1 <= SIZE_MAX. POSIX allows platforms where this isn’t true, though I don’t know of any examples.
* dfa, etc.: prefer xreallocarray to older namePaul Eggert2021-05-304-12/+22
| | | | | | | | | * lib/dfa.c (addtok_mb, realloc_trans_if_necessary, enlist): * lib/readtokens.c (readtokens): * tests/uninorm/test-u32-normalize-big.c: (read_normalization_test_file): Prefer xreallocarray to the equivalent xnrealloc. The newer name follows the glibc lead of ‘reallocarray’.