| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also helps document glibc’s direction in using GCC’s
memory-allocation checking.
* lib/cdefs.h: Omit comments that glibc rejected.
(__returns_nonnull, __attr_access_none, __attr_dealloc)
(__attr_dealloc_free): New macros.
* lib/libc-config.h: Undef the new macros that are defined
unconditionally.
* lib/malloc/dynarray_at_failure.c [_LIBC]: Do not include stdlib.h.
(__libc_dynarray_at_failure) [_LIBC]: Call __libc_fatal,
fixing a bad merge previously.
|
|
|
|
|
|
|
|
|
|
|
|
| |
DragonFlyBSD defines __nonnull incompatibly with glibc,
so avoid the use of __nonnull in Gnulib code.
Problem reported by Gavin Smith in:
https://lists.gnu.org/r/bug-gnulib/2021-03/msg00066.html
* lib/cdefs.h (__attribute_nonnull__): Rename from __nonnull.
All uses in Gnulib changed. There should be no need to change
glibc code that is not shared with Gnulib.
(__nonnull): New macro, defined in terms of __attribute_nonnull__,
and which can be used in glibc code that is not shared with Gnulib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Problem reported by Darshit Shah in:
https://lists.gnu.org/r/bug-gnulib/2021-01/msg00140.html
* lib/malloc/dynarray-skeleton.c (DYNARRAY_FREE): New macro.
Use it everywhere instead of DYNARRAY_NAME (free).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* config/srclist.txt: Adjust accordingly.
* lib/canonicalize-lgpl.c (realpath_stk):
* lib/canonicalize.c (canonicalize_filename_mode_stk):
Simplify by using scratch_buffer_dupfree.
* lib/malloc/scratch_buffer.h (scratch_buffer_dupfree): New function.
* lib/malloc/scratch_buffer_dupfree.c: New file.
* modules/scratch_buffer (Files, Depends-on):
Add malloc/scratch_buffer_dupfree.c.
|
| |
|
|
|
|
|
|
| |
* config/srclist.txt: Add the scratch_buffer source
code from glibc, since these should be in sync.
Autoupdate.
|
| |
|
| |
|
| |
|
|
Suggested by Florian Weimer in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-09/msg00004.html
* lib/scratch_buffer.h: Rename to lib/malloc/scratch_buffer.h.
* lib/scratch_buffer_grow.c: Rename to
lib/malloc/scratch_buffer_grow.c.
* lib/scratch_buffer_grow_preserve.c: Rename to
lib/malloc/scratch_buffer_grow_preserve.c.
* lib/scratch_buffer_set_array_size.c: Rename to
lib/malloc/scratch_buffer_set_array_size.c.
* lib/scratch_buffer.h: New file.
* modules/scratch_buffer (Files, Makefile.am):
Adjust to source-file renaming.
|