mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
Add CSRIMALLOC Support
This commit is contained in:
parent
e8af46f2a7
commit
bf86644ba3
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue