diff options
Diffstat (limited to 'accel-pppd/memdebug.h')
-rw-r--r-- | accel-pppd/memdebug.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/memdebug.h b/accel-pppd/memdebug.h index 98e87d0..09978f4 100644 --- a/accel-pppd/memdebug.h +++ b/accel-pppd/memdebug.h @@ -10,12 +10,14 @@ #define _free(ptr) md_free(ptr, __FILE__, __LINE__) #define _strdup(str) md_strdup(str, __FILE__, __LINE__) #define _strndup(str, size) md_strndup(str, size, __FILE__, __LINE__) +#define _asprintf(strp, fmt, ...) md_asprintf(__FILE__, __LINE__, strp, fmt, ##__VA_ARGS__) void *md_malloc(size_t size, const char *fname, int line); void *md_realloc(void *ptr, size_t size, const char *fname, int line); void md_free(void *ptr, const char *fname, int line); char* md_strdup(const char *ptr, const char *fname, int line); char* md_strndup(const char *ptr, size_t size, const char *fname, int line); +int md_asprintf(const char *fname, int line, char **strp, const char *fmt, ...) __attribute__((format(gnu_printf, 4, 5))); void md_check(void *ptr); #else @@ -24,7 +26,7 @@ void md_check(void *ptr); #define _free(ptr) free(ptr) #define _strdup(str) strdup(str) #define _strndup(str, size) strndup(str, size) +#define _asprintf(strp, fmt, ...) asprintf(strp, fmt, ##__VA_ARGS__) #endif #endif - |