| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Reported by Eli Zaretskii <eliz@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00059.html>.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Test whether <bcrypt.h> exists.
* lib/getrandom.c: If <bcrypt.h> is not available, include <ntdef.h> and
define/declare BCRYPT_ALG_HANDLE, BCRYPT_USE_SYSTEM_PREFERRED_RNG,
BCryptGenRandom ourselves.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/unistd.in.h: Include <sys/random.h>, when needed for the
'getentropy' module.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
UNISTD_H_HAVE_SYS_RANDOM_H.
* m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Set
UNISTD_H_HAVE_SYS_RANDOM_H.
* modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_SYS_RANDOM_H.
* doc/glibc-functions/getentropy.texi: Document the macOS and Solaris
problem. List more platforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/getrandom.c: Include <errno.h>, <windows.h>, <bcrypt.h>,
<wincrypt.h>.
(CRYPT_VERIFY_CONTEXT): New macro.
(LoadLibrary, CryptAcquireContext): Redirect to the variant with suffix
'A'.
(GetProcAddress): New macro.
(BCryptGenRandomFuncType): New type.
(BCryptGenRandomFunc, initialized): New variables.
(initialize): New function.
(getrandom): On native Windows, use <bcrypt.h> API when available, and
<wincrypt.h> API as fallback.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set LIB_GETRANDOM.
* modules/getrandom (Link): New section.
* modules/getentropy (Link): Likewise.
* modules/getrandom-tests (Makefile.am): Link test-getrandom against
$(LIB_GETRANDOM).
* modules/getentropy-tests (Makefile.am): Link test-getentropy against
$(LIB_GETRANDOM).
* modules/sys_random-c++-tests (Makefile.am): Link test-sys_random-c++
against $(LIB_GETRANDOM).
* doc/glibc-functions/getrandom.texi: Mention the native Windows
support.
|
|
|
|
| |
* m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case Solaris.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00387.html>.
* lib/wchar.in.h (wmempcpy): New declaration.
* lib/wmempcpy.c: New file.
* m4/wmempcpy.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmempcpy is declared.
(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMPCPY, HAVE_WMEMPCPY.
* modules/wchar (Makefile.am): Substitute GNULIB_WMEMPCPY,
HAVE_WMEMPCPY.
* modules/wmempcpy: New file.
* tests/test-wchar-c++.cc: Check the signature of wmempcpy.
* doc/glibc-functions/wmempcpy.texi: Mention the new module.
* modules/mempcpy (Description): Fix typo.
|
|
|
|
| |
* m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case NetBSD and OpenBSD.
|
|
|
|
|
|
|
|
|
| |
* m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Include <sys/types.h> and
<stdlib.h> before <sys/random.h>.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
* lib/sys_random.in.h: On macOS, include <sys/types.h> and <stdlib.h>
first.
* doc/glibc-headers/sys_random.texi: Mention the macOS problem.
|
|
|
|
| |
* m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Fix value of REPLACE_GETRANDOM.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/sys_random.in.h (getrandom): Override if REPLACE_GETRANDOM is 1.
* lib/getrandom.c (getrandom): When the system has getrandom, just
invoke it.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set REPLACE_GETRANDOM if the
system's getrandom function's prototype is not the expected one.
* m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Initialize
REPLACE_GETRANDOM.
* modules/sys_random (Makefile.am): Substitute REPLACE_GETRANDOM.
* modules/getrandom (modules/getrandom): Consider REPLACE_GETRANDOM.
* tests/test-getrandom.c (main): Allow error EINVAL as an alternative to
EAGAIN.
* doc/glibc-functions/getrandom.texi: Mention the new module and the
Solaris problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/sys_random.in.h: Use the common idioms for overridable header
files.
* m4/sys_random_h.m4: New file.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Require gl_SYS_RANDOM_H_DEFAULTS.
* modules/sys_random: New file.
* modules/getrandom (Files): Remove lib/sys_random.in.h.
(Depends-on): Add sys_random.
(configure.ac): Use gl_SYS_RANDOM_MODULE_INDICATOR, not
gl_UNISTD_MODULE_INDICATOR.
(Makefile.am): Don't generate sys/random.h here.
* doc/glibc-headers/sys_random.texi: New file.
* doc/gnulib.texi: Include it.
|
|
|
|
|
|
|
|
|
|
| |
* lib/unistd.in.h (getrandom): Remove declaration.
* m4/unistd_h.m4 (gl_UNISTD_H): Don't test whether getrandom is
declared.
(gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_GETRANDOM,
HAVE_GETRANDOM.
* modules/unistd (Makefile.am): Don't substitute GNULIB_GETRANDOM,
HAVE_GETRANDOM.
|
| |
|
|
|
|
|
|
|
| |
* m4/gc-random.m4 (gl_GC_RANDOM): Set LIB_GC_RAMDOM.
* modules/crypto/gc-random (Link): New section.
* modules/crypto/gc-tests (Makefile.am): Link test-gc against
$(LIB_GC_RAMDOM).
|
|
|
|
|
|
|
|
|
|
| |
* modules/fnmatch (Depends-on): Add btowc, isblank, iswctype, wmemchr,
wmempcpy, mempcpy.
* lib/fnmatch.c: Assume that HAVE_WCTYPE_H, HAVE_BTOWC, HAVE_ISWCTYPE,
HAVE_WMEMCHR, HAVE_WMEMPCPY, HAVE_ISBLANK, HAVE_DECL_ISBLANK,
HAVE_MEMPCPY are all 1.
* m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't test for btowc, isblank,
iswctype, mempcpy, wmemchr, wmemcpy, wmempcpy, <wctype.h>.
|
|
|
|
|
|
|
|
|
| |
* m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Link, not only compile, the test
program.
* m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise.
* m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise.
* m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise.
* m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* MODULES.html.sh (func_all_modules):
* lib/unistd.in.h (getentropy, getrandom):
* m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS):
* modules/unistd (unistd.h):
Add support for getentropy, getrandom.
* doc/glibc-functions/getentropy.texi (getentropy):
* doc/glibc-functions/getrandom.texi (getrandom):
These are now fixed on some platforms.
* lib/getentropy.c, lib/getrandom.c, lib/sys_random.in.h:
* m4/getentropy.m4, m4/getrandom.m4:
* modules/getentropy, modules/getentropy-tests:
* modules/getrandom, modules/getrandom-tests:
* tests/test-getentropy.c, tests/test-getrandom.c:
New files.
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00119.html>.
* lib/fopen.c (rpl_fopen): When the fopen-gnu module is enabled and the
mode contains an 'x' or 'e' flag, use open() followed by fdopen().
* m4/fopen.m4 (gl_FUNC_FOPEN_GNU): New macro.
* modules/fopen-gnu: New file.
* doc/posix-functions/fopen.texi: Document the 'fopen-gnu' module.
|
|
|
|
|
|
|
| |
Uses code by Paul Eggert.
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Allow a calloc() implementation
to return more than SIZE_MAX bytes, but only without wrap-around bugs.
|
|
|
|
|
| |
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Split the AC_RUN_IFELSE into two
AC_RUN_IFELSE invocations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM,
gl_ISNANF_WORKS): Don't use __builtin_isnanf on clang versions that
don't have it.
* m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
gl_FUNC_ISNANL_WORKS): Don't use __builtin_isnanl on clang versions that
don't have it.
* lib/isnanf-nolibm.h (__has_builtin): New macro.
(isnanf): Don't use __builtin_isnanf on clang versions that don't have
it.
* lib/isnanl-nolibm.h (__has_builtin): New macro.
(isnanl): Don't use __builtin_isnanl on clang versions that don't have
it.
* lib/math.in.h (__has_builtin): New macro.
(isnanf): Don't use __builtin_isnanf on clang versions that don't have
it.
(isnanl): Don't use __builtin_isnanl on clang versions that don't have
it.
(isnan): Don't use the builtins on clang versions that don't have
__builtin_isnanf and __builtin_isnanl.
|
|
|
|
|
| |
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Mark the pointer variable as
'volatile', to defeat compiler optimizations.
|
|
|
|
|
|
| |
* m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Pass the
'long double' values by reference, with values taken from a statically
allocated array.
|
|
|
|
|
|
|
| |
Reported by Tim Rühsen in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
* m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Use NULL + 1, not NULL.
|
|
|
|
|
|
|
|
| |
Reported by Tim Rühsen in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
* m4/regex.m4 (gl_REGEX): Free compiled regexes and allocated registers
before returning with status 0.
|
|
|
|
|
|
|
| |
Reported by Tim Rühsen in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
* m4/glob.m4 (gl_GLOB): Free allocated memory before returning.
|
|
|
|
|
|
|
|
|
| |
Reported by Tim Rühsen in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
* m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Cast -1 to uid_t or git_t,
respectively.
|
|
|
|
| |
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Fix memleak.
|
|
|
|
|
|
| |
* build-aux/gcc-warning.spec:
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)):
Add GCC 10.1.0 warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Correct config.h comment.
* m4/wint_t.m4 (gt_TYPE_WINT_T): Correct indentation.
|
|
|
|
|
|
| |
* m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb without excluding
inline definitions.
* doc/posix-functions/c32rtomb.texi: Mention the Haiku problem.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* m4/bison.m4 (gl_PROG_BISON): Set ac_verc_fail to 'yes', not 'true'.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* m4/bison-i18n.m4 (BISON_I18N): Fix typo in the --help output.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
Some OS define memset_s instead of explicit_bzero. Use it.
* lib/explicit_bzero.c (__STDC_WANT_LIB_EXT1__): Define.
(explicit_bzero): Use memset_s when available.
* m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Test for memset_s.
Signed-off-by: Bastien Roucariès <rouca@debian.org>
|
|
|
|
|
|
|
|
|
|
| |
* m4/gettext.m4: Fix comments regarding the gettext library.
* m4/intl-thread-locale.m4: Likewise.
* m4/intlmacosx.m4: Likewise.
* m4/lcmessage.m4: Likewise.
* m4/nls.m4: Likewise.
* m4/po.m4: Likewise.
* m4/progtest.m4: Likewise.
|
| |
|
|
|
|
|
| |
* m4/acl.m4 (gl_FUNC_ACL): Test the value of gl_need_lib_has_acl
more reliably.
|
|
|
|
|
| |
* m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): Enable interpretation of
brackets in AC_COMPILE_IFELSE invocation.
|
|
|
|
|
|
|
|
|
|
| |
Reported by Adrian Bunk <bunk@stusta.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00011.html>.
* doc/posix-functions/*printf.texi: Document the problem with the %n
directive on some glibc systems.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Adjust
the cross-compilation guesses accordingly.
|
|
|
|
|
|
|
|
| |
Reported by Jens Rehsack <sno@netbsd.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00136.html>.
* m4/getloadavg.m4 (gl_GETLOADAVG): Don't look in /usr/local/lib when
cross-compiling.
|
|
|
|
|
| |
* lib/gc.h (gc_pbkdf2_hmac, gc_pbkdf2_sha1): Use 'restrict'.
* m4/gc.m4 (gl_GC): Require AC_C_RESTRICT.
|
|
|
|
|
| |
* lib/sm3.h (sm3_finish_ctx, sm3_read_ctx, sm3_buffer): Use 'restrict'.
* m4/sm3.m4 (gl_SM3): Require AC_C_RESTRICT.
|