mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
- define isc_mem_reallocate() in the abstract API for export lib [rt20208]
- define BIND9 in config.h.win32 - fix problems in mem.h caused by the win32 preprocessor failing to expand macros used within macros - silence a win32 compiler warning in hip_55.c
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mem.h,v 1.83 2009/09/01 23:47:44 tbox Exp $ */
|
||||
/* $Id: mem.h,v 1.84 2009/09/02 23:43:54 each Exp $ */
|
||||
|
||||
#ifndef ISC_MEM_H
|
||||
#define ISC_MEM_H 1
|
||||
@@ -152,11 +152,11 @@ LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_debugging;
|
||||
#endif
|
||||
|
||||
|
||||
#define isc_mem_get(c, s) isc__mem_get((c), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_allocate(c, s) isc__mem_allocate((c), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_reallocate(c, p, s) isc__mem_reallocate((c), (p), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_strdup(c, p) isc__mem_strdup((c), (p) _ISC_MEM_FILELINE)
|
||||
#define isc_mempool_get(c) isc__mempool_get((c) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_get(c, s) isc___mem_get((c), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_allocate(c, s) isc___mem_allocate((c), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_reallocate(c, p, s) isc___mem_reallocate((c), (p), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_strdup(c, p) isc___mem_strdup((c), (p) _ISC_MEM_FILELINE)
|
||||
#define isc_mempool_get(c) isc___mempool_get((c) _ISC_MEM_FILELINE)
|
||||
|
||||
/*%
|
||||
* isc_mem_putanddetach() is a convenience function for use where you
|
||||
@@ -197,6 +197,8 @@ typedef struct isc_memmethods {
|
||||
void (*memputanddetach)(isc_mem_t **mctxp, void *ptr,
|
||||
size_t size _ISC_MEM_FLARG);
|
||||
void *(*memallocate)(isc_mem_t *mctx, size_t size _ISC_MEM_FLARG);
|
||||
void *(*memreallocate)(isc_mem_t *mctx, void *ptr,
|
||||
size_t size _ISC_MEM_FLARG);
|
||||
char *(*memstrdup)(isc_mem_t *mctx, const char *s _ISC_MEM_FLARG);
|
||||
void (*memfree)(isc_mem_t *mctx, void *ptr _ISC_MEM_FLARG);
|
||||
void (*setdestroycheck)(isc_mem_t *mctx, isc_boolean_t flag);
|
||||
@@ -256,29 +258,29 @@ struct isc_mempool {
|
||||
#if ISC_MEM_DEBUG
|
||||
#define isc_mem_put(c, p, s) \
|
||||
do { \
|
||||
isc__mem_put((c), (p), (s) _ISC_MEM_FILELINE); \
|
||||
isc___mem_put((c), (p), (s) _ISC_MEM_FILELINE); \
|
||||
(p) = NULL; \
|
||||
} while (0)
|
||||
#define isc_mem_putanddetach(c, p, s) \
|
||||
do { \
|
||||
isc__mem_putanddetach((c), (p), (s) _ISC_MEM_FILELINE); \
|
||||
isc___mem_putanddetach((c), (p), (s) _ISC_MEM_FILELINE); \
|
||||
(p) = NULL; \
|
||||
} while (0)
|
||||
#define isc_mem_free(c, p) \
|
||||
do { \
|
||||
isc__mem_free((c), (p) _ISC_MEM_FILELINE); \
|
||||
isc___mem_free((c), (p) _ISC_MEM_FILELINE); \
|
||||
(p) = NULL; \
|
||||
} while (0)
|
||||
#define isc_mempool_put(c, p) \
|
||||
do { \
|
||||
isc__mempool_put((c), (p) _ISC_MEM_FILELINE); \
|
||||
isc___mempool_put((c), (p) _ISC_MEM_FILELINE); \
|
||||
(p) = NULL; \
|
||||
} while (0)
|
||||
#else
|
||||
#define isc_mem_put(c, p, s) isc__mem_put((c), (p), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_put(c, p, s) isc___mem_put((c), (p), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_putanddetach(c, p, s) \
|
||||
isc__mem_putanddetach((c), (p), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_free(c, p) isc__mem_free((c), (p) _ISC_MEM_FILELINE)
|
||||
isc___mem_putanddetach((c), (p), (s) _ISC_MEM_FILELINE)
|
||||
#define isc_mem_free(c, p) isc___mem_free((c), (p) _ISC_MEM_FILELINE)
|
||||
#define isc_mempool_put(c, p) isc__mempool_put((c), (p) _ISC_MEM_FILELINE)
|
||||
#endif
|
||||
|
||||
@@ -671,23 +673,23 @@ isc_mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit);
|
||||
* Pseudo-private functions for use via macros. Do not call directly.
|
||||
*/
|
||||
void *
|
||||
isc__mem_get(isc_mem_t *, size_t _ISC_MEM_FLARG);
|
||||
isc___mem_get(isc_mem_t *, size_t _ISC_MEM_FLARG);
|
||||
void
|
||||
isc__mem_putanddetach(isc_mem_t **, void *, size_t _ISC_MEM_FLARG);
|
||||
isc___mem_putanddetach(isc_mem_t **, void *, size_t _ISC_MEM_FLARG);
|
||||
void
|
||||
isc__mem_put(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
|
||||
isc___mem_put(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
|
||||
void *
|
||||
isc__mem_allocate(isc_mem_t *, size_t _ISC_MEM_FLARG);
|
||||
isc___mem_allocate(isc_mem_t *, size_t _ISC_MEM_FLARG);
|
||||
void *
|
||||
isc__mem_reallocate(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
|
||||
isc___mem_reallocate(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
|
||||
void
|
||||
isc__mem_free(isc_mem_t *, void * _ISC_MEM_FLARG);
|
||||
isc___mem_free(isc_mem_t *, void * _ISC_MEM_FLARG);
|
||||
char *
|
||||
isc__mem_strdup(isc_mem_t *, const char *_ISC_MEM_FLARG);
|
||||
isc___mem_strdup(isc_mem_t *, const char *_ISC_MEM_FLARG);
|
||||
void *
|
||||
isc__mempool_get(isc_mempool_t * _ISC_MEM_FLARG);
|
||||
isc___mempool_get(isc_mempool_t * _ISC_MEM_FLARG);
|
||||
void
|
||||
isc__mempool_put(isc_mempool_t *, void * _ISC_MEM_FLARG);
|
||||
isc___mempool_put(isc_mempool_t *, void * _ISC_MEM_FLARG);
|
||||
|
||||
#ifdef USE_MEMIMPREGISTER
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: namespace.h,v 1.2 2009/09/01 00:22:28 jinmei Exp $ */
|
||||
/* $Id: namespace.h,v 1.3 2009/09/02 23:43:54 each Exp $ */
|
||||
|
||||
#ifndef ISCAPI_NAMESPACE_H
|
||||
#define ISCAPI_NAMESPACE_H 1
|
||||
@@ -59,6 +59,7 @@
|
||||
#define isc__mem_allocate isc___mem_allocate
|
||||
#define isc__mem_free isc___mem_free
|
||||
#define isc__mem_strdup isc___mem_strdup
|
||||
#define isc__mem_reallocate isc___mem_reallocate
|
||||
#define isc_mem_references isc__mem_references
|
||||
#define isc_mem_setdestroycheck isc__mem_setdestroycheck
|
||||
#define isc_mem_setquota isc__mem_setquota
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.h,v 1.92 2009/09/02 18:32:25 each Exp $ */
|
||||
/* $Id: socket.h,v 1.93 2009/09/02 23:43:54 each Exp $ */
|
||||
|
||||
#ifndef ISC_SOCKET_H
|
||||
#define ISC_SOCKET_H 1
|
||||
@@ -1068,7 +1068,7 @@ void *isc_socket_gettag(isc_socket_t *socket);
|
||||
*/
|
||||
|
||||
void
|
||||
isc_socketmgr_setreserved(isc_socketmgr_t *mgr, isc_uint32_t);
|
||||
isc__socketmgr_setreserved(isc_socketmgr_t *mgr, isc_uint32_t);
|
||||
/*%<
|
||||
* Temporary. For use by named only.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user