strm->msg = NULL;
if (strm->zalloc == NULL) {
- strm->zalloc = PREFIX3(calloc);
+ strm->zalloc = PREFIX(zcalloc);
strm->opaque = NULL;
}
if (strm->zfree == NULL)
- strm->zfree = PREFIX3(cfree);
+ strm->zfree = PREFIX(zcfree);
if (level == Z_DEFAULT_COMPRESSION)
level = 6;
return Z_STREAM_ERROR;
strm->msg = NULL; /* in case we return an error */
if (strm->zalloc == NULL) {
- strm->zalloc = PREFIX3(calloc);
+ strm->zalloc = PREFIX(zcalloc);
strm->opaque = NULL;
}
if (strm->zfree == NULL)
- strm->zfree = PREFIX3(cfree);
+ strm->zfree = PREFIX(zcfree);
state = ZALLOC_INFLATE_STATE(strm);
if (state == NULL)
return Z_MEM_ERROR;
return Z_STREAM_ERROR;
strm->msg = NULL; /* in case we return an error */
if (strm->zalloc == NULL) {
- strm->zalloc = PREFIX3(calloc);
+ strm->zalloc = PREFIX(zcalloc);
strm->opaque = NULL;
}
if (strm->zfree == NULL)
- strm->zfree = PREFIX3(cfree);
+ strm->zfree = PREFIX(zcfree);
state = ZALLOC_INFLATE_STATE(strm);
if (state == NULL)
return Z_MEM_ERROR;
# define zng_uncompress2 @ZLIB_SYMBOL_PREFIX@zng_uncompress2
#endif
#define zng_zError @ZLIB_SYMBOL_PREFIX@zng_zError
-#ifndef Z_SOLO
-# define zng_zcalloc @ZLIB_SYMBOL_PREFIX@zng_zcalloc
-# define zng_zcfree @ZLIB_SYMBOL_PREFIX@zng_zcfree
-#endif
+#define zng_zcalloc @ZLIB_SYMBOL_PREFIX@zng_zcalloc
+#define zng_zcfree @ZLIB_SYMBOL_PREFIX@zng_zcfree
#define zng_zlibCompileFlags @ZLIB_SYMBOL_PREFIX@zng_zlibCompileFlags
#define zng_zlibVersion @ZLIB_SYMBOL_PREFIX@zng_zlibVersion
#define zng_zError @ZLIB_SYMBOL_PREFIX@zng_zError
#define zng_alloc_aligned @ZLIB_SYMBOL_PREFIX@zng_alloc_aligned
-#define zng_calloc @ZLIB_SYMBOL_PREFIX@zng_calloc
-#define zng_cfree @ZLIB_SYMBOL_PREFIX@zng_cfree
#define zng_free_aligned @ZLIB_SYMBOL_PREFIX@zng_free_aligned
#define zng_get_crc_table @ZLIB_SYMBOL_PREFIX@zng_get_crc_table
#define zng_inflateSyncPoint @ZLIB_SYMBOL_PREFIX@zng_inflateSyncPoint
/* zlib-ng specific symbols */
#define zng_alloc_aligned @ZLIB_SYMBOL_PREFIX@zng_alloc_aligned
-#define zng_calloc @ZLIB_SYMBOL_PREFIX@zng_calloc
-#define zng_cfree @ZLIB_SYMBOL_PREFIX@zng_cfree
#define zng_free_aligned @ZLIB_SYMBOL_PREFIX@zng_free_aligned
#endif /* ZLIB_NAME_MANGLING_H */
return ERR_MSG(err);
}
-void Z_INTERNAL *PREFIX3(calloc)(void *opaque, unsigned items, unsigned size) {
+void Z_INTERNAL *PREFIX(zcalloc)(void *opaque, unsigned items, unsigned size) {
Z_UNUSED(opaque);
return zng_alloc((size_t)items * (size_t)size);
}
-void Z_INTERNAL PREFIX3(cfree)(void *opaque, void *ptr) {
+void Z_INTERNAL PREFIX(zcfree)(void *opaque, void *ptr) {
Z_UNUSED(opaque);
zng_free(ptr);
}
void *ptr;
/* If no custom calloc function used then call zlib-ng's aligned calloc */
- if (zalloc == PREFIX3(calloc))
- return PREFIX3(calloc)(opaque, items, size);
+ if (zalloc == PREFIX(zcalloc))
+ return PREFIX(zcalloc)(opaque, items, size);
/* Allocate enough memory for proper alignment and to store the original memory pointer */
alloc_size = sizeof(void *) + (items * size) + align;
void Z_INTERNAL PREFIX3(free_aligned)(zng_cfree_func zfree, void *opaque, void *ptr) {
/* If no custom cfree function used then call zlib-ng's aligned cfree */
- if (zfree == PREFIX3(cfree)) {
- PREFIX3(cfree)(opaque, ptr);
+ if (zfree == PREFIX(zcfree)) {
+ PREFIX(zcfree)(opaque, ptr);
return;
}
if (!ptr)
/* memory allocation functions */
-void Z_INTERNAL *PREFIX3(calloc)(void *opaque, unsigned items, unsigned size);
-void Z_INTERNAL PREFIX3(cfree)(void *opaque, void *ptr);
+void Z_INTERNAL *PREFIX(zcalloc)(void *opaque, unsigned items, unsigned size);
+void Z_INTERNAL PREFIX(zcfree)(void *opaque, void *ptr);
typedef void *zng_calloc_func(void *opaque, unsigned items, unsigned size);
typedef void zng_cfree_func(void *opaque, void *ptr);