aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-03 11:42:48 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-03 11:42:48 +0100
commit0c85a2ebf172b6c651ed65f67269b26797054b4d (patch)
treeb8ab2ac4f26de26b7b60db0cfd1f528142726f7f
parentapi: conditionalize quasi expensive prelinkevent (diff)
downloadwintun-0c85a2ebf172b6c651ed65f67269b26797054b4d.tar.xz
wintun-0c85a2ebf172b6c651ed65f67269b26797054b4d.zip
api: move _L macro where it belongs
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--api/entry.h7
-rw-r--r--api/logger.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/api/entry.h b/api/entry.h
index e60dd71..ac37680 100644
--- a/api/entry.h
+++ b/api/entry.h
@@ -7,13 +7,6 @@
#include <Windows.h>
-#ifndef __L
-# define __L(x) L##x
-#endif
-#ifndef _L
-# define _L(x) __L(x)
-#endif
-
/* TODO: Replace with is_defined. MSVC has issues with the linux kernel varadic macro trick for this. */
#if defined(_M_IX86) || defined(_M_ARM)
# define MAYBE_WOW64 1
diff --git a/api/logger.h b/api/logger.h
index 4bf8e04..5e26de3 100644
--- a/api/logger.h
+++ b/api/logger.h
@@ -28,6 +28,8 @@ LoggerLastError(_In_z_ const WCHAR *Prefix)
return Error;
}
+#define __L(x) L##x
+#define _L(x) __L(x)
#define LOG(lvl, msg) (Logger((lvl), _L(__FUNCTION__) L": " msg))
#define LOG_ERROR(msg, err) (LoggerError(_L(__FUNCTION__) L": " msg, (err)))
#define LOG_LAST_ERROR(msg) (LoggerLastError(_L(__FUNCTION__) L": " msg))