[libc-commits] [libc] [libc][stdlib] Add calloc header (PR #94403)

via libc-commits libc-commits at lists.llvm.org
Tue Jun 4 15:51:49 PDT 2024


https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/94403

>From 7345672867142c47b93e2196d6c42500d368bbf4 Mon Sep 17 00:00:00 2001
From: Leonard Chan <leonardchan at google.com>
Date: Tue, 4 Jun 2024 14:51:05 -0700
Subject: [PATCH] [libc][stdlib] Add calloc header

---
 libc/src/stdlib/calloc.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 libc/src/stdlib/calloc.h

diff --git a/libc/src/stdlib/calloc.h b/libc/src/stdlib/calloc.h
new file mode 100644
index 0000000000000..bdb025b9d0d1c
--- /dev/null
+++ b/libc/src/stdlib/calloc.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for calloc ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <stddef.h>
+
+#ifndef LLVM_LIBC_SRC_STDLIB_CALLOC_H
+#define LLVM_LIBC_SRC_STDLIB_CALLOC_H
+
+namespace LIBC_NAMESPACE {
+
+void *calloc(size_t num, size_t size);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_STDLIB_CALLOC_H



More information about the libc-commits mailing list