Bruno Haible
0b416a8a26
alignalloc: Don't use aligned_alloc if it is buggy.
...
Reported by <gnulib@mifar.in > in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-09/msg00097.html >.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC_WORKS): New macro,
extracted from gl_FUNC_ALIGNED_ALLOC.
(gl_FUNC_ALIGNED_ALLOC): Use it.
* m4/alignalloc.m4 (gl_ALIGNALLOC): Invoke gl_FUNC_ALIGNED_ALLOC_WORKS
and define HAVE_WORKING_ALIGNED_ALLOC.
* lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC): Test
HAVE_WORKING_ALIGNED_ALLOC, instead of testing for an address sanitizer.
* modules/alignalloc (Files): Add m4/aligned_alloc.m4.
2026-09-23 23:43:28 +02: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
Bruno Haible
a1da46a05c
aligned_alloc: Fix test failures on macOS, Solaris (regr. 2024-10-30).
...
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Check for the Solaris
bug. Let the test program return a bit mask. Update cross-compilation
guesses.
* lib/aligned_alloc.c: Include <errno.h>.
(aligned_alloc): Fail if the alignment is not a power of 2. Work around
the Solaris bug.
* modules/aligned_alloc (Depends-on): Add malloc-posix.
* doc/posix-functions/aligned_alloc.texi: Mention the Solaris bug.
2024-11-04 17:50:09 +01:00
Bruno Haible
8be7e3ed25
aligned_alloc: Fix comment.
...
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Fix typo in comment.
2024-10-31 12:09:46 +01:00
Paul Eggert
e6108a3b3e
aligned_alloc: check for GNU behavior with size 0
...
If someone ever needs to distinguish between GNU and merely POSIX
behavior we can split this into two modules, but for now just
make this module act like GNU.
* lib/aligned_alloc.c (aligned_alloc): Treat zero size like GNU.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC):
* tests/test-aligned_alloc.c (main):
Test zero size too.
2024-10-30 12:50:24 -07:00
Bruno Haible
b1f65faabb
Use a warranty disclaimer in all-permissive license notices.
...
* etc/license-notices/unlimited: Add a short warranty disclaimer
sentence.
* m4/*.m4: Update.
* build-aux/prefix-gnulib-mk: Likewise.
* HACKING: Likewise.
2024-10-17 21:52:41 +02:00
Bruno Haible
b744688d95
Make the serial numbers in *.m4 files effective.
...
Reported by Sam James in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00051.html >.
* m4/*.m4: Apply sed -e '1s|^# \(.*[.]m4\) serial |# \1\n# serial |'.
2024-04-04 11:16:15 +02:00
Simon Josefsson
5b92dd0a45
maint: run 'make update-copyright'
2024-01-01 10:31:48 +01:00
Bruno Haible
b27b9d9bae
aligned_alloc: Fix test failure on AIX 7.3 with ibm-clang.
...
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use 'volatile', to
disable optimization of ibm-clang -O2.
* doc/posix-functions/aligned_alloc.texi: Update version info.
2023-08-18 19:00:16 +02:00
Bruno Haible
99acf8c353
Resolve conflicts for functions introduced in Android API level 28.
...
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Conditionally set
REPLACE_ALIGNED_ALLOC.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Conditionally set
REPLACE_GETRANDOM.
2023-01-22 15:57:27 +01:00
Bruno Haible
cf2937d427
Recognize functions added in future versions of Android.
...
* m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/freading.m4 (gl_FUNC_FREADING): Likewise.
* m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise.
* m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
* m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise.
* m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
* m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
* m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise.
* doc/glibc-functions/getentropy.texi: Mark function as existing in
Android 9.0.
* doc/glibc-functions/getrandom.texi: Likewise.
* doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise.
* doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.
2023-01-05 16:36:52 +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
79c4db534e
doc: Update for macOS 11.1.
...
* doc/posix-headers/*.texi: Update.
* doc/glibc-headers/*.texi: Update.
* doc/posix-functions/*.texi: Likewise.
* doc/pastposix-functions/*.texi: Likewise.
* doc/glibc-functions/*.texi: Likewise.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update cross-compilation
guess.
2021-03-21 14:56:02 +01:00
Bruno Haible
4653cdc3d3
aligned_alloc: Fix test failure on OpenBSD 6.8.
...
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Require gl_USE_SYSTEM_EXTENSIONS.
2021-01-01 23:04:52 +01:00
Bruno Haible
ef4b4afaa5
aligned_alloc: Fix test failure on OpenBSD 6.8.
...
* m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): On OpenBSD, define
_ISOC11_SOURCE.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update comment.
2021-01-01 22:50:58 +01:00
Paul Eggert
4b94832196
maint: run 'make update-copyright'
2020-12-31 23:30:01 -08:00
Bruno Haible
d8de841b65
aligned_alloc: New module.
...
* lib/stdlib.in.h (aligned_alloc): New declaration.
* lib/aligned_alloc.c: New file.
* m4/aligned_alloc.m4: New file.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether aligned_alloc is declared.
(gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ALIGNED_ALLOC,
HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
* modules/stdlib (Makefile.am): Substitute GNULIB_ALIGNED_ALLOC,
HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
* modules/aligned_alloc: New file.
* tests/test-stdlib-c++.cc (aligned_alloc): Check signature.
* doc/posix-functions/aligned_alloc.texi: Mention the new module and the
AIX bug.
2020-11-04 02:22:33 +01:00