4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-09 02:29:07 +08:00

2 Commits

Author SHA1 Message Date
Keith Packard via Newlib
aaa7d6f653 libc/stdlib: Use __builtin_mul_overflow for reallocarray and calloc
This built-in function (available in both gcc and clang) is more
efficient and generates shorter code than open-coding the test.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-10-14 10:54:27 -04:00
Sebastian Huber
eb14d0cc64 Add BSD-specific reallocarray()
It is available in FreeBSD, NetBSD and OpenBSD, but not in glibc.  It is
used for example by OpenSSH.
2017-04-04 12:19:18 +02:00