| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
Some implementation could add canaries after free failling the test.
* tests/test-explicit_bzero.c (test_heap): Handle implementations of
free() that overwrite the memory with canaries.
Signed-off-by: Bastien Roucariès <rouca@debian.org>
|
|
|
|
|
| |
* tests/test-explicit_bzero.c: New file.
* modules/explicit_bzero-tests: New file.
|
|
|
|
|
|
|
|
|
|
|
| |
Induce the changes by running this:
re='by perl'; g grep -l "$re"|xargs perl -pi -e "s/$re/by perl/"
* build-aux/announce-gen: Change "by perl" to "by perl".
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/prefix-gnulib-mk: Likewise.
* build-aux/update-copyright: Likewise.
* build-aux/useless-if-before-free: Likewise.
* tests/test-update-copyright.sh: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are split from fchmodat, fchownat. GNU Emacs needs the
POSIX-specified fchmodat, but not the gnulib-specified chmodat and
lchmodat. Split the latter two into a new module chmodat.
Similarly for fchownat. This the same basic idea for why statat
was split from fstatat on 2013-01-23.
* lib/chmodat.c, lib/openat.h (CHMODAT_INLINE):
Rename from FCHMODAT_INLINE. All uses changed.
* lib/chownat.c, lib/openat.h (CHOWNAT_INLINE):
Rename from FCHOWNAT_INLINE. All uses changed.
* lib/openat.h:
(chownat, lchownat): Define if GNULIB_CHOWNAT, not GNULIB_FCHOWNAT.
(chmodat, lchmodat): Define if GNULIB_CHMODAT, not GNULIB_FCHMODAT.
* modules/chmodat, modules/chownat, tests/test-chownat.c: New files.
* modules/fchmodat (Files:): Remove lib/fchmodat.c.
(configure.ac): Remove fchmodat module indicator.
(Makefile.am): Omit chmodat.c.
(Maintainer): Add self.
* modules/fchownat: Similarly, but for chown.
* tests/test-fchownat.c (BASE): Don't define if already defined.
(do_chown, do_lchown) [!TEST_CHOWNAT]: Test fchownat instead.
|
|
|
|
|
|
|
|
|
|
| |
Reported by Christian Biesinger in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00064.html>.
* lib/wctype.in.h (iswdigit, iswxdigit): Don't declare if the
corresponding module is not enabled.
* tests/test-wctype-h-c++.cc (iswdigit, iswxdigit): Don't check the
prototype if the corresponding module is not enabled.
|
|
|
|
| |
* tests/test-ptsname_r.c: Don't include null-ptr.h if we don't need it.
|
|
|
|
|
| |
* tests/test-lchmod.c: New file.
* modules/lchmod-tests: New file.
|
|
|
|
|
|
| |
* tests/test-fchmodat.c (BASE): New macro.
(main): Use it, to avoid conflicts with other unit tests. Verify that
fchmodat changed the file permission bits.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that
they act like chmod on non-symlinks.
* NEWS:
* doc/glibc-functions/lchmod.texi (lchmod):
* doc/posix-functions/fchmodat.texi (fchmodat):
Mention this.
* lib/fchmodat.c: Define __need_system_sys_stat_h before including
config.h, and undef it after including sys/stat.h the first time.
Include fcntl.h, stdio.h, unistd.h, intprops.h, and include
sys/stat.h a second time after defining orig_fchmodat.
(orig_fchmodat) [HAVE_FCHMODAT]: New function.
(fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug.
* lib/lchmod.c: New file.
* lib/sys_stat.in.h (fchmodat, lchmod):
Support replacing these functions.
* m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists,
test that AT_SYMLINK_NOFOLLOW works on non-symlinks.
* m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat.
Test that lchmod works on non-symlinks.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS):
Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0.
* modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd.
(Depends-on, configure.ac): Check REPLACE_FCHMODAT too.
* modules/lchmod (Files): Add lib/lchmod.c.
(Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd.
(configure.ac): Compile lchmod.c if needed.
(lib_SOURCES): Add lchmod.c.
* modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT
and REPLACE_LCHMOD.
* tests/test-fchmodat.c: Include fcntl.h, sys/stat.h.
(main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.
|
|
|
|
|
|
|
|
| |
* tests/test-canonicalize.c: Protect the inclusion of null-ptr.h
with the same guard as that used to protect usage of the null_ptr
function, so that one doesn't get a -Wunused warning
about the function being defined but unused.
* tests/test-canonicalize-lgpl.c: Likewise.
|
|
|
|
|
| |
* tests/test-omap-c++.cc: New file.
* modules/omap-c++-tests: New file.
|
|
|
|
|
| |
* tests/test-map-c++.cc: New file.
* modules/map-c++-tests: New file.
|
|
|
|
|
| |
* tests/test-oset-c++.cc: New file.
* modules/oset-c++-tests: New file.
|
|
|
|
|
| |
* tests/test-set-c++.cc: New file.
* modules/set-c++-tests: New file.
|
|
|
|
|
| |
* tests/test-list-c++.cc: New file.
* modules/list-c++-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isxdigit.c: New file, based on tests/test-iswxdigit.c.
* tests/test-c32isxdigit.sh: New file.
* modules/c32isxdigit-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isupper.c: New file.
* tests/test-c32isupper.sh: New file.
* modules/c32isupper-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isspace.c: New file.
* tests/test-c32isspace.sh: New file.
* modules/c32isspace-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32ispunct.c: New file.
* tests/test-c32ispunct.sh: New file.
* modules/c32ispunct-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isprint.c: New file.
* tests/test-c32isprint.sh: New file.
* modules/c32isprint-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32islower.c: New file.
* tests/test-c32islower.sh: New file.
* modules/c32islower-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isgraph.c: New file.
* tests/test-c32isgraph.sh: New file.
* modules/c32isgraph-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isdigit.c: New file, based on tests/test-iswdigit.c.
* tests/test-c32isdigit.sh: New file.
* modules/c32isdigit-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32iscntrl.c: New file.
* tests/test-c32iscntrl.sh: New file.
* modules/c32iscntrl-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isblank.c: New file.
* tests/test-c32isblank.sh: New file.
* modules/c32isblank-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isalpha.c: New file.
* tests/test-c32isalpha.sh: New file.
* modules/c32isalpha-tests: New file.
|
|
|
|
|
|
| |
* tests/test-c32isalnum.c: New file.
* tests/test-c32isalnum.sh: New file.
* modules/c32isalnum-tests: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/uchar.in.h (c32isalnum, c32isalpha, c32isblank, c32iscntrl,
c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace,
c32isupper, c32isxdigit): New declarations.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32ISALNUM,
GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
* modules/uchar (Makefile.am): Substitute GNULIB_C32ISALNUM,
GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
* tests/test-uchar-c++.cc: Test the signature of c32isalnum, c32isalpha,
c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
c32ispunct, c32isspace, c32isupper, c32isxdigit.
|
|
|
|
|
|
| |
* tests/test-iswxdigit.c: New file.
* tests/test-iswxdigit.sh: New file.
* modules/iswxdigit-tests: New file.
|
|
|
|
|
| |
* tests/test-iswdigit.c (for_character): If mbrtowc cannot convert the
byte sequence, return 0.
|
|
|
|
|
|
| |
* tests/test-iswdigit.c: New file.
* tests/test-iswdigit.sh: New file.
* modules/iswdigit-tests: New file.
|
|
|
|
|
|
|
|
|
|
|
| |
* MODULES.html.sh (func_all_modules): Add gc-pbkdf2.
* NEWS: Deprecated gc-pbkdf2-sha1 in favor of gc-pbkdf2.
* lib/gc-pbkdf2.c: New file.
* lib/gc-pbkdf2-sha1.c: Use new interface.
* lib/gc.h (GC_MAX_DIGEST_SIZE, gc_pbkdf2_hmac): Add.
* modules/crypto/gc-pbkdf2: New file.
* modules/crypto/gc-pbkdf2-tests: New file.
* tests/test-gc-pbkdf2.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-c32stombs.c: New file, based on tests/test-c32srtombs.c.
* tests/test-c32stombs-1.sh: New file, based on
tests/test-c32srtombs-1.sh.
* tests/test-c32stombs-2.sh: New file, based on
tests/test-c32srtombs-2.sh.
* tests/test-c32stombs-3.sh: New file, based on
tests/test-c32srtombs-3.sh.
* tests/test-c32stombs-4.sh: New file, based on
tests/test-c32srtombs-4.sh.
* modules/c32stombs-tests: New file, based on modules/c32srtombs-tests.
|
|
|
|
|
|
|
|
|
|
| |
* lib/uchar.in.h (c32stombs): New declaration.
* lib/c32stombs.c: New file.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32STOMBS.
* modules/uchar (Makefile.am): Substitute GNULIB_C32STOMBS.
* modules/c32stombs: New file.
* tests/test-uchar-c++.cc: Test the signature of c32stombs.
* doc/posix-functions/wcstombs.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-c32snrtombs.c: New file, based on tests/test-wcsnrtombs.c.
* tests/test-c32snrtombs-1.sh: New file, based on
tests/test-wcsnrtombs1.sh.
* tests/test-c32snrtombs-2.sh: New file, based on
tests/test-wcsnrtombs2.sh.
* tests/test-c32snrtombs-3.sh: New file, based on
tests/test-wcsnrtombs3.sh.
* tests/test-c32snrtombs-4.sh: New file, based on
tests/test-wcsnrtombs4.sh.
* modules/c32snrtombs-tests: New file, based on
modules/wcsnrtombs-tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/uchar.in.h (c32snrtombs): New declaration.
* lib/wcsnrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
INTERNAL_STATE, WCRTOMB.
* lib/wcsnrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
* lib/c32snrtombs.c: New file.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SNRTOMBS.
* modules/uchar (Makefile.am): Substitute GNULIB_C32SNRTOMBS.
* modules/c32snrtombs: New file.
* tests/test-uchar-c++.cc: Test the signature of c32snrtombs.
* doc/posix-functions/wcsnrtombs.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-c32srtombs.c: New file, based on tests/test-wcsrtombs.c.
* tests/test-c32srtombs-1.sh: New file, based on
tests/test-wcsrtombs1.sh.
* tests/test-c32srtombs-2.sh: New file, based on
tests/test-wcsrtombs2.sh.
* tests/test-c32srtombs-3.sh: New file, based on
tests/test-wcsrtombs3.sh.
* tests/test-c32srtombs-4.sh: New file, based on
tests/test-wcsrtombs4.sh.
* modules/c32srtombs-tests: New file, based on modules/wcsrtombs-tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/uchar.in.h (c32srtombs): New declaration.
* lib/wcsrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
INTERNAL_STATE, WCRTOMB.
* lib/wcsrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
* lib/c32srtombs.c: New file.
* lib/c32srtombs-state.c: New file, based on lib/wcsrtombs-state.c.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SRTOMBS.
* modules/uchar (Makefile.am): Substitute GNULIB_C32SRTOMBS.
* modules/c32srtombs: New file.
* tests/test-uchar-c++.cc: Test the signature of c32srtombs.
* doc/posix-functions/wcsrtombs.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-c32rtomb.c: New file, based on tests/test-wcrtomb.c.
* tests/test-c32rtomb.sh: New file, based on tests/test-wcrtomb.sh.
* tests/test-c32rtomb-w32.c: New file, based on
tests/test-wcrtomb-w32.c.
* tests/test-c32rtomb-w32-1.sh: New file, based on
tests/test-wcrtomb-w32-1.sh.
* tests/test-c32rtomb-w32-2.sh: New file, based on
tests/test-wcrtomb-w32-2.sh.
* tests/test-c32rtomb-w32-3.sh: New file, based on
tests/test-wcrtomb-w32-3.sh.
* tests/test-c32rtomb-w32-4.sh: New file, based on
tests/test-wcrtomb-w32-4.sh.
* tests/test-c32rtomb-w32-5.sh: New file, based on
tests/test-wcrtomb-w32-5.sh.
* tests/test-c32rtomb-w32-6.sh: New file, based on
tests/test-wcrtomb-w32-6.sh.
* tests/test-c32rtomb-w32-7.sh: New file, based on
tests/test-wcrtomb-w32-7.sh.
* modules/c32rtomb-tests: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/uchar.in.h (c32rtomb): New declaration.
* lib/c32rtomb.c: New file, based on lib/unistr/u8-uctomb-aux.c.
* m4/c32rtomb.m4: New file.
* m4/uchar.m4 (gl_UCHAR_H): Test whether c32rtomb is declared.
(gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32RTOMB, HAVE_C32RTOMB,
REPLACE_C32RTOMB.
* modules/uchar (Makefile.am): Substitute GNULIB_C32RTOMB,
HAVE_C32RTOMB, REPLACE_C32RTOMB.
* modules/c32rtomb: New file.
* tests/test-uchar-c++.cc: Test the signature of c32rtomb.
* doc/posix-functions/c32rtomb.texi: Document the new module.
* doc/posix-functions/wcrtomb.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
| |
sed's configure.ac specifies gl_DISABLE_THREADS, and that caused three
thread-using gnulib tests to fail. Add an #if-guarded exit (77) to each
of those, so they are skipped in this case.
* tests/test-nl_langinfo-mt.c (main): Exit 77 when threading is disabled.
* tests/test-setlocale_null-mt-all.c (main): Likewise.
* tests/test-setlocale_null-mt-one.c (main): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Jim Meyering in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00040.html>.
* lib/stdlib.in.h (GNULIB_defined_canonicalize_file_name): New macro.
(GNULIB_defined_ptsname_r): New macro.
* tests/test-canonicalize.c (_GL_ARG_NONNULL): Define to empty.
(main): Disable the NULL argument test if canonicalize_file_name does
not come from gnulib.
* tests/test-canonicalize-lgpl.c (_GL_ARG_NONNULL): Define to empty.
(main): Disable the NULL argument test if canonicalize_file_name does
not come from gnulib.
* tests/test-ptsname_r.c (_GL_ARG_NONNULL): Define to empty.
(test_errors): Disable the NULL argument test if ptsname_r does not come
from gnulib.
|
|
|
|
|
|
|
|
| |
* tests/test-update-copyright.sh: Restore the "-pi" options removed
on 2019-06-15. Without those, an internal preliminary test would
fail, causing this test always to be skipped.
Verify that the test is now run and passes via this:
./gnulib-tool --test --dir /tmp/x --with-tests update-copyright
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-mbstoc32s.c: New file, based on tests/test-mbsrtoc32s.c.
* tests/test-mbstoc32s-1.sh: New file, based on
tests/test-mbsrtoc32s-1.sh.
* tests/test-mbstoc32s-2.sh: New file, based on
tests/test-mbsrtoc32s-2.sh.
* tests/test-mbstoc32s-3.sh: New file, based on
tests/test-mbsrtoc32s-3.sh.
* tests/test-mbstoc32s-4.sh: New file, based on
tests/test-mbsrtoc32s-4.sh.
* modules/mbstoc32s-tests: New file, based on modules/mbsrtoc32s-tests.
|
|
|
|
|
|
|
|
|
|
| |
* lib/uchar.in.h (mbstoc32s): New declaration.
* lib/mbstoc32s.c: New file.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSTOC32S.
* modules/uchar (Makefile.am): Substitute GNULIB_MBSTOC32S.
* modules/mbstoc32s: New file.
* tests/test-uchar-c++.cc: Test the signature of mbstoc32s.
* doc/posix-functions/mbstowcs.texi: Mention the new module.
|
|
|
|
|
|
| |
* tests/test-mbrtoc32.c: Make signature consistent with uchar.in.h.
* tests/test-mbsrtoc32s.c: Likewise.
* tests/test-mbsnrtoc32s.c: Likewise.
|