Import libiberty from gcc

This commit is contained in:
Alan Modra
2022-05-13 16:43:15 +09:30
parent 845cbaa9ff
commit 31b15688c4
28 changed files with 165 additions and 148 deletions

View File

@@ -16,13 +16,13 @@ Uses @code{malloc} to allocate storage for @var{nelem} objects of
#include <stddef.h>
/* For systems with larger pointers than ints, this must be declared. */
PTR malloc (size_t);
void bzero (PTR, size_t);
void *malloc (size_t);
void bzero (void *, size_t);
PTR
void *
calloc (size_t nelem, size_t elsize)
{
register PTR ptr;
register void *ptr;
if (nelem == 0 || elsize == 0)
nelem = elsize = 1;