From 532fb5f59566abd7989c55c3ea05525f1fc89b11 Mon Sep 17 00:00:00 2001 From: tholo <> Date: Tue, 20 Aug 1996 17:56:52 +0000 Subject: Make the binding cfree() -> free() weak if possible --- src/lib/libc/stdlib/malloc.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 47059a8388..a210c3f318 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/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 */ -- cgit v1.2.3-55-g6feb