summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* autoupdateKarl Berry2020-11-111-4/+17
|
* mgetgroups: avoid warning with clangPádraig Brady2020-11-092-1/+7
| | | | | * lib/mgetgroups.c: Xcode-12.1 identifies as GCC 4.2.1, so disable -Wpointer-sign for all clang versions.
* gnulib-tool: Fix link error with 'version-etc' (regression 2020-05-29).Bruno Haible2020-11-073-9/+20
| | | | | | | | | Reported by Simon Josefsson in <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00032.html>. * gnulib-tool (func_emit_tests_Makefile_am): Add libtests.a to LDADD a third time, after the second occurrence of ../lib/libgnu.a. * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
* autoupdateKarl Berry2020-11-072-113/+113
|
* tests: pacify Sun C 5.9Paul Eggert2020-11-044-11/+9
| | | | | | | | | | Without these changes, Sun C 5.9 (2009/11/22) issues complaints like “"test-nl_langinfo-mt.c", line 75: warning: statement not reached”. * tests/test-nl_langinfo-mt.c (thread1_func, thread2_func) (thread3_func, thread4_func, thread5_func, thread6_func, threadN_func): * tests/test-setlocale_null-mt-all.c (thread1_func, thread2_func): * tests/test-setlocale_null-mt-one.c (thread1_func, thread2_func): Remove unreachable ‘return NULL;’s.
* tests: port better to XLC 12.01Paul Eggert2020-11-043-2/+14
| | | | | | | | | | * tests/test-argmatch.c (CHECK): Do not use -1 as a subscript, even in code that is not executed, as IBM XLC 12.01 complains "The subscript -1 is less than zero." * tests/test-stdint.c (verify_width): Pass an (unused) 3rd argument to _GL_VERIFY, as ISO C requires. Otherwise, IBM XLC 12.01 complains "The invocation of macro _GL_VERIFY contains fewer arguments than are required by the macro definition."
* aligned-malloc: Use fixes from the new modules.Bruno Haible2020-11-042-1/+11
| | | | | | * modules/aligned-malloc (Depends-on): Add posix_memalign, aligned_alloc, memalign. (configure.ac): Use AC_CHECK_FUNCS_ONCE.
* aligned_alloc: Add tests.Bruno Haible2020-11-043-0/+113
| | | | | * tests/test-aligned_alloc.c: New file. * modules/aligned_alloc-tests: New file.
* aligned_alloc: New module.Bruno Haible2020-11-049-3/+162
| | | | | | | | | | | | | | | * lib/stdlib.in.h (aligned_alloc): New declaration. * lib/aligned_alloc.c: New file. * m4/aligned_alloc.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether aligned_alloc is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ALIGNED_ALLOC, HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC. * modules/stdlib (Makefile.am): Substitute GNULIB_ALIGNED_ALLOC, HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC. * modules/aligned_alloc: New file. * tests/test-stdlib-c++.cc (aligned_alloc): Check signature. * doc/posix-functions/aligned_alloc.texi: Mention the new module and the AIX bug.
* posix_memalign: Add tests.Bruno Haible2020-11-043-0/+119
| | | | | * tests/test-posix_memalign.c: New file. * modules/posix_memalign-tests: New file.
* posix_memalign: New module.Bruno Haible2020-11-049-5/+178
| | | | | | | | | | | | | | | * lib/stdlib.in.h (posix_memalign): New declaration. * lib/posix_memalign.c: New file. * m4/posix_memalign.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether posix_memalign is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_POSIX_MEMALIGN, HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN. * modules/stdlib (Makefile.am): Substitute GNULIB_POSIX_MEMALIGN, HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN. * modules/posix_memalign: New file. * tests/test-stdlib-c++.cc (posix_memalign): Check signature. * doc/posix-functions/posix_memalign.texi: Mention the new module and the OpenBSD bug.
* memalign: Add tests.Bruno Haible2020-11-043-0/+121
| | | | | * tests/test-memalign.c: New file. * modules/memalign-tests: New file.
* memalign: New module.Bruno Haible2020-11-043-1/+29
| | | | | * modules/memalign: New file. * doc/glibc-functions/memalign.texi: Mention the new module.
* verify tests: Fix crash with GCC (regression 2020-11-02).Bruno Haible2020-11-032-1/+6
| | | | * tests/test-verify.c (main): Fix initializer of s.
* mountlist: recognize more file system types as remotePádraig Brady2020-11-032-2/+17
| | | | | | | | | | | | | | | | | | Sync "remote" file systems from stat.c in coreutils. Note we only consider file systems that do not use host:resource mount source. I.e. those that don't generally use a colon when mounting, as that case is already considered. Searching for "<fstype> /etc/fstab" was informative for identifying these. The full list of "remote" file systems in coreutils is currently: acfs afs ceph cifs coda fhgfs fuseblk fusectl gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs Note also we do not include virtual machine file systems, as even though they're remote to the current kernel, they are generally not distributed to separate hosts. * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered "remote" file systems from stat.c in coreutils.
* verify tests: Fix -Wuninitialized warning (regression 2020-10-30)Bernhard Voelker2020-11-032-1/+7
| | | | | * tests/test-verify.c (main): Initialize state variable. Reported by Bruno Haible for GCC 5.4.0.
* dfa.h: support inclusion from C++Paul Eggert2020-11-022-0/+19
| | | | | * lib/dfa.h: Allow multiple inclusion, and inclusion from C++ code. The latter was suggested by Arnold Robbins.
* ssfmalloc tests: Portability to Linux/PowerPC and Linux/SPARC.Bruno Haible2020-11-022-3/+11
| | | | | * tests/test-ssfmalloc.c: Include <limits.h>. (PAGESIZE_MAX): Set to 65536 on Linux/PowerPC.
* verify tests: Fix compilation error with MSVC (regression 2020-10-30).Bruno Haible2020-11-022-1/+6
| | | | * tests/test-verify.c (test_assume_noreturn): Fix declaration.
* dfa-tests: test for today's invalid-merge fixJim Meyering2020-11-013-0/+40
| | | | | | * tests/test-dfa-invalid-merge.sh: New file. * modules/dfa-tests (Files): Add it. (TESTS): Add it.
* dfa: retain sequences of similar nodes in optimizationNorihiro Tanaka2020-11-012-1/+14
| | | | | | | | | | | DFA was merging similar nodes when it should not. For example, it would convert a+a+a to a+a. Now, a sequence of similar nodes is not merged. Problem reported by Gonzalo Padrino in https://bugs.gnu.org/44351 * lib/dfa.c (merge_nfa_state): Skip the follow for repetition in optimization.
* test-dfa-match-aux.c: accept EREs, not BREsJim Meyering2020-11-012-1/+7
| | | | | * tests/test-dfa-match-aux.c (main): Specify RE_SYNTAX_EGREP, not RE_SYNTAX_GREP, so tests can use ERE syntax rather than BRE.
* verify tests: avoid -Wmissing-declarations warningsBernhard Voelker2020-10-312-6/+24
| | | | | | | | | * tests/test-verify.c (test_assume_expressions): Add declaration. (test_assume_optimization): Likewise. (test_assume_noreturn): Likewise. (main): Move down after all other definitions. While at it, also call test_assume_expressions and test_assume_optimization as a runtime check.
* sys_stat: update comments for S_IRWXUGO, S_IXUGOPaul Eggert2020-10-262-2/+10
| | | | | | | * lib/sys_stat.in.h (S_IXUGO, S_IRWXUGO): Update comments. Perhaps these macros should be removed, as they’re not in either POSIX or GNU. They could be moved to stat-macros.h, which would be cleaner in some sense.
* ssfmalloc tests: Small tweaks.Bruno Haible2020-10-252-1/+30
| | | | | | | * tests/test-ssfmalloc.c: Add comments. (alloc_pages): Don't require PROT_EXEC bits. (block_sizes): Add more small sizes, for better coverage of ssfmalloc-bitmap.h.
* ssfmalloc tests: Portability to Minix.Bruno Haible2020-10-253-2/+9
| | | | | | * modules/ssfmalloc-tests (Files): Add m4/mmap-anon.m4. (configure.ac): Invoke gl_FUNC_MMAP_ANON. * m4/mmap-anon.m4: Update comment.
* ssfmalloc: Portability to AIX.Bruno Haible2020-10-253-0/+11
| | | | | | | * modules/ssfmalloc (Include): Add ssfmalloc.h. (Link): New section. * modules/ssfmalloc-tests (Makefile.am): Link test-ssfmalloc with $(LIBTHREAD).
* ssfmalloc: Portability to Cygwin.Bruno Haible2020-10-253-0/+24
| | | | | | | * lib/ssfmalloc.h: Add parameter PAGESIZE_MAX. (pg_offset_t): Define depending on PAGESIZE_MAX. * tests/test-ssfmalloc.c: Undefine PAGESIZE. (PAGESIZE_MAX): New macro.
* ssfmalloc: Fix buffer overrun in bitmap search.Bruno Haible2020-10-252-124/+130
| | | | | * lib/ssfmalloc-bitmap.h (find_first_packet_set): Don't access the word *words_end.
* autoupdateKarl Berry2020-10-251-6/+18
|
* doc: mention ‘restrict’ and C++Paul Eggert2020-10-242-0/+8
| | | | | * doc/gnulib-readme.texi (C99 features assumed): Document that ‘restrict’ should be avoided in C++ code.
* autoupdateKarl Berry2020-10-221-1/+2
|
* selinux-at, selinux-h: port to SELinux 3.1Bernhard Voelker2020-10-195-33/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new release finally deprecated the typedef 'security_context_t', see <https://github.com/SELinuxProject/selinux/commit/7a124ca275>. Use the simpler 'char *' instead. * lib/getfilecon.c (getfilecon): Adjust type of context parameter. (lgetfilecon): Likewise. (fgetfilecon): Likewise. (map_to_failure): Likewise. (rpl_getfilecon): Likewise. (rpl_lgetfilecon): Likewise. (rpl_fgetfilecon): Likewise. * lib/se-selinux.in.h (security_context_t): Remove typedef. (getcon): Adjust type of context parameter. (freecon): Likewise. (getfscreatecon): Likewise. (setfscreatecon): Likewise. (matchpathcon): Likewise. (getfilecon): Likewise. (lgetfilecon): Likewise. (fgetfilecon): Likewise. (setfilecon): Likewise. (lsetfilecon): Likewise. (fsetfilecon): Likewise. (security_check_context): Likewise. (security_check_context_raw): Likewise. (setexeccon): Likewise. (security_compute_create): Likewise. * lib/selinux-at.c (getfileconat): Likewise. (lgetfileconat): Likewise. (setfileconat): Likewise. (lsetfileconat): Likewise. * lib/selinux-at.h: Likewise.
* xalloc-die: Fix link error with Solaris cc (regression 2020-07-27).Bruno Haible2020-10-204-7/+34
| | | | | | | | | * lib/xalloc.h (xalloc_die): Don't declare if GNULIB_XALLOC_DIE is 0. (xmalloc, xzalloc, xcalloc, xrealloc, x2realloc, xmemdup, xstrdup, XMALLOC, XNMALLOC, XZALLOC, XCALLOC, xnmalloc, xnrealloc, x2nrealloc, xcharalloc): Don't declare/define if GNULIB_XALLOC is 0. * modules/xalloc (configure.ac): Define GNULIB_XALLOC. * modules/xalloc-die (configure.ac): Define GNULIB_XALLOC_DIE.
* ssfmalloc: Add tests.Bruno Haible2020-10-193-0/+335
| | | | | * tests/test-ssfmalloc.c: New file. * modules/ssfmalloc-tests: New file.
* ssfmalloc: New module.Bruno Haible2020-10-194-0/+1601
| | | | | | * lib/ssfmalloc.h: New file. * lib/ssfmalloc-bitmap.h: New file. * modules/ssfmalloc: New file.
* wchar: Fix configure test result on some versions of AIX.Bruno Haible2020-10-182-26/+39
| | | | | | | | Reported by Clément Chigot <clement.chigot@atos.net> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00115.html>. * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Execute the test only on glibc systems.
* time: Fix warning about asctime when asctime is not used.Bruno Haible2020-10-182-3/+9
| | | | | * lib/time.in.h (asctime_r, ctime, ctime_r): Fix _GL_WARN_ON_USE invocation.
* *-list, *-oset, *-omap: Avoid a GCC warning (regression 2020-10-10).Bruno Haible2020-10-189-8/+21
| | | | | | | | | | | | * lib/gl_anylinked_list2.h (gl_linked_iterator_free): Remove '_GL_ATTRIBUTE_CONST'. * lib/gl_anytree_list2.h (gl_tree_iterator_free): Likewise. * lib/gl_anytree_omap.h (gl_tree_iterator_free): Likewise. * lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise. * lib/gl_array_list.c (gl_array_iterator_free): Likewise. * lib/gl_array_omap.c (gl_array_iterator_free): Likewise. * lib/gl_array_oset.c (gl_array_iterator_free): Likewise. * lib/gl_carray_list.c (gl_carray_iterator_free): Likewise.
* obstack: Fix a clang warning.Bruno Haible2020-10-182-1/+6
| | | | * lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__.
* hash: Rename hash_delete to hash_remove.Bruno Haible2020-10-176-8/+34
| | | | | | | | | | * lib/hash.h (hash_remove): Renamed from hash_delete. (hash_delete): New declaration. * lib/hash.c (hash_remove): Renamed from hash_delete. (hash_delete): New function. * tests/test-hash.c (main): Update. * lib/fts-cycle.c (leave_dir): Likewise. * NEWS: Mention the change.
* hash, xhash: Make usable from C++.Bruno Haible2020-10-172-0/+13
| | | | * lib/hash.h: Add extern "C".
* hash, xhash: Move comments to the .h file.Bruno Haible2020-10-174-171/+206
| | | | | | * lib/hash.c: Move comments meant for the user from here... * lib/xhash.c: ... and here... * lib/hash.h: ... to here.
* autoupdateKarl Berry2020-10-161-7/+34
|
* autoupdateKarl Berry2020-10-151-1/+1
|
* autoupdateKarl Berry2020-10-141-2/+8
|
* Don't declare an intention to modify the return value of strerror.Philipp Klaus Krause2020-10-142-1/+7
| | | | | * tests/test-perror2.c (main): Assign the return value of strerror to a 'const char *' variable.
* *printf: Avoid "expanded before it was required" warning.Bruno Haible2020-10-122-2/+8
| | | | | * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99): Define through AC_DEFUN_ONCE.
* getprogname: Add support for OpenServer 6 and UnixWare 7.Benji Wiebe2020-10-112-0/+44
| | | | | * lib/getprogname.c: Include <fcntl.h>, <stdlib.h>, <string.h>. (getprogname): On OpenServer6 and UnixWare, read /proc/<pid>/cmdline.
* tests: Avoid a name clash on UnixWare.Bruno Haible2020-10-112-0/+14
| | | | | | | Reported by Tim Rice <tim@multitalents.net> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00025.html>. * tests/nap.h (nap): Define as gl_nap on OpenServer and UnixWare.