summaryrefslogtreecommitdiff
path: root/src/wrapper/verbose.h
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-02-27 13:41:40 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-02-27 13:43:09 +0200
commit61fdc3c23af1c842da8cd66673d5ce0ad5f1c6cf (patch)
tree0bc34c617b5cd3b81d18912399bc154991c5fe64 /src/wrapper/verbose.h
parentb17cf07336199d7e23b8c6a2d6e948e1a50bf07c (diff)
wrapper: Don't wrap NULL functions
Diffstat (limited to 'src/wrapper/verbose.h')
-rw-r--r--src/wrapper/verbose.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/wrapper/verbose.h b/src/wrapper/verbose.h
index 06ee681..00f72a0 100644
--- a/src/wrapper/verbose.h
+++ b/src/wrapper/verbose.h
@@ -1,11 +1,11 @@
#pragma once
-#ifdef VERBOSE_FUNCTIONS
-# include <stdio.h>
-# include <stdarg.h>
-# include <pthread.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <pthread.h>
+
static void
-verbose(const char *fmt, ...)
+verbose_log(const char *fmt, ...)
{
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock(&mutex);
@@ -17,6 +17,9 @@ verbose(const char *fmt, ...)
fputc('\n', stderr);
pthread_mutex_unlock(&mutex);
}
+
+#ifdef VERBOSE_FUNCTIONS
+# define verbose verbose_log
#else
# define verbose(...)
#endif