-/* $OpenBSD: stdlib.h,v 1.17 2023/05/18 16:11:09 guenther Exp $ */
+/* $OpenBSD: stdlib.h,v 1.18 2023/05/27 04:33:00 otto Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*-
PROTO_DEPRECATED(a64l);
PROTO_NORMAL(abort);
PROTO_NORMAL(abs);
-/* PROTO_NORMAL(aligned_alloc) not yet, breaks emacs */
+PROTO_NORMAL(aligned_alloc);
PROTO_NORMAL(arc4random);
PROTO_NORMAL(arc4random_buf);
PROTO_NORMAL(arc4random_uniform);
PROTO_STD_DEPRECATED(atol);
PROTO_STD_DEPRECATED(atoll);
PROTO_STD_DEPRECATED(bsearch);
-/*PROTO_NORMAL(calloc); not yet, breaks emacs */
+PROTO_NORMAL(calloc);
PROTO_NORMAL(calloc_conceal);
PROTO_NORMAL(cgetcap);
PROTO_NORMAL(cgetclose);
PROTO_NORMAL(erand48);
PROTO_NORMAL(exit);
PROTO_DEPRECATED(fcvt);
-/*PROTO_NORMAL(free); not yet, breaks emacs */
+PROTO_NORMAL(free);
PROTO_NORMAL(freezero);
PROTO_DEPRECATED(gcvt);
PROTO_DEPRECATED(getbsize);
PROTO_STD_DEPRECATED(llabs);
PROTO_STD_DEPRECATED(lldiv);
PROTO_DEPRECATED(lrand48);
-/*PROTO_NORMAL(malloc); not yet, breaks emacs */
+PROTO_NORMAL(malloc);
PROTO_NORMAL(malloc_conceal);
PROTO_STD_DEPRECATED(mblen);
PROTO_STD_DEPRECATED(mbstowcs);
PROTO_DEPRECATED(mktemp);
PROTO_DEPRECATED(mrand48);
PROTO_DEPRECATED(nrand48);
-/*PROTO_NORMAL(posix_memalign); not yet, breaks emacs */
+PROTO_NORMAL(posix_memalign);
PROTO_DEPRECATED(posix_openpt);
PROTO_DEPRECATED(ptsname);
PROTO_NORMAL(putenv);
PROTO_STD_DEPRECATED(rand);
PROTO_NORMAL(rand_r);
PROTO_DEPRECATED(random);
-/*PROTO_NORMAL(realloc); not yet, breaks emacs */
+PROTO_NORMAL(realloc);
PROTO_NORMAL(reallocarray);
PROTO_NORMAL(recallocarray);
PROTO_DEPRECATED(realpath);
-/* $OpenBSD: malloc.c,v 1.283 2023/05/10 07:58:06 otto Exp $ */
+/* $OpenBSD: malloc.c,v 1.284 2023/05/27 04:33:00 otto Exp $ */
/*
* Copyright (c) 2008, 2010, 2011, 2016, 2023 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
EPILOGUE()
return r;
}
-/*DEF_STRONG(malloc);*/
+DEF_STRONG(malloc);
void *
malloc_conceal(size_t size)
_MALLOC_UNLOCK(d->mutex);
errno = saved_errno;
}
-/*DEF_STRONG(free);*/
+DEF_STRONG(free);
static void
freezero_p(void *ptr, size_t sz)
EPILOGUE()
return r;
}
-/*DEF_STRONG(realloc);*/
+DEF_STRONG(realloc);
/*
* This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
EPILOGUE()
return r;
}
-/*DEF_STRONG(calloc);*/
+DEF_STRONG(calloc);
void *
calloc_conceal(size_t nmemb, size_t size)
errno = saved_errno;
return res;
}
-/*DEF_STRONG(posix_memalign);*/
+DEF_STRONG(posix_memalign);
void *
aligned_alloc(size_t alignment, size_t size)
EPILOGUE()
return r;
}
-/*DEF_STRONG(aligned_alloc);*/
+DEF_STRONG(aligned_alloc);
#ifdef MALLOC_STATS