| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* lib/string.in.h (memrchr, strchrnul, strcasestr): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
|
|
|
|
|
|
|
|
|
| |
* lib/string.in.h: On Android as well, include <strings.h>.
* m4/ffsl.m4 (gl_FUNC_FFSL): Use a specific link test instead of
AC_CHECK_FUNCS_ONCE.
* m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
* doc/glibc-functions/ffsl.texi: Mention Android problems.
* doc/glibc-functions/ffsll.texi: Likewise.
|
|
|
|
|
|
|
|
|
| |
* lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is
not declared.
* m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared.
(gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW.
* modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW.
* doc/glibc-functions/putw.texi: Update regarding Android.
|
|
|
|
|
|
|
|
| |
* lib/stdio.in.h (getw): Don't declare in the C++ namespace if getw is
not declared.
* m4/stdio_h.m4 (gl_STDIO_H): Test whether getw is declared.
(gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_GETW.
* modules/stdio (Makefile.am): Substitute HAVE_DECL_GETW.
|
|
|
|
|
|
|
| |
* lib/sigsegv.in.h: For Android, don't include <ucontext.h> and don't
reference ucontext_t.
* lib/sigsegv.c (SIGSEGV_FAULT_): For Android, use a plain POSIX fault
handler (cf. libsigsegv/src/fault-posix.h).
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Kenton Groombridge in:
https://lists.gnu.org/archive/html/bug-gawk/2022-12/msg00010.html
On x86-64, Clang 15 gets confused by a call (X ? dfaerror :
dfawarn) (Y) and generates the wrong code, presumably because
dfaerror is _Noreturn and dfawarn is not.
* lib/dfa.c (parse_bracket_exp): Reword to have one call for
dfaerror, the other for dfawarn.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/verify.h (_GL_VERIFY): Port MSVC hack back to C99.
Problem found when testing bleeding-edge gzip on IBM XL C for AIX,
V12.1 (5765-J02, 5725-C72), which complained ‘"malloca.c", line
42.56: 1506-041 (E) The invocation of macro _Static_assert
contains fewer arguments than are required by the macro
definition.’ This diagnostic is valid because C99 requires
that if you #define _Static_assert(R, ...) you must call
_Static_assert with at least two arguments. I found a similar
problem with Sun C 5.9 SunOS_sparc Patch 124867-12 2009/11/22.
|
|
|
|
|
|
| |
* lib/file-has-acl.c (acl_nfs4_nontrivial): Fix off-by-one
error when rounding WHOLEN up to next multiple of 4.
Pacify GCC 12.2.1 -Wcast-align.
|
|
|
|
|
|
|
|
| |
* m4/gnulib-common.m4 (gl_COMMON_BODY): In _GL_ATTRIBUTE_DEALLOC_FREE,
with GNU C++, cast the 'free' function.
* lib/string.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): With GNU C++, cast the
'free' function.
* lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): Likewise.
|
|
|
|
|
|
|
| |
C23 says <stdnoreturn.h> is obsolescent, so deprecate the
stdnoreturn module. I don't think it was being used anyway
as it had too many problems.
* modules/stdnoreturn: Mark as obsolete.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a link failure with emacsclient on GNU/Linux. This
program wants file_has_acl but none of the other ACL primitives,
so it doesn’t link acl-internal.o; this way it doesn’t need to
link with -lacl. While I was at it I reviewed the recent changes,
fixed some unlikely overflow bugs, and adjusted to GNU style.
* doc/acl-nfsv4.txt: Remove. Its contents are now in a
comment in lib/file-has-acl.c.
* lib/acl-internal.c, lib/acl-internal.h: Move recent changes
relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that
there is no trouble linking programs that need only file_has_acl.
* lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from
lib/acl-internal.c, so that we needn't link -lacl in
programs that want only file_has_acl, such as emacsclient.
Do not assume a char buffer is aligned for uint32_t.
Check more carefully for buffer read overrun.
Allow up to 6 ACEs, since other code does; but check
that they’re distinct. Avoid integer overflow.
Use memcmp rather than strncmp to compare memory blocks.
(file_has_acl): Preserve initial errno instead of setting to 0.
Allocate a bit more room for trivial ACL buffer.
Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).
|
|
|
|
|
|
|
|
|
| |
* lib/acl-internal.h (acl_nfs4_nontrivial): New declaration.
* lib/acl-internal.c (acl_nfs4_nontrivial): New function.
* lib/file-has-acl.c: Include <arpa/inet.h>.
(XATTR_NAME_NFSV4_ACL, TRIVIAL_NFS4_ACL_MAX_LENGTH): New macros.
(file_has_acl): Test for NFSv4 ACLs.
* doc/acl-nfsv4.txt: New file.
|
|
|
|
|
|
|
|
| |
C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
* NEWS, doc/posix-functions/asctime.texi:
* doc/posix-functions/ctime.texi: Mention this.
* lib/time.in.h (ctime): Deprecate any ctime replacement.
* modules/ctime: Now obsolete.
|
|
|
|
|
|
|
|
|
| |
* lib/memset_explicit.c (memset_explicit):
Remove special case for C==0 and MS-Windows. The code isn’t
needed for correctness and it’s more trouble than it’s worth as it
prevents this module from being used with GNU Emacs, which wants
to port to MS-Windows versions so old that they lack
SecureZeroMemory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes things in what I hope is a better way than the
fd-only approach proposed by Kamil Dudka here:
https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00079.html
https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00080.html
* lib/fts.c (GNULIB_FTS_DEBUG): Rename from FTS_DEBUG,
to avoid collision with coreutils symbol.
Do not include <stdint.h> (not needed, since we include <stdint.h>)
or "getcwdat.h" (no longer exists).
(fd_ring_check, fd_ring_print): Add forward decls.
(struct devino): New type.
(PRINT_DEVINO): New macro.
(getdevino): New static function.
(fd_ring_print): Do nothing if not debugging.
(fd_ring_print, fd_ring_check): Use getdevino instead of getcwdat.
The output isn’t as good, but at least it compiles and runs.
|
|
|
|
|
|
|
|
| |
This shouldn’t affect anything; it’s merely a refactoring.
* lib/verify.h (_GL_HAVE__STATIC_ASSERT1): Require
__STDC_VERSION__ to be at least 202311, instead of at least
202000. The latter number was put in in 2019 because we didn’t
yet know C23’s __STDC_VERSION__ value.
|
|
|
|
|
|
|
|
|
|
|
| |
I hope this fixes a Luke Dashjr coreutils bug report about ext4
ramdisks; see “9.1: du Aborted (corrupt filesystem)”
<https://debbugs.gnu.org/59821>.
* lib/fts.c (fts_build): Fix two bugs. First, fts_stat was being
called without checking its return value, causing a later abort.
Second, there was a race between opening a directory and statting
it, fixed by using fstat on the file descriptor rather than
fstatat on the directory name.
|
|
|
|
| |
* lib/fts.c (fts_build): Refactor to omit goto.
|
|
|
|
| |
* lib/fts.c (ISSET): Refactor to clarify boolean usage.
|
|
|
|
|
|
|
|
| |
As voted for in Nov 2022 by the BIPM:
https://www.bipm.org/en/cgpm-2022/resolution-3
* lib/human.c: Add Ronna (10^27), and Quetta (10^30) to the prefix list.
* lib/xstrtol.c (__xstrtol): Likewise.
|
|
|
|
|
|
|
|
| |
* lib/explicit_bzero.c (explicit_bzero):
Simplify by just calling memset_explicit.
* m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Remove.
All uses removed.
* modules/explicit_bzero (Depends-on): Add memset_explicit.
|
|
|
|
|
|
|
| |
* lib/read-file.c (fread_file, read_file):
Use memset_explicit instead of explicit_bzero.
* modules/read-file (Depends-on): Depend on memset_explicit
instead of on explicit_bzero.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/memset_explicit.texi, lib/memset_explicit.c:
* m4/memset_explicit.m4, modules/memset_explicit:
* modules/memset_explicit-tests, tests/test-memset_explicit.c:
New files.
* lib/string.in.h (memset_explict): New decl.
* m4/string_h.m4 (gl_STRING_H, gl_STRING_H_REQUIRE_DEFAULTS)
(gl_STRING_H_DEFAULTS):
* modules/string (string.h):
Support memset_explicit.
|
|
|
|
|
| |
* lib/explicit_bzero.c (explicit_bzero) [__GNUC__ && !__clang__]:
Use __asm__ instead of asm.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Mike Fulton <fultonm@ca.ibm.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00130.html>.
* gnulib-tool: Use symbolic signal names.
* posix-modules: Likewise.
* MODULES.html.sh: Likewise.
* build-aux/bootstrap (prepare_GNULIB_SRCDIR): Likewise.
* build-aux/csharpcomp.sh.in: Likewise.
* build-aux/gnu-web-doc-update: Likewise.
* top/autogen.sh: Likewise.
* top/bootstrap-funclib.sh: Likewise.
* top/gitsub.sh: Likewise.
* lib/t-idcache: Likewise.
* tests/havelib/rpath-1: Likewise.
* tests/havelib/rpath-2_a: Likewise.
* tests/havelib/rpath-2_b: Likewise.
* tests/havelib/rpath-3_a: Likewise.
* tests/havelib/rpath-3_b: Likewise.
* tests/init.sh: Likewise.
* tests/test-binary-io.sh: Likewise.
* tests/test-c-stack.sh: Likewise.
* tests/test-c-stack2.sh: Likewise.
* tests/test-dprintf-posix.sh: Likewise.
* tests/test-fpending.sh: Likewise.
* tests/test-fprintf-posix.sh: Likewise.
* tests/test-lseek.sh: Likewise.
* tests/test-printf-posix.sh: Likewise.
* tests/test-select-in.sh: Likewise.
* tests/test-select-out.sh: Likewise.
* tests/test-sigpipe.sh: Likewise.
* tests/test-tsearch.sh: Likewise.
* tests/test-update-copyright.sh: Likewise.
* tests/test-vdprintf-posix.sh: Likewise.
* tests/test-vfprintf-posix.sh: Likewise.
* tests/test-vprintf-posix.sh: Likewise.
* tests/test-xprintf-posix.sh: Likewise.
* tests/uniwidth/test-uc_width2.sh: Likewise.
|
|
|
|
|
|
|
| |
Suggested by Minsoo Choo in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00114.html>.
* lib/spawni.c: Ignore -Wdeprecated-declarations warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Karl Berry in:
https://lists.gnu.org/r/bug-gnulib/2022-11/msg00004.html
* build-aux/depcomp, doc/make-stds.texi, lib/malloc/scratch_buffer.h:
Autoupdate.
* build-aux/install-reloc (func_create_wrapper):
Omit removed file scratch_buffer_dupfree.c.
* config/srclist.txt: Remove lib/malloc/scratch_buffer_dupfree.c
* lib/canonicalize-lgpl.c: Merge changes from glibc through its
commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f dated 2022-07-05
11:04:45 +0200.
(__strdup) [!_LIBC]: New macro.
(struct realpath_bufs): New type.
(realpath_stk): Use it as the extra argument. All uses changed.
No longer any need for noinline or GCC_BOGUS_WRETURN_LOCAL_ADDR.
* lib/canonicalize.c (struct realpath_bufs)
(canonicalize_filename_mode_stk): Likewise.
* lib/malloc/scratch_buffer_dupfree.c:
Remove, since it was removed in glibc.
* lib/scratch_buffer.h (scratch_buffer_dupfree) [0]:
(__libc_scratch_buffer_dupfree): Remove decls.
* modules/relocatable-prog-wrapper (Files):
* modules/scratch_buffer (Files, lib_SOURCES):
Remove lib/malloc/scratch_buffer_dupfree.c.
|
|
|
|
|
| |
* lib/glthread/thread.h (gl_thread_self_pointer): With POSIX
threads, cast the call to gl_thread_t before casting to void *.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
Exclude 0x13439..0x1343F.
(get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x0ECE, 0x10EFD..0x10EFF, 0x11241, 0x11F00..0x11F01, 0x11F36..0x11F3A,
0x11F40, 0x11F42, 0x13439..0x13440, 0x13447..0x13455, 0x1E08F,
0x1E4EC..0x1E4EF.
* All the affected modules: Bump required libunistring version.
|
|
|
|
|
| |
* lib/gen-uni-tables.c: Include <stdbool.h>, unless the C compiler
advertises compliance to ISO C 23.
|
|
|
|
|
|
| |
* lib/stat-time.h: Include stdckdint.h instead of intprops.h.
(stat_time_normalize): Use ckd_add instead of INT_ADD_WRAPV.
* modules/stat-time (Depends-on): Depend on stdckdint, not intprops.
|
|
|
|
|
|
|
|
| |
These used to be needed, but are not needed now.
* lib/xalloc.h: Do not include stdlib.h.
[GNULIB_XALLOC]: Do not include "intprops.h".
* lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX.
* modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.
|
|
|
|
|
|
| |
* lib/fts.c (fts_build): Use proper errno if dirfd failed.
Although I don’t know of any platform where dirfd can fail here,
we might as well get it right.
|
|
|
|
|
|
| |
* lib/stdalign.in.h: Treat MSVC in C++ mode like C++11 compliant
compilers.
* tests/test-stdalign-c++.cc: Include some other header files.
|
|
|
|
|
| |
* lib/stdalign.in.h (_GL_STDALIGN_NEEDS_STDDEF): New macro.
Include <stddef.h> only when needed.
|
|
|
|
|
| |
* lib/stdbool.in.h (true): Redefine if it does not evaluate to 1 in the
preprocessor.
|
|
|
|
|
|
|
| |
* lib/unicase.in.h: Do include <stdbool.h>.
* lib/unictype.in.h: Likewise.
* lib/unigbrk.in.h: Likewise.
* lib/unistr.in.h: Likewise.
|
|
|
|
|
| |
* lib/signal.in.h: On OpenBSD, include <sys/param.h>. Don't include
<pthread.h> on OpenBSD ≥ 5.1.
|
|
|
|
|
|
| |
* lib/wchar.in.h (wcsnlen, wcpcpy, wcpncpy, wcscasecmp, wcsncasecmp,
wcsdup): Force declaration in C++ mode on Solaris (which does not
declare these functions in the global namespace).
|
|
|
|
|
| |
* lib/unistd.in.h (swab): For the C++ declaration, under Solaris 11 but
not under Solaris 10, test also __XOPEN_OR_POSIX.
|
|
|
|
|
|
|
| |
* m4/time_h.m4 (gl_TIME_H): Test whether asctime_r and ctime_r are
declared.
* lib/time.in.h (asctime_r, ctime_r): Skip _GL_WARN_ON_USE invocations
when these functions are not declared.
|
|
|
|
|
|
| |
* lib/verify.h (static_assert): Don't define in clang C++ 6 or newer.
* m4/assert_h.m4 (gl_ASSERT_H): If we don't need to define static_assert
with clang in C++ mode, don't include <assert.h>.
|
|
|
|
|
| |
* lib/verify.h (static_assert): For MSVC in C++ mode, use a definition
that supports both the two-arguments and the one-argument syntax.
|
|
|
|
|
| |
* lib/verify.h (_Static_assert): Pass only the first argument to
_GL_VERIFY.
|
|
|
|
| |
* lib/verify.h (static_assert): Don't define in GNU C++ 6 or newer.
|
|
|
|
|
|
|
| |
* lib/alignalloc.c, lib/argp-parse.c, lib/fts.c, lib/md4.c, lib/md5.c:
* lib/rawmemchr.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/sm3.c:
* lib/sys_socket.in.h:
In C23, <stdalign.h> is a no-op, so don’t include it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Where it’s easy, prefer ‘static_assert’ to ‘verify’,
as this simplifies the source by removing the need to
include verify.h. Keep using ‘verify’ if verify.h
is used for other reasons, or if code is shared with glibc.
* lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h:
* lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c:
* lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c:
* lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c:
* lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c:
* lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c:
* lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c:
* lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c:
* lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c:
* tests/test-intprops.c, tests/test-libgmp.c:
* tests/test-limits-h.c, tests/test-locale.c:
* tests/test-pthread.c, tests/test-round2.c:
* tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c:
* tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c:
* tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c:
* tests/test-wchar.c:
Prefer static_assert to verify, and stop including verify.h.
* lib/stat.c: Don’t include verify.h (this include was unnecessary).
* modules/alignalloc, modules/alignof-tests, modules/argmatch:
* modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha:
* modules/c32isblank, modules/c32iscntrl, modules/c32isdigit:
* modules/c32isgraph, modules/c32islower, modules/c32isprint:
* modules/c32ispunct, modules/c32isspace, modules/c32isupper:
* modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs:
* modules/exclude, modules/filevercmp, modules/fma, modules/fmaf:
* modules/fmal, modules/fstat, modules/i-ring, modules/ino-map:
* modules/intprops-tests, modules/libgmp-tests:
* modules/limits-h-tests, modules/locale-tests, modules/malloca:
* modules/mbrtoc32, modules/mbrtowc, modules/mbsinit:
* modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep:
* modules/parse-datetime, modules/pipe2, modules/pthread-h-tests:
* modules/rawmemchr, modules/relocatable-prog-wrapper:
* modules/round-tests, modules/roundf-tests, modules/sleep:
* modules/stat, modules/stdalign-tests, modules/stdckdint-tests:
* modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests:
* modules/strerror, modules/string-tests, modules/strtoimax:
* modules/strtoumax, modules/sys_stat-tests, modules/time-tests:
* modules/uchar-tests, modules/unistd-tests:
* 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/utimecmp, modules/vasnprintf, modules/wchar-tests:
Depend on assert-h, not verify.
|
|
|
|
|
|
|
| |
* tests/test-stdalign.c: Do not test __alignas_is_defined,
_Alignof, or _Alignas as they are obsolescent.
Do not use __alignas_is_defined in C23 or later (or C++11 or later),
as it’s removed in C23.
|