summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils.h b/src/utils.h
index a46946a..c9dfd36 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -41,6 +41,13 @@ int genb_fclose_tmp(FILE *filef, const char *fname);
char *strndup(const char *s, size_t n);
#endif
-#define SLEN(x) (sizeof((x)) - 1)
+#ifndef SLEN
+/* Calculate length of a string constant */
+#define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */
+#endif
+
+#ifndef UNUSED
+#define UNUSED(x) ((void)(x))
+#endif
#endif