apply modifications to XCALLOC according to #192
This commit is contained in:
parent
d6c6f8c3cc
commit
a3651cbd79
@ -30,14 +30,14 @@ extern "C" {
|
|||||||
#ifndef XMALLOC
|
#ifndef XMALLOC
|
||||||
/* default to libc stuff */
|
/* default to libc stuff */
|
||||||
# define XMALLOC(size) malloc(size)
|
# define XMALLOC(size) malloc(size)
|
||||||
# define XFREE(mem, size) free(mem)
|
|
||||||
# define XREALLOC(mem, oldsize, newsize) realloc(mem, newsize)
|
# define XREALLOC(mem, oldsize, newsize) realloc(mem, newsize)
|
||||||
# define XCALLOC calloc
|
# define XCALLOC(nmemb, size) calloc(nmemb, size)
|
||||||
|
# define XFREE(mem, size) free(mem)
|
||||||
#else
|
#else
|
||||||
/* prototypes for our heap functions */
|
/* prototypes for our heap functions */
|
||||||
extern void *XMALLOC(size_t size);
|
extern void *XMALLOC(size_t size);
|
||||||
extern void *XREALLOC(void *mem, size_t oldsize, size_t newsize);
|
extern void *XREALLOC(void *mem, size_t oldsize, size_t newsize);
|
||||||
extern void *XCALLOC(size_t n, size_t s);
|
extern void *XCALLOC(size_t nmemb, size_t size);
|
||||||
extern void XFREE(void *mem, size_t size);
|
extern void XFREE(void *mem, size_t size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user