1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-29 02:50:28 +03:00

Use the new memory macro file from Samba 3.

This commit is contained in:
Jelmer Vernooij 2008-10-18 14:07:51 +02:00
parent dc5dc3b469
commit 3189d14152
4 changed files with 9 additions and 2 deletions

View File

@ -40,12 +40,20 @@
/**
* Allocate an array of elements of one data type. Does type-checking.
*/
#if _SAMBA_BUILD_ == 3
#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count, false)
#else
#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
#endif
/**
* Resize an array of elements of one data type. Does type-checking.
*/
#if _SAMBA_BUILD_ == 3
#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count, false)
#else
#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
#endif
/**
* zero a structure

View File

@ -25,7 +25,6 @@
#if _SAMBA_BUILD_ == 3
#undef malloc
#undef realloc
#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count, false)
#endif
/**

View File

@ -38,7 +38,6 @@
#if _SAMBA_BUILD_ == 3
#undef malloc
#define malloc_p(type) malloc(sizeof(type))
#endif
#define XBUFSIZE BUFSIZ

View File

@ -592,6 +592,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
/* Lists, trees, caching, database... */
#include "../lib/util/xfile.h"
#include "../lib/util/memory.h"
#include "intl.h"
#include "../lib/util/dlinklist.h"
#include "tdb.h"