summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-08-20 17:56:53 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-08-20 17:56:53 +0000
commit73c793c6fe0a1bfd5b889fb1c1fc4cd44b89bf3d (patch)
treefd7592632f56f3233483b5b8521e8266b57b0d60 /lib
parent3ad14a1d331b2a81b6e1bb69ac78d172f0ba14ca (diff)
Make the binding cfree() -> free() weak if possible
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/malloc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 47059a8388c..a210c3f3189 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -8,7 +8,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: malloc.c,v 1.6 1996/08/20 17:30:49 downsj Exp $";
+static char rcsid[] = "$OpenBSD: malloc.c,v 1.7 1996/08/20 17:56:52 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -1260,10 +1260,17 @@ free(ptr)
}
#ifdef CFREE_STUB
+
+#ifdef __indr_reference
+__indr_reference(free, cfree);
+#else /* __indr_reference */
+
void
-cfree(ptr)
- void *ptr;
+cfree(p)
+ void *p;
{
- free(ptr);
+ free(p);
}
-#endif
+#endif /* not __indr_reference */
+
+#endif /* CFREE_STUB */