Hash :
99bbb61c
Author :
Date :
2024-10-30T12:47:02
posix_memalign: check for GNU behavior with size 0 * lib/posix_memalign.c: Include stdckdint.h. (posix_memalign): Test for overflow more straightforwardly, and more portably to unlikely platforms where SIZE_MAX <= INT_MAX. Treat a zero size as if it were alignment. * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): * tests/test-posix_memalign.c (main): Test zero size too. Use volatile to avoid compiler optimizations. * modules/posix_memalign (Depends-on): Add stdckdint.
Description:
Allocate memory with indefinite extent and specified alignment.
Files:
lib/posix_memalign.c
m4/posix_memalign.m4
Depends-on:
extensions
stdckdint [test $REPLACE_POSIX_MEMALIGN = 1]
stdlib
configure.ac:
gl_FUNC_POSIX_MEMALIGN
gl_CONDITIONAL([GL_COND_OBJ_POSIX_MEMALIGN], [test $REPLACE_POSIX_MEMALIGN = 1])
gl_STDLIB_MODULE_INDICATOR([posix_memalign])
Makefile.am:
if GL_COND_OBJ_POSIX_MEMALIGN
lib_SOURCES += posix_memalign.c
endif
Include:
<stdlib.h>
License:
LGPLv2+
Maintainer:
all