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:
parent
dc5dc3b469
commit
3189d14152
@ -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
|
||||
|
@ -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
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,6 @@
|
||||
|
||||
#if _SAMBA_BUILD_ == 3
|
||||
#undef malloc
|
||||
#define malloc_p(type) malloc(sizeof(type))
|
||||
#endif
|
||||
|
||||
#define XBUFSIZE BUFSIZ
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user