summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-21 13:17:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-04-21 13:17:33 +0000
commitc71b1ba73a268042715490e261831e620c0227ea (patch)
tree824780297e33ea7b4daad327c59815d83690c8f6 /include
parentca772a59398ddf9ad2a7a298d361880ad1db1ea3 (diff)
Introducing: void *mallocarray(size_t nmemb, size_t size);
Like calloc(), except without the cleared-memory gaurantee ok beck guenther, discussed for more than a year...
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index a2310e363b7..93eddce71ab 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdlib.h,v 1.56 2013/12/28 01:51:53 martynas Exp $ */
+/* $OpenBSD: stdlib.h,v 1.57 2014/04/21 13:17:32 deraadt Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*-
@@ -124,6 +124,9 @@ char *getenv(const char *);
long labs(long);
ldiv_t ldiv(long, long);
void *malloc(size_t);
+#if __BSD_VISIBLE
+void *mallocarray(size_t, size_t);
+#endif /* __BSD_VISIBLE */
void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
int rand(void);
void *realloc(void *, size_t);