1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-06-15 15:25:49 +00:00

11 Commits

Author SHA1 Message Date
Bruno Haible cbb15d86b1 glibc-internal/dynarray: Move private Gnulib functions to _gl_* namespace.
* lib/dynarray.h (__libc_dynarray_*): Define to symbols in the _gl_*
namespace.
2026-03-15 23:07:25 +01:00
Collin Funk a8482ceecf maint: run 'make update-copyright' 2026-01-01 10:37:05 -08:00
Pádraig Brady 7b08932179 maint: run 'make update-copyright' 2025-01-01 09:25:10 +00:00
Simon Josefsson 5b92dd0a45 maint: run 'make update-copyright' 2024-01-01 10:31:48 +01:00
Simon Josefsson 32a72f4537 maint: run 'make update-copyright' 2023-01-01 01:14:21 +01:00
Paul Eggert eec12c00cf maint: run 'make update-copyright' 2022-01-01 09:44:11 -08:00
Bruno Haible 0c907f7da1 dynarray: Avoid conflict with preprocessor macros owned by the system.
* 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.
2021-06-07 01:19:32 +02:00
Bruno Haible 5ffa144085 Put LGPLv2+ notices in source files where appropriate.
* lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description
says so.
2021-06-04 20:55:41 +02:00
Bruno Haible 7ce163b7e9 dynarray: Make the module usable on its own.
* lib/dynarray.h: Document the exported API. Comments taken from
lib/malloc/dynarray-skeleton.c and lib/malloc/dynarray.h.
Distinguish an internal include from an include for instantiation.
In the latter case, include <libc-config.h> and
<malloc/dynarray-skeleton.c>.
* modules/dynarray (Depends-on): Add intprops.
(Include): Reduce to just "dynarray.h".
2021-03-07 00:40:27 +01:00
Paul Eggert 4b5bc7fdd5 Port better to macOS Mojave
Problem reported by Tom Shields in:
https://lists.gnu.org/r/bug-gnulib/2021-02/msg00064.html
* config/srclist.txt: Comment out dynarray_finalize.c.
* lib/dynarray.h (__libc_dynarray_at_failure): Don’t include
libc-config.h here, as that’s the includer’s responsibility.
* lib/malloc/dynarray_at_failure.c:
* lib/malloc/dynarray_emplace_enlarge.c:
* lib/malloc/dynarray_finalize.c:
* lib/malloc/dynarray_resize.c:
* lib/malloc/dynarray_resize_clear.c:
If _LIBC is not defined, include libc-config.h.
2021-02-16 11:42:07 -08:00
Paul Eggert 921d2ea19b dynarray: new module
* config/srclist.txt: Mention the new files.
* lib/cdefs.h (__attribute_maybe_unused__): New macro,
like Gnulib’s _GL_ATTRIBUTE_MAYBE_UNUSED but with glibc
naming conventions.
* lib/libc-config.h: Use it instead of __glibc_likely.
* lib/dynarray.h, modules/dynarray: New files.
* lib/malloc/dynarray-skeleton.c, lib/malloc/dynarray.h:
* lib/malloc/dynarray_at_failure.c:
* lib/malloc/dynarray_emplace_enlarge.c:
* lib/malloc/dynarray_finalize.c, lib/malloc/dynarray_resize.c:
* lib/malloc/dynarray_resize_clear.c, modules/dynarray:
New files, from glibc with the following changes needed for
portability to compilers that are not recent-enough GCC.
* lib/malloc/dynarray_at_failure.c: Include stdlib.h, for abort.
(__libc_dynarray_at_failure) [!_LIBC]: Simply abort.
* lib/malloc/dynarray_emplace_enlarge.c:
* lib/malloc/dynarray_resize.c:
Include intprops.h, and use INT_MULTIPLY_WRAPV instead
of __builtin_mul_overflow.
* lib/malloc/dynarray.h (__libc_dynarray_at_failure):
Use _Noreturn instead of __attribute__ ((noreturn)).
* lib/malloc/dynarray_resize_clear.c: Do not include stdlib.h;
it’s not needed.
(__libc_dynarray_resize_clear): Do not do arithmetic on void *.
* lib/malloc/dynarray-skeleton.c (struct DYNARRAY_STRUCT):
Do not use anonymous unions, as they are not in C99. All uses changed.
Use __nonnull (X) instead of __attribute__ ((nonnull X)),
and __attribute_maybe_unused__ instead of __attribute__ ((unused)).
2021-01-08 12:02:03 -08:00