summaryrefslogtreecommitdiff
path: root/src/shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared.h')
-rw-r--r--src/shared.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared.h b/src/shared.h
index 3b0a5f7..7034255 100644
--- a/src/shared.h
+++ b/src/shared.h
@@ -29,6 +29,11 @@
29 exit(EXIT_FAILURE); /* Makes gcc happy */\ 29 exit(EXIT_FAILURE); /* Makes gcc happy */\
30} while (0) 30} while (0)
31 31
32// Whether to use `XALLOC` or normal `malloc` functions for acquiring new memory via the `VALLOC()` macro. `> 0`
33// enables XALLOC functionality
34#define ___VXGG___USE_XALLOC_FOR_VALLOC___ 0
35#define VALLOC(nmemb, size) ((___VXGG___USE_XALLOC_FOR_VALLOC___ > 0) ? xmalloc((nmemb) * (size)) : malloc((nmemb) * (size)))
36
32// Error macro that gcc will not complain about 37// Error macro that gcc will not complain about
33#define ERROR(status, errnum, format, ...) do {error((status), (errnum), (format)__VA_ARGS__); exit((status));} while (0) 38#define ERROR(status, errnum, format, ...) do {error((status), (errnum), (format)__VA_ARGS__); exit((status));} while (0)
34 39