| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-md5-buffer.c: New file, based on tests/test-md5.c.
* tests/test-md5-stream.c: Renamed from tests/test-md5.c.
(main): Remove md5-buffer tests.
* modules/crypto/md5-buffer-tests: New file, based on
modules/crypto/md5-tests.
* modules/crypto/md5-tests: Remove tests that are now in
modules/crypto/md5-buffer-tests. Test tests/test-md5-stream.c instead
of tests/test-md5.c.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/md5-stream.c: New file, extracted from lib/md5.c.
* lib/md5.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, md5_stream): Moved to md5-stream.c.
* lib/md5.h: Tweak.
* modules/crypto/md5 (Files): Add lib/md5-stream.c.
(configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
(Makefile.am): Arrange to compile md5-stream.c.
(Link): Mention $(LIB_CRYPTO).
|
|
|
|
|
|
|
| |
* tests/test-md4-buffer.c: Renamed from tests/test-md4.c.
* modules/crypto/md4-buffer-tests: Renamed from
modules/crypto/md4-tests. Test tests/test-md4-buffer.c instead of
tests/test-md4.c.
|
|
|
|
|
|
|
|
|
| |
* lib/md4-stream.c: New file, extracted from lib/md4.c.
* lib/md4.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, md4_stream): Moved to md4-stream.c.
* lib/md4.h: Reorder declarations.
* modules/crypto/md4-buffer: New file, based on modules/crypto/md4.
* modules/crypto/md4: Rewritten.
|
|
|
|
|
|
|
| |
* tests/test-md2-buffer.c: Renamed from tests/test-md2.c.
* modules/crypto/md2-buffer-tests: Renamed from
modules/crypto/md2-tests. Test tests/test-md2-buffer.c instead of
tests/test-md2.c.
|
|
|
|
|
|
|
|
|
| |
* lib/md2-stream.c: New file, extracted from lib/md2.c.
* lib/md2.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, md2_stream): Moved to md2-stream.c.
* lib/md2.h: Reorder declarations.
* modules/crypto/md2-buffer: New file, based on modules/crypto/md2.
* modules/crypto/md2: Rewritten.
|
|
|
|
|
|
|
|
|
|
| |
* lib/string.in.h (free, rpl_free): Consider GNULIB_FREE_POSIX variable.
* lib/wchar.in.h (free, rpl_free): Likewise.
* m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Require module
indicator variable initializations from the stdlib module.
* m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
* modules/string (Makefile.am): Substitute GNULIB_FREE_POSIX in string.h.
* modules/wchar (Makefile.am): Substitute GNULIB_FREE_POSIX in wchar.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the
system strerror_r returns char *, and HAVE_DECL_STRERROR_R to
decide whether it either does that or returns an integer. In the
former case, use the system strerror_r even on platforms like
Android API level 23 that don’t have __xpg_strerror_r; also
check for strerror_r failure just in case.
* m4/error.m4 (gl_PREREQ_ERROR):
* m4/strerror_r.m4 (gl_PREREQ_STRERROR_R):
Use system extensions on Android, to avoid mishandling strerror_r
on API level 23 and later.
* modules/error, modules/strerror_r-posix (configure.ac):
Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that
AC_REQUIREs are propagated out.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/string.in.h, lib/wchar.in.h:
(free): Declare by hand instead of including stdlib.h.
This avoids some namespace pollution. It should also avoid some
nested-include problems described by Lucy Phipps in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html
* modules/string, modules/wchar:
(Depends-on): Add stdlib, so that REPLACE_FREE has the right value.
(Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
|
| |
|
|
|
|
|
|
| |
* modules/crypto/md5-buffer, modules/crypto/sha1-buffer:
* modules/crypto/sha256-buffer, modules/crypto/sha512-buffer:
(Files): Add lib/af_alg.h, since the .c files include it.
|
|
|
|
|
|
|
|
| |
* tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>,
qemu.h.
(main): Under QEMU user-mode, allow fd 2 or fd 3 to be open.
* modules/spawn-pipe-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
|
|
|
|
|
|
|
| |
* tests/test-execute-child.c: Include <stdbool.h>, qemu.h.
(main): Under QEMU user-mode, allow fd 3 to be open.
* modules/execute-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-posix_spawn-fchdir.c: Include qemu.h.
(is_qemu): New variable.
(test): Under QEMU user-mode, don't expect that "pwd" produces the
result "/".
(main): Initialize is_qemu. Under QEMU user-mode, skip the relative file
name test.
* modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
|
|
|
|
|
|
|
|
| |
* modules/getcwd-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* tests/test-getcwd.c: Include qemu.h.
(test_long_name): Skip this test when running under QEMU user-mode.
(main): Consider return code 77 from test_long_name.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html
* lib/base32.c, lib/base64.c: Do not include verify.h,
and omit all uses of ‘assume’.
* modules/base32, modules/base64 (Depends-on): Remove verify.
* tests/test-base32.c, tests/test-base64.c:
Don’t pass out-of-range values to allocator,
as converting them to idx_t relies on implementation-defined
behavior that could trap.
|
|
|
|
| |
* modules/ialloc (License): Change from LGPL to LGPLv2+.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/qemu.h: New file.
* tests/test-get-rusage-as.c: Include qemu.h.
(main): Skip the test when running under QEMU.
* tests/test-get-rusage-data.c: Include qemu.h.
(main): Skip the test when running under QEMU.
* tests/test-printf-posix2.c: Include qemu.h.
(main): Return with code 77 when running under QEMU.
* tests/test-fprintf-posix2.c: Include qemu.h.
(main): Return with code 77 when running under QEMU.
* tests/test-fprintf-posix3.c: Include qemu.h.
(main): Return with code 79 when running under QEMU.
* tests/test-fprintf-posix3.sh: Skip the test when the return code was
79.
* tests/test-dprintf-posix2.c: Include qemu.h.
(main): Return with code 79 when running under QEMU. Use return code 80
instead of 78.
* tests/test-dprintf-posix2.sh: Skip the test when the return code was
79. Update for changed return code.
* modules/get-rusage-as-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/get-rusage-data-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/fprintf-posix-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/dprintf-posix-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h.
Include intprops.h, verify.h.
* lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8)
(base32_decode_ctx, base32_decode_alloc_ctx):
* lib/base32.h (struct base32_decode_context):
* lib/base64.c (base64_encode_fast, base64_encode)
(base64_encode_alloc, get_4, decode_4, base64_decode_ctx)
(base64_decode_alloc_ctx):
* lib/base64.h (struct base64_decode_context):
* tests/test-base32.c (main):
* tests/test-base64.c (main):
Prefer signed to unsigned integers.
* lib/base32.c (base32_encode_alloc):
* lib/base64.c (base64_encode_alloc):
Use simpler and more-direct check for overflow, removing a TODO.
* lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h.
* modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
|
|
|
|
|
|
|
|
|
| |
* modules/execute-tests (Makefile.am): Link test-execute-child without
using libtool.
* modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child
without using libtool.
* modules/system-quote-tests (Makefile.am): Link test-system-quote-child
without using libtool.
|
|
|
|
| |
* modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
|
|
|
|
|
|
| |
* modules/c-stack (Depends-on): Add inttypes, mempcpy.
mempcpy problem reported by Evan Miller in:
https://debbugs.gnu.org/50098#31
|
|
|
|
|
|
|
|
| |
* m4/sigsegv.m4: New file, based on modules/sigsegv.
* modules/sigsegv (Files): Add it.
(configure.ac): Require gl_SIGSEGV. Test gl_sigsegv_uses_libsigsegv
instead of with_libsigsegv and gl_cv_lib_sigsegv.
* m4/c-stack.m4 (gl_C_STACK): Likewise.
|
|
|
|
|
| |
* lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR.
* modules/relocatable-prog-wrapper (Depends-on): Add stdalign.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it’s not defined;
otherwise this file would not be compiled. Include limits.h,
stdalign.h, stdint.h, verify.h.
(rawmemchr): Prefer uintptr_t to unsigned long and to size_t when
it’s the better type. Verify that longword lacks padding. Use
alignof rather than sizeof when checking alignment. Simplify by
assuming C99 decl-after-statement, and by using multiplication
rather than repeated shifting and OR (modern compilers can
optimize the multiplication if needed). Avoid unnecessary casts.
Don’t assume CHAR_WIDTH is 8. Convert back and forth between void *
to suppress bogus GCC warnings about alignment. Omit a
duplicate assignment to char_ptr.
* modules/rawmemchr (Depends-on): Add stdalign, stdint, verify.
|
|
|
|
| |
* modules/fopen (Depends-on): Add close.
|
|
|
|
| |
* modules/fopen (Depends-on): Add fcntl-h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (aligned_alloc): For GCC >= 11: Declare also when the
platform already declares the function or when the module
'aligned_alloc' is not in use.
(calloc): For GCC >= 11: Declare nearly always.
(canonicalize_file_name): For GCC >= 11: Declare also when the platform
already declares the function or when the module 'canonicalize-lgpl' is
not in use.
(malloc, realloc): For GCC >= 11: Declare nearly always.
* lib/malloc.in.h: Remove redundant include.
(memalign): For GCC >= 11: Declare also when the platform already
declares the function or when the module 'memalign' is not in use.
* lib/string.in.h: Include <stdlib.h> always.
(strdup): For GCC >= 11: Declare also when the platform already declares
the function or when the module 'strdup' or 'strdup-posix' is not in
use.
* lib/wchar.in.h: Include <stdlib.h> always.
(wcsdup): For GCC >= 11: Declare also when the platform already declares
the function or when the module 'wcsdup' is not in use.
* modules/free-posix (Depends-on): Add string, wchar.
|
|
|
|
|
|
|
|
|
|
| |
* lib/xgetaname-impl.h: New file, based on lib/xgethostname.c.
* lib/xgethostname.c: Move implementation to lib/xgetaname-impl.h.
* lib/xgetdomainname.c: Include <config.h>. Include xgetaname-impl.h
instead of xgethostname.c.
* modules/xgethostname (Files): Add lib/xgetaname-impl.h.
* modules/xgetdomainname (Files): Likewise.
(Depends-on): Remove xgethostname. Add free-posix, xalloc.
|
|
|
|
|
|
| |
* lib/glob-libc.h, lib/glob.c: Merge changes from glibc 2.34.
The result should be copyable directly into glibc.
* modules/glob-h (glob-libc.gl.h): Also omit __THROWNL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use blessed-by-draft-standard way to test for [[__deprecated__]]
etc.; this is supported by GCC 11 and the fallback code should
work fine with GCC 10 and earlier, clang, etc.
* NEWS, doc/attribute.texi:
Mention that DEPRECATED etc. must now come first.
* lib/fflush.c, lib/unistr.in.h:
Do not include unused-parameter.h. All uses of _GL_UNUSED_PARAMETER
(after parameters) replaced by _GL_ATTRIBUTE_MAYBE_UNUSED (before
parameters). Although perhaps we need a shorter name for
_GL_ATTRIBUTE_MAYBE_UNUSED, that should probably be in
gnulib-common.m4, due to the ubiquity of this issue.
And perhaps the snippet/unused-parameter module should be marked
obsolete since it's no longer compatible with its old use.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro
_GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in
deciding whether to use C2x attributes like [[__deprecated__]].
(_GL_ATTRIBUTE_MAYBE_UNUSED): Fall back on _GL_ATTRIBUTE_UNUSED.
(_GL_ATTRIBUTE_UNUSED): New macro, for labels where C2x
[[maybe_unused]] do not work.
(_GL_UNUSED, _GL_UNUSED_LABEL): Use it.
* modules/fflush, modules/unistr/base (Depends-on):
Remove snippet/unused-parameter.
* modules/fflush (selinux/selinux.h, selinux/context.h)
(selinux/label.h): Do not use $(UNUSED_PARAMETER).
Remove useless chmod a-x.
|
|
|
|
|
|
|
|
|
|
|
| |
* modules/vasprintf (Notice): Remove.
* modules/xvasprintf (Notice): Remove.
* modules/xprintf (Notice): Remove.
* modules/error (Notice): Remove.
* modules/verror (Notice): Remove.
* modules/argp (Notice): Remove.
* modules/propername (Notice): Remove.
* lib/propername.h: Remove outdated comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, modernize while I’m at it.
* lib/posixtm.c: Include c-ctype.h, idx.h, intprops.h, verify.h
instead of stdlib.h.
(ISDIGIT): Remove. All uses replaced by c_isdigit.
(year, posix_time_parse): Prefer idx_t to size_t. Use assume
instead of abort.
(posixtime): Do not parse twice; once is enough. That way, we
needn’t worry about a bogus warning about strcpy overrunning a
buffer from GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64
when coreutils is configured with --enable-gcc-warnings.
* modules/posixtm (Depends-on): Add c-ctype, intprops, verify.
Remove stpcpy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In glibc 2.34 on Linux kernels where time_t is traditionally 32-bit,
defining _FILE_OFFSET_BITS=64 and _TIME_BITS=64 makes time_t 64-bit.
Apps must define both macros. Gnulib applications that use either
the largefile or the year2038 modules will want this behavior;
largefile because it deals with the off_t and ino_t components of
struct stat already, and so should also deal with time_t.
* NEWS, doc/largefile.texi, doc/posix-headers/time.texi:
Mention this.
* m4/largefile.m4: Override two macros even in Autoconf 2.70 and later.
(_AC_SYS_LARGEFILE_MACRO_VALUE): #undef $1 before #defining it, in
case some other Gnulib macro has #defined it.
(AC_SYS_LARGEFILE): Use AS_IF and AS_CASE to propagate AC_REQUIREs.
Invoke gl_YEAR2038_BODY if we need to set _FILE_OFFSET_BITS=64.
* m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): New macro.
(gl_YEAR2038_BODY): New macro, with gl_YEAR2038’s old body; this
macro is designed to be used directly instead of being
AC_REQUIREd. It takes an argument specifying whether 64-bit is
required. Set _TIME_BITS=64 if this makes a difference in time_t
width when setting _FILE_OFFSET_BITS=64. Do not warn about
32-bit time_t more than once.
* modules/largefile (Files): Add year2038.m4.
(Depends-on): Require gl_YEAR2038_EARLY.
|
|
|
|
|
|
|
|
|
| |
Add .m4 files needed for standalone relocatable-prog-wrapper, so
that ‘./gnulib-tool --test relocatable-prog-wrapper’ does not fail
with diagnostics like ‘configure.ac:63: error: possibly undefined
macro: gl_FUNC_MALLOC_POSIX’.
* modules/relocatable-prog-wrapper (Files): Add m4/free.m4,
m4/malloc.m4, m4/mempcpy.m4, m4/rawmemchr.m4, m4/realloc.m4.
|
|
|
|
| |
* modules/unitypes (configure.ac): Define _UC_RESTRICT through config.h.
|
|
|
|
|
| |
* modules/tsearch (License): Change to LGPLv2+.
* lib/tsearch.c: Update license notice.
|
|
|
|
|
|
| |
* modules/xnanosleep (Description): Improve.
* lib/xnanosleep.h: Add comment. Make includable from C++.
* lib/xnanosleep.c: Update comment.
|
|
|
|
|
|
| |
* modules/xfreopen (Description): Improve.
* lib/xfreopen.h: Add comments. Make includable from C++.
* lib/xfreopen.c: Update comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Paul Eggert.
* m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize
GNULIB_UNISTD_H_GETOPT variable.
* modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT
variable.
* modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix}
processing done by gnulib-tool since 2021-04-11.
* gnulib-tool: Revert last change.
* pygnulib/GLEmiter.py: Likewise.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* lib/ialloc.c, lib/ialloc.h, modules/ialloc: New files.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* modules/glob-h (Makefile.am): Also transform the '__restrict' macro.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* modules/git-merge-changelog (License): Change back to GPL.
* lib/git-merge-changelog.c: Use a GPLv3+ notice.
|