Hash :
a1da46a0
Author :
Date :
2024-11-04T17:50:09
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.
Description:
Allocate memory with indefinite extent and specified alignment.
Files:
lib/aligned_alloc.c
m4/aligned_alloc.m4
Depends-on:
extensions
stdlib
malloc-posix [test $REPLACE_ALIGNED_ALLOC = 1]
configure.ac:
gl_FUNC_ALIGNED_ALLOC
gl_CONDITIONAL([GL_COND_OBJ_ALIGNED_ALLOC], [test $REPLACE_ALIGNED_ALLOC = 1])
gl_STDLIB_MODULE_INDICATOR([aligned_alloc])
Makefile.am:
if GL_COND_OBJ_ALIGNED_ALLOC
lib_SOURCES += aligned_alloc.c
endif
Include:
<stdlib.h>
License:
LGPLv2+
Maintainer:
all