aboutsummaryrefslogtreecommitdiff
path: root/src/util_ct.h
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2020-09-14 15:47:30 +0930
committerDavid Timber <mieabby@gmail.com>2020-09-14 15:47:30 +0930
commitf7f7332afafd4f965c5ef1d45cc1c7da9275c6ef (patch)
tree53b8e96d2d070215f0c6ee133cdba58ca93a4138 /src/util_ct.h
parentc4160ed41717260b5941e2729c444b8ec051d5f0 (diff)
* Add "--enable-static" configure option
* Change "PRNE_DEBUG" macro use * Add "PRNE_VERBOSE" * Impl "recon" * Add "inet.h" for Internet Protocol stuff * Changes regarding "PRNE_RND_WELL512_SEEDLEN" * Add prne_own_realloc() for objects with multiple array memebers * Add prne_add_timespec()
Diffstat (limited to 'src/util_ct.h')
-rw-r--r--src/util_ct.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/util_ct.h b/src/util_ct.h
index a199b19..767606a 100644
--- a/src/util_ct.h
+++ b/src/util_ct.h
@@ -2,11 +2,17 @@
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
-#ifdef PRNE_DEBUG
+#if PRNE_DEBUG
#include <stdio.h>
#include <errno.h>
#endif
+#define PRNE_VL_FATAL 0
+#define PRNE_VL_ERR 1
+#define PRNE_VL_INFO 1
+#define PRNE_VL_WARN 2
+#define PRNE_VL_DBG0 3
+
#define PRNE_LIMIT_ENUM(t,x,l) _Static_assert((x) <= (l),"enum overflow: "#t)
#define prne_static_assert(expr, msg) _Static_assert((expr), msg)
@@ -17,7 +23,7 @@
#define prne_salign_next(x, align) (((x) % (align) == 0) ? (x) : ((x) / (align) + 1) * (align))
#define prne_salign_at(x, align) (((x) % (align) == 0) ? (x) : ((x) / (align)) * (align))
-#ifdef PRNE_DEBUG
+#if PRNE_DEBUG
#define prne_dbgpf(...) fprintf(stderr, __VA_ARGS__)
#define prne_dbgperr(str) perror(str)
#define prne_assert(expr) assert(expr)