From bf86644ba347913dd747b17cf2673e2cd7bca50b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 19 Aug 1999 20:01:42 +0000 Subject: [PATCH] Add CSRIMALLOC Support --- servers/slurpd/ch_malloc.c | 4 ++++ servers/slurpd/proto-slurp.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/servers/slurpd/ch_malloc.c b/servers/slurpd/ch_malloc.c index 54d54c3aaa..41bad34005 100644 --- a/servers/slurpd/ch_malloc.c +++ b/servers/slurpd/ch_malloc.c @@ -10,6 +10,8 @@ * is provided ``as is'' without express or implied warranty. */ +#define CH_FREE 1 + /* * ch_malloc.c - malloc() and friends, with check for NULL return. */ @@ -24,6 +26,7 @@ #include "../slapd/slap.h" +#ifndef CSRIMALLOC /* * Just like malloc, except we check the returned value and exit @@ -116,3 +119,4 @@ ch_free( return; } +#endif diff --git a/servers/slurpd/proto-slurp.h b/servers/slurpd/proto-slurp.h index 37bcb3f85d..2d314cdd3a 100644 --- a/servers/slurpd/proto-slurp.h +++ b/servers/slurpd/proto-slurp.h @@ -12,10 +12,17 @@ RETSIGTYPE do_admin LDAP_P((int sig)); int doargs LDAP_P((int argc, char **argv, struct globals *g)); /* ch_malloc.c */ +#ifdef CSRIMALLOC +#define ch_malloc malloc +#define ch_realloc realloc +#define ch_calloc calloc +#define ch_free free +#else void *ch_malloc LDAP_P((ber_len_t size)); void *ch_realloc LDAP_P((void *block, ber_len_t size)); void *ch_calloc LDAP_P((ber_len_t nelem, ber_len_t size)); void ch_free LDAP_P((void *p)); +#endif /* config.c */ int slurpd_read_config LDAP_P((char *fname)); -- 2.39.5