diff options
author | Bruno Haible <bruno@clisp.org> | 2020-11-04 02:22:33 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-11-04 02:22:33 +0100 |
commit | d8de841b650d9dd635b8ea7a494f3b1cb82bd20d (patch) | |
tree | 55712b454abeeb24564fd7c98432fb1572606f5f /modules | |
parent | 25792758360eb2383ff381d1227c3b928e0cba62 (diff) | |
download | gnulib-d8de841b650d9dd635b8ea7a494f3b1cb82bd20d.tar.gz |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/aligned_alloc | 28 | ||||
-rw-r--r-- | modules/stdlib | 3 |
2 files changed, 31 insertions, 0 deletions
diff --git a/modules/aligned_alloc b/modules/aligned_alloc new file mode 100644 index 0000000000..f7757f4a96 --- /dev/null +++ b/modules/aligned_alloc @@ -0,0 +1,28 @@ +Description: +Allocate memory with indefinite extent and specified alignment. + +Files: +lib/aligned_alloc.c +m4/aligned_alloc.m4 + +Depends-on: +extensions +stdlib + +configure.ac: +gl_FUNC_ALIGNED_ALLOC +if test $REPLACE_ALIGNED_ALLOC = 1; then + AC_LIBOBJ([aligned_alloc]) +fi +gl_STDLIB_MODULE_INDICATOR([aligned_alloc]) + +Makefile.am: + +Include: +<stdlib.h> + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/stdlib b/modules/stdlib index df533a96e2..032a2e6663 100644 --- a/modules/stdlib +++ b/modules/stdlib @@ -32,6 +32,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ + -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ @@ -69,6 +70,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ + -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ @@ -105,6 +107,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ + -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \ |