summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc')
-rw-r--r--libc/stdlib/malloc/Makefile4
-rw-r--r--libc/stdlib/malloc/calloc.c32
2 files changed, 2 insertions, 34 deletions
diff --git a/libc/stdlib/malloc/Makefile b/libc/stdlib/malloc/Makefile
index 6d1e89186..30e5b9e2a 100644
--- a/libc/stdlib/malloc/Makefile
+++ b/libc/stdlib/malloc/Makefile
@@ -24,8 +24,8 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC = malloc.o free.o realloc.o calloc.o heap_alloc.o \
- heap_alloc_at.o heap_free.o
+CSRC = malloc.o free.o realloc.o heap_alloc.o \
+ heap_alloc_at.o heap_free.o ../malloc-930716/calloc.o
COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(COBJS)
diff --git a/libc/stdlib/malloc/calloc.c b/libc/stdlib/malloc/calloc.c
deleted file mode 100644
index 1cbab4ac5..000000000
--- a/libc/stdlib/malloc/calloc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * libc/stdlib/malloc/calloc.c -- calloc function
- *
- * Copyright (C) 2002 NEC Corporation
- * Copyright (C) 2002 Miles Bader <miles@gnu.org>
- *
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License. See the file COPYING.LIB in the main
- * directory of this archive for more details.
- *
- * Written by Miles Bader <miles@gnu.org>
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "malloc.h"
-
-
-void *
-calloc (size_t size, size_t num)
-{
- void *mem;
-
- size *= num;
-
- mem = malloc (size);
- if (mem)
- memset (mem, 0, size);
-
- return mem;
-}