acadia-newlib/newlib/libc
Szabolcs Nagy 0f785536f3 Reimplement aligned_alloc
The original implementation had multiple issues:

- Only worked when posix_memalign was available (Linux, RTEMS).
- Violated C11 link namespace rules by calling posix_memalign.
- Failed to set errno on error.

These can be fixed by essentially using the same implementation
for aligned_alloc as for memalign, i.e. simply calling _memalign_r
(which is always available and a "more reserved name" although
technically still not in the reserved link namespace, at least
code written in c cannot define a colliding symbol, newlib has
plenty such namespace issues so this is fine).

It is not clear what the right policy is when MALLOC_PROVIDED is set,
currently that does not cover aligned_alloc so it is kept that way.

Tested on aarch64-none-elf
2020-05-19 15:19:33 +02:00
..
argz
ctype Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
errno
iconv
include newlib/libc/include/devctl.h: Add extern "C" wrapper 2020-02-20 09:45:39 +01:00
locale Locale modifier "@cjksingle" to enforce single-width CJK width. 2020-02-18 11:35:42 +01:00
machine arm: Finish moving newlib to unified syntax for Thumb1 2020-03-02 13:33:11 +00:00
misc Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
posix Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
reent
search Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
signal
ssp
stdio Typo in license for newlib/libc/stdio/flags.c 2020-02-06 11:58:50 +01:00
stdio64 Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
stdlib Reimplement aligned_alloc 2020-05-19 15:19:33 +02:00
string Locale modifier "@cjksingle" to enforce single-width CJK width. 2020-02-18 11:35:42 +01:00
sys RTEMS: Include missing header and fix stub 2020-03-13 13:51:20 -05:00
syscalls
time
unix
xdr
Makefile.am
Makefile.in
aclocal.m4
configure Bump up newlib release to 3.3.0 2020-01-21 15:17:43 -05:00
configure.in
libc.in.xml
libc.texinfo
saber
sys.tex