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 ee3e06b..af6c56e 100644
--- a/src/shared.h
+++ b/src/shared.h
@@ -5,6 +5,11 @@
5 5
6#define STATIC_ARRAY_LEN(arr) (sizeof((arr))/sizeof((arr)[0])) 6#define STATIC_ARRAY_LEN(arr) (sizeof((arr))/sizeof((arr)[0]))
7 7
8#define RETURNWERR(errval, retval) do {\
9 errno = (errval);\
10 return (retval);\
11} while (0)
12
8// Defines how `x___alloc()` functions should exit. `___VXGG___XALLOC_EXIT_ON_ERROR___ > 0` calls `error()`, and thus functions 13// Defines how `x___alloc()` functions should exit. `___VXGG___XALLOC_EXIT_ON_ERROR___ > 0` calls `error()`, and thus functions
9// registered with `atexit()` and `on_exit()`. `___VXGG___XALLOC_EXIT_ON_ERROR___ <= 0` calls `abort()` on error. `x___alloc()` 14// registered with `atexit()` and `on_exit()`. `___VXGG___XALLOC_EXIT_ON_ERROR___ <= 0` calls `abort()` on error. `x___alloc()`
10// type functions will ALWAYS 'abort', doing otherwise defeats the purpose of the function type 15// type functions will ALWAYS 'abort', doing otherwise defeats the purpose of the function type